LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 06-15-2015, 05:40 PM   #1
joemon83
Member
 
Registered: Jan 2009
Posts: 71

Rep: Reputation: 11
ip command to get ipv6 gateway


Hi,

Can someone tell how the ip command is able to fetch the ipv6 gateway details.

[root@CuCM-210 ~]# cat /etc/sysconfig/network-scripts/ifcfg-eth0
DEVICE=eth0
TYPE=Ethernet
UUID=9e01d4c0-04b7-4d1c-aa31-3bf13f6b9576
ONBOOT=yes
NM_CONTROLLED=yes
BOOTPROTO=none
IPADDR=10.126.155.210
NETMASK=255.255.255.0
GATEWAY=10.126.155.1
IPV6INIT=yes
IPV6ADDR=2001:155:155:155:250:56ff:fe8c:5a92/64
IPV6_AUTOCONF=no
DHCPV6C=no

IPV6_AUTOCONF & DHCPV6C is set to no, and gateway is not statically set, but still ip -6 route command is able to fetch the ipv6 gateway details, not sure from where.

[root@linux ~]# ip -6 route | grep ^default
default via fe80::224:98ff:fe15:8800 dev eth0 proto kernel metric 1024 expires 1779sec mtu 1500 advmss 1440 hoplimit 64

Can some one explain this.

Thanks,
Joe
 
Old 06-15-2015, 08:44 PM   #2
Ser Olmy
Senior Member
 
Registered: Jan 2012
Distribution: Slackware
Posts: 3,340

Rep: Reputation: Disabled
IPv6 works very differently from IPv4 when it comes to gateways.

With IPv4, you need to specify a gateway manually or via a DHCP option. With IPv6, the IP stack locates gateways automatically by using ICMP-v6 Neighbor Discovery packets. Specifically, a client will listen for Router Advertisements, which may be sent gratuitously by a router or as a response to a Router Solicitation package.

This mechanism works independently of IPv6 Stateless Address Autoconfiguration (SLAAC) and DHCPv6. It is possible to turn it off with /proc/sys/net/ipv6/conf/<interface>/accept_ra_defrtr and/or /proc/sys/net/ipv6/conf/<interface>/accept_ra. The kernel documentation will tell you which values are valid for those two settings, and what they do.
 
1 members found this post helpful.
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Look similar command (netsh interface ipv6 show prefixpolicies) at Linux nnnnnng Linux - Networking 3 02-02-2013 07:53 PM
[SOLVED] arping command for IPV6 shruthi iyer Linux - Networking 1 11-30-2011 06:37 AM
How to set the default gateway if I configured IPv4 and IPv6 address? leericlapton Linux - Networking 1 10-26-2011 07:57 AM
ipv6 address which add by ifconfig command lost after eth down anqing Linux - Kernel 0 02-21-2011 07:53 AM
problem creating default ipv6 gateway on fc6 gonphsn1 Linux - Networking 1 07-30-2007 07:33 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 03:53 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration