The NEXT_HOP Attribute
Configuration Example 1
Case 1:
The NEXT_HOP will be the NEXT_HOP of the external Neighbor.
As the following example illustrates, Switch A distributes 7777::/64 to Switch B. As seen, the next_hop is 5005::02 on both Switch B and Switch C. It will not be active, as Switch C does not know how to reach 5005::2. Thus, user must instruct Switch C on how to reach next_hop, 5005::2 via IGP.
Figure 1-13
Step 1: Switch A and Switch B Enable EBGP. Switch B and Switch C Enable IGP.
Switch A:
admin@XorPlus# set protocols bgp bgp-id 33.33.33.33 admin@XorPlus# set 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 9 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 "9" admin@XorPlus# set protocols bgp peer 3003::1 local-ip "3003::2" admin@XorPlus# set protocols bgp peer 3003::1 as "9" admin@XorPlus# set protocols bgp peer 3003::1 ipv6-unicast true 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
Switch C:
admin@XorPlus# set protocols bgp bgp-id 6.6.6.6 admin@XorPlus# set protocols bgp local-as "9" admin@XorPlus# set protocols bgp peer 3003::2 local-ip "3003::1" admin@XorPlus# set protocols bgp peer 3003::2 as "9" admin@XorPlus# set protocols bgp peer 3003::2 ipv6-unicast true
Step 2: Switch A propagate a BGP route entry 7777::/64 to Switch B
Note: Check the BGP route table on Switch B. The next_hop should be 5005::2. And the next_hop also is 5005::2, but it’s not reachable on Switch C, so the BGP route entry 7777::/64 is inactive.
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 5005::2 9.9.9.9 10 i
Step 3: Configure a static route to the destination 5005::2/64, and specify the next_hop 3003::1/64 on Switch C
Switch C:
admin@XorPlus# set protocols static route 5005::/64 next-hop 3003::2 admin@XorPlus# run show route forward-route ipv6 all Destination NetMask NextHopMac Port --------------------------------------- --------------------------------------- ----------------- --------- 2001:: ffff:ffff:ffff:ffff:: 04:7D:7B:62:93:FF connected 3003:: ffff:ffff:ffff:ffff:: 04:7D:7B:62:93:FF connected 5005:: ffff:ffff:ffff:ffff:: C8:0A:A9:AE:0A:66 te-1/1/46 7777:: ffff:ffff:ffff:ffff:: C8:0A:A9:AE:0A:66 te-1/1/46
Step 4: Check BGP route table on Switch C, the BGP route entry 7777::/64 is already active as the next_hop 5005:;2 was reachable and it is installed into route table.
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 9.9.9.9 10 i admin@XorPlus# admin@XorPlus# run show route forward-route ipv6 all Destination NetMask NextHopMac Port --------------------------------------- --------------------------------------- ----------------- --------- 2001:: ffff:ffff:ffff:ffff:: 04:7D:7B:62:93:FF connected 3003:: ffff:ffff:ffff:ffff:: 04:7D:7B:62:93:FF connected 5005:: ffff:ffff:ffff:ffff:: C8:0A:A9:AE:0A:66 te-1/1/46 7777:: ffff:ffff:ffff:ffff:: C8:0A:A9:AE:0A:66 te-1/1/46
Configuration Example 2
Case 2:
Use the set protocols bgp peer <Peer-IPV6-Address> next-hop-self true command to force the router to advertise itself.
Figure 1-14
Step 1: Switch A Switch B Enable EBGP, Switch B Switch C Enable IGP
Switch A:
admin@XorPlus# set protocols bgp bgp-id 33.33.33.33 admin@XorPlus# set 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 9 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 "9" admin@XorPlus# set protocols bgp peer 3003::1 local-ip "3003::2" admin@XorPlus# set protocols bgp peer 3003::1 as "9" admin@XorPlus# set protocols bgp peer 3003::1 ipv6-unicast true 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
Switch C:
admin@XorPlus# set protocols bgp bgp-id 6.6.6.6 admin@XorPlus# set protocols bgp local-as "9" admin@XorPlus# set protocols bgp peer 3003::2 local-ip "3003::1" admin@XorPlus# set protocols bgp peer 3003::2 as "9" admin@XorPlus# set protocols bgp peer 3003::2 ipv6-unicast true
Step 2: Switch A propagate a BGP route entry 7777::/64 to Switch B
Note: Check the BGP route table on Switch B. The next_hop should be 5005::2.
And the next_hop also is 5005::2 and it’s not reachable on SwitchC, so the bgp route entry 7777::/64 is inactive.
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 5005::2 9.9.9.9 10 i
Step 3: Enable Next-hop-self on Switch B
Note: After enabling next-hop-self on Switch B, the next-hop will be forced to be modified by itself using the IPv6 address.
Switch B:
admin@XorPlus# set protocols bgp peer 3003::1 next-hop-self 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
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
Note: We can see that the next-hop has been set as 3003::2.
Configuration Example 3
Case 3:
The NEXT_HOP always is the peer IPv6 address who advertised it.
Figure 1-15
Step 1: Switch A Switch B Enable EBGP
Switch A:
admin@XorPlus# set protocols bgp bgp-id 33.33.33.33 admin@XorPlus# set 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 9 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 "9" 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
Step 2: Switch A propagate a BGP route entry 7777::/64 to Switch B
Note: Check the BGP route table on Switch B, The next_hop should be 5005::2.
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
Copyright © 2025 Pica8 Inc. All Rights Reserved.