Page MenuHomeVyOS Platform

BGP-LS: option nexthop-self cause commit error
Closed, ResolvedPublicBUG

Description

Setting nexthop-self or nexthop-self force under protocols bgp neighbor <IP> address-family link-state fails on commit with a configuration rendering error.

Config:

set protocols bgp neighbor 3.3.3.3 address-family link-state
set protocols bgp neighbor 3.3.3.3 remote-as '65002'
set protocols bgp neighbor 3.3.3.3 update-source '1.1.1.1'
set protocols bgp parameters router-id '1.1.1.1'
set protocols bgp system-as '65001'
set protocols isis interface eth0 network point-to-point
set protocols isis interface eth1 network point-to-point
set protocols isis interface lo passive
set protocols isis level 'level-2'
set protocols isis lsp-mtu '1300'
set protocols isis net '49.0001.0001.0001.00'
set protocols isis segment-routing global-block high-label-value '865534'
set protocols isis segment-routing global-block low-label-value '800000'
set protocols isis segment-routing maximum-label-depth '13'
set protocols isis segment-routing prefix 1.1.1.1/32 index value '1'
set protocols isis traffic-engineering enable
set protocols isis traffic-engineering export
set protocols mpls interface 'eth0'
set protocols mpls interface 'eth1'
set protocols mpls interface 'lo'
set protocols traffic-engineering interface eth0 max-bandwidth '10000'
set protocols traffic-engineering interface eth0 max-reservable-bandwidth '10000'
set protocols traffic-engineering interface eth1 max-bandwidth '10000'
set protocols traffic-engineering interface eth1 max-reservable-bandwidth '10000'

Actual behavior:

vyos@R1# set protocols bgp neighbor 3.3.3.3 address-family link-state nexthop-self 
Possible completions:
   force                Set the next hop to self for reflected routes

      
[edit]
vyos@R1# set protocols bgp neighbor 3.3.3.3 address-family link-state nexthop-self 
[edit]
vyos@R1# compare 
[protocols bgp neighbor 3.3.3.3 address-family link-state]
+ nexthop-self {
+ }

[edit]
vyos@R1# commit
[ protocols bgp ]
The system encountered an error while rendering the new routing daemon
configuration. To ensure network stability and avoid potential
connectivity disruptions, the configuration was not applied!
[[protocols bgp]] failed
Commit failed
[edit]
vyos@R1# set protocols bgp neighbor 3.3.3.3 address-family link-state nexthop-self force 
[edit]
vyos@R1# compare 
[protocols bgp neighbor 3.3.3.3 address-family link-state]
+ nexthop-self {
+     force
+ }

[edit]
vyos@R1# commit
[ protocols bgp ]
The system encountered an error while rendering the new routing daemon
configuration. To ensure network stability and avoid potential
connectivity disruptions, the configuration was not applied!
[[protocols bgp]] failed
Commit failed
[edit]
vyos@R1#

vtysh create and add next-hop-self to ipv4 unicast :

  R1(config-router)# address-family link-state
  R1(config-router-af)# neighbor 3.3.3.3 next-hop-self


!                                                                                                                                                                                           
  router bgp 65001                                                                                                                                                                            
   bgp router-id 1.1.1.1                                                                                                                                                                      
   no bgp ebgp-requires-policy                                                                                                                                                                
   no bgp reject-as-sets                                                                                                                                                                      
   no bgp default ipv4-unicast                                                                                                                                                                
   no bgp network import-check                                                                                                                                                                
   neighbor 3.3.3.3 remote-as 65002                                                                                                                                                           
   no neighbor 3.3.3.3 enforce-first-as                                                                                                                                                       
   neighbor 3.3.3.3 update-source 1.1.1.1                                                                                                                                                     
   !                                                                                                                                                                                          
   address-family ipv4 unicast                                                                                                                                                                
    neighbor 3.3.3.3 next-hop-self                                                                                                                                                            
   exit-address-family                                                                                                                                                                        
   !                                                                                                                                                                                          
   address-family link-state link-state                                                                                                                                                       
    neighbor 3.3.3.3 activate                                                                                                                                                                 
   exit-address-family

Details

Version
VyOS 2026.04.15-1023-integration
Is it a breaking change?
Perfectly compatible
Issue type
Bug (incorrect behavior)

Event Timeline

natali-rs1985 changed the task status from Open to In progress.Apr 21 2026, 10:56 AM
natali-rs1985 claimed this task.
natali-rs1985 triaged this task as Normal priority.
natali-rs1985 changed Is it a breaking change? from Unspecified (possibly destroys the router) to Perfectly compatible.
natali-rs1985 changed the task status from In progress to Open.Apr 23 2026, 11:26 AM
natali-rs1985 reassigned this task from natali-rs1985 to hedrok.
natali-rs1985 subscribed.

FRR behaviour seems weird, but it is result of:

  1. vtysh has code that on failed command retries the command on each level of configuration from down-to-top, if on any level there is success, it jumps to that level.
  2. on 'router bgp 65001` level there are a lot of hidden alias commands, including neighbor 3.3.3.3 next-hop-self that work with ipv4 unicast address family - probably backward compatibility.
  3. next-hop-self is unsupported for link-state address family

So when under link-state address family one tries to run invalid neighbor 3.3.3.3 next-hop-self, vtysh tries on one level up, succeeds, and jumps to that level. So when we later try exit-address-family, it fails.

As next-hop-self is invalid, I've created PR that just removes it from VyOS CLI: https://github.com/vyos/vyos-1x/pull/5144

Viacheslav moved this task from Need Triage to Completed on the VyOS Rolling board.