Redistribute Connected

Scenario to verify RIPng redistribute connected functionality with metric configuration and route-map filtering options.

Test RIPng Default Metric With Default Value

Description

Test RIPng redistribute connected metric with the default value (metric 1). When metric is not explicitly configured, RIPng uses metric 1 by default. DUT0 redistributes the connected IPv6 route 2001:db8:100::/64 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 '2001:db8:100::1/64'
set interfaces ethernet eth0 address '2001:db8:1::100/64'
set protocols ripng network '2001:db8:1::/64'
set protocols ripng redistribute connected
set protocols ripng 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 '2001:db8:1::50/64'
set protocols ripng network '2001:db8:1::/64'
set protocols ripng timers update 5
set system login user admin authentication encrypted-password '$6$GSjsCj8gHLv$/VcqU6FLi6CT2Oxn0MJQ2C2tqnRDrYKNF8HIYWJp68nvXvPdFccDsT04.WtigUONbKYrgKg8d6rEs8PjljMkH0'

Attention

Verify that DUT1 learns route 2001:db8:100::/64 via eth0 with metric 2

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

R\(n\) +2001:db8:100::/64[\s\S]+eth0 +2
Show output
Codes: K - kernel route, C - connected, L - local, S - static,
       R - RIPng, 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, (a/S) - aggregated/Suppressed

   Network      Next Hop                      Via     Metric Tag Time
C(i) 2001:db8:1::/64
                  ::                          self       1    0
R(n) 2001:db8:100::/64
                  fe80::dcad:beff:feef:6c00   eth0       2    0  02:58

Step 4: Ping IP address 2001:db8:100::1 from DUT1:

admin@DUT1$ ping 2001:db8:100::1 count 1 size 56 timeout 1
Show output
PING 2001:db8:100::1(2001:db8:100::1) 56 data bytes
64 bytes from 2001:db8:100::1: icmp_seq=1 ttl=64 time=0.719 ms

--- 2001:db8:100::1 ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 0.719/0.719/0.719/0.000 ms

Test RIPng Default Metric With Valid Value

Description

Test RIPng redistribute connected metric with a valid value (metric 5). DUT0 redistributes the connected IPv6 route 2001:db8:100::/64 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 '2001:db8:100::1/64'
set interfaces ethernet eth0 address '2001:db8:1::100/64'
set protocols ripng network '2001:db8:1::/64'
set protocols ripng redistribute connected metric 5
set protocols ripng 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 '2001:db8:1::50/64'
set protocols ripng network '2001:db8:1::/64'
set protocols ripng timers update 5
set system login user admin authentication encrypted-password '$6$GSjsCj8gHLv$/VcqU6FLi6CT2Oxn0MJQ2C2tqnRDrYKNF8HIYWJp68nvXvPdFccDsT04.WtigUONbKYrgKg8d6rEs8PjljMkH0'

Attention

Verify that DUT1 learns route 2001:db8:100::/64 via eth0 with metric 6

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

R\(n\) +2001:db8:100::/64[\s\S]+eth0 +6
Show output
Codes: K - kernel route, C - connected, L - local, S - static,
       R - RIPng, 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, (a/S) - aggregated/Suppressed

   Network      Next Hop                      Via     Metric Tag Time
C(i) 2001:db8:1::/64
                  ::                          self       1    0
R(n) 2001:db8:100::/64
                  fe80::dcad:beff:feef:6c00   eth0       6    0  02:59

Step 4: Ping IP address 2001:db8:100::1 from DUT1:

admin@DUT1$ ping 2001:db8:100::1 count 1 size 56 timeout 1
Show output
PING 2001:db8:100::1(2001:db8:100::1) 56 data bytes
64 bytes from 2001:db8:100::1: icmp_seq=1 ttl=64 time=0.456 ms

--- 2001:db8:100::1 ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 0.456/0.456/0.456/0.000 ms

Test RIPng Metric 16 Route Not Announced

Description

Test RIPng redistribute connected metric 16 - route is not announced. When DUT0 redistributes 2001:db8:100::/64 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 RIPng 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 '2001:db8:100::1/64'
set interfaces ethernet eth0 address '2001:db8:1::100/64'
set protocols ripng network '2001:db8:1::/64'
set protocols ripng redistribute connected metric 16
set protocols ripng 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 '2001:db8:1::50/64'
set protocols ripng network '2001:db8:1::/64'
set protocols ripng timers update 5
set system login user admin authentication encrypted-password '$6$GSjsCj8gHLv$/VcqU6FLi6CT2Oxn0MJQ2C2tqnRDrYKNF8HIYWJp68nvXvPdFccDsT04.WtigUONbKYrgKg8d6rEs8PjljMkH0'

