The AS_PATH Attribute
AS_PATH is a list of AS-numbers that the BGP route passed. Router will elect the shortest AS_PATH as the best path when other attributes are the same.
If using private AS-numbers (64512-65534), user can remove the private AS-number from the AS_PATH to prevent the leakage of private AS numbers into the Internet.
Figure 1-16
Step 1: Switch A and Switch B Enable EBGP. Switch B and Switch C Enable EBGP. Switch A uses a private AS-number 65534
Switch A:
admin@XorPlus# set protocols bgp bgp-id 33.33.33.33 admin@XorPlus# et protocols bgp local-as 10 admin@XorPlus# set protocols bgp peer 5005::1 local-ip "5005::2" admin@XorPlus# set protocols bgp peer 5005::1 as 65534 admin@XorPlus# set protocols bgp peer 5005::1 ipv6-unicast true
Switch B:
admin@XorPlus# set protocols bgp bgp-id 9.9.9.9 admin@XorPlus# set protocols bgp local-as "65534" admin@XorPlus# set protocols bgp peer 5005::2 local-ip "5005::1" admin@XorPlus# set protocols bgp peer 5005::2 as "10" admin@XorPlus# set protocols bgp peer 5005::2 ipv6-unicast true admin@XorPlus# set protocols bgp peer 3003::1 local-ip "3003::2" admin@XorPlus# set protocols bgp peer 3003::1 as "6" admin@XorPlus# set protocols bgp peer 3003::1 ipv6-unicast true
Switch C:
admin@XorPlus# set protocols bgp bgp-id 6.6.6.6 admin@XorPlus# set protocols bgp local-as "6" admin@XorPlus# set protocols bgp peer 3003::2 local-ip "3003::1" admin@XorPlus# set protocols bgp peer 3003::2 as "65534" admin@XorPlus# set protocols bgp peer 3003::2 ipv6-unicast true
Step 2: Check BGP peer status on Switch B
Switch B:
admin@XorPlus# run show bgp peers detail 3003::1 Peer 1: local 3003::2/50985 remote 3003::1/179 Peer ID: 6.6.6.6 Peer State: ESTABLISHED Admin State: START Negotiated BGP Version: 4 Peer AS Number: 6 Updates Received: 0, Updates Sent: 1 Messages Received: 4, Messages Sent: 5 Time since last received update: n/a Number of transitions to ESTABLISHED: 8 Time since last entering ESTABLISHED state: 69 seconds Retry Interval: 120 seconds Hold Time: 90 seconds, Keep Alive Time: 30 seconds Configured Hold Time: 90 seconds, Configured Keep Alive Time: 30 seconds Minimum AS Origination Interval: 0 seconds Minimum Route Advertisement Interval: 0 seconds admin@XorPlus# run show bgp peers detail 5005::2 Peer 1: local 5005::1/36229 remote 5005::2/179 Peer ID: 33.33.33.33 Peer State: ESTABLISHED Admin State: START Negotiated BGP Version: 4 Peer AS Number: 10 Updates Received: 1, Updates Sent: 0 Messages Received: 9, Messages Sent: 8 Time since last received update: 156 seconds Number of transitions to ESTABLISHED: 3 Time since last entering ESTABLISHED state: 156 seconds Retry Interval: 120 seconds Hold Time: 90 seconds, Keep Alive Time: 30 seconds Configured Hold Time: 90 seconds, Configured Keep Alive Time: 30 seconds Minimum AS Origination Interval: 0 seconds Minimum Route Advertisement Interval: 0 seconds
Step 3: Switch A propagate a BGP route entry 7777::/64
Note :The AS-path should be 65534 on Switch B, and the AS-path should be 9 65534 on Switch C.
Switch B:
admin@XorPlus# run show bgp routes ipv6 Status Codes: * valid route, > best route Origin Codes: i IGP, e EGP, ? incomplete Prefix Nexthop Peer AS Path ---------------------------- ------------------------ --------------- ------------ *> 7777::/64 5005::2 33.33.33.33 10 i
Switch C:
admin@XorPlus# run show bgp routes ipv6 Status Codes: * valid route, > best route Origin Codes: i IGP, e EGP, ? incomplete Prefix Nexthop Peer AS Path ---------------------------- ------------------------ --------------- ------------ *> 7777::/64 3003::2 9.9.9.9 65534 10 i
Step 4: Remove private AS-number from AS_PATH
Note: The private AS-number should be removed from the AS-path after enabled public-as-only. It only removes the private AS-number when the private AS-number is its own.
Switch B:
admin@XorPlus# set protocols bgp peer 3003::1 public-as-only true admin@XorPlus# commit Merging the configuration. Commit OK. Save done. admin@XorPlus# run show bgp routes ipv6 Status Codes: * valid route, > best route Origin Codes: i IGP, e EGP, ? incomplete Prefix Nexthop Peer AS Path ---------------------------- ------------------------ --------------- ------------ *> 7777::/64 5005::2 33.33.33.33 10 i admin@XorPlus#
Switch C:
admin@XorPlus# run show bgp routes ipv6 Status Codes: * valid route, > best route Origin Codes: i IGP, e EGP, ? incomplete Prefix Nexthop Peer AS Path ---------------------------- ------------------------ --------------- ------------ *> 7777::/64 3003::2 9.9.9.9 10 i admin@XorPlus#
Copyright © 2025 Pica8 Inc. All Rights Reserved.