RIP EcoRouter Documentation / Routing / RIP
RIP configuring
Routing Information Protocol (RIP) is a dynamic routing protocol. This protocol driven devices send messages with known routes at certain fixed periods and when network topology changes. A route change messages contain metrics of every known for router network.
EcoRouterOS supports RIP v.2.
RIP metric
The Bellman-Ford algorithm for finding the shortest route to the destination network is used. It doesn't take into account a chanel load and an interface bandwidth on the way to the destination network. The result is a number of "hops" - routers on the way to the destination network. The best route is one with a minimal possible metric's value, it will be written to the routing table.
An administration distance value is set to 120 by default.
Administration distance value changes are sent to the multicast address 224.0.0.9. All routers driven by RIP v.2 are listening to this address.
RIP timers
By default, a RIP-driven router sends routing information updates packets each 30 seconds (update timer) with a small time fluctuation. The route is marked as unreacheable (invalid, metric 16) if the router doesn't get any update of routing information during 6 periods each of 30 sec. In the period of flush timer the unreachable route will be deleted from the routing table. The flush timer default value is 60 sec. It counts from the moment the router is marked unreachable (invalid).
Thus when the route information is unavailable a maximum periond the route has being included into routing table is 240 sec.
The value ranges and default values of timeras are represented in the table below.
Timer | Value range, sec | Default value, с |
---|---|---|
update | 1-4294967295 | 30 |
flush | 1-4294967295 | 60 |
invalid | 1-4294967295 | 180 |
Attention: The timers setting causes the RIP service to be restarted, accordingly, it can cause interruption of data transmission in the network.
Split horizon route advertisement
EcoRouterOS uses a Split Horizon technology to prevent routing loops. The principle of this technology is to prohibit a router from advertising a route back onto the interface from which it was learned.
Manual route summarizing function
The EcoRouterOS supports the manual RIP route summarizing function. Manual route summarizing works as follows:
- the summarization is configured on the router's interface;
- the configured summarized route is announced on the interface in case there is at least one RIP route on the router that is included in the range of the summarized route (the child route);
- the summarized route's metric is equal to the smallest metric among the child routes.
Configuration commands
RIP configuration commands are shown in the table below.
Command | Description |
---|---|
router rip | Switching RIP on a router on |
redistribute <connected|static|ospf|isis|bgp> metric <0-16> | Distributing the routes from another routing protocols into RIP context with route metrics labeling. By default the metric is 0 |
neighbor <A.B.C.D> distribute-list <1-199|1300-2699> <in|out> | Filtering the neighbour's routes (incoming and outcoming) |
distance <1-255> | Setting the administrative distance for routes incoming from other RIP driven routers |
load rip | Loading RIP on the virtual router |
default-information originate metric <0-16> | Including the default route advertising into protocol routing update |
network <A.B.C.D/M> | Advertising the subnetwork in the RIP |
passive-interface <interface name> | Switching RIP routing updates advertising on the specified interface off |
timer update <1-4294967295> | Setting the update timer |
timer invalid <1-4294967295> | Setting the invalid timer |
timer flush <1-4294967295> | Setting the flush timer |
ip summary-address rip <A.B.C.D> <mask> | Enabling route summarizing on the interface. The command must be specified in the context interface configuration mode config-if. |
Every network advertised on interfaces will be included into routing context.
Basic configuration example
Step 1. Configuring interfaces.
ecorouter#conf t Enter configuration commands, one per line. End with CNTL/Z.
ecorouter(config)#interface e1
ecorouter(config-if)#ip add 10.10.10.1/24
ecorouter(config-if)#interface e2
ecorouter(config-if)#ip add 192.168.1.1/24
ecorouter(config-if)#interface loopback.1
ecorouter(config-lo)#ip add 1.1.1.1/32
Interface must be connected to the port via service instance.
Step 2. Switching RIP on.
ecorouter(config)#router rip
ecorouter(config-router)#
Step 3. Including connected networks into RIP routing context.
ecorouter(config-router)#network 10.10.10.0/24
ecorouter(config-router)#network 192.168.1.0/24
ecorouter(config-router)#network 1.1.1.1/32
Step 4. Including connected networks into RIP routing context with a specific metric.
ecorouter(config-router)#redistribute connected metric 1
ecorouter#sh ip route
Codes: K - kernel, C - connected, S - static, R - RIP, B - BGP
O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2
i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, ia - IS-IS inter area
* - candidate default
IP Route Table for VRF "default"
C 1.1.1.1/32 is directly connected, loopback.1
C 10.10.10.0/24 is directly connected, e1
C 192.168.1.0/24 is directly connected, e2
Switching RIP on a virtual router on
Switching on in the configuration mode of a physical router.
ecorouter>en
ecorouter#conf t
Creating virtual router named vr1.
ecorouter(config)#virtual-router vr1
Switching RIP on a virtual router on.
ecorouter(config-vr)#load rip
Viewing commands
The show ip protocols rip command is used for protocol diagnostics.
ecorouter#show ip protocols rip
Routing Protocol is "rip"
Redistributing: default connected static
Default version control: send version 2, receive version 2
Interface e1: State is Up, Metric 1
Sending updates every 30 seconds, next in 1 seconds
Invalid after 180 seconds, flushed after 120
Neighbors active: 1
Neighbor IP address Metric Routes Seen
10.0.0.2 1 1 29
Interface e2: State is Up, Metric 1
Sending updates every 30 seconds, next in 15 seconds
Invalid after 180 seconds, flushed after 120
Neighbors active: 0
Maximum path: 16
Routing Information:
#0: 10.2.2.0/24 valid via 10.0.0.2 dev e1 from 10.0.0.2 metric 2 age 73 seco
Distance: (default is 120)