IPv6 Router Lifetime in Router Advertisements

book

Article ID: 167985

calendar_today

Updated On:

Products

XOS

Issue/Introduction

This article discusses Router Lifetime value advertised in IPv6 Router Advertisement messages.
This article discusses Router Lifetime value advertised in IPv6 Router Advertisement messages.

Resolution

When IPv6 hosts use IPv6 Stateless Address Autoconfiguration, they rely on Router Advertisement (RA) messages to install a default IPv6 route. It is the only mechanism to configure the default router's address automatically in IPv6. DHCPv6 cannot carry this information. RA messages are part of the Neighbor Discovery mechanism in IPv6.

An IPv6 router sends periodic as well as solicited RA messages out its advertising interfaces to the all-nodes multicast address. RA messages inform about router's ability to forward IPv6 packets and contain other parameters required for Stateless Address Autoconfiguration.

RA message includes a value called Router Lifetime (in seconds). This value applies to the router's usefulness as a default router. It does not apply to other information contained in the RA message. IPv6 hosts receiving the RA message should install the default route with an expiry time set to the Lifetime. A Lifetime of 0 indicates that the router is not a default router anymore and associated default route should be discarded from host's routing table. 

 
An example of this behavior can be observed on a Linux-based router with the radvd service (Router Advertisement Daemon) and by sniffing IPv6 traffic. When the daemon is stopped, it sends 'router lifetime 0s' to indicate that the router is not available anymore as a default router:
 
[[email protected] admin]# service radvd stop
Stopping radvd: radvd.
[[email protected] admin]# 
 
[[email protected] admin]# tcpdump -nvvi eth0 ip6
12:07:13.970339 IP6 (hlim 255, next-header ICMPv6 (58) payload length: 56) fe80::5054:abff:fe14:122 > ff02::1: [icmp6 sum ok] ICMP6, router advertisement, length 56
hop limit 64, Flags [none], pref medium, router lifetime 0s, reachable time 0s, retrans time 0s
 prefix info option (3), length 32 (4): 2001:15c0:6753:14::/64, Flags [onlink, auto], valid time 86400s, pref. time 14400s
   0x0000:  40c0 0001 5180 0000 3840 0000 0000 2001
   0x0010:  15c0 6753 0014 0000 0000 0000 0000
 source link-address option (1), length 8 (1): 52:54:ab:14:01:22
   0x0000:  5254 ab14 0122
 

When the service is started, it sends 'router lifetime 1800s' to indicate to hosts that it is available as a default router again.
 
[[email protected] admin]# service radvd start
Starting radvd: radvd.
[[email protected] admin]# 
 
[[email protected] admin]# tcpdump -nvvi eth0 ip6
12:07:14.052182 IP6 (hlim 255, next-header ICMPv6 (58) payload length: 56) fe80::5054:abff:fe14:122 > ff02::1: [icmp6 sum ok] ICMP6, router advertisement, length 56
hop limit 64, Flags [none], pref medium, router lifetime 1800s, reachable time 0s, retrans time 0s
 prefix info option (3), length 32 (4): 2001:15c0:6753:14::/64, Flags [onlink, auto], valid time 86400s, pref. time 14400s
   0x0000:  40c0 0001 5180 0000 3840 0000 0000 2001
   0x0010:  15c0 6753 0014 0000 0000 0000 0000
 source link-address option (1), length 8 (1): 52:54:ab:14:01:22
   0x0000:  5254 ab14 0122
 
 
 

Workaround

N/A