Redistribute Connected Metric

Test to verify RIP metric configuration for redistributed connected routes. The redistribute connected metric command sets the metric value for connected routes redistributed into RIP. Valid values are 1-16, where metric 1 is the default when not specified. This test validates the default behavior (metric 1), custom valid metric values, and the special case of metric 16 where routes are not announced (infinity).

Test RIP Default Metric With Default Value

Description

Test RIP redistribute connected metric with the default value (metric 1). When metric is not explicitly configured, RIP uses metric 1 by default. DUT0 redistributes the connected route 10.10.10.0/24 with the default metric. DUT1 learns this route with metric 2 (incremented by 1 hop). The route is installed in the routing table and connectivity is verified with ping.

Scenario

Step 1: Set the following configuration in DUT0 :

set interfaces dummy dum0 address 10.10.10.1/24
set interfaces ethernet eth0 address 10.1.1.100/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 2: Set the following configuration in DUT1 :

set interfaces ethernet eth0 address 10.1.1.50/24
set protocols rip network 10.1.1.0/24
set protocols rip timers update 5
set system login user admin authentication encrypted-password '$6$GSjsCj8gHLv$/VcqU6FLi6CT2Oxn0MJQ2C2tqnRDrYKNF8HIYWJp68nvXvPdFccDsT04.WtigUONbKYrgKg8d6rEs8PjljMkH0'

Attention

Verify that DUT1 learns route 10.10.10.0/24 with next-hop 10.1.1.100 and metric 2

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

10.10.10.0/24\s+10.1.1.100\s+2\s+10.1.1.100
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.100            2 10.1.1.100        0 02:58

Step 4: Ping IP address 10.10.10.1 from DUT1:

admin@DUT1$ ping 10.10.10.1 count 1 size 56 timeout 1
Show output
PING 10.10.10.1 (10.10.10.1) 56(84) bytes of data.
64 bytes from 10.10.10.1: icmp_seq=1 ttl=64 time=1.98 ms

--- 10.10.10.1 ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 1.979/1.979/1.979/0.000 ms

Test RIP Default Metric With Valid Value

Description

Test RIP redistribute connected metric with a valid value (metric 5). DUT0 redistributes the connected route 10.10.10.0/24 with metric 5. DUT1 learns this route with metric 6 (incremented by 1 hop). The route is installed in the routing table and connectivity is verified with ping.

Scenario

Step 1: Set the following configuration in DUT0 :

set interfaces dummy dum0 address 10.10.10.1/24
set interfaces ethernet eth0 address 10.1.1.100/24
set protocols rip network 10.1.1.0/24
set protocols rip redistribute connected metric 5
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 ethernet eth0 address 10.1.1.50/24
set protocols rip network 10.1.1.0/24
set protocols rip timers update 5
set system login user admin authentication encrypted-password '$6$GSjsCj8gHLv$/VcqU6FLi6CT2Oxn0MJQ2C2tqnRDrYKNF8HIYWJp68nvXvPdFccDsT04.WtigUONbKYrgKg8d6rEs8PjljMkH0'

Attention

Verify that DUT1 learns route 10.10.10.0/24 with next-hop 10.1.1.100 and metric 6

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

10.10.10.0/24\s+10.1.1.100\s+6\s+10.1.1.100
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.100            6 10.1.1.100        0 02:58

Step 4: Ping IP address 10.10.10.1 from DUT1:

admin@DUT1$ ping 10.10.10.1 count 1 size 56 timeout 1
Show output
PING 10.10.10.1 (10.10.10.1) 56(84) bytes of data.
64 bytes from 10.10.10.1: icmp_seq=1 ttl=64 time=0.261 ms

--- 10.10.10.1 ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 0.261/0.261/0.261/0.000 ms

Test RIP Metric 16 Route Not Announced

Description

Test RIP redistribute connected metric 16 - route is not announced. When DUT0 redistributes 10.10.10.0/24 with metric 16 (infinity), the route is not announced to neighbors because it is already unreachable at the source. DUT1 does not see the route in RIP database, does not install it in routing table, and ping fails.

Scenario

Step 1: Set the following configuration in DUT0 :

set interfaces dummy dum0 address 10.10.10.1/24
set interfaces ethernet eth0 address 10.1.1.100/24
set protocols rip network 10.1.1.0/24
set protocols rip redistribute connected metric 16
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 ethernet eth0 address 10.1.1.50/24
set protocols rip network 10.1.1.0/24
set protocols rip timers update 5
set system login user admin authentication encrypted-password '$6$GSjsCj8gHLv$/VcqU6FLi6CT2Oxn0MJQ2C2tqnRDrYKNF8HIYWJp68nvXvPdFccDsT04.WtigUONbKYrgKg8d6rEs8PjljMkH0'

Attention

Verify that DUT1 does not see route 10.10.10.0/24 in RIP database

Step 3: Run command protocols rip show at DUT1 and expect this output:

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

Step 4: Expect a failure in the following command: Ping IP address 10.10.10.1 from DUT1:

admin@DUT1$ ping 10.10.10.1 count 1 size 56 timeout 1
Show output
ping: connect: Network is unreachable