Static Route

Test to verify RIP default-distance (administrative distance) configuration. Administrative distance determines route preference when multiple routing protocols provide routes to the same destination. Lower values are preferred. By default, RIP uses distance 120, while static routes use distance 1. This test validates that distance values can be modified to change route preference between RIP and static routes.

Test RIP Default Distance Static Route Wins

Description

Test RIP route preference with default distance values. By default, RIP uses distance 120 and static routes use distance 1. DUT1 redistributes connected route 10.10.10.0/24 via RIP. DUT0 receives this route via RIP and also has a static route to the same destination. The static route wins because it has lower distance. The static route is installed in the routing table instead of the RIP route.

Scenario

Step 1: Set the following configuration in DUT0 :

set interfaces ethernet eth0 address 10.1.1.100/24
set protocols rip network 10.1.1.0/24
set protocols rip timers update 5
set protocols static route 10.10.10.0/24 blackhole
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'

Attention

Verify that DUT0 learns route 10.10.10.0/24 via RIP from DUT1

Step 3: Run command protocols rip show at DUT0 and check if output matches the following regular expressions:

10.10.10.0/24\s+10.1.1.50\s+2\s+10.1.1.50
Show 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
R(n) 10.10.10.0/24      10.1.1.50             2 10.1.1.50         0 02:58

Attention

Verify that static route is selected (S>* with distance [1/0])

Step 4: Run command protocols ip show route at DUT0 and check if output matches the following regular expressions:

S>\* 10.10.10.0/24 \[1/0\].*blackhole
Show 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:08
K * 10.1.1.0/24 [0/0] is directly connected, eth0, weight 1, 00:00:08
L>* 10.1.1.100/32 is directly connected, eth0, weight 1, 00:00:08
R   10.10.10.0/24 [120/2] via 10.1.1.50, eth0, weight 1, 00:00:02
S>* 10.10.10.0/24 [1/0] unreachable (blackhole), weight 1, 00:00:08

Attention

Verify that RIP route exists but is not selected (R with distance [120/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 \[120/2\].*via 10.1.1.50
Show 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:08
K * 10.1.1.0/24 [0/0] is directly connected, eth0, weight 1, 00:00:08
L>* 10.1.1.100/32 is directly connected, eth0, weight 1, 00:00:08
R   10.10.10.0/24 [120/2] via 10.1.1.50, eth0, weight 1, 00:00:02
S>* 10.10.10.0/24 [1/0] unreachable (blackhole), weight 1, 00:00:08

Test RIP Default Distance Modified RIP Wins

Description

Test RIP route preference with modified distance values. DUT1 redistributes connected route 10.10.10.0/24 via RIP. DUT0 is configured with default-distance 2 for RIP and static route with distance 10. Now the RIP route wins because it has lower distance. The RIP route is installed in the routing table instead of the static route.

Scenario

Step 1: Set the following configuration in DUT0 :

set interfaces ethernet eth0 address 10.1.1.100/24
set protocols rip default-distance 2
set protocols rip network 10.1.1.0/24
set protocols rip timers update 5
set protocols static route 10.10.10.0/24 blackhole distance 10
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'

Attention

Verify that DUT0 learns route 10.10.10.0/24 via RIP from DUT1

Step 3: Run command protocols rip show at DUT0 and check if output matches the following regular expressions:

10.10.10.0/24\s+10.1.1.50\s+2\s+10.1.1.50
Show 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
R(n) 10.10.10.0/24      10.1.1.50             2 10.1.1.50         0 02:59

Attention

Verify that RIP route is selected (R>* with distance [2/2])

Step 4: Run command protocols ip show route at DUT0 and check if output matches the following regular expressions:

R>\* 10.10.10.0/24 \[2/2\].*via 10.1.1.50
Show 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:06
K * 10.1.1.0/24 [0/0] is directly connected, eth0, weight 1, 00:00:06
L>* 10.1.1.100/32 is directly connected, eth0, weight 1, 00:00:06
R>* 10.10.10.0/24 [2/2] via 10.1.1.50, eth0, weight 1, 00:00:01
S   10.10.10.0/24 [10/0] unreachable (blackhole), weight 1, 00:00:06

Attention

Verify that static route exists but is not selected (S with distance [10/0])

Step 5: Run command protocols ip show route at DUT0 and check if output matches the following regular expressions:

S +10.10.10.0/24 \[10/0\].*blackhole
Show 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:06
K * 10.1.1.0/24 [0/0] is directly connected, eth0, weight 1, 00:00:06
L>* 10.1.1.100/32 is directly connected, eth0, weight 1, 00:00:06
R>* 10.10.10.0/24 [2/2] via 10.1.1.50, eth0, weight 1, 00:00:01
S   10.10.10.0/24 [10/0] unreachable (blackhole), weight 1, 00:00:06