📄 ripd.texi
字号:
@c -*-texinfo-*-@c This is part of the GNU Zebra Manual.@c Copyright (C) 1999, 2000 Kunihiro Ishiguro@c See file zebra.texi for copying conditions.@node RIP@comment node-name, next, previous, up@chapter RIPRIP -- Routing Information Protocol is widely deployed interior gatewayprotocol. RIP was developed in the 1970s at Xerox Labs as part of theXNS routing protocol. RIP is a @dfn{distance-vector} protocol and isbased on the @dfn{Bellman-Ford} algorithms. As a distance-vectorprotocol, RIP router send updates to its neighbors periodically, thusallowing the convergence to a known topology. In each update, thedistance to any given network will be broadcasted to its neighboringrouter.@command{ripd} supports RIP version 2 as described in RFC2453 and RIPversion 1 as described in RFC1058.@menu* Starting and Stopping ripd:: * RIP Configuration:: * How to Announce RIP route:: * Filtering RIP Routes:: * RIP Metric Manipulation:: * RIP distance:: * RIP route-map:: * RIP Authentication:: * RIP Timers:: * Show RIP Information:: * RIP Debug Commands:: @end menu@node Starting and Stopping ripd, RIP Configuration, RIP, RIP@comment node-name, next, previous, up@section Starting and Stopping ripdThe default configuration file name of @command{ripd}'s is@file{ripd.conf}. When invocation @command{ripd} searches directory@value{INSTALL_PREFIX_ETC}. If @file{ripd.conf} is not there nextsearch current directory.RIP uses UDP port 521 to send and receive RIP packets. So the user must havethe capability to bind the port, generally this means that the user musthave superuser privileges. RIP protocol requires interface informationmaintained by @command{zebra} daemon. So running @command{zebra}is mandatory to run @command{ripd}. Thus minimum sequence for runningRIP is like below:@example@group# zebra -d# ripd -d@end group@end examplePlease note that @command{zebra} must be invoked before @command{ripd}.To stop @command{ripd}. Please use @command{kill `cat/var/run/ripd.pid`}. Certain signals have special meaningss to @command{ripd}.@table @samp@item SIGHUPReload configuration file @file{ripd.conf}. All configurations arereseted. All routes learned so far are cleared and removed from routingtable.@item SIGUSR1Rotate @command{ripd} logfile.@item SIGINT@itemx SIGTERM@command{ripd} sweeps all installed RIP routes then terminates properly.@end table@command{ripd} invocation options. Common options that can be specified(@pxref{Common Invocation Options}).@table @samp@item -r@itemx --retainWhen the program terminates, retain routes added by @command{ripd}.@end table@menu* RIP netmask:: @end menu@node RIP netmask, , Starting and Stopping ripd, Starting and Stopping ripd@comment node-name, next, previous, up@subsection RIP netmaskThe netmask features of @command{ripd} support both version 1 and version 2 ofRIP. Version 1 of RIP originally contained no netmask information. InRIP version 1, network classes were originally used to determine thesize of the netmask. Class A networks use 8 bits of mask, Class Bnetworks use 16 bits of masks, while Class C networks use 24 bits ofmask. Today, the most widely used method of a network mask is assignedto the packet on the basis of the interface that received the packet.Version 2 of RIP supports a variable length subnet mask (VLSM). Byextending the subnet mask, the mask can be divided and reused. Eachsubnet can be used for different purposes such as large to middle sizeLANs and WAN links. Zebra @command{ripd} does not support the non-sequentialnetmasks that are included in RIP Version 2.In a case of similar information with the same prefix and metric, theold information will be suppressed. Ripd does not currently supportequal cost multipath routing.@node RIP Configuration, How to Announce RIP route, Starting and Stopping ripd, RIP@comment node-name, next, previous, up@section RIP Configuration@deffn Command {router rip} {}The @code{router rip} command is necessary to enable RIP. To disableRIP, use the @code{no router rip} command. RIP must be enabled beforecarrying out any of the RIP commands.@end deffn@deffn Command {no rouer rip} {}Disable RIP.@end deffnRIP can be configured to process either Version 1 or Version 2 packets,the default mode is Version 2. If no version is specified, then the RIPdaemon will default to Version 2. If RIP is set to Version1, the setting "Version 1" will be displayed, but the setting "Version2" will not be displayed whether or not Version 2 is set explicitly asthe version of RIP being used.@deffn {RIP Command} {network @var{network}} {}@deffnx {RIP Command} {no network @var{network}} {}Set the RIP enable interface by @var{network}. The interfaces whichhave addresses matching with @var{network} are enabled.This group of commands either enables or disables RIP interfaces betweencertain numbers of a specified network address. For example, if thenetwork for 10.0.0.0/24 is RIP enabled, this would result in all theaddresses from 10.0.0.0 to 10.0.0.255 being enabled for RIP. The @code{nonetwork} command will disable RIP for the specified network.@end deffn@deffn {RIP Command} {network @var{ifname}} {}@deffnx {RIP Command} {no network @var{ifname}} {}Set a RIP enabled interface by @var{ifname}. Both the sending andreceiving of RIP packets will be enabled on the port specified in the@code{network ifname} command. The @code{no network ifname} command will disableRIP on the specified interface.@end deffn@deffn {RIP Command} {neighbor @var{a.b.c.d}} {}@deffnx {RIP Command} {no neighbor @var{a.b.c.d}} {}Specify RIP neighbor. When a neighbor doesn't understand multicast,this command is used to specify neighbors. In some cases, not allrouters will be able to understand multicasting, where packets are sentto a network or a group of addresses. In a situation where a neighborcannot process multicast packets, it is necessary to establish a directlink between routers. The neighbor command allows the networkadministrator to specify a router as a RIP neighbor. The @code{noneighbor a.b.c.d} command will disable the RIP neighbor.@end deffnBelow is very simple RIP configuration. Interface @code{eth0} andinterface which address match to @code{10.0.0.0/8} are RIP enabled.@example@group!router rip network 10.0.0.0/8 network eth0!@end group@end examplePassive interface@deffn {RIP command} {passive-interface @var{IFNAME}} {}@deffnx {RIP command} {no passive-interface @var{IFNAME}} {}This command sets the specified interface to passive mode. On passive modeinterface, all receiving packets are processed as normal and ripd doesnot send either multicast or unicast RIP packets except to RIP neighborsspecified with @code{neighbor} command.@end deffnRIP version handling@deffn {RIP Command} {version @var{version}} {}Set RIP process's version. @var{version} can be ``1'' or ``2''.@end deffn@deffn {Interface command} {ip rip send version @var{version}} {}@var{version} can be `1', `2', `1 2'. This configuration commandoverrides the router's rip version setting. The command will enable theselected interface to send packets with RIP Version 1, RIP Version 2, orboth. In the case of '1 2', packets will be both broadcast andmulticast.@end deffn@deffn {Interface command} {ip rip receive version @var{version}} {}Version setting for incoming RIP packets. This command will enable theselected interface to receive packets in RIP Version 1, RIP Version 2,or both.@end deffnRIP split-horizon@deffn {Interface command} {ip split-horizon} {}@deffnx {Interface command} {no ip split-horizon} {}Control split-horizon on the interface. Default is @code{ipsplit-horizon}. If you don't perform split-horizon on the interface,please specify @code{no ip split-horizon}.@end deffn@node How to Announce RIP route, Filtering RIP Routes, RIP Configuration, RIP@comment node-name, next, previous, up@section How to Announce RIP route@deffn {RIP command} {redistribute kernel} {}@deffnx {RIP command} {redistribute kernel metric <0-16>} {}@deffnx {RIP command} {redistribute kernel route-map @var{route-map}} {}@deffnx {RIP command} {no redistribute kernel} {}@code{redistribute kernel} redistributes routing information fromkernel route entries into the RIP tables. @code{no redistribute kernel}disables the routes.@end deffn@deffn {RIP command} {redistribute static} {}@deffnx {RIP command} {redistribute static metric <0-16>} {}@deffnx {RIP command} {redistribute static route-map @var{route-map}} {}@deffnx {RIP command} {no redistribute static} {}@code{redistribute static} redistributes routing information fromstatic route entries into the RIP tables. @code{no redistribute static}disables the routes.@end deffn@deffn {RIP command} {redistribute connected} {}@deffnx {RIP command} {redistribute connected metric <0-16>} {}@deffnx {RIP command} {redistribute connected route-map @var{route-map}} {}@deffnx {RIP command} {no redistribute connected} {}Redistribute connected routes into the RIP tables. @code{noredistribute connected} disables the connected routes in the RIP tables.This command redistribute connected of the interface which RIP disabled.The connected route on RIP enabled interface is announced by default.@end deffn@deffn {RIP command} {redistribute ospf} {}@deffnx {RIP command} {redistribute ospf metric <0-16>} {}@deffnx {RIP command} {redistribute ospf route-map @var{route-map}} {}@deffnx {RIP command} {no redistribute ospf} {}@code{redistribute ospf} redistributes routing information fromospf route entries into the RIP tables. @code{no redistribute ospf}disables the routes.@end deffn@deffn {RIP command} {redistribute bgp} {}@deffnx {RIP command} {redistribute bgp metric <0-16>} {}@deffnx {RIP command} {redistribute bgp route-map @var{route-map}} {}@deffnx {RIP command} {no redistribute bgp} {}@code{redistribute bgp} redistributes routing information frombgp route entries into the RIP tables. @code{no redistribute bgp}disables the routes.@end deffnIf you want to specify RIP only static routes:@deffn {RIP command} {default-information originate} {}@end deffn@deffn {RIP command} {route @var{a.b.c.d/m}} {}@deffnx {RIP command} {no route @var{a.b.c.d/m}} {}This command is specific to Zebra. The @code{route} command makes a staticroute only inside RIP. This command should be used only by advancedusers who are particularly knowledgeable about the RIP protocol. Inmost cases, we recommend creating a static route in Zebra andredistributing it in RIP using @code{redistribute static}.@end deffn@node Filtering RIP Routes, RIP Metric Manipulation, How to Announce RIP route, RIP@comment node-name, next, previous, up@section Filtering RIP RoutesRIP routes can be filtered by a distribute-list.@deffn Command {distribute-list @var{access_list} @var{direct} @var{ifname}} {}You can apply access lists to the interface with a @code{distribute-list}command. @var{access_list} is the access list name. @var{direct} is@samp{in} or @samp{out}. If @var{direct} is @samp{in} the access listis applied to input packets.The @code{distribute-list} command can be used to filter the RIP path.@code{distribute-list} can apply access-lists to a chosen interface.
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -