summaryrefslogtreecommitdiff
path: root/docs/configuration/protocols/rip.rst
blob: 4d46e2f02b5c00f64114d8cd1144563cdc2cb10d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
.. _rip:

###
RIP
###

:abbr:`RIP (Routing Information Protocol)` is a widely deployed interior gateway
protocol. RIP was developed in the 1970s at Xerox Labs as part of the XNS
routing protocol. RIP is a distance-vector protocol and is based on the
Bellman-Ford algorithms. As a distance-vector protocol, RIP router send updates
to its neighbors periodically, thus allowing the convergence to a known
topology. In each update, the distance to any given network will be broadcast
to its neighboring router.

Supported versions of RIP are:

 - RIPv1 as described in :rfc:`1058`
 - RIPv2 as described in :rfc:`2453`

General Configuration
---------------------

.. cfgcmd:: set protocols rip network <A.B.C.D/M>

  This command enables RIP and sets the RIP enable interface by NETWORK.
  The interfaces which have addresses matching with NETWORK are enabled.
  
.. cfgcmd:: set protocols rip interface <interface>

  This command specifies a RIP enabled interface by interface name. Both
  the sending and receiving of RIP packets will be enabled on the port
  specified in this command.
  
.. cfgcmd:: set protocols rip neighbor <A.B.C.D>

  This command specifies a RIP neighbor. When a neighbor doesn’t understand
  multicast, this command is used to specify neighbors. In some cases, not
  all routers will be able to understand multicasting, where packets are
  sent to a network or a group of addresses. In a situation where a neighbor
  cannot process multicast packets, it is necessary to establish a direct
  link between routers.

.. cfgcmd:: set protocols rip passive-interface interface <interface>

  This command sets the specified interface to passive mode. On passive mode
  interface, all receiving packets are processed as normal and VyOS does not
  send either multicast or unicast RIP packets except to RIP neighbors
  specified with neighbor command.
  
.. cfgcmd:: set protocols rip passive-interface interface default

  This command specifies all interfaces to passive mode.


Optional Configuration
----------------------

.. cfgcmd:: set protocols rip default-distance <distance>

  This command change distance value of RIP. The distance range is 1 to 255.
   
   .. note:: Routes with a distance of 255 are effectively disabled and not
      installed into the kernel.

.. cfgcmd:: set protocols rip network-distance <A.B.C.D/M> distance <distance>

  This command sets default RIP distance to specified value when the route’s
  source IP address matches the specified prefix.
  
.. cfgcmd:: set protocols rip network-distance <A.B.C.D/M> access-list <name>

  This command can be used with previous command to sets default RIP distance
  to specified value when the route’s source IP address matches the specified
  prefix and the specified access-list.

.. cfgcmd:: set protocols rip default-information originate

  This command generate a default route into the RIP.

.. cfgcmd:: set protocols rip distribute-list access-list <in|out> <number>

  This command can be used to filter the RIP path using access lists.
  :cfgcmd:`in` and :cfgcmd:`out` this is the direction in which the access
  lists are applied.
  
.. cfgcmd:: set protocols rip distribute-list interface <interface> access-list <in|out> <number>

  This command allows you apply access lists to a chosen interface to
  filter the RIP path.
  
.. cfgcmd:: set protocols rip distribute-list prefix-list <in|out> <name>

  This command can be used to filter the RIP path using prefix lists.
  :cfgcmd:`in` and :cfgcmd:`out` this is the direction in which the prefix
  lists are applied.

.. cfgcmd:: set protocols rip distribute-list interface <interface> prefix-list <in|out> <name>

  This command allows you apply prefix lists to a chosen interface to
  filter the RIP path.

.. cfgcmd:: set protocols rip route <A.B.C.D/M>

  This command is specific to FRR and VyOS. The route command makes a static
  route only inside RIP. This command should be used only by advanced users
  who are particularly knowledgeable about the RIP protocol. In most cases,
  we recommend creating a static route in VyOS and redistributing it in RIP
  using :cfgcmd:`redistribute static`.
  
.. cfgcmd:: set protocols rip timers update <seconds>

  This command specifies the update timer. Every update timer seconds, the
  RIP process is awakened to send an unsolicited response message containing
  the complete routing table to all neighboring RIP routers. The time range
  is 5 to 2147483647. The default value is 30 seconds.

