Configuring Linux machine as IPv6 router
From Notes_Wiki
<yambe:breadcrumb self="Configuring Linux machine as IPv6 router">IPv6|IPv6</yambe:breadcrumb>
Configuring Linux machine as IPv6 router
To configure Linux machine as IPv6 router:
- Ensure that package 'radvd' is installed or install it using 'yum -y install radvd'.
- Edit '/etc/radvd.conf' and advertize prefixes for each interface of this router machine. Example configuration is:
- interface eth0
- {
- AdvSendAdvert on;
- prefix fd57:1d29:4f94:1::/64 {};
- prefix fd57:1d29:4f94:a::/64 {};
- };
- interface eth1
- {
- AdvSendAdvert on;
- prefix fd57:1d29:4f94:2::/64 {};
- prefix fd57:1d29:4f94:b::/64 {};
- };
- Enable 'radvd' service on startup using
- chkconfig radvd on
- Edit '/etc/sysconfig/network' so that it has values
- NETWORKING_IPV6=yes
- IPV6FORWARDING=yes
- IPV6_ROUTER=yes
- Reboot the machine
Note that:
- This automatically sets 'sysctl net.ipv6.conf.all.accept_ra' to 0 so that all advertisements from other routers get ignored. This is necessary so that router does not learns prefixes advertised by other routers on same link.
Verifying node is listening on anycast addresses
All IPv6 routers should listen on anycast address for the prefixes they advertize. Hence after configuring a Linux machine as IPv6 router we can use command 'netstat -rnv -A inet6' and verify whether node is listening on anycast interfaces or not.
Anycast address would be have same prefix as node is advertising with host identifier as all zeros. On Linux node will listen on anycast address with prefix /128.
<yambe:breadcrumb self="Configuring Linux machine as IPv6 router">IPv6|IPv6</yambe:breadcrumb>