Network-Distance
Scenario to verify RIP network-distance configuration and route selection.
This test validates that the administrative distance for specific networks can be
modified using the network-distance command. By default, RIP uses distance 120.
DUT0 receives the same route from DUT1 and DUT2 with different configured
distances and selects the route with the lowest distance.
Test RIP Network Distance Route Selection
Description
Test RIP network-distance route selection with multiple neighbors where
DUT0 receives route 10.10.10.0/24 from DUT1 via 10.1.1.50
with configured distance 200 and from DUT2 via 10.2.2.50 with
configured distance 60 so DUT0 selects the route via DUT2 because 60 < 200
Scenario
Step 1: Set the following configuration in DUT0 :
set interfaces ethernet eth0 address 10.1.1.100/24 set interfaces ethernet eth1 address 10.2.2.100/24 set protocols rip network 10.1.1.0/24 set protocols rip network 10.2.2.0/24 set protocols rip network-distance 10.1.1.50/32 distance 200 set protocols rip network-distance 10.2.2.50/32 distance 60 set protocols rip timers update 5 set system login user admin authentication encrypted-password '$6$GSjsCj8gHLv$/VcqU6FLi6CT2Oxn0MJQ2C2tqnRDrYKNF8HIYWJp68nvXvPdFccDsT04.WtigUONbKYrgKg8d6rEs8PjljMkH0'
Step 2: Set the following configuration in DUT1 :
set interfaces dummy dum0 address 10.10.10.1/24 set interfaces ethernet eth0 address 10.1.1.50/24 set protocols rip network 10.1.1.0/24 set protocols rip redistribute connected set protocols rip timers update 5 set system login user admin authentication encrypted-password '$6$GSjsCj8gHLv$/VcqU6FLi6CT2Oxn0MJQ2C2tqnRDrYKNF8HIYWJp68nvXvPdFccDsT04.WtigUONbKYrgKg8d6rEs8PjljMkH0'
Step 3: Set the following configuration in DUT2 :
set interfaces dummy dum0 address 10.10.10.1/24 set interfaces ethernet eth0 address 10.2.2.50/24 set protocols rip network 10.2.2.0/24 set protocols rip redistribute connected set protocols rip timers update 5 set system login user admin authentication encrypted-password '$6$GSjsCj8gHLv$/VcqU6FLi6CT2Oxn0MJQ2C2tqnRDrYKNF8HIYWJp68nvXvPdFccDsT04.WtigUONbKYrgKg8d6rEs8PjljMkH0'
Attention
Verify that DUT0 learns route 10.10.10.0/24 via RIP from DUT2
Step 4: Run command protocols rip show at DUT0 and check if output matches the following regular expressions:
10.10.10.0/24\s+10.2.2.50\s+2\s+10.2.2.50Show output
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) 10.1.1.0/24 0.0.0.0 1 self 0 C(i) 10.2.2.0/24 0.0.0.0 1 self 0 R(n) 10.10.10.0/24 10.2.2.50 2 10.2.2.50 0 02:59
Attention
Verify that route via DUT2 is selected (R>* with [60/2])
Step 5: Run command protocols ip show route at DUT0 and check if output matches the following regular expressions:
R>\* 10.10.10.0/24 \[60/2\].*via 10.2.2.50Show output
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, > - selected route, * - FIB route, q - queued, r - rejected, b - backup t - trapped, o - offload failure IPv4 unicast VRF default: C>* 10.1.1.0/24 is directly connected, eth0, weight 1, 00:00:05 K * 10.1.1.0/24 [0/0] is directly connected, eth0, weight 1, 00:00:05 L>* 10.1.1.100/32 is directly connected, eth0, weight 1, 00:00:05 C>* 10.2.2.0/24 is directly connected, eth1, weight 1, 00:00:05 K * 10.2.2.0/24 [0/0] is directly connected, eth1, weight 1, 00:00:05 L>* 10.2.2.100/32 is directly connected, eth1, weight 1, 00:00:05 R>* 10.10.10.0/24 [60/2] via 10.2.2.50, eth1, weight 1, 00:00:01