Page MenuHomeVyOS Platform

BGP next-hop-self not working.
Closed, ResolvedPublicBUG

Description

The next-hop-self on the neighbor config is not working. I expected it to set next-hop IP of the IP I am using to peer with my iBGP neighbor.
This router is a Route reflector.

Topology:

image.png (595×644 px, 43 KB)

route-reflector config:

protocols {
    bgp 65000 {
        neighbor 192.168.1.2 {
            remote-as 65000
        }
        neighbor 192.168.2.2 {
            address-family {
                ipv4-unicast {
                    nexthop-self
                    route-reflector-client
                }
            }
            remote-as 65000
        }
    }
}

However, if I use the keyword in force/all does not exist in vyos

Configuration path: protocols bgp 65000 neighbor 192.168.2.2 address-family ipv4-unicast nexthop-self [force] is nod
 Set failed

If I instead manually set it under vtysh - I get the desired results.

vyos-dup# show running-config 
Building configuration...

Current configuration:
!
frr version 7.0.1-20190820-04-g047efd6
frr defaults traditional
hostname vyos-dup
log syslog informational
service integrated-vtysh-config
!
router bgp 65000
 neighbor 192.168.1.2 remote-as 65000
 neighbor 192.168.2.2 remote-as 65000
 !
 address-family ipv4 unicast
  neighbor 192.168.1.2 next-hop-self force
  neighbor 192.168.2.2 route-reflector-client
  neighbor 192.168.2.2 next-hop-self force
  neighbor 192.168.2.2 next-hop-self
 exit-address-family
!
line vty

Details

Difficulty level
Unknown (require assessment)
Version
v1.2.3
Why the issue appeared?
Will be filled on close
Is it a breaking change?
Unspecified (possibly destroys the router)

Related Objects

Mentioned In
1.2.9

Event Timeline

olofl updated the task description. (Show Details)
olofl updated the task description. (Show Details)

From CPO on Slack:

https://github.com/vyos/vyatta-cfg-quagga/blob/current/scripts/bgp/vyatta-bgp.pl#L451
scripts/bgp/vyatta-bgp.pl:451
      set => 'router bgp #3 ; address-family ipv4 unicast ; neighbor #5 next-hop-self',
<https://github.com/vyos/vyatta-cfg-quagga|vyos/vyatta-cfg-quagga>vyos/vyatta-cfg-quagga | Added by GitHub

change this line to next-hop-self force  on your system and check if the CLI works as expected after a reboot
/opt/vyatta/sbin/vyatta-bgp.pl

I added force keyword on line 451, and now the FRR config looks correct for iBGP.
Im not sure if there are any reasons why its a separate knob for eBGP and iBGP, but it works as I want to with iBGP and force keyword.

vyos@vyos# set protocols bgp 65000 neighbor 192.168.1.2 address-family ipv4 nexthop-self 
vtysh# show run
Building configuration...
Current configuration:
!
frr version 7.0.1-20190820-04-g047efd6
frr defaults traditional
hostname vyos-dup
log syslog informational
service integrated-vtysh-config
!
router bgp 65000
 neighbor 192.168.1.2 remote-as 65000
 neighbor 192.168.2.2 remote-as 65000
 !
 address-family ipv4 unicast
  neighbor 192.168.1.2 next-hop-self force
...
syncer triaged this task as Normal priority.
syncer edited projects, added VyOS 1.3 Equuleus; removed VyOS 1.2 Crux.
zsdc changed the task status from Open to In progress.Dec 31 2019, 9:27 PM
Viacheslav added a subscriber: Viacheslav.

Fixed, VyOS 1.3-rolling-202007240117

set protocols bgp 65001 neighbor 10.0.0.1 address-family ipv4-unicast nexthop-self force
set protocols bgp 65001 neighbor 10.0.0.1 address-family ipv4-unicast route-reflector-client
set protocols bgp 65001 neighbor 10.0.0.1 remote-as '65001'

Vtysh

!
router bgp 65001
 neighbor 10.0.0.2 remote-as 65001
 !
 address-family ipv4 unicast
  neighbor 10.0.0.2 route-reflector-client
  neighbor 10.0.0.2 next-hop-self force
  neighbor 10.0.0.2 next-hop-self
 exit-address-family
!

I ran into this issue as well and verified it's resolved on current rolling release. Will this also be fixed in 1.2.6?