mBGP Next Hop Address

I currently have an established eBGP session established on a dual stack p2p link in my lab.
The peering is established with the v4 addresses and I have multiprotocol extensions enabled and I can share both IPv4 & v6 prefixes.
My only problem is that the v6 routes are populating the routing table with the link-local address of the peer as the next hop when I would prefer it to use the global address.
Can someone please look over my config and help me understand what I have misconfigured.
Thanks You.

!!!R1!!!

set interfaces ethernet eth2 address 192.168.0.0/31
set interfaces ethernet eth2 address 2001:4626::0/127
set interfaces ethernet eth2 description ‘DCRT1’

set policy prefix-list6 LAN-v6-Summary
set policy prefix-list6 LAN-v6-Summary description Summary-Prefix
set policy prefix-list6 LAN-v6-Summary rule 10 action permit
set policy prefix-list6 LAN-v6-Summary rule 10 prefix 2001:4626:0001::/48

set policy route-map IPv6-Next-Hop-DC
set policy route-map IPv6-Next-Hop-DC description Set-Eth2-As-Next-Hop
set policy route-map IPv6-Next-Hop-DC rule 10 action permit
set policy route-map IPv6-Next-Hop-DC rule 10 match ipv6 address prefix-list LAN-v6-Summary
set policy route-map IPv6-Next-Hop-DC rule 10 set ipv6-next-hop global 2001:4626::0

set protocols bgp system-as 65101
set protocols bgp neighbor 192.168.0.1 remote-as 65102
set protocols bgp neighbor 192.168.0.1 remote-as external
set protocols bgp neighbor 192.168.0.1 bfd
set protocols bgp neighbor 192.168.0.1 capability dynamic
set protocols bgp neighbor 192.168.0.1 address-family ipv4-unicast
set protocols bgp neighbor 192.168.0.1 address-family ipv6-unicast
set protocols bgp neighbor 192.168.0.1 address-family ipv6-unicast route-map export IPv6-Next-Hop-DC
set protocols bgp address-family ipv4-unicast network 10.1.0.0/16
set protocols bgp address-family ipv6-unicast network 2001:4626:0001::/48

!!!R2!!!

set interfaces ethernet eth2 address 192.168.0.1/31
set interfaces ethernet eth2 address 2001:4626::1/127
set interfaces ethernet eth2 description ‘MDRT1’

set policy prefix-list6 LAN-v6-Summary
set policy prefix-list6 LAN-v6-Summary description Summary-Prefix
set policy prefix-list6 LAN-v6-Summary rule 10 action permit
set policy prefix-list6 LAN-v6-Summary rule 10 prefix 2001:4626:0002::/48

set policy route-map IPv6-Next-Hop-MD
set policy route-map IPv6-Next-Hop-MD description Set-Eth2-As-Next-Hop
set policy route-map IPv6-Next-Hop-MD rule 10 action permit
set policy route-map IPv6-Next-Hop-MD rule 10 match ipv6 address prefix-list LAN-v6-Summary
set policy route-map IPv6-Next-Hop-MD rule 10 set ipv6-next-hop global 2001:4626::1

set protocols bgp system-as 65102
set protocols bgp neighbor 192.168.0.0 remote-as 65101
set protocols bgp neighbor 192.168.0.0 remote-as external
set protocols bgp neighbor 192.168.0.0 bfd
set protocols bgp neighbor 192.168.0.0 capability dynamic
set protocols bgp neighbor 192.168.0.0 address-family ipv4-unicast
set protocols bgp neighbor 192.168.0.0 address-family ipv6-unicast
del protocols bgp neighbor 192.168.0.0 address-family ipv6-unicast route-map export IPv6-Next-Hop-MD
set protocols bgp address-family ipv4-unicast network 10.2.0.0/16
set protocols bgp address-family ipv6-unicast network 2001:4626:0002::/48

Try import route map

set policy route-map BGP-IPV6 rule 10 set ipv6-next-hop prefer-global

no luck, it just removed the prefix from the table entirely.
I appreciate your attempt to help me, thank you.

Provide the current configuration:

show conf com | match "policy|bgp"

R1