.. cfgcmd:: set protocols rip timers timeout <seconds>

  This command specifies the timeout timer. Upon expiration of the timeout,
  the route is no longer valid; however, it is retained in the routing table
  for a short time so that neighbors can be notified that the route has been
  dropped. The time range is 5 to 2147483647. The default value is 180
  seconds.

.. cfgcmd:: set protocols rip timers garbage-collection <seconds>

  This command specifies the garbage-collection timer. Upon expiration of
  the garbage-collection timer, the route is finally removed from the
  routing table. The time range is 5 to 2147483647. The default value is 120
  seconds.


Redistribution Configuration
----------------------------

.. cfgcmd:: set protocols rip redistribute <route source>

  This command redistributes routing information from the given route source
  into the RIP tables. There are five modes available for route source: bgp,
  connected, kernel, ospf, static.

.. cfgcmd:: set protocols rip redistribute <route source> metric <metric>

  This command specifies metric for redistributed routes from the given route
  source. There are five modes available for route source: bgp, connected,
  kernel, ospf, static. The metric range is 1 to 16. 
  
.. cfgcmd:: set protocols rip redistribute <route source> route-map <name>

  This command allows to use route map to filter redistributed routes from
  the given route source. There are five modes available for route source:
  bgp, connected, kernel, ospf, static.

.. cfgcmd:: set protocols rip default-metric <metric>

  This command modifies the default metric (hop count) value for redistributed
  routes. The metric range is 1 to 16. The default value is 1. This command
  does not affect connected route even if it is redistributed by
  :cfgcmd:`redistribute connected`. To modify connected route’s metric
  value, please use :cfgcmd:`redistribute connected metric`.


Interfaces Configuration
------------------------

.. cfgcmd:: set interfaces <inttype> <intname> ip rip authentication plaintext-password <text>

  This command sets the interface with RIP simple password authentication.
  This command also sets authentication string. The string must be shorter
  than 16 characters.

.. cfgcmd:: set interfaces <inttype> <intname> ip rip authentication md5 <id> password <text>

  This command sets the interface with RIP MD5 authentication. This command
  also sets MD5 Key. The key must be shorter than 16 characters.

.. cfgcmd:: set interfaces <inttype> <intname> ip rip split-horizon disable

  This command disables split-horizon on the interface. By default, VyOS does
  not advertise RIP routes out the interface over which they were learned
  (split horizon).
  
.. cfgcmd:: set interfaces <inttype> <intname> ip rip split-horizon poison-reverse

  This command enables poison-reverse on the interface. If both poison reverse
  and split horizon are enabled, then VyOS advertises the learned routes
  as unreachable over the interface on which the route was learned.


Operational Mode Commands
-------------------------

.. opcmd:: show ip rip

  This command displays RIP routes.

.. code-block:: none

  Codes: R - RIP, C - connected, S - Static, O - OSPF, B - BGP
  Sub-codes:
        (n) - normal, (s) - static, (d) - default, (r) - redistribute,
        (i) - interface
  
       Network            Next Hop         Metric From            Tag Time
  C(i) 10.0.12.0/24       0.0.0.0               1 self              0
  C(i) 10.0.13.0/24       0.0.0.0               1 self              0
  R(n) 10.0.23.0/24       10.0.12.2             2 10.0.12.2         0 02:53

.. opcmd:: show ip rip status

  The command displays current RIP status. It includes RIP timer, filtering,
  version, RIP enabled interface and RIP peer information.

.. code-block:: none

  Routing Protocol is "rip"
    Sending updates every 30 seconds with +/-50%, next due in 11 seconds
    Timeout after 180 seconds, garbage collect after 120 seconds
    Outgoing update filter list for all interface is not set
    Incoming update filter list for all interface is not set
    Default redistribution metric is 1
    Redistributing:
    Default version control: send version 2, receive any version
      Interface        Send  Recv   Key-chain
      eth0             2     1 2
      eth2             2     1 2
    Routing for Networks:
      10.0.12.0/24
      eth0
    Routing Information Sources:
      Gateway          BadPackets BadRoutes  Distance Last Update
      10.0.12.2                0         0       120   00:00:11
    Distance: (default is 120)
  

Configuration Example
---------------------

Simple RIP configuration using 2 nodes and redistributing connected interfaces.

**Node 1:**

.. code-block:: none

  set interfaces loopback address 10.1.1.1/32
  set protocols rip network 192.168.0.0/24
  set protocols rip redistribute connected

**Node 2:**

.. code-block:: none

  set interfaces loopback address 10.2.2.2/32
  set protocols rip network 192.168.0.0/24
  set protocols rip redistribute connected