]>
Commit | Line | Data |
---|---|---|
0efdf0fe | 1 | .. _rip: |
42fc5d26 QY |
2 | |
3 | *** | |
4 | RIP | |
5 | *** | |
6 | ||
7 | RIP -- Routing Information Protocol is widely deployed interior gateway | |
c1a54c05 QY |
8 | protocol. RIP was developed in the 1970s at Xerox Labs as part of the |
9 | XNS routing protocol. RIP is a :term:`distance-vector` protocol and is | |
10 | based on the :term:`Bellman-Ford` algorithms. As a distance-vector | |
42fc5d26 | 11 | protocol, RIP router send updates to its neighbors periodically, thus |
c1a54c05 | 12 | allowing the convergence to a known topology. In each update, the |
d1e7591e | 13 | distance to any given network will be broadcast to its neighboring |
42fc5d26 QY |
14 | router. |
15 | ||
16 | *ripd* supports RIP version 2 as described in RFC2453 and RIP | |
17 | version 1 as described in RFC1058. | |
18 | ||
0efdf0fe | 19 | .. _starting-and-stopping-ripd: |
42fc5d26 QY |
20 | |
21 | Starting and Stopping ripd | |
22 | ========================== | |
23 | ||
c1a54c05 QY |
24 | The default configuration file name of *ripd*'s is :file:`ripd.conf`. When |
25 | invocation *ripd* searches directory |INSTALL_PREFIX_ETC|. If :file:`ripd.conf` | |
26 | is not there next search current directory. | |
42fc5d26 | 27 | |
c1a54c05 QY |
28 | RIP uses UDP port 520 to send and receive RIP packets. So the user must have |
29 | the capability to bind the port, generally this means that the user must have | |
30 | superuser privileges. RIP protocol requires interface information maintained by | |
31 | *zebra* daemon. So running *zebra* is mandatory to run *ripd*. Thus minimum | |
32 | sequence for running RIP is like below: | |
42fc5d26 QY |
33 | |
34 | :: | |
35 | ||
42fc5d26 QY |
36 | # zebra -d |
37 | # ripd -d | |
a8c90e15 | 38 | |
42fc5d26 QY |
39 | |
40 | Please note that *zebra* must be invoked before *ripd*. | |
41 | ||
c1a54c05 QY |
42 | To stop *ripd*. Please use:: |
43 | kill `cat /var/run/ripd.pid` | |
44 | ||
d1e7591e | 45 | Certain signals have special meanings to *ripd*. |
42fc5d26 | 46 | |
07a17e6d QY |
47 | +-------------+------------------------------------------------------+ |
48 | | Signal | Action | | |
49 | +=============+======================================================+ | |
50 | | ``SIGHUP`` | Reload configuration file :file:`ripd.conf`. | | |
51 | | | All configurations are reset. All routes learned | | |
52 | | | so far are cleared and removed from routing table. | | |
53 | +-------------+------------------------------------------------------+ | |
54 | | ``SIGUSR1`` | Rotate the *ripd* logfile. | | |
55 | +-------------+------------------------------------------------------+ | |
56 | | ``SIGINT`` | | | |
57 | | ``SIGTERM`` | Sweep all installed routes and gracefully terminate. | | |
58 | +-------------+------------------------------------------------------+ | |
42fc5d26 | 59 | |
c1a54c05 | 60 | *ripd* invocation options. Common options that can be specified |
0efdf0fe | 61 | (:ref:`common-invocation-options`). |
42fc5d26 | 62 | |
42fc5d26 | 63 | |
0efdf0fe | 64 | .. _rip-netmask: |
42fc5d26 QY |
65 | |
66 | RIP netmask | |
67 | ----------- | |
68 | ||
c1a54c05 QY |
69 | The netmask features of *ripd* support both version 1 and version 2 of RIP. |
70 | Version 1 of RIP originally contained no netmask information. In RIP version 1, | |
71 | network classes were originally used to determine the size of the netmask. | |
72 | Class A networks use 8 bits of mask, Class B networks use 16 bits of masks, | |
73 | while Class C networks use 24 bits of mask. Today, the most widely used method | |
74 | of a network mask is assigned to the packet on the basis of the interface that | |
75 | received the packet. Version 2 of RIP supports a variable length subnet mask | |
76 | (VLSM). By extending the subnet mask, the mask can be divided and reused. Each | |
77 | subnet can be used for different purposes such as large to middle size LANs and | |
78 | WAN links. FRR *ripd* does not support the non-sequential netmasks that are | |
79 | included in RIP Version 2. | |
80 | ||
81 | In a case of similar information with the same prefix and metric, the old | |
82 | information will be suppressed. Ripd does not currently support equal cost | |
83 | multipath routing. | |
42fc5d26 | 84 | |
0efdf0fe | 85 | .. _rip-configuration: |
42fc5d26 QY |
86 | |
87 | RIP Configuration | |
88 | ================= | |
89 | ||
c1a54c05 QY |
90 | .. index:: router rip |
91 | .. clicmd:: router rip | |
42fc5d26 | 92 | |
c1a54c05 QY |
93 | The `router rip` command is necessary to enable RIP. To disable RIP, use the |
94 | `no router rip` command. RIP must be enabled before carrying out any of the | |
95 | RIP commands. | |
42fc5d26 | 96 | |
c1a54c05 QY |
97 | .. index:: no router rip |
98 | .. clicmd:: no router rip | |
42fc5d26 | 99 | |
c1a54c05 | 100 | Disable RIP. |
42fc5d26 | 101 | |
c1a54c05 QY |
102 | .. index:: network NETWORK |
103 | .. clicmd:: network NETWORK | |
42fc5d26 | 104 | |
c1a54c05 QY |
105 | .. index:: no network NETWORK |
106 | .. clicmd:: no network NETWORK | |
42fc5d26 | 107 | |
c1a54c05 QY |
108 | Set the RIP enable interface by NETWORK. The interfaces which have addresses |
109 | matching with NETWORK are enabled. | |
42fc5d26 | 110 | |
c1a54c05 QY |
111 | This group of commands either enables or disables RIP interfaces between |
112 | certain numbers of a specified network address. For example, if the network | |
113 | for 10.0.0.0/24 is RIP enabled, this would result in all the addresses from | |
114 | 10.0.0.0 to 10.0.0.255 being enabled for RIP. The `no network` command will | |
115 | disable RIP for the specified network. | |
42fc5d26 | 116 | |
c1a54c05 QY |
117 | .. index:: network IFNAME |
118 | .. clicmd:: network IFNAME | |
42fc5d26 | 119 | |
c1a54c05 QY |
120 | .. index:: no network IFNAME |
121 | .. clicmd:: no network IFNAME | |
42fc5d26 | 122 | |
c1a54c05 QY |
123 | Set a RIP enabled interface by IFNAME. Both the sending and |
124 | receiving of RIP packets will be enabled on the port specified in the | |
125 | `network ifname` command. The `no network ifname` command will disable | |
126 | RIP on the specified interface. | |
42fc5d26 | 127 | |
c1a54c05 QY |
128 | .. index:: neighbor A.B.C.D |
129 | .. clicmd:: neighbor A.B.C.D | |
42fc5d26 | 130 | |
c1a54c05 QY |
131 | .. index:: no neighbor A.B.C.D |
132 | .. clicmd:: no neighbor A.B.C.D | |
42fc5d26 | 133 | |
c1a54c05 QY |
134 | Specify RIP neighbor. When a neighbor doesn't understand multicast, this |
135 | command is used to specify neighbors. In some cases, not all routers will be | |
136 | able to understand multicasting, where packets are sent to a network or a | |
137 | group of addresses. In a situation where a neighbor cannot process multicast | |
138 | packets, it is necessary to establish a direct link between routers. The | |
139 | neighbor command allows the network administrator to specify a router as a | |
140 | RIP neighbor. The `no neighbor a.b.c.d` command will disable the RIP | |
141 | neighbor. | |
42fc5d26 | 142 | |
c1a54c05 QY |
143 | Below is very simple RIP configuration. Interface `eth0` and interface which |
144 | address match to `10.0.0.0/8` are RIP enabled. | |
a8c90e15 | 145 | |
9eb95b3b | 146 | .. code-block:: frr |
42fc5d26 | 147 | |
c1a54c05 QY |
148 | ! |
149 | router rip | |
150 | network 10.0.0.0/8 | |
151 | network eth0 | |
152 | ! | |
42fc5d26 | 153 | |
42fc5d26 | 154 | |
c1a54c05 QY |
155 | .. index:: passive-interface (IFNAME|default) |
156 | .. clicmd:: passive-interface (IFNAME|default) | |
42fc5d26 | 157 | |
c1a54c05 QY |
158 | .. index:: no passive-interface IFNAME |
159 | .. clicmd:: no passive-interface IFNAME | |
42fc5d26 | 160 | |
c1a54c05 QY |
161 | This command sets the specified interface to passive mode. On passive mode |
162 | interface, all receiving packets are processed as normal and ripd does not | |
163 | send either multicast or unicast RIP packets except to RIP neighbors | |
164 | specified with `neighbor` command. The interface may be specified as | |
165 | `default` to make ripd default to passive on all interfaces. | |
42fc5d26 | 166 | |
c1a54c05 | 167 | The default is to be passive on all interfaces. |
42fc5d26 | 168 | |
c1a54c05 QY |
169 | .. index:: ip split-horizon |
170 | .. clicmd:: ip split-horizon | |
42fc5d26 | 171 | |
c1a54c05 QY |
172 | .. index:: no ip split-horizon |
173 | .. clicmd:: no ip split-horizon | |
42fc5d26 | 174 | |
c1a54c05 QY |
175 | Control split-horizon on the interface. Default is `ip split-horizon`. If |
176 | you don't perform split-horizon on the interface, please specify `no ip | |
177 | split-horizon`. | |
42fc5d26 | 178 | |
0efdf0fe | 179 | .. _rip-version-control: |
42fc5d26 QY |
180 | |
181 | RIP Version Control | |
182 | =================== | |
183 | ||
c1a54c05 QY |
184 | RIP can be configured to send either Version 1 or Version 2 packets. The |
185 | default is to send RIPv2 while accepting both RIPv1 and RIPv2 (and replying | |
186 | with packets of the appropriate version for REQUESTS / triggered updates). The | |
d1e7591e QY |
187 | version to receive and send can be specified globally, and further overridden on |
188 | a per-interface basis if needs be for send and receive separately (see below). | |
42fc5d26 | 189 | |
c1a54c05 QY |
190 | It is important to note that RIPv1 cannot be authenticated. Further, if RIPv1 |
191 | is enabled then RIP will reply to REQUEST packets, sending the state of its RIP | |
192 | routing table to any remote routers that ask on demand. For a more detailed | |
0efdf0fe | 193 | discussion on the security implications of RIPv1 see :ref:`rip-authentication`. |
42fc5d26 | 194 | |
c1a54c05 QY |
195 | .. index:: version VERSION |
196 | .. clicmd:: version VERSION | |
42fc5d26 | 197 | |
c1a54c05 QY |
198 | Set RIP version to accept for reads and send. ``VERSION`` can be either 1 or |
199 | 1. | |
42fc5d26 | 200 | |
c1a54c05 | 201 | Disabling RIPv1 by specifying version 2 is STRONGLY encouraged, |
0efdf0fe | 202 | :ref:`rip-authentication`. This may become the default in a future release. |
42fc5d26 | 203 | |
c1a54c05 | 204 | Default: Send Version 2, and accept either version. |
42fc5d26 | 205 | |
c1a54c05 QY |
206 | .. index:: no version |
207 | .. clicmd:: no version | |
42fc5d26 | 208 | |
c1a54c05 | 209 | Reset the global version setting back to the default. |
42fc5d26 | 210 | |
c1a54c05 QY |
211 | .. index:: ip rip send version VERSION |
212 | .. clicmd:: ip rip send version VERSION | |
42fc5d26 | 213 | |
c1a54c05 | 214 | VERSION can be ``1``, ``2``, or ``1 2``. |
42fc5d26 | 215 | |
c1a54c05 QY |
216 | This interface command overrides the global rip version setting, and selects |
217 | which version of RIP to send packets with, for this interface specifically. | |
218 | Choice of RIP Version 1, RIP Version 2, or both versions. In the latter | |
219 | case, where ``1 2`` is specified, packets will be both broadcast and | |
220 | multicast. | |
42fc5d26 | 221 | |
c1a54c05 | 222 | Default: Send packets according to the global version (version 2) |
42fc5d26 | 223 | |
c1a54c05 QY |
224 | .. index:: ip rip receive version VERSION |
225 | .. clicmd:: ip rip receive version VERSION | |
42fc5d26 | 226 | |
c1a54c05 | 227 | VERSION can be ``1``, ``2``, or ``1 2``. |
42fc5d26 | 228 | |
c1a54c05 QY |
229 | This interface command overrides the global rip version setting, and selects |
230 | which versions of RIP packets will be accepted on this interface. Choice of | |
231 | RIP Version 1, RIP Version 2, or both. | |
42fc5d26 | 232 | |
c1a54c05 | 233 | Default: Accept packets according to the global setting (both 1 and 2). |
42fc5d26 | 234 | |
0efdf0fe | 235 | .. _how-to-announce-rip-route: |
42fc5d26 QY |
236 | |
237 | How to Announce RIP route | |
238 | ========================= | |
239 | ||
c1a54c05 QY |
240 | .. index:: redistribute kernel |
241 | .. clicmd:: redistribute kernel | |
42fc5d26 | 242 | |
c1a54c05 QY |
243 | .. index:: redistribute kernel metric (0-16) |
244 | .. clicmd:: redistribute kernel metric (0-16) | |
42fc5d26 | 245 | |
c1a54c05 QY |
246 | .. index:: redistribute kernel route-map ROUTE-MAP |
247 | .. clicmd:: redistribute kernel route-map ROUTE-MAP | |
42fc5d26 | 248 | |
c1a54c05 QY |
249 | .. index:: no redistribute kernel |
250 | .. clicmd:: no redistribute kernel | |
42fc5d26 | 251 | |
c1a54c05 QY |
252 | `redistribute kernel` redistributes routing information from kernel route |
253 | entries into the RIP tables. `no redistribute kernel` disables the routes. | |
42fc5d26 | 254 | |
c1a54c05 QY |
255 | .. index:: redistribute static |
256 | .. clicmd:: redistribute static | |
42fc5d26 | 257 | |
c1a54c05 QY |
258 | .. index:: redistribute static metric (0-16) |
259 | .. clicmd:: redistribute static metric (0-16) | |
42fc5d26 | 260 | |
c1a54c05 QY |
261 | .. index:: redistribute static route-map ROUTE-MAP |
262 | .. clicmd:: redistribute static route-map ROUTE-MAP | |
42fc5d26 | 263 | |
c1a54c05 QY |
264 | .. index:: no redistribute static |
265 | .. clicmd:: no redistribute static | |
42fc5d26 | 266 | |
c1a54c05 QY |
267 | `redistribute static` redistributes routing information from static route |
268 | entries into the RIP tables. `no redistribute static` disables the routes. | |
42fc5d26 | 269 | |
c1a54c05 QY |
270 | .. index:: redistribute connected |
271 | .. clicmd:: redistribute connected | |
42fc5d26 | 272 | |
c1a54c05 QY |
273 | .. index:: redistribute connected metric (0-16) |
274 | .. clicmd:: redistribute connected metric (0-16) | |
42fc5d26 | 275 | |
c1a54c05 QY |
276 | .. index:: redistribute connected route-map ROUTE-MAP |
277 | .. clicmd:: redistribute connected route-map ROUTE-MAP | |
42fc5d26 | 278 | |
c1a54c05 QY |
279 | .. index:: no redistribute connected |
280 | .. clicmd:: no redistribute connected | |
42fc5d26 | 281 | |
c1a54c05 QY |
282 | Redistribute connected routes into the RIP tables. `no redistribute |
283 | connected` disables the connected routes in the RIP tables. This command | |
284 | redistribute connected of the interface which RIP disabled. The connected | |
285 | route on RIP enabled interface is announced by default. | |
42fc5d26 | 286 | |
c1a54c05 QY |
287 | .. index:: redistribute ospf |
288 | .. clicmd:: redistribute ospf | |
42fc5d26 | 289 | |
c1a54c05 QY |
290 | .. index:: redistribute ospf metric (0-16) |
291 | .. clicmd:: redistribute ospf metric (0-16) | |
42fc5d26 | 292 | |
c1a54c05 QY |
293 | .. index:: redistribute ospf route-map ROUTE-MAP |
294 | .. clicmd:: redistribute ospf route-map ROUTE-MAP | |
42fc5d26 | 295 | |
c1a54c05 QY |
296 | .. index:: no redistribute ospf |
297 | .. clicmd:: no redistribute ospf | |
42fc5d26 | 298 | |
c1a54c05 QY |
299 | `redistribute ospf` redistributes routing information from ospf route |
300 | entries into the RIP tables. `no redistribute ospf` disables the routes. | |
42fc5d26 | 301 | |
c1a54c05 QY |
302 | .. index:: redistribute bgp |
303 | .. clicmd:: redistribute bgp | |
42fc5d26 | 304 | |
c1a54c05 QY |
305 | .. index:: redistribute bgp metric (0-16) |
306 | .. clicmd:: redistribute bgp metric (0-16) | |
42fc5d26 | 307 | |
c1a54c05 QY |
308 | .. index:: redistribute bgp route-map ROUTE-MAP |
309 | .. clicmd:: redistribute bgp route-map ROUTE-MAP | |
42fc5d26 | 310 | |
c1a54c05 QY |
311 | .. index:: no redistribute bgp |
312 | .. clicmd:: no redistribute bgp | |
42fc5d26 | 313 | |
c1a54c05 QY |
314 | `redistribute bgp` redistributes routing information from bgp route entries |
315 | into the RIP tables. `no redistribute bgp` disables the routes. | |
42fc5d26 | 316 | |
c1a54c05 | 317 | If you want to specify RIP only static routes: |
42fc5d26 | 318 | |
c1a54c05 QY |
319 | .. index:: default-information originate |
320 | .. clicmd:: default-information originate | |
42fc5d26 | 321 | |
c1a54c05 QY |
322 | .. index:: route A.B.C.D/M |
323 | .. clicmd:: route A.B.C.D/M | |
42fc5d26 | 324 | |
c1a54c05 QY |
325 | .. index:: no route A.B.C.D/M |
326 | .. clicmd:: no route A.B.C.D/M | |
42fc5d26 | 327 | |
c1a54c05 QY |
328 | This command is specific to FRR. The `route` command makes a static route |
329 | only inside RIP. This command should be used only by advanced users who are | |
330 | particularly knowledgeable about the RIP protocol. In most cases, we | |
331 | recommend creating a static route in FRR and redistributing it in RIP using | |
332 | `redistribute static`. | |
42fc5d26 | 333 | |
0efdf0fe | 334 | .. _filtering-rip-routes: |
42fc5d26 QY |
335 | |
336 | Filtering RIP Routes | |
337 | ==================== | |
338 | ||
339 | RIP routes can be filtered by a distribute-list. | |
340 | ||
c1a54c05 QY |
341 | .. index:: distribute-list ACCESS_LIST DIRECT IFNAME |
342 | .. clicmd:: distribute-list ACCESS_LIST DIRECT IFNAME | |
42fc5d26 | 343 | |
c1a54c05 QY |
344 | You can apply access lists to the interface with a `distribute-list` command. |
345 | ACCESS_LIST is the access list name. DIRECT is ``in`` or ``out``. If DIRECT | |
346 | is ``in`` the access list is applied to input packets. | |
42fc5d26 | 347 | |
c1a54c05 QY |
348 | The `distribute-list` command can be used to filter the RIP path. |
349 | `distribute-list` can apply access-lists to a chosen interface. First, one | |
350 | should specify the access-list. Next, the name of the access-list is used in | |
351 | the distribute-list command. For example, in the following configuration | |
352 | ``eth0`` will permit only the paths that match the route 10.0.0.0/8 | |
42fc5d26 | 353 | |
9eb95b3b | 354 | .. code-block:: frr |
42fc5d26 | 355 | |
c1a54c05 QY |
356 | ! |
357 | router rip | |
358 | distribute-list private in eth0 | |
359 | ! | |
360 | access-list private permit 10 10.0.0.0/8 | |
361 | access-list private deny any | |
362 | ! | |
a8c90e15 | 363 | |
42fc5d26 | 364 | |
c1a54c05 | 365 | `distribute-list` can be applied to both incoming and outgoing data. |
42fc5d26 | 366 | |
c1a54c05 QY |
367 | .. index:: distribute-list prefix PREFIX_LIST (in|out) IFNAME |
368 | .. clicmd:: distribute-list prefix PREFIX_LIST (in|out) IFNAME | |
42fc5d26 | 369 | |
c1a54c05 QY |
370 | You can apply prefix lists to the interface with a `distribute-list` |
371 | command. PREFIX_LIST is the prefix list name. Next is the direction of | |
372 | ``in`` or ``out``. If DIRECT is ``in`` the access list is applied to input | |
373 | packets. | |
42fc5d26 | 374 | |
0efdf0fe | 375 | .. _rip-metric-manipulation: |
42fc5d26 QY |
376 | |
377 | RIP Metric Manipulation | |
378 | ======================= | |
379 | ||
c1a54c05 | 380 | RIP metric is a value for distance for the network. Usually |
42fc5d26 | 381 | *ripd* increment the metric when the network information is |
c1a54c05 | 382 | received. Redistributed routes' metric is set to 1. |
42fc5d26 | 383 | |
c1a54c05 QY |
384 | .. index:: default-metric (1-16) |
385 | .. clicmd:: default-metric (1-16) | |
42fc5d26 | 386 | |
c1a54c05 QY |
387 | .. index:: no default-metric (1-16) |
388 | .. clicmd:: no default-metric (1-16) | |
42fc5d26 | 389 | |
c1a54c05 QY |
390 | This command modifies the default metric value for redistributed routes. |
391 | The default value is 1. This command does not affect connected route even if | |
392 | it is redistributed by *redistribute connected*. To modify connected route's | |
393 | metric value, please use ``redistribute connected metric`` or *route-map*. | |
394 | *offset-list* also affects connected routes. | |
42fc5d26 | 395 | |
c1a54c05 QY |
396 | .. index:: offset-list ACCESS-LIST (in|out) |
397 | .. clicmd:: offset-list ACCESS-LIST (in|out) | |
42fc5d26 | 398 | |
c1a54c05 QY |
399 | .. index:: offset-list ACCESS-LIST (in|out) IFNAME |
400 | .. clicmd:: offset-list ACCESS-LIST (in|out) IFNAME | |
42fc5d26 | 401 | |
42fc5d26 | 402 | |
0efdf0fe | 403 | .. _rip-distance: |
42fc5d26 QY |
404 | |
405 | RIP distance | |
406 | ============ | |
407 | ||
c1a54c05 | 408 | Distance value is used in zebra daemon. Default RIP distance is 120. |
42fc5d26 | 409 | |
c1a54c05 QY |
410 | .. index:: distance (1-255) |
411 | .. clicmd:: distance (1-255) | |
42fc5d26 | 412 | |
c1a54c05 QY |
413 | .. index:: no distance (1-255) |
414 | .. clicmd:: no distance (1-255) | |
42fc5d26 | 415 | |
c1a54c05 | 416 | Set default RIP distance to specified value. |
42fc5d26 | 417 | |
c1a54c05 QY |
418 | .. index:: distance (1-255) A.B.C.D/M |
419 | .. clicmd:: distance (1-255) A.B.C.D/M | |
42fc5d26 | 420 | |
c1a54c05 QY |
421 | .. index:: no distance (1-255) A.B.C.D/M |
422 | .. clicmd:: no distance (1-255) A.B.C.D/M | |
42fc5d26 | 423 | |
c1a54c05 QY |
424 | Set default RIP distance to specified value when the route's source IP |
425 | address matches the specified prefix. | |
42fc5d26 | 426 | |
c1a54c05 QY |
427 | .. index:: distance (1-255) A.B.C.D/M ACCESS-LIST |
428 | .. clicmd:: distance (1-255) A.B.C.D/M ACCESS-LIST | |
42fc5d26 | 429 | |
c1a54c05 QY |
430 | .. index:: no distance (1-255) A.B.C.D/M ACCESS-LIST |
431 | .. clicmd:: no distance (1-255) A.B.C.D/M ACCESS-LIST | |
42fc5d26 | 432 | |
c1a54c05 QY |
433 | Set default RIP distance to specified value when the route's source IP |
434 | address matches the specified prefix and the specified access-list. | |
42fc5d26 | 435 | |
11ab5329 | 436 | .. _rip-route-map: |
42fc5d26 QY |
437 | |
438 | RIP route-map | |
439 | ============= | |
440 | ||
441 | Usage of *ripd*'s route-map support. | |
442 | ||
443 | Optional argument route-map MAP_NAME can be added to each `redistribute` | |
444 | statement. | |
445 | ||
9eb95b3b | 446 | .. code-block:: frr |
42fc5d26 | 447 | |
9eb95b3b QY |
448 | redistribute static [route-map MAP_NAME] |
449 | redistribute connected [route-map MAP_NAME] | |
450 | ..... | |
42fc5d26 | 451 | |
a8c90e15 | 452 | |
c1a54c05 QY |
453 | Cisco applies route-map _before_ routes will exported to rip route table. In |
454 | current FRR's test implementation, *ripd* applies route-map after routes are | |
455 | listed in the route table and before routes will be announced to an interface | |
456 | (something like output filter). I think it is not so clear, but it is draft and | |
457 | it may be changed at future. | |
42fc5d26 | 458 | |
0efdf0fe | 459 | Route-map statement (:ref:`route-map`) is needed to use route-map |
42fc5d26 QY |
460 | functionality. |
461 | ||
c1a54c05 QY |
462 | .. index:: match interface WORD |
463 | .. clicmd:: match interface WORD | |
42fc5d26 | 464 | |
c1a54c05 QY |
465 | This command match to incoming interface. Notation of this match is |
466 | different from Cisco. Cisco uses a list of interfaces - NAME1 NAME2 ... | |
467 | NAMEN. Ripd allows only one name (maybe will change in the future). Next - | |
468 | Cisco means interface which includes next-hop of routes (it is somewhat | |
469 | similar to "ip next-hop" statement). Ripd means interface where this route | |
470 | will be sent. This difference is because "next-hop" of same routes which | |
471 | sends to different interfaces must be different. Maybe it'd be better to | |
472 | made new matches - say "match interface-out NAME" or something like that. | |
42fc5d26 | 473 | |
c1a54c05 QY |
474 | .. index:: match ip address WORD |
475 | .. clicmd:: match ip address WORD | |
42fc5d26 | 476 | |
c1a54c05 QY |
477 | .. index:: match ip address prefix-list WORD |
478 | .. clicmd:: match ip address prefix-list WORD | |
42fc5d26 | 479 | |
c1a54c05 | 480 | Match if route destination is permitted by access-list. |
42fc5d26 | 481 | |
c1a54c05 QY |
482 | .. index:: match ip next-hop WORD |
483 | .. clicmd:: match ip next-hop WORD | |
42fc5d26 | 484 | |
c1a54c05 QY |
485 | .. index:: match ip next-hop prefix-list WORD |
486 | .. clicmd:: match ip next-hop prefix-list WORD | |
42fc5d26 | 487 | |
c1a54c05 QY |
488 | Match if route next-hop (meaning next-hop listed in the rip route-table as |
489 | displayed by "show ip rip") is permitted by access-list. | |
42fc5d26 | 490 | |
c1a54c05 QY |
491 | .. index:: match metric (0-4294967295) |
492 | .. clicmd:: match metric (0-4294967295) | |
42fc5d26 | 493 | |
c1a54c05 QY |
494 | This command match to the metric value of RIP updates. For other protocol |
495 | compatibility metric range is shown as (0-4294967295). But for RIP protocol | |
496 | only the value range (0-16) make sense. | |
42fc5d26 | 497 | |
c1a54c05 QY |
498 | .. index:: set ip next-hop A.B.C.D |
499 | .. clicmd:: set ip next-hop A.B.C.D | |
42fc5d26 | 500 | |
c1a54c05 QY |
501 | This command set next hop value in RIPv2 protocol. This command does not |
502 | affect RIPv1 because there is no next hop field in the packet. | |
42fc5d26 | 503 | |
c1a54c05 QY |
504 | .. index:: set metric (0-4294967295) |
505 | .. clicmd:: set metric (0-4294967295) | |
42fc5d26 | 506 | |
c1a54c05 QY |
507 | Set a metric for matched route when sending announcement. The metric value |
508 | range is very large for compatibility with other protocols. For RIP, valid | |
509 | metric values are from 1 to 16. | |
42fc5d26 | 510 | |
0efdf0fe | 511 | .. _rip-authentication: |
42fc5d26 QY |
512 | |
513 | RIP Authentication | |
514 | ================== | |
515 | ||
516 | RIPv2 allows packets to be authenticated via either an insecure plain | |
517 | text password, included with the packet, or via a more secure MD5 based | |
d50b2aa0 | 518 | :abbr:`HMAC (keyed-Hashing for Message AuthentiCation)`, |
42fc5d26 QY |
519 | RIPv1 can not be authenticated at all, thus when authentication is |
520 | configured `ripd` will discard routing updates received via RIPv1 | |
521 | packets. | |
522 | ||
a8c90e15 | 523 | However, unless RIPv1 reception is disabled entirely, |
0efdf0fe | 524 | :ref:`rip-version-control`, RIPv1 REQUEST packets which are received, |
42fc5d26 | 525 | which query the router for routing information, will still be honoured |
a8c90e15 | 526 | by `ripd`, and `ripd` WILL reply to such packets. This allows |
42fc5d26 QY |
527 | `ripd` to honour such REQUESTs (which sometimes is used by old |
528 | equipment and very simple devices to bootstrap their default route), | |
529 | while still providing security for route updates which are received. | |
530 | ||
531 | In short: Enabling authentication prevents routes being updated by | |
532 | unauthenticated remote routers, but still can allow routes (I.e. the | |
533 | entire RIP routing table) to be queried remotely, potentially by anyone | |
534 | on the internet, via RIPv1. | |
535 | ||
536 | To prevent such unauthenticated querying of routes disable RIPv1, | |
0efdf0fe | 537 | :ref:`rip-version-control`. |
42fc5d26 | 538 | |
c1a54c05 QY |
539 | .. index:: ip rip authentication mode md5 |
540 | .. clicmd:: ip rip authentication mode md5 | |
42fc5d26 | 541 | |
c1a54c05 QY |
542 | .. index:: no ip rip authentication mode md5 |
543 | .. clicmd:: no ip rip authentication mode md5 | |
42fc5d26 | 544 | |
c1a54c05 | 545 | Set the interface with RIPv2 MD5 authentication. |
42fc5d26 | 546 | |
c1a54c05 QY |
547 | .. index:: ip rip authentication mode text |
548 | .. clicmd:: ip rip authentication mode text | |
42fc5d26 | 549 | |
c1a54c05 QY |
550 | .. index:: no ip rip authentication mode text |
551 | .. clicmd:: no ip rip authentication mode text | |
42fc5d26 | 552 | |
c1a54c05 | 553 | Set the interface with RIPv2 simple password authentication. |
42fc5d26 | 554 | |
c1a54c05 QY |
555 | .. index:: ip rip authentication string STRING |
556 | .. clicmd:: ip rip authentication string STRING | |
42fc5d26 | 557 | |
c1a54c05 QY |
558 | .. index:: no ip rip authentication string STRING |
559 | .. clicmd:: no ip rip authentication string STRING | |
42fc5d26 | 560 | |
c1a54c05 QY |
561 | RIP version 2 has simple text authentication. This command sets |
562 | authentication string. The string must be shorter than 16 characters. | |
42fc5d26 | 563 | |
c1a54c05 QY |
564 | .. index:: ip rip authentication key-chain KEY-CHAIN |
565 | .. clicmd:: ip rip authentication key-chain KEY-CHAIN | |
42fc5d26 | 566 | |
c1a54c05 QY |
567 | .. index:: no ip rip authentication key-chain KEY-CHAIN |
568 | .. clicmd:: no ip rip authentication key-chain KEY-CHAIN | |
42fc5d26 | 569 | |
d1e7591e | 570 | Specify Keyed MD5 chain. |
42fc5d26 | 571 | |
9eb95b3b | 572 | .. code-block:: frr |
42fc5d26 | 573 | |
9eb95b3b QY |
574 | ! |
575 | key chain test | |
576 | key 1 | |
577 | key-string test | |
578 | ! | |
579 | interface eth1 | |
580 | ip rip authentication mode md5 | |
581 | ip rip authentication key-chain test | |
582 | ! | |
a8c90e15 | 583 | |
42fc5d26 | 584 | |
0efdf0fe | 585 | .. _rip-timers: |
42fc5d26 QY |
586 | |
587 | RIP Timers | |
588 | ========== | |
589 | ||
c1a54c05 QY |
590 | .. index:: timers basic UPDATE TIMEOUT GARBAGE |
591 | .. clicmd:: timers basic UPDATE TIMEOUT GARBAGE | |
42fc5d26 | 592 | |
42fc5d26 | 593 | |
c1a54c05 QY |
594 | RIP protocol has several timers. User can configure those timers' values |
595 | by `timers basic` command. | |
42fc5d26 | 596 | |
c1a54c05 | 597 | The default settings for the timers are as follows: |
42fc5d26 | 598 | |
c1a54c05 QY |
599 | - The update timer is 30 seconds. Every update timer seconds, the RIP |
600 | process is awakened to send an unsolicited Response message containing | |
601 | the complete routing table to all neighboring RIP routers. | |
602 | - The timeout timer is 180 seconds. Upon expiration of the timeout, the | |
603 | route is no longer valid; however, it is retained in the routing table | |
604 | for a short time so that neighbors can be notified that the route has | |
605 | been dropped. | |
606 | - The garbage collect timer is 120 seconds. Upon expiration of the | |
607 | garbage-collection timer, the route is finally removed from the routing | |
608 | table. | |
42fc5d26 | 609 | |
c1a54c05 QY |
610 | The ``timers basic`` command allows the the default values of the timers |
611 | listed above to be changed. | |
42fc5d26 | 612 | |
c1a54c05 QY |
613 | .. index:: no timers basic |
614 | .. clicmd:: no timers basic | |
42fc5d26 | 615 | |
c1a54c05 QY |
616 | The `no timers basic` command will reset the timers to the default settings |
617 | listed above. | |
42fc5d26 | 618 | |
0efdf0fe | 619 | .. _show-rip-information: |
42fc5d26 QY |
620 | |
621 | Show RIP Information | |
622 | ==================== | |
623 | ||
624 | To display RIP routes. | |
625 | ||
c1a54c05 QY |
626 | .. index:: show ip rip |
627 | .. clicmd:: show ip rip | |
42fc5d26 | 628 | |
c1a54c05 | 629 | Show RIP routes. |
42fc5d26 QY |
630 | |
631 | The command displays all RIP routes. For routes that are received | |
632 | through RIP, this command will display the time the packet was sent and | |
c1a54c05 | 633 | the tag information. This command will also display this information |
42fc5d26 QY |
634 | for routes redistributed into RIP. |
635 | ||
c1a54c05 QY |
636 | .. index:: show ip rip status |
637 | .. clicmd:: show ip rip status | |
42fc5d26 | 638 | |
c1a54c05 | 639 | The command displays current RIP status. It includes RIP timer, |
d1e7591e | 640 | filtering, version, RIP enabled interface and RIP peer information. |
42fc5d26 QY |
641 | |
642 | :: | |
643 | ||
c1a54c05 QY |
644 | ripd> **show ip rip status** |
645 | Routing Protocol is "rip" | |
646 | Sending updates every 30 seconds with +/-50%, next due in 35 seconds | |
647 | Timeout after 180 seconds, garbage collect after 120 seconds | |
648 | Outgoing update filter list for all interface is not set | |
649 | Incoming update filter list for all interface is not set | |
650 | Default redistribution metric is 1 | |
651 | Redistributing: kernel connected | |
652 | Default version control: send version 2, receive version 2 | |
653 | Interface Send Recv | |
654 | Routing for Networks: | |
655 | eth0 | |
656 | eth1 | |
657 | 1.1.1.1 | |
658 | 203.181.89.241 | |
659 | Routing Information Sources: | |
660 | Gateway BadPackets BadRoutes Distance Last Update | |
a8c90e15 | 661 | |
42fc5d26 QY |
662 | |
663 | RIP Debug Commands | |
664 | ================== | |
665 | ||
666 | Debug for RIP protocol. | |
667 | ||
c1a54c05 QY |
668 | .. index:: debug rip events |
669 | .. clicmd:: debug rip events | |
42fc5d26 | 670 | |
c1a54c05 QY |
671 | Shows RIP events. Sending and receiving packets, timers, and changes in |
672 | interfaces are events shown with *ripd*. | |
42fc5d26 | 673 | |
c1a54c05 QY |
674 | .. index:: debug rip packet |
675 | .. clicmd:: debug rip packet | |
42fc5d26 | 676 | |
c1a54c05 QY |
677 | Shows display detailed information about the RIP packets. The origin and |
678 | port number of the packet as well as a packet dump is shown. | |
42fc5d26 | 679 | |
c1a54c05 QY |
680 | .. index:: debug rip zebra |
681 | .. clicmd:: debug rip zebra | |
42fc5d26 | 682 | |
c1a54c05 QY |
683 | This command will show the communication between *ripd* and *zebra*. The |
684 | main information will include addition and deletion of paths to the kernel | |
685 | and the sending and receiving of interface information. | |
42fc5d26 | 686 | |
c1a54c05 QY |
687 | .. index:: show debugging rip |
688 | .. clicmd:: show debugging rip | |
42fc5d26 | 689 | |
c1a54c05 | 690 | Shows all information currently set for ripd debug. |
42fc5d26 | 691 |