.\" As its sole author, I explicitly place this file in the public domain. .\" It may be used by anyone in any way for any purpose, though I would .\" appreciate credit where it's due. .\" der Mouse, mouse@rodents.montreal.qc.ca, 2000-01-26 .Dd January 26, 2000 .Dt NC 1 .Os NetBSD 1.4J .Sh NAME .Nm ripadv .Nd RIP route advertiser .Sh SYNOPSIS .Nm .Op options ... .Ar src-addr Ns Op /src-port .Ar target-addr Ns Op /target-port .Ar route-spec .Oo .Ar route-spec ... .Oc .Sh DESCRIPTION .Nm is a small tool designed for advertising routes with RIP (see RFCs 1058 and 2453). The available .Ar options are as follows. If conflicting options are given, such as .Fl 1 and .Fl 2 , the last one specified wins. .Bl -tag -width indent .It Fl 1 Use RIPv1; give an error if any route-specs would require RIPv2. .It Fl 2 Use RIPv2, even if all routes could be represented in RIPv1. .It Fl 0 Restore the default: use RIPv1 if all routes can be represented in RIPv1, RIPv2 otherwise. .It Fl a Turn on .Dv SO_REUSEADDR on the sending socket (see .Xr setsockopt 2 ) . .It Fl p Turn on .Dv SO_REUSEPORT on the sending socket (see .Xr setsockopt 2 ) . .It Fl b Turn on .Dv SO_BROADCAST on the sending socket (see .Xr setsockopt 2 ) . .El .Pp Packets are sent from the specified .Ar src-addr , port .Ar src-port if specified (otherwise a random port assigned by the kernel). They are sent to .Ar target-addr , port .Ar target-port if specified (otherwise the default RIP port, port 520). Further arguments specify routes to be advertised. .Pp Each .Ar route-spec consists of a destination, followed by additional specifiers describing the other information necessary. The destination argument consists of a dotted-quad IP address, optionally concatenated with a slash and either a small-integer CIDR netmask width or a netmask (itself in dotted-quad form). Each additional specifier consists of a keyword followed by a value. Optionally, the destination argument may be preceded by the keyword .Sq to . .Pp The additional specifier keywords available are: .Bl -tag -width indent .It netmask Specifies the netmask. (Note that a netmask can instead be specified as part of the destination argument.) The next argument must be a dotted quad or a small-integer CIDR-style width prefixed with a slash. If this is omitted, 0.0.0.0 is used, which means .Sq no explicit netmask . .It mask Same as .Sq netmask . .It via Specifies the next-hop gateway. The next argument must be a dotted quad. If this is omitted, 0.0.0.0 is used, which tells RIP listeners to use the address the packet came from. .It metric Specifies the route's metric. The next argument must be a small integer (in the range 0 through 16). If this is omitted, the default is 1. .It tag Specifies the RIPv2 route tag. The next argument must be a small integer (in the range 0 through 65535). If this is omitted, the default is 0. (If you don't know what route tags are, you can almost certainly just skip this specifier.) .El .Pp Specifying any of the keywords except .Sq metric , or specifying a netmask on the destination address, is incompatible with RIPv1 operation. .Pp .Ar target-address will normally be the broadcast address for some directly-connected network, but this does not have to be the case. .Pp The .Ar src-addr and .Ar target-addr arguments must be dotted-quad addresses; they cannot be names. .Pp The entire argument list is always sent as a single packet. If you want to advertise so many routes that you need multiple packets, run multiple instances of .Nm ripadv . .Pp Packets are emitted every 30 seconds. .Sh EXAMPLES .D1 ripadv 10.4.5.81/520 10.4.5.255 10.5.0.0/16 via 10.4.5.1 metric 3 .Sh BUGS There is no way to specify authentication. .Sh AUTHOR der Mouse, .Aq mouse@rodents.montreal.qc.ca .