NDP and RIPng daemon for a router.
ndpd-router [-r] [-p] [-M] [-O] [-s] [-q] [-g] [-n] [-R] [-S] [-d] [-t] [-v] [-u port] [-D max[min[/life]]] [-P [invlife]/[deplife]] [-T [reachtim]/[retrans]/[hlim]]
The ndpd-router daemon manages the Neighbor Discovery Protocol (NDP) for non-kernel activities, it provides Router Advertisements. It can also exchange routing information using the RIPng protocol.
The /etc/gateway6 file provides options for ndpd-router. This file can be modified while the program is running. The changes are checked before any emission or reception of message, or on reception of the HUP signal. The file contains directives, one by line (with # as comment). All the IPv6 addresses and prefixes in the file must be in numeric form. No symbolic name is allowed. Except for the gateway directive, each line begins with a keyword and is made of options of the form key = argument, separated by spaces.
Interfaces
The ndpd-router daemon knows about IEEE and CTI point to point interfaces. The ndpd-router daemon exchanges packets on all the known interfaces UP with a Link-Local Address. Any change of status of an interface is detected. If an interface goes down or loses its Link-Local address, the NDP and RIPng processing is stopped on this interface. If an interface goes up, the NDP and RIPng processing is started.
In order to send Router Advertisements and/or RIPng packets, both local and remote Link-Local addresses must be configured.
option [option-directive ...] Set different per-interface options.
The possible option-directive are:
mtu [=mtuval] | Advertise a MTU value of mtuval in router advertisements. If there is no mtuval argument, the advertised MTU is the MTU of the interface. If mtuval is 0, suppress the advertisement of MTU. | ||||
ripin = (n|y) | Do not listen (listen) to incoming rip packets. Do not send (send) rip packets. With the -S flag, do not use split horizon. With the -R flag, use split horizon without poisoning reverse. | ||||
rtadv = (n|y|min[/max]) | Do not send (send) router advertisements. With min[/max] option, set the interval between router advertisements. | ||||
flag = [MO] | Sets the stateful mode flags in router advertisements.
| ||||
life = dd | Sets the router life field in router advertisements (value in seconds). | ||||
reach = dd | Set the reachable field in router advertisements (value in seconds). | ||||
retrans = dd | Set the retransmit interval field in router advertisements (value in seconds). | ||||
if = list
interface = list |
If there is no keyword, the option directive is a default option. If there is an interface field, the option parameters apply only to the listed interfaces. list is comma-separated. One can use le* to match all the leX interfaces. The default option must be the first line in the /etc/gateway6 file. | ||||
filter = (in|out) [filter-directive ...] | Define a filter pattern for incoming (filter=in) or outgoing
(filter=out) rip packets. There is one incoming and one outgoing filter
per interface, and one default incoming and one default outgoing filter
for interfaces without explicit filter.
Any received rip information is tested against the input filter of the interface, or, if there is none, against the default input filter. The static interface routes are seen as input information coming from the interface and from a gateway with the link local address of the interface. The routes set by a gateway directive with a gateway keyword are seen as input information coming from the specified interface and gateway. The default route (-g flag) and the routes set by a gateway directive without a gateway keyword are seen as input information coming from gateway :: and no interface (the default input filter applies). Any sent rip information is tested against the output filter of the interface, or, if there is none, against the default output filter. Each filter is a sequence of matching patterns. The patterns are tested in order. Each pattern can test the prefix length, the source gateway (for input filters and that the prefix (padded with zeroes) matches a fixed prefix. If a pattern contains more than one test description, the match is the conjunction of all the tests. The first matching pattern defines the action to perform. If no pattern matches, the default action is accept. The possible actions are accept, reject and truncate/dd. The last action means: if the pattern matches and if prefix length is greater or equal to dd, accept the prefix with new length dd. The accepted prefix is immediately accepted, that is, not checked again against the filters. For example, the following directive inhibits sending host routes on any interface without explicit outgoing filter: filter=out length==128 action=reject The possible filter-directive are:
| ||||
if = list
interface = list |
If there is no interface keyword, the filter directive is a default option. If there is an interface field, the filter pattern is added at the end of the filters of all specified interfaces. The list is comma-separated. You can use le* to specify all the leX interfaces. | ||||
prefix [prefix-directive ...] | Defines the prefixes announced in Router advertisement directives. If
there is no prefix-directive for an interface, the router advertisement
contains the list of prefixes deduced from the address list of the
interface. If there are prefix-directives, the router
advertisement contains
the list of prefixes defined by the different prefix directives (in order).
No prefix is installed in the kernel. If there is one directive of
the form prefix prefix=none, no prefix list is advertised.
The possible prefix-directive are:
| ||||
if = xx
interface = xx |
Specifies the interface on which the directive applies (mandatory).
The gateway directives allow to set routes in rip packets and/or in the kernel. These directive must appear at the end of the /etc/gateway6 file, after the other directives. The syntax is as follows: xxx::/dd metric dd xxx::/dd metric dd gateway zzz ifname The second syntax is used to add the route in the kernel. |
On a site where all addresses are of the form 5f06:2200:c001:0200:xxxx, the following example means that only one route, describing all the site, is exported on all the ctiXX interfaces.
Note: The keyword abbreviations shown are valid.
filt=out if=cti* pref=5f06:2200:c001:0200::/64 len=>=64 act=trunc/64
Setting a default outgoing route:
::/0 metric 2 gateway 5f06:2200:c102:0200::1 cti0
Declare that any cti interface active with rip defines a default route:
filter=in if=cti* act=trunc/0
The following example defines a site with an exterior connection cti0, which aggregates other sites connected through ctiX, and which uses split horizon without poisoned reverse. The order of the lines is important, as all filter descriptions apply to cti0.
option if=cti* ripout=R filter=out if=cti0 prefix=5f06:2200::/24 len=>=24 act=trunc/24 filt=out if=cti* pref=5f06:2200:c001:0200::/64 len=>=64 act=trunc/64 filter=in if=cti0 act=trunc/0 filter=in if=cti* prefix=5f06:2200::/24 len=>=24 act=trunc/64 filter=in if=cti* act=reject
All errors are logged at the daemon.err level, unless the debug option is set. This includes all the syntax errors in the /etc/gateway6 file and configuration mismatches between different routers.
Ndpd-router responds to the following signals:
SIGINT | Dumps its current state to syslog, if syslog is defined. Otherwise, dumped to stdout. |
SIGHUP | The /etc/gateway6 file is read again. |
SIGUSR1 | Verbosity is incremented. |
SIGUSR2 | Verbosity is reset. |
SIGTERM | Resets to a resonable state and stops. |
SIGQUIT | Resets to a resonable state and stops. |
/etc/gateway6 |
The ifconfig command, route command, autoconf6 command, ndpd-host command.