Attention

Verify that DUT1 does not see route 2001:db8:100::/64 in RIPng database

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

Show output
Codes: K - kernel route, C - connected, L - local, S - static,
       R - RIPng, 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, (a/S) - aggregated/Suppressed

   Network      Next Hop                      Via     Metric Tag Time
C(i) 2001:db8:1::/64
                  ::                          self       1    0

Step 4: Expect a failure in the following command: Ping IP address 2001:db8:100::1 from DUT1:

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

Test RIPng Redistribute Connected With Route-Map

Description

Test RIPng route redistribution with route-map filtering between two routers. DUT0 has two dummy interfaces (dum0 and dum1), but only dum0 matches the route-map INTERNAL filter. This validates that only matching IPv6 routes are advertised while non-matching routes (dum1) are filtered out.

Scenario

Step 1: Set the following configuration in DUT0 :

set interfaces dummy dum0 address '2001:db8:100::1/64'
set interfaces dummy dum1 address '2001:db8:200::1/64'
set interfaces ethernet eth0 address '2001:db8:1::100/64'
set protocols ripng network '2001:db8:1::/64'
set protocols ripng redistribute connected route-map INTERNAL
set protocols ripng timers update 5
set protocols route-map INTERNAL rule 1 action permit
set protocols route-map INTERNAL rule 1 match interface dum0
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 '2001:db8:1::50/64'
set protocols ripng network '2001:db8:1::/64'
set protocols ripng timers update 5
set system login user admin authentication encrypted-password '$6$GSjsCj8gHLv$/VcqU6FLi6CT2Oxn0MJQ2C2tqnRDrYKNF8HIYWJp68nvXvPdFccDsT04.WtigUONbKYrgKg8d6rEs8PjljMkH0'

Attention

Verify that dum0 route 2001:db8:100::/64 is advertised and learned

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

R\(n\) +2001:db8:100::/64
Show output
Codes: K - kernel route, C - connected, L - local, S - static,
       R - RIPng, 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, (a/S) - aggregated/Suppressed

   Network      Next Hop                      Via     Metric Tag Time
C(i) 2001:db8:1::/64
                  ::                          self       1    0
R(n) 2001:db8:100::/64
                  fe80::dcad:beff:feef:6c00   eth0       2    0  02:58

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

R>\* +2001:db8:100::/64
Show output
Codes: K - kernel route, C - connected, L - local, S - static,
       R - RIPng, O - OSPFv3, I - IS-IS, B - BGP, 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

IPv6 unicast VRF default:
C>* 2001:db8:1::/64 is directly connected, eth0, weight 1, 00:00:03
K * 2001:db8:1::/64 [0/256] is directly connected, eth0, weight 1, 00:00:04
L>* 2001:db8:1::50/128 is directly connected, eth0, weight 1, 00:00:03
R>* 2001:db8:100::/64 [120/2] via fe80::dcad:beff:feef:6c00, eth0, weight 1, 00:00:02
C>* fe80::/64 is directly connected, eth0, weight 1, 00:00:03

Attention

Verify that dum1 route 2001:db8:200::/64 is NOT advertised (not in route-map)

Step 5: Run command protocols ripng show at DUT1 and expect this output:

Show output
Codes: K - kernel route, C - connected, L - local, S - static,
       R - RIPng, 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, (a/S) - aggregated/Suppressed

   Network      Next Hop                      Via     Metric Tag Time
C(i) 2001:db8:1::/64
                  ::                          self       1    0
R(n) 2001:db8:100::/64
                  fe80::dcad:beff:feef:6c00   eth0       2    0  02:57

Step 6: Run command protocols ipv6 show route at DUT1 and expect this output:

Show output
Codes: K - kernel route, C - connected, L - local, S - static,
       R - RIPng, O - OSPFv3, I - IS-IS, B - BGP, 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

IPv6 unicast VRF default:
C>* 2001:db8:1::/64 is directly connected, eth0, weight 1, 00:00:03
K * 2001:db8:1::/64 [0/256] is directly connected, eth0, weight 1, 00:00:04
L>* 2001:db8:1::50/128 is directly connected, eth0, weight 1, 00:00:03
R>* 2001:db8:100::/64 [120/2] via fe80::dcad:beff:feef:6c00, eth0, weight 1, 00:00:02
C>* fe80::/64 is directly connected, eth0, weight 1, 00:00:03