Hello,
VyOS 1.1.8 and 1.2.0-rolling+201901100337 are filling OIDs bgp4PathAttrCalcLocalPref and bgp4PathAttrLocalPref incorrectly.
bgp4PathAttrLocalPref filled with value after localpref calculation and haven't filled with default value in case when not changed
bgp4PathAttrCalcLocalPref not filled at all.
$ show ip bgp Network Next Hop Metric LocPrf Weight Path * 10.3.1.0/24 10.10.10.10 0 0 3 i *> 10.0.1.2 200 0 2 3 i $ show ip bgp 10.3.1.0/24 BGP routing table entry for 10.3.1.0/24 Paths: (2 available, best #2, table default) Advertised to non peer-group peers: 10.0.1.2 10.10.10.10 3 10.10.10.10 from 10.10.10.10 (10.10.10.10) Origin IGP, metric 0, valid, external Last update: Fri Jan 25 12:20:44 2019 2 3 10.0.1.2 from 10.0.1.2 (10.10.20.30) Origin IGP, localpref 200, valid, external, best Last update: Fri Jan 25 12:21:14 2019
VyOS 1.1.8 shows route 10.10.10.10 as follows (just look onto localpref value):
10.10.10.10 from 10.10.10.10 (10.10.10.10) Origin IGP, metric 0, localpref 100, valid, external Last update: Fri Jan 25 08:08:56 2019
As you can see, route with next-hop 10.10.10.10 has unchanged localpref and should have
bgp4PathAttrLocalPref=-1 - because it isn't received via iBGP
bgp4PathAttrCalcLocalPref=100 - because it should have default localpref
Route 10.0.1.2 has localpref value changed by import route-map from eBGP peer to value "200".
SNMP OIDs should have these values:
bgp4PathAttrLocalPref=-1 - because it isn't received via iBGP
bgp4PathAttrCalcLocalPref=200 - because it was changed by route-map
But actually VyOS returns these values (note OID 6.1.8 is a LocalPref and 6.1.12 is a CalcLocalPref):
# snmpwalk -v2c -c public 10.10.10.10 1.3.6.1.2.1.15.6.1.8 SNMPv2-SMI::mib-2.15.6.1.8.10.3.1.0.24.10.0.1.2 = INTEGER: 200 SNMPv2-SMI::mib-2.15.6.1.8.10.3.1.0.24.10.10.10.10 = INTEGER: 0 # snmpwalk -v2c -c public 10.10.10.10 1.3.6.1.2.1.15.6.1.12 SNMPv2-SMI::mib-2.15.6.1.12.10.3.1.0.24.10.0.1.2 = INTEGER: -1 SNMPv2-SMI::mib-2.15.6.1.12.10.3.1.0.24.10.10.10.10 = INTEGER: -1
As you can see, VyOS incorrectly returns value -1 in 6.1.12 instead of 6.1.8
and returns LocalPref value 0 instead of default 100 even for unchanged LP.
Our Juniper router returns correct values (note both routes have LP changed by RM):
# snmpwalk -v2c -c ccc 999.999.999 .1.3.6.1.2.1.15.6.1.8.8.8.8.0.24 SNMPv2-SMI::mib-2.15.6.1.8.8.8.8.0.24.x.x.x.x = INTEGER: -1 SNMPv2-SMI::mib-2.15.6.1.8.8.8.8.0.24.y.y.y.y = INTEGER: -1 # snmpwalk -v2c -c ccc 999.999.999 .1.3.6.1.2.1.15.6.1.12.8.8.8.0.24 SNMPv2-SMI::mib-2.15.6.1.12.8.8.8.0.24.x.x.x.x = INTEGER: 200 SNMPv2-SMI::mib-2.15.6.1.12.8.8.8.0.24.y.y.y.y = INTEGER: 200
Thanks.