Aggregate-Address As-Set
Scenario to verify BGP address-family ipv6-unicast aggregate-address as-set configuration. The as-set option generates AS_SET path information for the aggregate route, preserving the AS path information from the contributing routes. This is useful for loop prevention when aggregating routes from multiple AS sources.
Test BGP IPv6 Aggregate Address As-Set eBGP
Description
Test BGP address-family ipv6-unicast aggregate-address as-set with eBGP. DUT0 (AS 10) receives
route 2001:db8:100::/64 from DUT1 (AS 20) and has local route 2001:db8:200::/64.
It aggregates both into 2001:db8::/32 with as-set and announces to
DUT2 (AS 30). With as-set, DUT2 sees AS_SET {20} in the path,
preserving the origin AS information for loop prevention.
Scenario
Step 1: Set the following configuration in DUT0 :
set interfaces dummy dum0 address '2001:db8:200::1/64' set interfaces ethernet eth0 address '2001:db8:1::100/64' set interfaces ethernet eth1 address '2001:db8:2::100/64' set protocols bgp 10 address-family ipv6-unicast aggregate-address '2001:db8::/32' as-set set protocols bgp 10 address-family ipv6-unicast redistribute connected set protocols bgp 10 neighbor DUT1 address-family ipv6-unicast activate set protocols bgp 10 neighbor DUT1 address-family ipv6-unicast route-map import PERMIT set protocols bgp 10 neighbor DUT1 remote-address '2001:db8:1::1' set protocols bgp 10 neighbor DUT1 remote-as 20 set protocols bgp 10 neighbor DUT2 address-family ipv6-unicast activate set protocols bgp 10 neighbor DUT2 address-family ipv6-unicast route-map export PERMIT set protocols bgp 10 neighbor DUT2 remote-address '2001:db8:2::2' set protocols bgp 10 neighbor DUT2 remote-as 30 set protocols bgp 10 parameters router-id 1.1.1.100 set protocols route-map PERMIT rule 1 action permit 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 ethernet eth0 address '2001:db8:1::1/64' set protocols bgp 20 address-family ipv6-unicast redistribute connected set protocols bgp 20 neighbor DUT0 address-family ipv6-unicast activate set protocols bgp 20 neighbor DUT0 address-family ipv6-unicast route-map export PERMIT set protocols bgp 20 neighbor DUT0 remote-address '2001:db8:1::100' set protocols bgp 20 neighbor DUT0 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'
Step 3: Set the following configuration in DUT2 :
set interfaces ethernet eth1 address '2001:db8:2::2/64' set protocols bgp 30 neighbor DUT0 address-family ipv6-unicast activate set protocols bgp 30 neighbor DUT0 address-family ipv6-unicast route-map import PERMIT set protocols bgp 30 neighbor DUT0 remote-address '2001:db8:2::100' set protocols bgp 30 neighbor DUT0 remote-as 10 set protocols bgp 30 parameters router-id 1.1.1.2 set protocols route-map PERMIT rule 1 action permit set system login user admin authentication encrypted-password '$6$GSjsCj8gHLv$/VcqU6FLi6CT2Oxn0MJQ2C2tqnRDrYKNF8HIYWJp68nvXvPdFccDsT04.WtigUONbKYrgKg8d6rEs8PjljMkH0'
Attention
Verify BGP sessions are established
Step 4: Run command protocols bgp show ipv6 summary at DUT0 and check if output matches the following regular expressions:
2001:db8:1::1.*Established[\s\S]+2001:db8:2::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 6 RIB entries 8, using 1024 bytes of memory Peers 2, using 47 KiB of memory Neighbor LocalAddr V AS MsgRcvd MsgSent TblVer InQ OutQ Up/Down State PfxRcd PfxSnt Desc 2001:db8:1::1 0.0.0.0 4 20 6 4 6 0 0 00:00:03 Established 2 (Policy) N/A 2001:db8:2::2 0.0.0.0 4 30 2 3 0 0 0 00:00:01 Established (Policy) 0 N/A Total number of neighbors 2
Attention
Verify that DUT0 receives route 2001:db8:100::/64 from DUT1 (AS 20)
Step 5: Run command protocols bgp show ipv6 at DUT0 and check if output matches the following regular expressions:
[*].*?2001:db8:(100|200)::/64[\s\S]+2001:db8:(100|200)::/64Show output
BGP table version is 6, local router ID is 1.1.1.100, 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 *> 2001:db8::/32 :: 0 32768 {20} ? *> 2001:db8:1::/64 :: 0 32768 ? * fe80::dcad:beff:feef:6c10 0 0 20 ? *> 2001:db8:2::/64 :: 0 32768 ? *> 2001:db8:100::/64 fe80::dcad:beff:feef:6c10 0 0 20 ? *> 2001:db8:200::/64 :: 0 32768 ? Displayed 5 routes and 6 total paths
Attention
Verify that DUT0 has the aggregate route 2001:db8::/32 with AS_SET containing AS 20
Step 6: Run command protocols bgp show ipv6 at DUT0 and check if output matches the following regular expressions:
[*].*?2001:db8::/32[\s\S]+?\{20\}\s+\?Show output
BGP table version is 6, local router ID is 1.1.1.100, 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 *> 2001:db8::/32 :: 0 32768 {20} ? *> 2001:db8:1::/64 :: 0 32768 ? * fe80::dcad:beff:feef:6c10 0 0 20 ? *> 2001:db8:2::/64 :: 0 32768 ? *> 2001:db8:100::/64 fe80::dcad:beff:feef:6c10 0 0 20 ? *> 2001:db8:200::/64 :: 0 32768 ? Displayed 5 routes and 6 total paths
Attention
Verify that DUT2 receives the aggregate route with AS 10 and AS_SET {20}
Step 7: Run command protocols bgp show ipv6 at DUT2 and check if output matches the following regular expressions:
[*].*?2001:db8::/32[\s\S]+?10\s+\{20\}\s+\?Show output
BGP table version is 5, local router ID is 1.1.1.2, vrf id 0 Default local pref 100, local AS 30 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::/32 fe80::dcad:beff:feef:6c01 0 0 10 {20} ? *> 2001:db8:1::/64 fe80::dcad:beff:feef:6c01 0 0 10 ? *> 2001:db8:2::/64 fe80::dcad:beff:feef:6c01 0 0 10 ? *> 2001:db8:100::/64 fe80::dcad:beff:feef:6c01 0 10 20 ? *> 2001:db8:200::/64 fe80::dcad:beff:feef:6c01 0 0 10 ? Displayed 5 routes and 5 total paths