2 @c This is part of the Quagga Manual.
3 @c @value{COPYRIGHT_STR}
4 @c See file quagga.texi for copying conditions.
8 RIP -- Routing Information Protocol is widely deployed interior gateway
9 protocol. RIP was developed in the 1970s at Xerox Labs as part of the
10 XNS routing protocol. RIP is a @dfn{distance-vector} protocol and is
11 based on the @dfn{Bellman-Ford} algorithms. As a distance-vector
12 protocol, RIP router send updates to its neighbors periodically, thus
13 allowing the convergence to a known topology. In each update, the
14 distance to any given network will be broadcasted to its neighboring
17 @command{ripd} supports RIP version 2 as described in RFC2453 and RIP
18 version 1 as described in RFC1058.
21 * Starting and Stopping ripd::
23 * How to Announce RIP route::
24 * Filtering RIP Routes::
25 * RIP Metric Manipulation::
28 * RIP Authentication::
30 * Show RIP Information::
31 * RIP Debug Commands::
34 @node Starting and Stopping ripd
35 @section Starting and Stopping ripd
37 The default configuration file name of @command{ripd}'s is
38 @file{ripd.conf}. When invocation @command{ripd} searches directory
39 @value{INSTALL_PREFIX_ETC}. If @file{ripd.conf} is not there next
40 search current directory.
42 RIP uses UDP port 520 to send and receive RIP packets. So the user must have
43 the capability to bind the port, generally this means that the user must
44 have superuser privileges. RIP protocol requires interface information
45 maintained by @command{zebra} daemon. So running @command{zebra}
46 is mandatory to run @command{ripd}. Thus minimum sequence for running
56 Please note that @command{zebra} must be invoked before @command{ripd}.
58 To stop @command{ripd}. Please use @command{kill `cat
59 /var/run/ripd.pid`}. Certain signals have special meaningss to @command{ripd}.
63 Reload configuration file @file{ripd.conf}. All configurations are
64 reseted. All routes learned so far are cleared and removed from routing
67 Rotate @command{ripd} logfile.
70 @command{ripd} sweeps all installed RIP routes then terminates properly.
73 @command{ripd} invocation options. Common options that can be specified
74 (@pxref{Common Invocation Options}).
79 When the program terminates, retain routes added by @command{ripd}.
87 @subsection RIP netmask
89 The netmask features of @command{ripd} support both version 1 and version 2 of
90 RIP. Version 1 of RIP originally contained no netmask information. In
91 RIP version 1, network classes were originally used to determine the
92 size of the netmask. Class A networks use 8 bits of mask, Class B
93 networks use 16 bits of masks, while Class C networks use 24 bits of
94 mask. Today, the most widely used method of a network mask is assigned
95 to the packet on the basis of the interface that received the packet.
96 Version 2 of RIP supports a variable length subnet mask (VLSM). By
97 extending the subnet mask, the mask can be divided and reused. Each
98 subnet can be used for different purposes such as large to middle size
99 LANs and WAN links. Quagga @command{ripd} does not support the non-sequential
100 netmasks that are included in RIP Version 2.
102 In a case of similar information with the same prefix and metric, the
103 old information will be suppressed. Ripd does not currently support
104 equal cost multipath routing.
107 @node RIP Configuration
108 @section RIP Configuration
110 @deffn Command {router rip} {}
111 The @code{router rip} command is necessary to enable RIP. To disable
112 RIP, use the @code{no router rip} command. RIP must be enabled before
113 carrying out any of the RIP commands.
116 @deffn Command {no router rip} {}
120 RIP can be configured to process either Version 1 or Version 2 packets,
121 the default mode is Version 2. If no version is specified, then the RIP
122 daemon will default to Version 2. If RIP is set to Version
123 1, the setting "Version 1" will be displayed, but the setting "Version
124 2" will not be displayed whether or not Version 2 is set explicitly as
125 the version of RIP being used. The version can be specified globally, and
126 also on a per-interface basis (see below).
128 @deffn {RIP Command} {version @var{version}} {}
129 Set RIP process's version. @var{version} can be `1'' or `2''.
132 @deffn {RIP Command} {network @var{network}} {}
133 @deffnx {RIP Command} {no network @var{network}} {}
134 Set the RIP enable interface by @var{network}. The interfaces which
135 have addresses matching with @var{network} are enabled.
137 This group of commands either enables or disables RIP interfaces between
138 certain numbers of a specified network address. For example, if the
139 network for 10.0.0.0/24 is RIP enabled, this would result in all the
140 addresses from 10.0.0.0 to 10.0.0.255 being enabled for RIP. The @code{no
141 network} command will disable RIP for the specified network.
144 @deffn {RIP Command} {network @var{ifname}} {}
145 @deffnx {RIP Command} {no network @var{ifname}} {}
146 Set a RIP enabled interface by @var{ifname}. Both the sending and
147 receiving of RIP packets will be enabled on the port specified in the
148 @code{network ifname} command. The @code{no network ifname} command will disable
149 RIP on the specified interface.
152 @deffn {RIP Command} {neighbor @var{a.b.c.d}} {}
153 @deffnx {RIP Command} {no neighbor @var{a.b.c.d}} {}
154 Specify RIP neighbor. When a neighbor doesn't understand multicast,
155 this command is used to specify neighbors. In some cases, not all
156 routers will be able to understand multicasting, where packets are sent
157 to a network or a group of addresses. In a situation where a neighbor
158 cannot process multicast packets, it is necessary to establish a direct
159 link between routers. The neighbor command allows the network
160 administrator to specify a router as a RIP neighbor. The @code{no
161 neighbor a.b.c.d} command will disable the RIP neighbor.
164 Below is very simple RIP configuration. Interface @code{eth0} and
165 interface which address match to @code{10.0.0.0/8} are RIP enabled.
179 @deffn {RIP command} {passive-interface (@var{IFNAME}|default)} {}
180 @deffnx {RIP command} {no passive-interface @var{IFNAME}} {}
181 This command sets the specified interface to passive mode. On passive mode
182 interface, all receiving packets are processed as normal and ripd does
183 not send either multicast or unicast RIP packets except to RIP neighbors
184 specified with @code{neighbor} command. The interface may be specified
185 as @var{default} to make ripd default to passive on all interfaces.
187 The default is to be passive on all interfaces.
192 @deffn {Interface command} {ip rip send version @var{version}} {}
193 @var{version} can be `1', `2', `1 2'. This configuration command
194 overrides the router's rip version setting. The command will enable the
195 selected interface to send packets with RIP Version 1, RIP Version 2, or
196 both. In the case of '1 2', packets will be both broadcast and
199 The default is to send only version 2.
202 @deffn {Interface command} {ip rip receive version @var{version}} {}
203 Version setting for incoming RIP packets. This command will enable the
204 selected interface to receive packets in RIP Version 1, RIP Version 2,
207 The default is to receive both versions.
212 @deffn {Interface command} {ip split-horizon} {}
213 @deffnx {Interface command} {no ip split-horizon} {}
214 Control split-horizon on the interface. Default is @code{ip
215 split-horizon}. If you don't perform split-horizon on the interface,
216 please specify @code{no ip split-horizon}.
219 @node How to Announce RIP route
220 @section How to Announce RIP route
222 @deffn {RIP command} {redistribute kernel} {}
223 @deffnx {RIP command} {redistribute kernel metric <0-16>} {}
224 @deffnx {RIP command} {redistribute kernel route-map @var{route-map}} {}
225 @deffnx {RIP command} {no redistribute kernel} {}
226 @code{redistribute kernel} redistributes routing information from
227 kernel route entries into the RIP tables. @code{no redistribute kernel}
231 @deffn {RIP command} {redistribute static} {}
232 @deffnx {RIP command} {redistribute static metric <0-16>} {}
233 @deffnx {RIP command} {redistribute static route-map @var{route-map}} {}
234 @deffnx {RIP command} {no redistribute static} {}
235 @code{redistribute static} redistributes routing information from
236 static route entries into the RIP tables. @code{no redistribute static}
240 @deffn {RIP command} {redistribute connected} {}
241 @deffnx {RIP command} {redistribute connected metric <0-16>} {}
242 @deffnx {RIP command} {redistribute connected route-map @var{route-map}} {}
243 @deffnx {RIP command} {no redistribute connected} {}
244 Redistribute connected routes into the RIP tables. @code{no
245 redistribute connected} disables the connected routes in the RIP tables.
246 This command redistribute connected of the interface which RIP disabled.
247 The connected route on RIP enabled interface is announced by default.
250 @deffn {RIP command} {redistribute ospf} {}
251 @deffnx {RIP command} {redistribute ospf metric <0-16>} {}
252 @deffnx {RIP command} {redistribute ospf route-map @var{route-map}} {}
253 @deffnx {RIP command} {no redistribute ospf} {}
254 @code{redistribute ospf} redistributes routing information from
255 ospf route entries into the RIP tables. @code{no redistribute ospf}
259 @deffn {RIP command} {redistribute bgp} {}
260 @deffnx {RIP command} {redistribute bgp metric <0-16>} {}
261 @deffnx {RIP command} {redistribute bgp route-map @var{route-map}} {}
262 @deffnx {RIP command} {no redistribute bgp} {}
263 @code{redistribute bgp} redistributes routing information from
264 bgp route entries into the RIP tables. @code{no redistribute bgp}
268 If you want to specify RIP only static routes:
270 @deffn {RIP command} {default-information originate} {}
273 @deffn {RIP command} {route @var{a.b.c.d/m}} {}
274 @deffnx {RIP command} {no route @var{a.b.c.d/m}} {}
275 This command is specific to Quagga. The @code{route} command makes a static
276 route only inside RIP. This command should be used only by advanced
277 users who are particularly knowledgeable about the RIP protocol. In
278 most cases, we recommend creating a static route in Quagga and
279 redistributing it in RIP using @code{redistribute static}.
282 @node Filtering RIP Routes
283 @section Filtering RIP Routes
285 RIP routes can be filtered by a distribute-list.
287 @deffn Command {distribute-list @var{access_list} @var{direct} @var{ifname}} {}
288 You can apply access lists to the interface with a @code{distribute-list}
289 command. @var{access_list} is the access list name. @var{direct} is
290 @samp{in} or @samp{out}. If @var{direct} is @samp{in} the access list
291 is applied to input packets.
293 The @code{distribute-list} command can be used to filter the RIP path.
294 @code{distribute-list} can apply access-lists to a chosen interface.
295 First, one should specify the access-list. Next, the name of the
296 access-list is used in the distribute-list command. For example, in the
297 following configuration @samp{eth0} will permit only the paths that
298 match the route 10.0.0.0/8
304 distribute-list private in eth0
306 access-list private permit 10 10.0.0.0/8
307 access-list private deny any
313 @code{distribute-list} can be applied to both incoming and outgoing data.
315 @deffn Command {distribute-list prefix @var{prefix_list} (in|out) @var{ifname}} {}
316 You can apply prefix lists to the interface with a
317 @code{distribute-list} command. @var{prefix_list} is the prefix list
318 name. Next is the direction of @samp{in} or @samp{out}. If
319 @var{direct} is @samp{in} the access list is applied to input packets.
322 @node RIP Metric Manipulation
323 @section RIP Metric Manipulation
325 RIP metric is a value for distance for the network. Usually
326 @command{ripd} increment the metric when the network information is
327 received. Redistributed routes' metric is set to 1.
329 @deffn {RIP command} {default-metric <1-16>} {}
330 @deffnx {RIP command} {no default-metric <1-16>} {}
331 This command modifies the default metric value for redistributed routes. The
332 default value is 1. This command does not affect connected route
333 even if it is redistributed by @command{redistribute connected}. To modify
334 connected route's metric value, please use @command{redistribute
335 connected metric} or @command{route-map}. @command{offset-list} also
336 affects connected routes.
339 @deffn {RIP command} {offset-list @var{access-list} (in|out)} {}
340 @deffnx {RIP command} {offset-list @var{access-list} (in|out) @var{ifname}} {}
344 @section RIP distance
346 Distance value is used in zebra daemon. Default RIP distance is 120.
348 @deffn {RIP command} {distance <1-255>} {}
349 @deffnx {RIP command} {no distance <1-255>} {}
350 Set default RIP distance to specified value.
353 @deffn {RIP command} {distance <1-255> @var{A.B.C.D/M}} {}
354 @deffnx {RIP command} {no distance <1-255> @var{A.B.C.D/M}} {}
355 Set default RIP distance to specified value when the route's source IP
356 address matches the specified prefix.
359 @deffn {RIP command} {distance <1-255> @var{A.B.C.D/M} @var{access-list}} {}
360 @deffnx {RIP command} {no distance <1-255> @var{A.B.C.D/M} @var{access-list}} {}
361 Set default RIP distance to specified value when the route's source IP
362 address matches the specified prefix and the specified access-list.
366 @section RIP route-map
368 Usage of @command{ripd}'s route-map support.
370 Optional argument route-map MAP_NAME can be added to each @code{redistribute}
374 redistribute static [route-map MAP_NAME]
375 redistribute connected [route-map MAP_NAME]
379 Cisco applies route-map _before_ routes will exported to rip route table.
380 In current Quagga's test implementation, @command{ripd} applies route-map
381 after routes are listed in the route table and before routes will be
382 announced to an interface (something like output filter). I think it is not
383 so clear, but it is draft and it may be changed at future.
385 Route-map statement (@pxref{Route Map}) is needed to use route-map
388 @deffn {Route Map} {match interface @var{word}} {}
389 This command match to incoming interface. Notation of this match is
390 different from Cisco. Cisco uses a list of interfaces - NAME1 NAME2
391 ... NAMEN. Ripd allows only one name (maybe will change in the
392 future). Next - Cisco means interface which includes next-hop of
393 routes (it is somewhat similar to "ip next-hop" statement). Ripd
394 means interface where this route will be sent. This difference is
395 because "next-hop" of same routes which sends to different interfaces
396 must be different. Maybe it'd be better to made new matches - say
397 "match interface-out NAME" or something like that.
400 @deffn {Route Map} {match ip address @var{word}} {}
401 @deffnx {Route Map} {match ip address prefix-list @var{word}} {}
402 Match if route destination is permitted by access-list.
405 @deffn {Route Map} {match ip next-hop A.B.C.D} {}
406 Cisco uses here <access-list>, @command{ripd} IPv4 address. Match if
407 route has this next-hop (meaning next-hop listed in the rip route
408 table - "show ip rip")
411 @deffn {Route Map} {match metric <0-4294967295>} {}
412 This command match to the metric value of RIP updates. For other
413 protocol compatibility metric range is shown as <0-4294967295>. But
414 for RIP protocol only the value range <0-16> make sense.
417 @deffn {Route Map} {set ip next-hop A.B.C.D} {}
418 This command set next hop value in RIPv2 protocol. This command does
419 not affect RIPv1 because there is no next hop field in the packet.
422 @deffn {Route Map} {set metric <0-4294967295>} {}
423 Set a metric for matched route when sending announcement. The metric
424 value range is very large for compatibility with other protocols. For
425 RIP, valid metric values are from 1 to 16.
428 @node RIP Authentication
429 @section RIP Authentication
431 @deffn {Interface command} {ip rip authentication mode md5} {}
432 @deffnx {Interface command} {no ip rip authentication mode md5} {}
433 Set the interface with RIPv2 MD5 authentication.
436 @deffn {Interface command} {ip rip authentication mode text} {}
437 @deffnx {Interface command} {no ip rip authentication mode text} {}
438 Set the interface with RIPv2 simple password authentication.
441 @deffn {Interface command} {ip rip authentication string @var{string}} {}
442 @deffnx {Interface command} {no ip rip authentication string @var{string}} {}
443 RIP version 2 has simple text authentication. This command sets
444 authentication string. The string must be shorter than 16 characters.
447 @deffn {Interface command} {ip rip authentication key-chain @var{key-chain}} {}
448 @deffnx {Interface command} {no ip rip authentication key-chain @var{key-chain}} {}
449 Specifiy Keyed MD5 chain.
459 ip rip authentication mode md5
460 ip rip authentication key-chain test
467 @deffn {RIP command} {timers basic @var{update} @var{timeout} @var{garbage}} {}
469 RIP protocol has several timers. User can configure those timers' values
470 by @code{timers basic} command.
472 The default settings for the timers are as follows:
476 The update timer is 30 seconds. Every update timer seconds, the RIP
477 process is awakened to send an unsolicited Response message containing
478 the complete routing table to all neighboring RIP routers.
481 The timeout timer is 180 seconds. Upon expiration of the timeout, the
482 route is no longer valid; however, it is retained in the routing table
483 for a short time so that neighbors can be notified that the route has
487 The garbage collect timer is 120 seconds. Upon expiration of the
488 garbage-collection timer, the route is finally removed from the routing
493 The @code{timers basic} command allows the the default values of the timers
494 listed above to be changed.
497 @deffn {RIP command} {no timers basic} {}
498 The @code{no timers basic} command will reset the timers to the default
499 settings listed above.
502 @node Show RIP Information
503 @section Show RIP Information
505 To display RIP routes.
507 @deffn Command {show ip rip} {}
511 The command displays all RIP routes. For routes that are received
512 through RIP, this command will display the time the packet was sent and
513 the tag information. This command will also display this information
514 for routes redistributed into RIP.
518 @deffn Command {show ip protocols} {}
519 The command displays current RIP status. It includes RIP timer,
520 filtering, version, RIP enabled interface and RIP peer inforation.
525 ripd> @b{show ip protocols}
526 Routing Protocol is "rip"
527 Sending updates every 30 seconds with +/-50%, next due in 35 seconds
528 Timeout after 180 seconds, garbage collect after 120 seconds
529 Outgoing update filter list for all interface is not set
530 Incoming update filter list for all interface is not set
531 Default redistribution metric is 1
532 Redistributing: kernel connected
533 Default version control: send version 2, receive version 2
535 Routing for Networks:
540 Routing Information Sources:
541 Gateway BadPackets BadRoutes Distance Last Update
545 @node RIP Debug Commands
546 @section RIP Debug Commands
548 Debug for RIP protocol.
550 @deffn Command {debug rip events} {}
554 @code{debug rip} will show RIP events. Sending and receiving
555 packets, timers, and changes in interfaces are events shown with @command{ripd}.
557 @deffn Command {debug rip packet} {}
561 @code{debug rip packet} will display detailed information about the RIP
562 packets. The origin and port number of the packet as well as a packet
565 @deffn Command {debug rip zebra} {}
566 Debug rip between zebra communication.
569 This command will show the communication between @command{ripd} and
570 @command{zebra}. The main information will include addition and deletion of
571 paths to the kernel and the sending and receiving of interface information.
573 @deffn Command {show debugging rip} {}
574 Display @command{ripd}'s debugging option.
577 @code{show debugging rip} will show all information currently set for ripd