RIP
Developed in the 1970s at Xerox Labs, RIP is a distance-vector routing protocol based on the Bellman-Ford algorithm.
RIP determines the best route based on hop count (number of routers traversed). RIP-enabled routers periodically advertise their entire routing table to neighbors, along with the metric (hop count) for each destination.
Supported versions:
General configuration
Enable RIP on all interfaces whose IP addresses fall within the specified network.
Example:
set protocols rip network 192.0.2.0/24
Enable RIP on the specified interface.
Once applied, the interface sends and receives RIP packets.
Example:
set protocols rip interface eth0
Configure a RIP neighbor using its IP address.
Use this command when a neighbor cannot process multicast RIP updates. Once configured, the local router sends updates directly to the specified neighbor as unicast packets.
Example:
set protocols rip neighbor 192.0.2.2
Enable passive mode for the specified interface.
This prevents the router from sending outgoing RIP updates on the interface, except to explicitly configured neighbors. Incoming RIP updates are still accepted and processed.
Example:
set protocols rip passive-interface eth0
Enable passive mode for all interfaces.
This prevents the router from sending outgoing RIP updates on all interfaces, except to explicitly configured neighbors. The router still receives and processes incoming RIP updates normally.
Example:
set protocols rip passive-interface default
Optional configuration
Configure the administrative distance for all RIP-learned routes.
The administrative distance determines how RIP-learned routes are prioritized against routes learned from other sources (such as BGP, OSPF, or static routes) when multiple paths to the same destination exist.
Note
Routes assigned a distance of 255 are disabled and will not be installed in the kernel forwarding table.
Example:
set protocols rip default-distance 100
Configure an administrative distance for RIP routes whose source IP address falls within the specified network.
Example:
set protocols rip network-distance 192.0.2.0/24 distance 80
Restrict administrative distance assignments to RIP routes whose source IP address matches the specified network and the route itself matches the specified access-list.
Example:
set protocols rip network-distance 192.0.2.0/24 distance 80
set protocols rip network-distance 192.0.2.0/24 access-list 10
Generate and advertise a default route (0.0.0.0/0) to all RIP
neighbors.
Example:
set protocols rip default-information originate
Apply an access-list to filter RIP routes in the inbound or outbound direction.
in: Filters routes received from RIP neighbors.out: Filters routes advertised to RIP neighbors.
Example:
set protocols rip distribute-list access-list in 20
Apply an access-list to filter RIP routes in the inbound or outbound direction on the specified interface.
in: Filters routes received from RIP neighbors on this interface.out: Filters routes advertised to RIP neighbors on this interface.
Example:
set protocols rip distribute-list interface eth0 access-list in 20
Apply a prefix-list to filter RIP routes in the inbound or outbound direction.
in: Filters routes received from RIP neighbors.out: Filters routes advertised to RIP neighbors.
Example:
set protocols rip distribute-list prefix-list in INBOUND-FILTER
Apply a prefix-list to filter RIP routes on the specified interface in the inbound or outbound direction.
in: Filters routes received from RIP neighbors on this interface.out: Filters routes advertised to RIP neighbors on this interface.
Example:
set protocols rip distribute-list interface eth0 prefix-list in RIP-IN
Add a static route to the RIP routing process.
The route is created only inside RIP.
This command is specific to FRR and VyOS and should only be used by advanced users with a strong understanding of the RIP protocol.
For most deployments, the recommended approach is to create a standard
static route and redistribute it into RIP using
set protocols rip redistribute static.
Example:
set protocols rip route 192.0.2.0/24
Configure the RIP update timer, in seconds.
The update timer defines how often the router sends unsolicited Response messages to its RIP neighbors. Each Response contains the complete RIP routing table.
The default value is 30 seconds.
Example:
set protocols rip timers update 60
Configure the RIP route timeout, in seconds.
If a route is not refreshed by an incoming update within this interval, it becomes invalid. The router temporarily retains the invalid route in the RIP routing table so that neighbors learn the route has been dropped.
The default value is 180 seconds.
Example:
set protocols rip timers timeout 300
Configure the RIP garbage-collection timer, in seconds.
This timer starts when a route becomes invalid. When the timer expires, the route is removed from the routing table.
The default value is 120 seconds.
Example:
set protocols rip timers garbage-collection 60
Redistribution configuration
Redistribute routes from the specified source into RIP.
Routes learned from the chosen source are imported into the RIP routing table and advertised to RIP neighbors as if they had been learned through RIP itself.
The supported sources are:
babel: Routes learned via Babel.bgp: Routes learned via BGP.connected: Directly connected routes.isis: Routes learned via IS-IS.kernel: Routes installed in the kernel routing table.nhrp: Routes learned via NHRP.ospf: Routes learned via OSPF.static: Routes configured statically.
Example:
set protocols rip redistribute static
Configure the metric for routes redistributed from the specified source.
Example:
set protocols rip redistribute static metric 5
Apply a route-map to filter routes redistributed from the specified source.
Example:
set protocols rip redistribute static route-map RIP-REDISTRIBUTE
Configure the default metric (hop count) applied to redistributed routes.
The default value is 1.
Note
This command does not affect connected routes redistributed via
set protocols rip redistribute connected. To configure the metric for
connected routes, use set protocols rip redistribute connected metric
explicitly.
Example:
set protocols rip default-metric 5
Interfaces configuration
Enable simple password authentication for RIPv2 on the specified interface and set a password.
The password must not exceed 16 characters.
Example:
set protocols rip interface eth0 authentication plaintext-password vyos-secret
Enable MD5 authentication for RIPv2 on the specified interface and set the MD5 key.
The MD5 key must not exceed 16 characters.
Example:
set protocols rip interface eth0 authentication md5 1 password vyos-secret
Disable split-horizon on the specified interface.
By default, VyOS does not advertise RIP routes back through the interface on which they were learned (split horizon). This command turns off that default.
Example:
set protocols rip interface eth0 split-horizon disable
Enable split horizon with poison reverse on the specified interface.
If enabled, the router advertises the learned routes as unreachable on the interface where they were learned.
Example:
set protocols rip interface eth0 split-horizon poison-reverse
Operational mode commands
vyos@vyos-1:~$ show ip rip
Codes: K - kernel route, C - connected, L - local, S - static,
R - RIP, O - OSPF, I - IS-IS, B - BGP, E - EIGRP, N - NHRP,
T - Table, v - VNC, V - VNC-Direct, A - Babel, F - PBR,
f - OpenFabric, t - Table-Direct
Sub-codes:
(n) - normal, (s) - static, (d) - default, (r) - redistribute,
(i) - interface
Network Next Hop Metric From Tag Time
C(i) 192.0.2.0/24 0.0.0.0 1 self 0
C(i) 198.51.100.0/24 0.0.0.0 1 self 0
R(n) 203.0.113.0/24 192.0.2.2 2 192.0.2.2 0 02:53
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:
192.0.2.0/24
eth0
Routing Information Sources:
Gateway BadPackets BadRoutes Distance Last Update
192.0.2.2 0 0 120 00:00:11
Distance: (default is 120)
Example
The following example demonstrates a basic RIP configuration between two routers, where directly connected networks are redistributed into RIP.
Node 1:
set interfaces ethernet eth0 address '198.51.100.1/24'
set interfaces loopback lo address '192.0.2.1/32'
set protocols rip network 198.51.100.0/24
set protocols rip redistribute connected
Node 2:
set interfaces ethernet eth0 address '198.51.100.2/24'
set interfaces loopback lo address '192.0.2.2/32'
set protocols rip network 198.51.100.0/24
set protocols rip redistribute connected