Distribute-List Prefix-List
Test to verify RIPng distribute-list prefix-list configuration for route filtering.
The set protocols ripng distribute-list prefix-list in <list> command filters incoming RIPng
routes globally across all interfaces using a prefix-list. The set protocols ripng distribute-list
prefix-list out <list> command filters outgoing RIPng routes globally. These commands provide
centralized control over route acceptance and advertisement across all RIPng neighbors.
Test RIPng Distribute-List Prefix-List IN
Description
Test RIPng distribute-list prefix-list in filters incoming routes globally across all interfaces. DUT1 redistributes two dummy networks into RIPng, the 2001:db8:100::/64 and 2001:db8:200::/64 networks. DUT0 is configured with a global incoming distribute-list that permits only 2001:db8:100::/64 and denies all other routes. The test verifies that DUT0 accepts the 2001:db8:100::/64 route but rejects the 2001:db8:200::/64 route, demonstrating that the global prefix-list filter is working correctly for all incoming RIPng updates.
Scenario
Step 1: Set the following configuration in DUT0 :
set interfaces ethernet eth0 address '2001:db8::100/64' set protocols ipv6 prefix-list FILTER-ROUTES rule 10 action permit set protocols ipv6 prefix-list FILTER-ROUTES rule 10 prefix '2001:db8:100::/64' set protocols ipv6 prefix-list FILTER-ROUTES rule 20 action deny set protocols ipv6 prefix-list FILTER-ROUTES rule 20 prefix '::/0' set protocols ripng distribute-list prefix-list in FILTER-ROUTES set protocols ripng network '2001:db8::/64' 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 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::50/64' set protocols ripng network '2001:db8::/64' set protocols ripng redistribute connected set protocols ripng timers update 5 set system login user admin authentication encrypted-password '$6$GSjsCj8gHLv$/VcqU6FLi6CT2Oxn0MJQ2C2tqnRDrYKNF8HIYWJp68nvXvPdFccDsT04.WtigUONbKYrgKg8d6rEs8PjljMkH0'
Attention
DUT0 should learn route 2001:db8:100::/64 from DUT1 (allowed by distribute-list).
Step 3: Run command protocols ripng show at DUT0 and check if output matches the following regular expressions:
R\(n\) 2001:db8:100::/64Show 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::/64 :: self 1 0 R(n) 2001:db8:100::/64 fe80::dcad:beff:feef:6c10 eth0 2 0 02:58
Step 4: Run command protocols ipv6 show route at DUT0 and check if output matches the following regular expressions:
R>\* 2001:db8:100::/64Show 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::/64 is directly connected, eth0, weight 1, 00:00:04 K * 2001:db8::/64 [0/256] is directly connected, eth0, weight 1, 00:00:06 L>* 2001:db8::100/128 is directly connected, eth0, weight 1, 00:00:04 R>* 2001:db8:100::/64 [120/2] via fe80::dcad:beff:feef:6c10, eth0, weight 1, 00:00:01 C>* fe80::/64 is directly connected, eth0, weight 1, 00:00:04
Attention
DUT0 should not learn route 2001:db8:200::/64 from DUT1 (filtered by distribute-list).
Step 5: Run command protocols ripng show at DUT0 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::/64 :: self 1 0 R(n) 2001:db8:100::/64 fe80::dcad:beff:feef:6c10 eth0 2 0 02:58
Step 6: Run command protocols ipv6 show route at DUT0 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::/64 is directly connected, eth0, weight 1, 00:00:04 K * 2001:db8::/64 [0/256] is directly connected, eth0, weight 1, 00:00:06 L>* 2001:db8::100/128 is directly connected, eth0, weight 1, 00:00:04 R>* 2001:db8:100::/64 [120/2] via fe80::dcad:beff:feef:6c10, eth0, weight 1, 00:00:01 C>* fe80::/64 is directly connected, eth0, weight 1, 00:00:04
Test RIPng Distribute-List Prefix-List OUT
Description
Test RIPng distribute-list prefix-list out filters outgoing routes globally across all interfaces. DUT0 redistributes two dummy networks into RIPng, the 2001:db8:100::/64 and 2001:db8:200::/64 networks. DUT0 is configured with a global outgoing distribute-list that permits only 2001:db8:100::/64 and denies all other routes. The test verifies that DUT1 receives the 2001:db8:100::/64 route but does not receive the 2001:db8:200::/64 route, demonstrating that the global prefix-list filter is working correctly for all outgoing RIPng advertisements.
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::50/64' set protocols ipv6 prefix-list ALLOW-DUM0 rule 10 action permit set protocols ipv6 prefix-list ALLOW-DUM0 rule 10 prefix '2001:db8:100::/64' set protocols ipv6 prefix-list ALLOW-DUM0 rule 20 action deny set protocols ipv6 prefix-list ALLOW-DUM0 rule 20 prefix '::/0' set protocols ripng distribute-list prefix-list out ALLOW-DUM0 set protocols ripng network '2001:db8::/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::100/64' set protocols ripng network '2001:db8::/64' set protocols ripng timers update 5 set system login user admin authentication encrypted-password '$6$GSjsCj8gHLv$/VcqU6FLi6CT2Oxn0MJQ2C2tqnRDrYKNF8HIYWJp68nvXvPdFccDsT04.WtigUONbKYrgKg8d6rEs8PjljMkH0'
Attention
DUT1 should learn route 2001:db8:100::/64 from DUT0 (allowed by distribute-list).
Step 3: Run command protocols ripng show at DUT1 and check if output matches the following regular expressions:
R\(n\) 2001:db8:100::/64Show 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::/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::/64Show 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::/64 is directly connected, eth0, weight 1, 00:00:04 K * 2001:db8::/64 [0/256] is directly connected, eth0, weight 1, 00:00:05 L>* 2001:db8::100/128 is directly connected, eth0, weight 1, 00:00:04 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
DUT1 should not learn route 2001:db8:200::/64 from DUT0 (filtered by distribute-list).
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::/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::/64 is directly connected, eth0, weight 1, 00:00:04 K * 2001:db8::/64 [0/256] is directly connected, eth0, weight 1, 00:00:05 L>* 2001:db8::100/128 is directly connected, eth0, weight 1, 00:00:04 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