<?xml version="1.0"?>
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN"
  "http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd">
  
<!-- conversion to man: 
  xsltproc  /usr/apps/docbook/xsl/1.67.2/manpages/docbook.xsl rdisc.8.dbk
-->
<refentry id="rdisc">
    <refentryinfo>
        <productname>Linux</productname>
        <title>System Administration</title>
        <date>27 September 2002</date>
    </refentryinfo>

	<refmeta>
		<refentrytitle>rdisc</refentrytitle>
		<manvolnum>8</manvolnum>
	</refmeta>
	<refnamediv>
		<refname>rdisc</refname>
		<refpurpose>network router discovery daemon</refpurpose>
	</refnamediv>
	<refsynopsisdiv>
		<cmdsynopsis>
			<command>rdisc</command>
			<group>
				<arg choice="plain"><option>-a</option></arg>
				<arg choice="plain"><option>-b</option></arg>
				<arg choice="plain"><option>-d</option></arg>
				<arg choice="plain"><option>-f</option></arg>
				<arg choice="plain"><option>-s</option></arg>
				<arg choice="plain"><option>-t</option></arg>
				<arg choice="plain"><option>-v</option></arg>
				<arg choice="plain"><option>-V</option></arg>
			</group>
			<arg choice="opt"><replaceable>send_address</replaceable></arg>
			<arg choice="opt"><replaceable>receive_address</replaceable>
			</arg>
		</cmdsynopsis>
	</refsynopsisdiv>
	
	<refsection>
		
		<title>DESCRIPTION</title>
		
<para><command>rdisc</command> implements client side of the ICMP router 
discover protocol. <command>rdisc</command> is invoked at boot time to 
populate the network routing tables with default routes.</para>

<para><command>rdisc</command> listens on the ALL_HOSTS (224.0.0.1) 
multicast address (or <replaceable>receive_address</replaceable> provided 
it is given) for ROUTER_ADVERTISE messages from routers. The received
messages are handled by first ignoring those listed router
addresses with which the host does not share a network.
Among the remaining addresses the ones with the highest
preference are selected as default routers and a default
route is entered in the kernel routing table for each one of them.</para>

<para>Optionally, <command>rdisc</command> can avoid waiting for routers to
announce themselves by sending out a few ROUTER_SOLICITATION
messages to the ALL_ROUTERS (224.0.0.2) multicast address 
(or <replaceable>send_address</replaceable> provided it is given) when it is 
started.</para>
		
<para>A timer is associated with each router address and the address
will no longer be considered for inclusion in the the routing tables
if the timer expires before a new <emphasis>advertise</emphasis> message is
received from the router. The address will also be excluded from
consideration if the host receives an <emphasis>advertise</emphasis>
message with the preference being maximally negative.</para>
		
<para>Server side of router discovery protocol is supported by Cisco
IOS and by any more or less complete UNIX routing daemon, 
e.g. <command>gated</command>.</para>
	</refsection>
	
	<refsection>
		
		<title>OPTIONS</title>
		
		<variablelist>
			<varlistentry>
				<term>
					<option>-a</option>
				</term>
				<listitem>
<para>Accept all routers independently of the preference
they have in their <emphasis>advertise</emphasis> messages.
Normally <command>rdisc</command> only accepts (and enters in
the kernel routing tables) the router or routers
with the highest preference.</para>
				</listitem>
			</varlistentry>
			<varlistentry>
				<term>
					<option>-b</option>
				</term>
				<listitem>
<para>Opposite to <option>-a</option>, i.e. install only router
with the best preference value. It is default behaviour.</para>
				</listitem>
			</varlistentry>
			<varlistentry>
				<term>
					<option>-d</option>
				</term>
				<listitem>
<para>Send debugging messages to syslog.</para>
				</listitem>
			</varlistentry>
			<varlistentry>
				<term>
					<option>-f</option>
				</term>
				<listitem>
<para>Run <command>rdisc</command> forever even if no routers are
found. Normally <command>rdisc</command> gives up if it has
not received any <emphasis>advertise</emphasis> message
after after soliciting three times, in which
case it exits with a non-zero exit code. 
If <option>-f</option> is not specified in the
first form then<option>-s</option> must be specified.</para>
				</listitem>
			</varlistentry>
			<varlistentry>
				<term>
					<option>-s</option>
				</term>
				<listitem>
<para>Send three <emphasis>solicitation</emphasis> messages initially
to quickly discover the routers when the system is
booted. When <option>-s</option> is specified
<command>rdisc</command> exits with a non-zero exit
code if it can not find any routers. This
can be overridden with the <option>-f</option> option.</para>
				</listitem>
			</varlistentry>
			<varlistentry>
				<term>
					<option>-t</option>
				</term>
				<listitem>
<para> Test mode. Do not go to background.</para>
				</listitem>
			</varlistentry>
			<varlistentry>
				<term>
					<option>-v</option>
				</term>
				<listitem>
<para>Be verbose i.e. send lots of debugging messages to syslog.</para>
				</listitem>
			</varlistentry>
			<varlistentry>
				<term>
					<option>-V</option>
				</term>
				<listitem>
<para>Print version and exit.</para>
				</listitem>
			</varlistentry>
		</variablelist>
	</refsection>
	
	<refsection>
		
		<title>HISTORY</title>
		
<para>This program was developed by Sun Microsystems (see copyright notice in 
source file). It was ported to Linux by <address>
<firstname>Alexey</firstname> <surname>Kuznetsov</surname><email
>kuznet@ms2.inr.ac.ru</email></address>.</para>
	</refsection>
	
	<refsection>
		
		<title>SEE ALSO</title>
		
<para><citerefentry>
	<refentrytitle>icmp</refentrytitle>
	<manvolnum>7</manvolnum>
</citerefentry>, <citerefentry>
	<refentrytitle>inet</refentrytitle>
	<manvolnum>7</manvolnum>
</citerefentry>, <citerefentry>
	<refentrytitle>ping</refentrytitle>
	<manvolnum>8</manvolnum>
</citerefentry>.</para>
	</refsection>
	
	<refsection>
		
		<title>REFERENCES</title>
		
<para>Deering, S.E.,ed "ICMP Router Discovery Messages", <ulink
url="ftp://ftp.isi.edu/in-notes/rfc1256.txt"
>RFC1256</ulink>, Network Information Center, SRI International, Menlo Park, 
Calif., September 1991.</para>
	</refsection>
	
	<refsection>
		
		<title>SECURITY</title>
		
<para><command>rdisc</command> requires <constant
>CAP_NET_RAWIO</constant> to listen and send ICMP messages and 
capability <constant>CAP_NET_ADMIN</constant> to update routing tables.</para>
	</refsection>
	
	<refsection>
		
		<title>AVAILABILITY</title>
		
<para><command>rdisc</command> is part 
of <application>iputils</application> package and the latest
versions are available in source form for anonymous via <ulink
url="ftp://ftp.inr.ac.ru/ip-routing/iputils-current.tar.gz"/>.</para>
	</refsection>
</refentry>
