Page MenuHomeVyOS Platform

BGP Weight Not properly applying
Closed, ResolvedPublic

Description

Despite having weights configured for BGP neighbors they are not displayed and do not appear to be utilized in the route selection process. I may be missing one or more config settings in 1.2 that or messing me up, but the same general equivilant in 1.18 worked.

vyos@vyos1a:~$ configure
[edit]
vyos@vyos1a# show protocols bgp
 bgp 64513 {
     address-family {
         ipv4-unicast {
             redistribute {
                 connected {
                 }
             }
         }
     }
     maximum-paths {
         ebgp 1
         ibgp 1
     }
     neighbor 10.100.0.1 {
         remote-as 64512
         timers {
             holdtime 4
             keepalive 12
         }
     }
     neighbor 10.100.0.36 {
         address-family {
             ipv4-unicast {
                 default-originate {
                 }
                 weight 75
             }
         }
         remote-as 64514
         timers {
             holdtime 4
             keepalive 12
         }
     }
     neighbor 10.100.0.37 {
         address-family {
             ipv4-unicast {
                 default-originate {
                 }
                 weight 35
             }
         }
         remote-as 64514
         timers {
             holdtime 4
             keepalive 12
         }
     }
     parameters {
         router-id 10.100.0.33
     }
 }
[edit]
vyos@vyos1a#
vyos@vyos1a:~$ show ip bgp
BGP table version is 23, local router ID is 10.100.0.33, vrf id 0
Default local pref 100, local AS 64513
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

   Network          Next Hop            Metric LocPrf Weight Path
*> 0.0.0.0/0        10.100.0.1                             0 64512 i
*> 10.100.0.0/27    0.0.0.0                  0         32768 ?
*  10.100.0.32/27   10.100.0.37                            0 64514 ?
*>                  0.0.0.0                  0         32768 ?
*  10.100.0.64/27   10.100.0.36                            0 64514 ?
*>                  10.100.0.37                            0 64514 ?
*> 10.100.0.160/27  0.0.0.0                  0         32768 ?
*> 10.100.3.0/24    0.0.0.0                  0         32768 ?
*> 10.100.4.0/24    0.0.0.0                  0         32768 ?
*> 10.100.6.0/24    0.0.0.0                  0         32768 ?
*> 10.100.14.0/24   0.0.0.0                  0         32768 ?
*> 10.100.15.0/24   0.0.0.0                  0         32768 ?
*> 10.100.16.0/24   0.0.0.0                  0         32768 ?
*  10.100.65.0/27   10.100.0.36                            0 64514 ?
*>                  10.100.0.37                            0 64514 ?
*  10.100.100.0/24  10.100.0.36                            0 64514 ?
*>                  10.100.0.37                            0 64514 ?
*  10.100.103.0/24  10.100.0.36                            0 64514 ?
*>                  10.100.0.37                            0 64514 ?
*  10.100.104.0/24  10.100.0.36                            0 64514 ?
*>                  10.100.0.37                            0 64514 ?
*  10.100.105.0/27  10.100.0.36                            0 64514 ?
*>                  10.100.0.37                            0 64514 ?
*> 10.100.200.0/24  0.0.0.0                  0         32768 ?

Displayed  17 routes and 24 total paths

Details

Difficulty level
Unknown (require assessment)
Version
1.2.0-rolling+201905130000
Why the issue appeared?
Will be filled on close

Event Timeline

sentania triaged this task as Normal priority.May 13 2019, 10:55 AM
sentania created this task.
sentania created this object in space S1 VyOS Public.
sentania raised the priority of this task from Normal to Requires assessment.May 13 2019, 2:13 PM
hagbard changed the task status from Open to Confirmed.May 17 2019, 5:17 PM

bug confirmed.

Looks like the 7.1-dev frr branch is eiter not up to date or the frr documentation isn't updated.

[no] neighbor PEER weight WEIGHT

