Nexthop-Local

Test BGP address-family ipv6-unicast nexthop-local unchanged functionality. In IPv6 BGP, routes can have both a global next-hop and a link-local next-hop. The nexthop-local unchanged command preserves the original link-local next-hop when advertising routes to iBGP peers, which is useful when peers are on the same link.

Test iBGP IPv6 - Nexthop-local unchanged

Description

Test to verify that nexthop-local unchanged preserves the link-local next-hop. DUT1 (AS 20) announces 2001:db8:10::/64 to DUT0 (AS 20) via iBGP. With nexthop-local unchanged configured, DUT0 receives the route with the original link-local next-hop from DUT1 preserved.

Scenario

Step 1: Set the following configuration in DUT0 :

set interfaces ethernet eth0 address '2001:db8:1::100/64'
set protocols bgp 20 neighbor peer address-family ipv6-unicast activate
set protocols bgp 20 neighbor peer address-family ipv6-unicast nexthop-local unchanged
set protocols bgp 20 neighbor peer remote-address '2001:db8:1::200'
set protocols bgp 20 neighbor peer remote-as 20
set protocols bgp 20 parameters router-id 1.1.1.100
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:10::1/64'
set interfaces ethernet eth0 address '2001:db8:1::200/64'
set protocols bgp 20 address-family ipv6-unicast redistribute connected
set protocols bgp 20 neighbor peer address-family ipv6-unicast activate
set protocols bgp 20 neighbor peer remote-address '2001:db8:1::100'
set protocols bgp 20 neighbor peer remote-as 20
set protocols bgp 20 parameters router-id 1.1.1.200
set system login user admin authentication encrypted-password '$6$GSjsCj8gHLv$/VcqU6FLi6CT2Oxn0MJQ2C2tqnRDrYKNF8HIYWJp68nvXvPdFccDsT04.WtigUONbKYrgKg8d6rEs8PjljMkH0'

Attention

Verify iBGP session establishes 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::200.*Established
Show output
IPv6 Unicast Summary:
BGP router identifier 1.1.1.100, local AS number 20 VRF default vrf-id 0
BGP table version 0
RIB entries 0, using 0 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::200 0.0.0.0         4         20         2         4        0    0    0 00:00:01  Established        0        0 FRRouting/10.4.1

Total number of neighbors 1

Attention

Verify that DUT0 receives IPv6 route 2001:db8:10::/64 with both global and link-local next-hop.

Step 4: Run command protocols bgp show ipv6 2001:db8:10::/64 at DUT0 and check if output matches the following regular expressions:

2001:db8:10::/64[\s\S]*2001:db8:1::200[\s\S]*\(fe80:
Show output
BGP routing table entry for 2001:db8:10::/64, version 2
Paths: (1 available, best #1, table default)
  Not advertised to any peer
  Local
    2001:db8:1::200 from 2001:db8:1::200 (1.1.1.200)
    (fe80::dcad:beff:feef:6c10) (used)
      Origin incomplete, metric 0, localpref 100, valid, internal, best (First path received)
      Last update: Thu Mar  5 14:46:14 2026