Redistribute Connected Route-Map
Test to verify RIP protocol route-map filtering functionality for IPv4 route redistribution.
This test validates that only routes matching the route-map criteria are advertised to neighbors,
while non-matching connected routes are filtered out. Demonstrates selective route redistribution
using route-map with interface matching.
Test RIP
Description
Test RIP 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 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 10.10.10.1/24 set interfaces dummy dum1 address 10.20.20.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 route-map INTERNAL set protocols rip 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 10.1.1.50/24 set protocols rip network 10.1.1.0/24 set system login user admin authentication encrypted-password '$6$GSjsCj8gHLv$/VcqU6FLi6CT2Oxn0MJQ2C2tqnRDrYKNF8HIYWJp68nvXvPdFccDsT04.WtigUONbKYrgKg8d6rEs8PjljMkH0'
Attention
Verify that dum0 route 10.10.10.0/24 is advertised and learned
Step 3: Run command protocols rip show at DUT1 and check if output matches the following regular expressions:
10.10.10.0/24Show 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: Run command protocols ip show route at DUT1 and check if output matches the following regular expressions:
10.10.10.0/24Show 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:02 L>* 10.1.1.50/32 is directly connected, eth0, weight 1, 00:00:02 R>* 10.10.10.0/24 [120/2] via 10.1.1.100, eth0, weight 1, 00:00:01 L 10.215.168.21/32 is directly connected, eth0 inactive, weight 1, 02:18:21 L 10.215.168.21/32 is directly connected, eth0 inactive, weight 1, 02:20:05 L 10.215.168.21/32 is directly connected, eth0 inactive, weight 1, 02:47:27 L> 30.0.0.3/32 is directly connected, eth0 inactive, weight 1, 04:00:57 L 30.0.0.3/32 is directly connected, eth0 inactive, weight 1, 04:01:17
Attention
Verify that dum1 route 10.20.20.0/24 is NOT advertised (not in route-map)
Step 5: 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 R(n) 10.10.10.0/24 10.1.1.100 2 10.1.1.100 0 02:58
Step 6: Run command protocols ip show route 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, > - 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:02 L>* 10.1.1.50/32 is directly connected, eth0, weight 1, 00:00:02 R>* 10.10.10.0/24 [120/2] via 10.1.1.100, eth0, weight 1, 00:00:01 L 10.215.168.21/32 is directly connected, eth0 inactive, weight 1, 02:18:21 L 10.215.168.21/32 is directly connected, eth0 inactive, weight 1, 02:20:05 L 10.215.168.21/32 is directly connected, eth0 inactive, weight 1, 02:47:27 L> 30.0.0.3/32 is directly connected, eth0 inactive, weight 1, 04:00:57 L 30.0.0.3/32 is directly connected, eth0 inactive, weight 1, 04:01:17