(http://docs.frrouting.org/en/latest/bgp.html)

peer1(config-router)# neighbor 10.100.0.36 
  advertisement-interval     Minimum interval between sending BGP routing updates
  bfd                        Enables BFD support
  capability                 Advertise capability to the peer
  description                Neighbor specific description
  disable-connected-check    one-hop away EBGP peer using loopback address
  dont-capability-negotiate  Do not perform capability negotiation
  ebgp-multihop              Allow EBGP neighbors not on directly connected networks
  enforce-first-as           Enforce the first AS for EBGP routes
  enforce-multihop           Enforce EBGP neighbors perform multihop
  interface                  Interface
  local-as                   Specify a local-as number
  override-capability        Override capability negotiation result
  passive                    Don't send open messages to this neighbor
  password                   Set a password
  peer-group                 Member of the peer-group
  port                       Neighbor's BGP port
  remote-as                  Specify a BGP neighbor
  shutdown                   Administratively shut down this neighbor
  solo                       Solo peer - part of its own update group
  strict-capability-match    Strict capability negotiation match
  timers                     BGP per neighbor timers
  ttl-security               BGP ttl-security parameters
  update-source              Source of routing updates
hagbard changed the task status from Confirmed to On hold.May 17 2019, 5:40 PM
hagbard changed the task status from On hold to In progress.May 17 2019, 6:38 PM

looks like even if not listed it can be set, but not applied via cli. also need to test if it works.

hagbard changed the task status from In progress to Needs testing.May 17 2019, 7:59 PM

@sentania http://dev.packages.vyos.net/repositories/current/vyos/pool/main/v/vyatta-cfg-quagga/vyatta-cfg-quagga_0.19.1+vyos2+current9_all.deb or next rolling release will have it patched. It was just not implemented in the backend, so the parameter was never read from the cli.

I've tested with the following:

r1

set protocols bgp 64513 address-family ipv4-unicast redistribute connected
set protocols bgp 64513 maximum-paths ebgp '1'
set protocols bgp 64513 maximum-paths ibgp '1'
set protocols bgp 64513 neighbor 10.100.0.36 address-family ipv4-unicast weight '75'
set protocols bgp 64513 neighbor 10.100.0.36 remote-as '64514'
set protocols bgp 64513 neighbor 10.100.0.36 timers holdtime '4'
set protocols bgp 64513 neighbor 10.100.0.36 timers keepalive '12'
set protocols bgp 64513 parameters router-id '10.100.0.33'

r2

set protocols bgp 64514 address-family ipv4-unicast redistribute connected
set protocols bgp 64514 maximum-paths ebgp '1'
set protocols bgp 64514 maximum-paths ibgp '1'
set protocols bgp 64514 neighbor 10.100.0.33 address-family ipv4-unicast weight '75'
set protocols bgp 64514 neighbor 10.100.0.33 remote-as '64513'
set protocols bgp 64514 neighbor 10.100.0.33 timers holdtime '4'
set protocols bgp 64514 neighbor 10.100.0.33 timers keepalive '12'
set protocols bgp 64514 parameters router-id '10.100.0.36'

result

BGP table version is 3, local router ID is 10.100.0.33, vrf id 0
Default local pref 100, local AS 64513
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

   Network          Next Hop            Metric LocPrf Weight Path
*  10.0.2.0/24      10.100.0.36              0            75 64514 ?
*>                  0.0.0.0                  0         32768 ?
*  10.1.1.0/24      10.100.0.36              0            75 64514 ?
*>                  0.0.0.0                  0         32768 ?
*  10.100.0.0/24    10.100.0.36              0            75 64514 ?
*>                  0.0.0.0                  0         32768 ?

Let me know if it works for you.

hagbard triaged this task as Normal priority.May 17 2019, 8:37 PM

@sentania Can you please test with the latest rolling, the issue should have been fixed now.

@hagbard Looks good:

vyos@vyos1b:~$ show system image
The system currently has the following image(s) installed:

   1: 1.2.0-rolling+201905212216- (default boot)
   2: 1.1.8

vyos@vyos1b:~$ show ip bgp
BGP table version is 17, local router ID is 10.100.0.34, vrf id 0
Default local pref 100, local AS 64513
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

   Network          Next Hop            Metric LocPrf Weight Path
*> 0.0.0.0/0        10.100.0.1                            75 64512 i
*> 10.100.0.0/27    0.0.0.0                  0         32768 ?
*> 10.100.0.32/27   0.0.0.0                  0         32768 ?
*                   10.100.0.37                           50 64514 ?
*  10.100.0.64/27   10.100.0.37                           50 64514 ?
*>                  10.100.0.36                           75 64514 ?
*> 10.100.3.0/24    0.0.0.0                  0         32768 ?
*> 10.100.4.0/24    0.0.0.0                  0         32768 ?
*> 10.100.6.0/24    0.0.0.0                  0         32768 ?
*> 10.100.14.0/24   0.0.0.0                  0         32768 ?
*> 10.100.15.0/24   0.0.0.0                  0         32768 ?
*> 10.100.16.0/24   0.0.0.0                  0         32768 ?
*  10.100.65.0/27   10.100.0.37                           50 64514 ?
*>                  10.100.0.36                           75 64514 ?
*  10.100.100.0/24  10.100.0.37                           50 64514 ?
*>                  10.100.0.36                           75 64514 ?
*  10.100.103.0/24  10.100.0.37                           50 64514 ?
*>                  10.100.0.36                           75 64514 ?
*  10.100.104.0/24  10.100.0.37                           50 64514 ?
*>                  10.100.0.36                           75 64514 ?
*  10.100.105.0/27  10.100.0.37                           50 64514 ?
*>                  10.100.0.36                           75 64514 ?
*> 10.100.200.0/24  0.0.0.0                  0         32768 ?

Thanks for testing.

Still seeing this bug in 1.2.2. VyOS config has weights configured, but in the FRR config, weight is missing.

syncer added a subscriber: syncer.

@hagbard can you take a look if that was backported?

c-po moved this task from VyOS 1.2.2 to VyOS 1.2.3 on the VyOS 1.2 Crux board.
c-po moved this task from Needs Triage to Finished on the VyOS 1.2 Crux (VyOS 1.2.3) board.