[ Previous | Next | Contents | Glossary | Home | Search ]
AIX Version 4.3 Commands Reference, Volume 4

ndpd-router Daemon

Purpose

NDP and RIPng daemon for a router.

Syntax

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]]

Description

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.

Note: The ndpd-router daemon should be merged into /usr/local/sbin/gated.

Interfaces

The ndpd-router daemon knows about IEEE, PPP 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.

The IEEE interfaces are configured using the autoconf6 command. The PPP interfaces are configured using the pppd daemon. The token negotiation defines the Link-Local addresses. The CIT interfaces are configured using the cticonfig utility. In order to send Router Advertisements and/or RIPng packets, it must have local and distant Link-Local addresses.

Note: For all the up point to point interfaces, ndpd-router sets a local route via lo0 for the local address.

Flags

-D max | max[/min[/life]] Sends Unsolicited Router Advertisements at intervals from min to max seconds. Default max value is 600 seconds, valid range is 4 to 1800 seconds. Default min equals to max / 3, valid range is from 1 to 0.75 * max. The router lifetime is set with life, default value is 10 * max. Valid range is 0 to 65535 seconds.
-T [reachtim]/[retrans]/[hlim] Sets the BaseReachableTime field to reachim seconds, if reachim is not zero. If retrans is not zero, sets the RetransTime field to retrans seconds. If hlim is not zero, sets the hop limit field in Router Advertisements to hlim.
-M Sets the M flag (stateful configuration) in advertisements.
-O Set the O flag (other stateful information) in advertisements
-p Do not offer prefixes (learned from interface configuration).
-P Sets the invalid life value and the deprecated life value for announced prefixes (in seconds). The default value is 0xffffffff (infinite).
-r DO NOT offer to be the default router in Router Advertisements.
-s Enables the RIPng protocol (the default is: RIPng disabled).
-q Enables the RIPng protocol, but does not send RIPng packets.
-g Broadcast a default route in RIPng.
-n Do not install routes received by RIPng.
-u port Uses UDP port port for RIPng. The default is 521.
-R Uses split horizon without corrupting reverse for RIPng.
-S Do not use any split horizon for RIPng.
-d Enables debugging (exceptional conditions and dump).
-v Logs all interesting events (daemon.info and console).
-t Adds timestamps in logged messages.

Available directives

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 corrupting 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.
M
use stateful configuration
O
use stateful configuration, but not for addresses
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:

prefix = xxx::/dd
The pattern matches only if xxx::/dd is a prefix of the prefix in the rip packet.
gateway = xxx
The pattern matches only if the rip message comes from source address xxx, only in incoming filters.
length = (=|>=|<=|<|>)dd
The pattern match only if the prefix length in the rip message is equal (greater, less, ..) to dd.
action = (accept|reject|truncate/dd)
Specify the action to perform if the pattern matches: accept the message, reject the message, accept but truncate the prefix to dd bits.
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:

prefix = xxx::/dd
The advertised prefix.
flag = [LA]
Set the L and/or A flag for the prefix (the default is LA).
deprec = dd
Set the deprecated time for the prefix (value in seconds).
valid = dd
Set the validity time for the prefix (value in seconds).

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.

/etc/gateway6 Examples

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

Diagnostics

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.

Signals

When ndpd-router receives a signal it dumps its current state. On the file /etc/gateway6 is read again. On verbosity is incremented and on it is reset. ndpd-router resets to a reasonable state and stops when it receives or signals.

Files

/etc/gateway6  

Related Information

The ifconfig command, route command, autoconf6 command, ndpd-host command.


[ Previous | Next | Contents | Glossary | Home | Search ]