set policy prefix-list6 LAN-v6-Summary description ‘Summary-Prefix’
set policy prefix-list6 LAN-v6-Summary rule 10 action ‘permit’
set policy prefix-list6 LAN-v6-Summary rule 10 prefix ‘2001:4626:0001::/48’
set policy route-map IPv6-Next-Hop-DC description ‘Set-Eth2-As-Next-Hop’
set policy route-map IPv6-Next-Hop-DC rule 10 action ‘permit’
set policy route-map IPv6-Next-Hop-DC rule 10 match ipv6 address prefix-list ‘LAN-v6-Summary’
set policy route-map IPv6-Next-Hop-DC rule 10 set ipv6-next-hop prefer-global
set protocols bgp address-family ipv4-unicast network 10.1.0.0/16
set protocols bgp address-family ipv6-unicast network 2001:4626:0001::/48
set protocols bgp neighbor 192.168.0.1 address-family ipv4-unicast
set protocols bgp neighbor 192.168.0.1 address-family ipv6-unicast route-map import ‘IPv6-Next-Hop-DC’
set protocols bgp neighbor 192.168.0.1 bfd
set protocols bgp neighbor 192.168.0.1 capability dynamic
set protocols bgp neighbor 192.168.0.1 remote-as ‘external’
set protocols bgp system-as ‘65101’

R2

set policy prefix-list6 LAN-v6-Summary description ‘Summary-Prefix’
set policy prefix-list6 LAN-v6-Summary rule 10 action ‘permit’
set policy prefix-list6 LAN-v6-Summary rule 10 prefix ‘2001:4626:0002::/48’
set policy route-map IPv6-Next-Hop-MD description ‘Set-Eth2-As-Next-Hop’
set policy route-map IPv6-Next-Hop-MD rule 10 action ‘permit’
set policy route-map IPv6-Next-Hop-MD rule 10 match ipv6 address prefix-list ‘LAN-v6-Summary’
set policy route-map IPv6-Next-Hop-MD rule 10 set ipv6-next-hop prefer-global
set protocols bgp address-family ipv4-unicast network 10.2.0.0/16
set protocols bgp address-family ipv6-unicast network 2001:4626:0002::/48
set protocols bgp neighbor 192.168.0.0 address-family ipv4-unicast
set protocols bgp neighbor 192.168.0.0 address-family ipv6-unicast route-map import ‘IPv6-Next-Hop-MD’
set protocols bgp neighbor 192.168.0.0 bfd
set protocols bgp neighbor 192.168.0.0 capability dynamic
set protocols bgp neighbor 192.168.0.0 remote-as ‘external’
set protocols bgp system-as ‘65102’

You have issues with originated routes and import routes
R1 originate 2001:4626:0001::/48, but for import it uses the same prefix

The same is true for R2 it originate ‘2001:4626:0002::/48 and for import it uses the same prefix

So routes are filtered, if you del match or set the correct matchem all will work fine.

For example, R1 originate 0001 and import 0002

set policy prefix-list6 LAN-v6-Summary description 'Summary-Prefix'
set policy prefix-list6 LAN-v6-Summary rule 10 action 'permit'
set policy prefix-list6 LAN-v6-Summary rule 10 prefix '2001:4626:2::/48'

set policy route-map IPv6-Next-Hop-DC description 'Set-Eth2-As-Next-Hop'
set policy route-map IPv6-Next-Hop-DC rule 10 action 'permit'
set policy route-map IPv6-Next-Hop-DC rule 10 match ipv6 address prefix-list 'LAN-v6-Summary'
set policy route-map IPv6-Next-Hop-DC rule 10 set ipv6-next-hop prefer-global

set protocols bgp address-family ipv4-unicast network 10.1.0.0/16
set protocols bgp address-family ipv6-unicast network 2001:4626:0001::/48
set protocols bgp neighbor 192.168.0.1 address-family ipv4-unicast soft-reconfiguration inbound
set protocols bgp neighbor 192.168.0.1 address-family ipv6-unicast route-map import 'IPv6-Next-Hop-DC'
set protocols bgp neighbor 192.168.0.1 address-family ipv6-unicast soft-reconfiguration inbound
set protocols bgp neighbor 192.168.0.1 bfd
set protocols bgp neighbor 192.168.0.1 capability dynamic
set protocols bgp neighbor 192.168.0.1 remote-as 'external'
set protocols bgp neighbor 192.168.0.1 solo
set protocols bgp system-as '65101'

Check:

vyos@r14:~$ show bgp ipv6 neighbors 192.168.0.1 received-routes 
BGP table version is 4, local router ID is 192.168.122.14, vrf id 0
Default local pref 100, local AS 65101
Status codes:  s suppressed, d damped, h history, * 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:4626:2::/48 2001:4626::1             0             0 65102 i

Total number of prefixes 1
vyos@r14:~$ 

1 Like

Thank You for helping me I really appreciate it.!

1 Like

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.