The Router Discovery Protocol (RDP) is a standard
protocol that is used to inform hosts of the presence of routers
they can send packets to. RDP is intended to be used in place of
hosts wiretapping routing protocols (for example,
RIP). It is used instead of, or in addition to, having statically configured
default routes in hosts.
RDP consists of two portions: the server portion
runs on routers, and the client portion runs
on hosts. Note that gated treats the portions as separate protocols, and
so only one of them can be enabled at a time. Each of the portions
is described below.
Type man 4 gated.conf at the HP-UX prompt for a description of the statements
used for RDP configuration.
The RDP Server |
 |
The RDP server runs
on routers, and it is the portion that announces the routers' existence
to hosts. This is done by periodically multicasting or broadcasting
a Router Advertisement over
each physical interface that has the RDP server enabled on it. Each
Router Advertisement contains a list of all addresses on a physical
interface and their preference for being used as a default router.
You can configure the length of time (the "lifetime")
you want addresses to remain on the list.
At first, Router Advertisements occur every few seconds, and
then they begin occurring every few minutes. You can configure the
minimum and maximum intervals for Router Advertisements to occur.
Also, a host can send a Router Solicitation,
requesting an advertisement, and the router responds with a unicast
Router Advertisement unless a multicast or broadcast advertisement
is due to occur.
On hosts that support IP multicasting, Router Advertisements
are sent, by default, to the all-hosts mulicast address 224.0.0.1. If desired, you can specify in the configuration
that broadcasting is to be used for sending Router Advertisements.
This might be needed because a particular host does not support
IP multicasting, or because one or more hosts on an attached network
do not support IP multicasting. If Router Advertisements are being
sent to the all-hosts multicast address, or an interface is configured
for the limited-broadcast address 255.255.255.255, the advertisements contain all IP addresses configured
on the physical interface. If advertisements are being sent to a
net or subnet broadcast, only that net's or subnet's
address is included in the advertisement.
An example of the routerdiscovery server statement is shown below. In the example, the
server is being enabled on physical interfaces lan0 and lan2, and
the IP addresses 193.2.1.17, 193.2.1.33, and 193.2.1.46 are to be
included in all Router Advertisements that are sent out. Also, the addresses
have a preference of 50.
routerdiscovery server yes { interface lan1 lan2 maxadvinterval 5 ; address 193.2.1.17 193.2.1.33 193.2.1.46 broadcast preference 50 ; } ;
|
The RDP Client |
 |
The RDP client runs
on hosts, listening for Router Advertisements over the all-hosts
multicast address 224.0.0.1 (if it supports IP multicasting) or on the physical
interface's broadcast address (if the host does not support
multicasting). When a host starts up or has been reconfigured, it
might send some Router Solicitations, requesting advertisements.
When it sends the solicitations, it sends them to the all-routers
multicast address 224.0.0.2 or the interface's broadcast address
(if multicasting is not supported).
When the RDP client receives a Router Advertisement, the host
installs a default route to each of the addresses listed in the
advertisement. If the advertisement has a preference of ineligible (meaning the addresses in the advertisement are
not eligible to be the default route for any hosts), or if the addresses
are not on an attached physical interface, the route is marked unusable
but is retained. If the preference is a usable one, that route will
be among the routes considered. The route with the highest preference
is the route that will be used. If more than one route with the
same preference is received, the one with the lowest IP address is
used. Note that the default routes are not exportable to other protocols.
If an RDP client receives a Router Advertisement with a zero
lifetime (meaning that the addresses in the advertisement are no
longer valid), the host deletes all routes with next-hop addresses
that it learned from that router. The host also deletes any routes
it learned from ICMP redirects pointing to the invalid addresses. Also, if a
Router Advertisement is not received before the addresses it lists
become invalid (that is, before its lifetime expires), the routes
learned from that router are deleted by the host.
An example of the routerdiscovery client statement is shown below. In the example, the
client is being enabled on physical interface lan0, and the default
routes are to be given a preference of 50.
routerdiscovery client yes { preference 50 ; interface lan0 broadcast ; } ;
|
A simple example of an RDP server and two RDP clients is shown
in the picture below.