Network
Scenario to verify BGP address-family ipv6-unicast network command functionality, including basic network advertisement and route-map filtered advertisement, for both iBGP and eBGP sessions.
The network command is the primary method for injecting IPv6 routes into BGP. It
tells the router to advertise a specific prefix to BGP neighbors, provided the
route exists in the routing table (e.g., via a static blackhole route).
Basic network: Announces the specified prefix to all neighbors. DUT1 should learn the network and install it in its routing table.
Network with route-map: Applies a route-map filter to the network command. Only networks matching the route-map criteria (via prefix-list) are announced. In this test, three networks are configured but only one matches the filter, so DUT1 learns only that network while the others are filtered out.
Each variant is tested with both iBGP (same AS) and eBGP (different AS) sessions.
Test BGP IPv6 Network
Description
Test BGP address-family ipv6-unicast network command: basic (DUT1 learns the announced network) and route-map (only matching networks are advertised, others filtered out). Each variant tested with iBGP and eBGP.
Scenario
Example 1
Step 1: Set the following configuration in DUT0 :
set interfaces ethernet eth0 address '2001:db8:1::1/64' set protocols bgp 10 address-family ipv6-unicast network '2001:db8:10::/64' set protocols bgp 10 neighbor peer address-family ipv6-unicast activate set protocols bgp 10 neighbor peer nexthop-self set protocols bgp 10 neighbor peer remote-address '2001:db8:1::2' set protocols bgp 10 neighbor peer remote-as 10 set protocols bgp 10 parameters router-id 1.1.1.100 set protocols static route6 '2001:db8:10::/64' blackhole 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::2/64' set protocols bgp 10 neighbor peer address-family ipv6-unicast activate set protocols bgp 10 neighbor peer remote-address '2001:db8:1::1' set protocols bgp 10 neighbor peer remote-as 10 set protocols bgp 10 parameters router-id 1.1.1.1 set system login user admin authentication encrypted-password '$6$GSjsCj8gHLv$/VcqU6FLi6CT2Oxn0MJQ2C2tqnRDrYKNF8HIYWJp68nvXvPdFccDsT04.WtigUONbKYrgKg8d6rEs8PjljMkH0'
Attention
Verify BGP session is established between DUT0 and DUT1.
Step 3: Run command protocols bgp show ipv6 summary at DUT0 and check if output matches the following regular expressions:
2001:db8:1::2.*EstablishedShow output
IPv6 Unicast Summary: BGP router identifier 1.1.1.100, local AS number 10 VRF default vrf-id 0 BGP table version 1 RIB entries 1, using 128 bytes of memory Peers 1, using 24 KiB of memory Neighbor LocalAddr V AS MsgRcvd MsgSent TblVer InQ OutQ Up/Down State PfxRcd PfxSnt Desc 2001:db8:1::2 0.0.0.0 4 10 2 2 0 0 0 00:00:00 Established 0 0 FRRouting/10.4.1 Total number of neighbors 1
Attention
Verify DUT1 learns network 2001:db8:10::/64.
Step 4: Run command protocols bgp show ipv6 at DUT1 and check if output matches the following regular expressions:
[*]>i\s+2001:db8:10::/64Show output
BGP table version is 1, local router ID is 1.1.1.1, vrf id 0 Default local pref 100, local AS 10 local address - Status codes: s suppressed, d damped, h history, u unsorted, * valid, > best, = multipath, i internal, r RIB-failure, S Stale, R Removed Nexthop codes: @NNN nexthop's vrf id, < announce-nh-self Origin codes: i - IGP, e - EGP, ? - incomplete RPKI validation codes: V valid, I invalid, N Not found Network Next Hop Metric LocPrf Weight Path *>i 2001:db8:10::/64 fe80::dcad:beff:feef:6c00 0 100 0 i Displayed 1 routes and 1 total paths
Attention
Verify that route is installed in DUT1 routing table.
Step 5: Run command protocols ipv6 show route at DUT1 and check if output matches the following regular expressions:
B>[*]\s+2001:db8:10::/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: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::2/128 is directly connected, eth0, weight 1, 00:00:03 B>* 2001:db8:10::/64 [200/0] via fe80::dcad:beff:feef:6c00, eth0, weight 1, 00:00:01 C>* fe80::/64 is directly connected, eth0, weight 1, 00:00:03
Example 2
Step 1: Set the following configuration in DUT0 :
set interfaces ethernet eth0 address '2001:db8:1::1/64' set protocols bgp 10 address-family ipv6-unicast network '2001:db8:10::/64' set protocols bgp 10 neighbor peer address-family ipv6-unicast activate set protocols bgp 10 neighbor peer address-family ipv6-unicast route-map export PERMIT set protocols bgp 10 neighbor peer remote-address '2001:db8:1::2' set protocols bgp 10 neighbor peer remote-as 20 set protocols bgp 10 parameters router-id 1.1.1.100 set protocols route-map PERMIT rule 1 action permit set protocols static route6 '2001:db8:10::/64' blackhole 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::2/64' set protocols bgp 20 neighbor peer address-family ipv6-unicast activate set protocols bgp 20 neighbor peer address-family ipv6-unicast route-map import PERMIT set protocols bgp 20 neighbor peer remote-address '2001:db8:1::1' set protocols bgp 20 neighbor peer remote-as 10 set protocols bgp 20 parameters router-id 1.1.1.1 set protocols route-map PERMIT rule 1 action permit set system login user admin authentication encrypted-password '$6$GSjsCj8gHLv$/VcqU6FLi6CT2Oxn0MJQ2C2tqnRDrYKNF8HIYWJp68nvXvPdFccDsT04.WtigUONbKYrgKg8d6rEs8PjljMkH0'
Attention
Verify BGP session is established between DUT0 and DUT1.
Step 3: Run command protocols bgp show ipv6 summary at DUT0 and check if output matches the following regular expressions:
2001:db8:1::2.*EstablishedShow output
IPv6 Unicast Summary: BGP router identifier 1.1.1.100, local AS number 10 VRF default vrf-id 0 BGP table version 1 RIB entries 1, using 128 bytes of memory Peers 1, using 24 KiB of memory Neighbor LocalAddr V AS MsgRcvd MsgSent TblVer InQ OutQ Up/Down State PfxRcd PfxSnt Desc 2001:db8:1::2 0.0.0.0 4 20 4 4 0 0 0 00:00:01 Established (Policy) 0 N/A Total number of neighbors 1
Attention
Verify DUT1 learns network 2001:db8:10::/64.
Step 4: Run command protocols bgp show ipv6 at DUT1 and check if output matches the following regular expressions:
[*]>\s+2001:db8:10::/64Show output
BGP table version is 1, local router ID is 1.1.1.1, vrf id 0 Default local pref 100, local AS 20 local address - Status codes: s suppressed, d damped, h history, u unsorted, * valid, > best, = multipath, i internal, r RIB-failure, S Stale, R Removed Nexthop codes: @NNN nexthop's vrf id, < announce-nh-self Origin codes: i - IGP, e - EGP, ? - incomplete RPKI validation codes: V valid, I invalid, N Not found Network Next Hop Metric LocPrf Weight Path *> 2001:db8:10::/64 fe80::dcad:beff:feef:6c00 0 0 10 i Displayed 1 routes and 1 total paths
Attention
Verify that route is installed in DUT1 routing table.
Step 5: Run command protocols ipv6 show route at DUT1 and check if output matches the following regular expressions:
B>[*]\s+2001:db8:10::/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:1::/64 is directly connected, eth0, weight 1, 00:00:04 K * 2001:db8:1::/64 [0/256] is directly connected, eth0, weight 1, 00:00:05 L>* 2001:db8:1::2/128 is directly connected, eth0, weight 1, 00:00:04 B>* 2001:db8:10::/64 [20/0] via fe80::dcad:beff:feef:6c00, eth0, weight 1, 00:00:02 C>* fe80::/64 is directly connected, eth0, weight 1, 00:00:04
Example 3
Step 1: Set the following configuration in DUT0 :
set interfaces ethernet eth0 address '2001:db8:1::1/64' set protocols bgp 10 address-family ipv6-unicast network '2001:db8:10::/64' route-map FILTER-NET set protocols bgp 10 address-family ipv6-unicast network '2001:db8:20::/64' route-map FILTER-NET set protocols bgp 10 address-family ipv6-unicast network '2001:db8:30::/64' route-map FILTER-NET set protocols bgp 10 neighbor peer address-family ipv6-unicast activate set protocols bgp 10 neighbor peer nexthop-self set protocols bgp 10 neighbor peer remote-address '2001:db8:1::2' set protocols bgp 10 neighbor peer remote-as 10 set protocols bgp 10 parameters router-id 1.1.1.100 set protocols ipv6 prefix-list ALLOW-NET1 rule 1 action permit set protocols ipv6 prefix-list ALLOW-NET1 rule 1 prefix '2001:db8:10::/64' set protocols route-map FILTER-NET rule 1 action permit set protocols route-map FILTER-NET rule 1 match ipv6 address prefix-list ALLOW-NET1 set protocols static route6 '2001:db8:10::/64' blackhole set protocols static route6 '2001:db8:20::/64' blackhole set protocols static route6 '2001:db8:30::/64' blackhole 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::2/64' set protocols bgp 10 neighbor peer address-family ipv6-unicast activate set protocols bgp 10 neighbor peer remote-address '2001:db8:1::1' set protocols bgp 10 neighbor peer remote-as 10 set protocols bgp 10 parameters router-id 1.1.1.1 set system login user admin authentication encrypted-password '$6$GSjsCj8gHLv$/VcqU6FLi6CT2Oxn0MJQ2C2tqnRDrYKNF8HIYWJp68nvXvPdFccDsT04.WtigUONbKYrgKg8d6rEs8PjljMkH0'
Attention
Verify BGP session is established between DUT0 and DUT1.
Step 3: Run command protocols bgp show ipv6 summary at DUT0 and check if output matches the following regular expressions:
2001:db8:1::2.*EstablishedShow output
IPv6 Unicast Summary: BGP router identifier 1.1.1.100, local AS number 10 VRF default vrf-id 0 BGP table version 1 RIB entries 1, using 128 bytes of memory Peers 1, using 24 KiB of memory Neighbor LocalAddr V AS MsgRcvd MsgSent TblVer InQ OutQ Up/Down State PfxRcd PfxSnt Desc 2001:db8:1::2 0.0.0.0 4 10 2 2 0 0 0 00:00:00 Established 0 0 FRRouting/10.4.1 Total number of neighbors 1
Attention
Verify DUT1 learns network 2001:db8:10::/64.
Step 4: Run command protocols bgp show ipv6 at DUT1 and check if output matches the following regular expressions:
[*]>i\s+2001:db8:10::/64Show output
BGP table version is 1, local router ID is 1.1.1.1, vrf id 0 Default local pref 100, local AS 10 local address - Status codes: s suppressed, d damped, h history, u unsorted, * valid, > best, = multipath, i internal, r RIB-failure, S Stale, R Removed Nexthop codes: @NNN nexthop's vrf id, < announce-nh-self Origin codes: i - IGP, e - EGP, ? - incomplete RPKI validation codes: V valid, I invalid, N Not found Network Next Hop Metric LocPrf Weight Path *>i 2001:db8:10::/64 fe80::dcad:beff:feef:6c00 0 100 0 i Displayed 1 routes and 1 total paths
Example 4
Step 1: Set the following configuration in DUT0 :
set interfaces ethernet eth0 address '2001:db8:1::1/64' set protocols bgp 10 address-family ipv6-unicast network '2001:db8:10::/64' route-map FILTER-NET set protocols bgp 10 address-family ipv6-unicast network '2001:db8:20::/64' route-map FILTER-NET set protocols bgp 10 address-family ipv6-unicast network '2001:db8:30::/64' route-map FILTER-NET set protocols bgp 10 neighbor peer address-family ipv6-unicast activate set protocols bgp 10 neighbor peer address-family ipv6-unicast route-map export PERMIT set protocols bgp 10 neighbor peer remote-address '2001:db8:1::2' set protocols bgp 10 neighbor peer remote-as 20 set protocols bgp 10 parameters router-id 1.1.1.100 set protocols ipv6 prefix-list ALLOW-NET1 rule 1 action permit set protocols ipv6 prefix-list ALLOW-NET1 rule 1 prefix '2001:db8:10::/64' set protocols route-map FILTER-NET rule 1 action permit set protocols route-map FILTER-NET rule 1 match ipv6 address prefix-list ALLOW-NET1 set protocols route-map PERMIT rule 1 action permit set protocols static route6 '2001:db8:10::/64' blackhole set protocols static route6 '2001:db8:20::/64' blackhole set protocols static route6 '2001:db8:30::/64' blackhole 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::2/64' set protocols bgp 20 neighbor peer address-family ipv6-unicast activate set protocols bgp 20 neighbor peer address-family ipv6-unicast route-map import PERMIT set protocols bgp 20 neighbor peer remote-address '2001:db8:1::1' set protocols bgp 20 neighbor peer remote-as 10 set protocols bgp 20 parameters router-id 1.1.1.1 set protocols route-map PERMIT rule 1 action permit set system login user admin authentication encrypted-password '$6$GSjsCj8gHLv$/VcqU6FLi6CT2Oxn0MJQ2C2tqnRDrYKNF8HIYWJp68nvXvPdFccDsT04.WtigUONbKYrgKg8d6rEs8PjljMkH0'
Attention
Verify BGP session is established between DUT0 and DUT1.
Step 3: Run command protocols bgp show ipv6 summary at DUT0 and check if output matches the following regular expressions:
2001:db8:1::2.*EstablishedShow output
IPv6 Unicast Summary: BGP router identifier 1.1.1.100, local AS number 10 VRF default vrf-id 0 BGP table version 1 RIB entries 1, using 128 bytes of memory Peers 1, using 24 KiB of memory Neighbor LocalAddr V AS MsgRcvd MsgSent TblVer InQ OutQ Up/Down State PfxRcd PfxSnt Desc 2001:db8:1::2 0.0.0.0 4 20 2 2 0 0 0 00:00:01 Established (Policy) 0 N/A Total number of neighbors 1
Attention
Verify DUT1 learns network 2001:db8:10::/64.
Step 4: Run command protocols bgp show ipv6 at DUT1 and check if output matches the following regular expressions:
[*]>\s+2001:db8:10::/64Show output
BGP table version is 1, local router ID is 1.1.1.1, vrf id 0 Default local pref 100, local AS 20 local address - Status codes: s suppressed, d damped, h history, u unsorted, * valid, > best, = multipath, i internal, r RIB-failure, S Stale, R Removed Nexthop codes: @NNN nexthop's vrf id, < announce-nh-self Origin codes: i - IGP, e - EGP, ? - incomplete RPKI validation codes: V valid, I invalid, N Not found Network Next Hop Metric LocPrf Weight Path *> 2001:db8:10::/64 fe80::dcad:beff:feef:6c00 0 0 10 i Displayed 1 routes and 1 total paths