Difference between revisions of "IPv6 Router Advertisements"

From VyOS Wiki
Jump to: navigation, search
 
(7 intermediate revisions by 3 users not shown)
Line 1: Line 1:
 +
{{Migrated | url = https://vyos.readthedocs.io/en/latest/interfaces/addresses.html#router-advertisements}}
 
= Router Advertisements =
 
= Router Advertisements =
Router advertisements are described in https://tools.ietf.org/html/rfc4861#section-4.2 .<br>
+
Router advertisements are described in https://tools.ietf.org/html/rfc4861#section-4.2 .
 +
They are part of what is known as SLAAC (Stateless Address Autoconfiguration).
 +
<br>
  
 
Supported interface types:
 
Supported interface types:
Line 27: Line 30:
 
|<b>RFC Field</b>
 
|<b>RFC Field</b>
 
|<b>VyOS Config Option</b>
 
|<b>VyOS Config Option</b>
 +
|<b>Description</b>
 
|-
 
|-
 
|Cur Hop Limit
 
|Cur Hop Limit
 
|cur-hop-limit
 
|cur-hop-limit
 +
|Hop Count field of the outgoing RA packets
 
|-
 
|-
 
|"Managed address configuration" flag
 
|"Managed address configuration" flag
 
|managed-flag
 
|managed-flag
 +
|Tell hosts to use the administered stateful protocol  (i.e. DHCP) for autoconfiguration
 
|-
 
|-
 
|"Other configuration" flag
 
|"Other configuration" flag
 
|other-config-flag
 
|other-config-flag
 +
|Tell hosts to use the administered (stateful) protocol (i.e. DHCP) for autoconfiguration of other (non-address) information
 
|-
 
|-
 
|Router Lifetime
 
|Router Lifetime
 
|default-lifetime
 
|default-lifetime
 +
|
 
|-
 
|-
 
|Reachable Time
 
|Reachable Time
 
|reachable-time
 
|reachable-time
 +
|
 
|-
 
|-
 
|Retrans Timer
 
|Retrans Timer
 
|retrans-timer
 
|retrans-timer
 +
|
 
|-
 
|-
 
|MTU
 
|MTU
 
|link-mtu
 
|link-mtu
 +
|
 
|-
 
|-
 
|Prefix Information
 
|Prefix Information
 
|See below
 
|See below
 +
|
 
|}
 
|}
  
Line 93: Line 105:
 
* min-internal/max-interval - min and max interval between unsolicited multicast RAs
 
* min-internal/max-interval - min and max interval between unsolicited multicast RAs
 
* name-server: advertise DNS server per https://tools.ietf.org/html/rfc6106
 
* name-server: advertise DNS server per https://tools.ietf.org/html/rfc6106
 +
 +
= Receiving Router Advertisements =
 +
 +
To receive and accept RAs on an interface, you need to enable it via sysctl with the following command (as root):
 +
 +
<pre>
 +
sysctl -w net.ipv6.conf.eth0.accept_ra=2
 +
</pre>
 +
 +
The change is not reboot-persistent, so it either needs to be redone every time or added to rc.d.
 +
 +
[[Category:User_documentation]]
 +
[[Category:IPv6]]

Latest revision as of 20:45, 1 July 2019

Warning sign.png This page is migrated to Readthedocs .
Information found on this page is migrated to readthedocs and information found here could be outdated or misleading. https://vyos.readthedocs.io/en/latest/interfaces/addresses.html#router-advertisements
For a complete status of all migrations, see Project:Migration

Router Advertisements

Router advertisements are described in https://tools.ietf.org/html/rfc4861#section-4.2 . They are part of what is known as SLAAC (Stateless Address Autoconfiguration).

Supported interface types:

  • bonding
  • bridge
  • ethernet
  • l2tpv3
  • openvpn
  • psuedo-ethernet
  • tunnel
  • vxlan
  • wireless
  • wirelessmodem

To enable or disable, use

set interfaces <interface> ipv6 router-advert send-advert <true or false>

To set the options described in "Router Advertisement Message Format", start from

set interfaces <interface> ipv6 router-advert

With sub-options:

RFC Field VyOS Config Option Description
Cur Hop Limit cur-hop-limit Hop Count field of the outgoing RA packets
"Managed address configuration" flag managed-flag Tell hosts to use the administered stateful protocol (i.e. DHCP) for autoconfiguration
"Other configuration" flag other-config-flag Tell hosts to use the administered (stateful) protocol (i.e. DHCP) for autoconfiguration of other (non-address) information
Router Lifetime default-lifetime
Reachable Time reachable-time
Retrans Timer retrans-timer
MTU link-mtu
Prefix Information See below

Prefix Information

Prefix information is described in https://tools.ietf.org/html/rfc4861#section-4.6.2

To set the fields described, start from

set interfaces <interface> ipv6 router-advert prefix <h:h:h:h:h:h:h:h/x>

With sub-options:

RFC Field VyOS Config Option
Prefix Length 'x' in <h:h:h:h:h:h:h:h/x>
on-link flag on-link-flag
autonomous address-configuration flag autonomous-flag
Valid Lifetime valid-lifetime
Preferred Lifetime preferred-lifetime


Miscellaneous Options

Starting from

set interfaces <interface> ipv6 router-advert

There are the following additional options:

Receiving Router Advertisements

To receive and accept RAs on an interface, you need to enable it via sysctl with the following command (as root):

sysctl -w net.ipv6.conf.eth0.accept_ra=2

The change is not reboot-persistent, so it either needs to be redone every time or added to rc.d.