Router Advertisement (radvd) configuration
The radvd configuration is located in /etc/config/radvd.
This configuration is responsible for defining interface settings, prefixes, routes and RDNSS announcements.
Sections
Below is an overview of the section types that may be defined in the radvd configuration.
A minimal radvd configuration for a local network usually consists of at least one interface (lan) and one prefix section.
Each section type may occur multiple times in the config but interface sections are limited to one section per interface.
Interface
Sections of type interface specify global, interface specific options for radvd.
The default configuration defines one section for the lan interface:
config 'interface'
option 'interface' 'lan'
option 'AdvSendAdvert' '1'
option 'AdvManagedFlag' '0'
option 'AdvOtherConfigFlag' '0'
option 'ignore' '1'
lanis the logical interface name this section applies toAdvSendAdvert 1enables router advertisements and solicitationsAdvManagedFlag 0disables the additional stateful administered autoconfiguration protocol (RFC2462)AdvOtherConfigFlag 0disables the autoconfiguration of additional, non address information (RFC2462)ignore 1disables any advertisements on this interface. It must be set to0or removed in order to enable radvd for this interface
Each interface requires a separate interface declaration (i.e. the interface option only accepts a single interface name).
Below is the listing of defined options for interface sections.
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
interface |
string | yes | (none) | Specifies the logical interface name this section belongs to |
ignore |
boolean | no | 0 |
Tells radvd to ignore this interface |
client |
list of IPv6 addresses | no | (none) | If defined, radvd only does unicast communication with the specified hosts instead of using the default multicast address |
IgnoreIfMissing |
boolean | no | 0 |
Don't fail if the related interface does not exist yet |
UnicastOnly |
boolean | no | 0 |
Indicates that the underlying link is not broadcast capable, prevents unsolicited advertisements from being sent |
AdvSendAdvert |
boolean | no | 0 |
Enables router advertisements and solicitations |
AdvManagedFlag |
boolean | no | 0 |
Enables the additional stateful administered autoconfiguration protocol (RFC2462) |
AdvOtherConfigFlag |
boolean | no | 0 |
Enables the autoconfiguration of additional, non address information (RFC2462) |
AdvSourceLLAddress |
boolean | no | 1 |
Includes the link-layer address of the outgoing interface in the RA |
MinRtrAdvInterval |
integer | no | 198 |
The minimum time allowed between sending unsolicited multicast router advertisements from the interface, in seconds |
MaxRtrAdvInterval |
integer | no | 600 |
The maximum time allowed between sending unsolicited multicast router advertisements from the interface, in seconds |
MinDelayBetweenRAs |
integer | no | 3 |
The minimum time allowed between sending multicast router advertisements from the interface, in seconds |
AdvLinkMTU |
integer | no | 0 |
Advertises the given link MTU in the RA if specified. 0 disables MTU advertisements |
AdvReachableTime |
integer | no | 0 |
Advertises assumed reachability time in milliseconds of neighbours in the RA if specified. 0 disables reachability advertisements |
AdvRetransTimer |
integer | no | 0 |
Advertises wait time in milliseconds between Neighbor Solicitation messages in the RA if specified. 0 disables retransmit advertisements |
AdvCurHopLimit |
integer | no | 64 |
Advertises the default Hop Count value for outgoing unicast packets in the RA. 0 disables hopcount advertisements |
AdvDefaultLifetime |
integer | no | 1800 |
Advertises the lifetime of the default router in seconds. 0 indicates that the node is no default router |
AdvDefaultPreference |
string | no | medium |
Advertises the default router preference (low, medium or high) |
AdvHomeAgentFlag |
boolean | no | 0 |
Advertises Mobile IPv6 Home Agent capability (RFC3775) |
AdvHomeAgentInfo |
boolean | no | 0 |
Include Home Agent Information in the RA, depends on AdvHomeAgentFlag being enabled |
AdvMobRtrSupportFlag |
boolean | no | 0 |
Advertises Mobile Router registration capability (NEMO Basic), depends on AdvHomeAgentInfo being enabled |
AdvIntervalOpt |
boolean | no | 0 |
Include Mobile IPv6 Advertisement Interval option to RA |
HomeAgentLifetime |
integer | no | 1800 |
Advertises the time in seconds the router is offering Mobile IPv6 Home Agent services. Depends on AdvHomeAgentInfo being set |
HomeAgentPreference |
integer | no | 0 |
The preference for the Home Agent sending this RA. Depends on AdvHomeAgentInfo being set |
Prefix
The prefix sections declare IPv6 subnets where client addresses are derived from.
In the default config, one example prefix section is included with the following values:
config 'prefix'
option 'interface' 'lan'
option 'AdvOnLink' '1'
option 'AdvAutonomous' '1'
option 'AdvRouterAddr' '0'
option 'ignore' '1'
lanis the logical interface name this section applies toAdvOnLink 1specifies that the announced prefix can be used for on-link determination (RFC4861)AdvAutonomous 1indicates that the announced prefix can be used for autonomous address configuration (RFC4862)AdvRouterAddr 0forced radvd to send the network prefix instead of the sending interface addressignoredisables this prefix declaration
All defined options for the prefix section are listed below.
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
interface |
string | yes | (none) | Specifies the logical interface name this section belongs to |
ignore |
boolean | no | 0 |
Ignore this prefix declaration |
prefix |
IPv6 address | no | (current prefix of interface) | Override the advertised prefix (CIDR notation) |
AdvOnLink |
boolean | no | 1 |
Indicates that this prefix can be used for on-link determination (RFC4861) |
AdvAutonomous |
boolean | no | 1 |
Indicates that this prefix can be used for autonomous address configuration (RFC4862) |
AdvRouterAddr |
boolean | no | 0 |
Indicates that the address of interface is sent instead of network prefix, as is required by Mobile IPv6 |
AdvValidLifetime |
integer/string | no | 86400 |
Advertises the length of time in seconds that the prefix is valid for the purpose of on-link determination. The special value infinity means forever |
AdvPreferredLifetime |
integer/string | no | 14400 |
Advertises the length of time in seconds that addresses generated from the prefix via stateless address autoconfiguration remain preferred. The special value infinity means forever |
Base6to4Interface |
string | no | (none) | Specifies a logical interface name to derive a 6to4 prefix from. The interfaces public IPv4 address is combined with 2002::/3 and the value of the prefix option specified in the same section. If the referenced interface is not avilable at configuration time, radvd will leave it disabled until a SIGHUP signal is received or radvd is restarted |
Route
Sections of type route define arbritary IPv6 CIDR routes to advertise to clients.
A minimal section may look like this:
config 'route'
option 'interface' 'lan'
option 'prefix' '2001:0DB8:1234:5678::/64'
option 'AdvRouteLifetime' 'infinity'
lanis the logical interface name this section applies to2001:0DB8:1234:5678::/64specifies the prefix to advertiseAdvRouteLifetime infinitysets the route lifetime to forever
The defined options for route sections are:
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
interface |
string | yes | (none) | Specifies the logical interface name this section belongs to |
ignore |
boolean | no | 0 |
Ignore this route declaration |
prefix |
IPv6 address | yes | (none) | Specifies the advertised IPv6 route prefix (CIDR notation) |
AdvRouteLifetime |
integer/string | no | 1800 |
Specifies the lifetime associated with the route in seconds. The special value infinity means forever |
AdvRoutePreference |
string | no | medium |
Specifies the preference associated with the default router (low, medium or high) |
RDNSS
Recursive DNS Server (rdnss) sections define DNS server advertisements as specified in RFC5006.
A minimal rdnss section contains the interface and optionally an IPv6 address pointing to a recursive DNS resolver:
config 'rdnss'
option 'interface' 'lan'
list 'addr' '2001:DB8:1234:5678::1'
lanis the logical interface name this section applies to2001:DB8:1234:5678::1specifies the DNS server used for resolving
The options below are defined for rdnss sections:
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
interface |
string | yes | (none) | Specifies the logical interface name this section belongs to |
ignore |
boolean | no | 0 |
Ignore this DNS declaration |
addr |
list of IPv6 addresses | no | (link-local address of interface) | Specifies the advertised IPv6 DNS servers. Note that leaving this unspecified advertises the link-local address of the interface, which generally does not work for DNS clients, causing DNS timeouts and weirdness, so it is best to specify the global-scope IPv6 address of your interface here. |
AdvRDNSSPreference |
integer | no | 8 |
Specifies the preference of the DNS server, compared to other DNS servers advertised and used. 0 to 7 means less important than manually configured nameservers in resolv.conf, while 12 to 15 means more important |
AdvRDNSSOpen |
boolean | no | 0 |
Indicates whether that RDNSS continues to be available to hosts even if they moved to a different subnet |
AdvRDNSSLifetime |
integer/string | no | 1200 |
Specifies the maximum duration how long the RDNSS entries are used for name resolution. A value of 0 means the nameserver should no longer be used. The special value infinity means forever |
DNSSL
DNS search list (dnssl) sections provide domain search suffixes as defined in RFC6106.
A minimal dnssl section contains the corresponding interface and at least one domain suffix:
config 'dnssl'
option 'interface' 'lan'
list 'suffix' 'company.local'
list 'suffix' 'local'
lanis the logical interface name this section applies tocompany.localandlocalspecify the advertised domain suffixes
The options below are defined for dnssl sections:
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
interface |
string | yes | (none) | Specifies the logical interface name this section belongs to |
ignore |
boolean | no | 0 |
Ignore this search list declaration |
suffix |
list of domain suffixes | yes | (none) | Specifies the advertised domain suffixes |
AdvDNSSLLifetime |
integer/string | no | 1200 |
Specifies the maximum duration how long the DNSSL entries are used for name resolution. A value of 0 means the suffix should no longer be used. The special value infinity means forever |
Bypassing UCI
It is possible to use a traditional radvd.conf file and bypass the autogeneration from UCI values by defining the following section in /etc/config/radvd:
config 'radvd'
option 'config_file' '/etc/radvd.conf'
Examples
Simple example: advertising on two internal interfaces, wired and wifi, using the default configuration.
config interface
option interface wired
config prefix
option interface wired
config rdnss
option interface wired
config interface
option interface wifi
config prefix
option interface wifi
config rdnss
option interface wifi
doc/uci/radvd.txt · Last modified: 2012/07/05 00:16 by kenyon
