BGP Route Redistribution bgp option not valid

I have a vyos server between an ubuntu server running BIRD and a v9k.

I have 3 ASN’s one assigned to each device.

I have BGP Peering setup on vyos with both peers and they are established.

The problem I have is that vyos is learning a route from BIRD but when I attempt to set up redistribution the command says it is not valid while the documentation says it should be available.

Command:
set protocols bgp 65009 address-family ipv4-unicast redistribute bgp

Error:
Configuration path: protocols bgp 65009 address-family ipv4-unicast redistribute [bgp] is not valid
Set failed

Documentation referenced:
https://docs.vyos.io/en/latest/configuration/protocols/bgp.html

Redistribution Configuration

set protocols bgp address-family <ipv4-unicast|ipv6-unicast> redistribute

This command redistributes routing information from the given route source to the BGP process. There are six modes available for route source: bgp, connected, kernel, ospf, rip, static.

Please help.

@juesor
Bgp announce enabled by default.
You don’t need to declare redistribute BGP over BGP. It no makes any sense.
It’s mean “Redistribute information from another routing protocol” via bgp.

vyos@r5-roll# set protocols bgp 65001 address-family ipv4-unicast redistribute 
Possible completions:
 > connected    Redistribute connected routes into BGP
 > kernel       Redistribute kernel routes into BGP
 > ospf         Redistribute OSPF routes into BGP
 > rip          Redistribute RIP routes into BGP
 > static       Redistribute static routes into BGP
   table        Redistribute non-main Kernel Routing Table
1 Like

Ok so going through this a little bit more has gotten me to the point of why are my routes not seen?

  1. router’s 65009 config
  2. show ip route 192.168.103.1
  3. show ip bgp neighbor 192.168.101.2 routes
  4. show ip bgp neighbor 192.168.100.2 advertised-routes
  5. show version

protocols {
bgp 65009 {
address-family {
ipv4-unicast {
redistribute {
connected {
}
}
}
}
neighbor 192.168.100.2 {
address-family {
ipv4-unicast {
attribute-unchanged {
}
nexthop-self {
}
soft-reconfiguration {
inbound
}
}
}
capability {
dynamic
}
remote-as 65008
update-source eth0
}
neighbor 192.168.101.2 {
address-family {
ipv4-unicast {
attribute-unchanged {
as-path
}
nexthop-self {
}
soft-reconfiguration {
inbound
}
}
}
capability {
dynamic
}
remote-as 65010
update-source eth1
}
parameters {
router-id 10.10.10.60
}
}
}

show ip route 192.168.102.2
Routing entry for 192.168.102.2/32
Known via “bgp”, distance 20, metric 0, best
Last update 07:46:33 ago

  • 192.168.101.2, via eth1, weight 1

vyos@vyos:/var/log$ show ip bgp neighbors 192.168.101.2 routes
BGP table version is 3, local router ID is 10.10.10.60, vrf id 0
Default local pref 100, local AS 65009
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
*> 192.168.102.2/32 192.168.101.2 0 65010 i

Displayed 1 routes and 3 total paths

vyos@vyos:/var/log$ show ip bgp neighbors 192.168.101.2 routes
BGP table version is 3, local router ID is 10.10.10.60, vrf id 0
Default local pref 100, local AS 65009
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
*> 192.168.102.2/32 192.168.101.2 0 65010 i

Displayed 1 routes and 3 total paths
vyos@vyos:/var/log$ show ip bgp neighbor 192.168.100.2 advertised-routes
BGP table version is 3, local router ID is 10.10.10.60, vrf id 0
Default local pref 100, local AS 65009
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
*> 192.168.100.0/30 0.0.0.0 0 32768 ?
*> 192.168.101.0/30 0.0.0.0 0 32768 ?
*> 192.168.102.2/32 192.168.101.2 0 65010 i

Total number of prefixes 3

vyos@vyos:/var/log$ show version

Version: VyOS 1.4-rolling-202101140417
Release Train: sagitta

Built by: autobuild@vyos.net
Built on: Thu 14 Jan 2021 04:17 UTC
Build UUID: 29fa3022-d820-438c-81d6-8dfdc50eeec9
Build Commit ID: ae2279e30b1222

Architecture: x86_64
Boot via: installed image
System type: KVM guest

Hardware vendor: Red Hat
Hardware model: KVM
Hardware S/N:
Hardware UUID: f756ec88-8c28-43bc-99a9-d5b808a0e0dd

Copyright: VyOS maintainers and contributors


Ok so after seeing the advertised routes i need to explain that 192.168.100.2 is a iosxr9kv and 192.168.101.2 is BIRD

BIRD is trying to annouce its loopback all the way to the iosxr9kv

On 192.168.100.2 i’m getting this error

RP/0/RP0/CPU0:Feb 11 21:51:54.057 UTC: bgp[1078]: %ROUTING-BGP-3-MALFORM_UPDATE : Malformed UPDATE message received from neighbor 192.168.100.1 (VRF: default) - message length 49 bytes, error flags 0x00000200, action taken “TreatAsWdr”. Error details: “Error 0x00000200, Field “Attr-data”, Attribute 2 (Flags 0x40, Length 6), Data [5002000602010000fdf2]”. NLRIs: [IPv4 Unicast] 192.168.102.2/32

I guess I’m confused at what attribute is missing in VYOS to accept that peering.

And I guess looking back in 2015 someone had this same problem.

Thoughts?

Thanks again.

VYOS AnyCast Design

Here’s my design in CML.

Something is wrong on VYOS to 9kv because the 9k is saying the packet is malformed and withdrawn.

So clearly VYOS’s config is wrong and I’ve gone through the config guideline and I’m not seeing anything that would make this work.

I’ve turned on multiple debug options for bgp and vyos is not seeing anything wrong but is still being rejected by xr9kv

Feb 15 15:11:00 vyos bgpd[875]: 192.168.101.2 [FSM] Timer (keepalive timer expire)
Feb 15 15:11:38 vyos bgpd[875]: 192.168.100.2 [FSM] Timer (keepalive timer expire)
Feb 15 15:12:00 vyos bgpd[875]: 192.168.101.2 [FSM] Timer (keepalive timer expire)
Feb 15 15:12:38 vyos bgpd[875]: 192.168.100.2 [FSM] Timer (keepalive timer expire)
Feb 15 15:13:00 vyos bgpd[875]: 192.168.101.2 [FSM] Timer (keepalive timer expire)
Feb 15 15:13:38 vyos bgpd[875]: 192.168.100.2 [FSM] Timer (keepalive timer expire)

The only thing in /var/log/messages is timers.

So i rebooted and

Feb 15 15:16:22 vyos watchfrr[826]: bgpd state -> up : connect succeeded
Feb 15 15:16:29 vyos bgpd[875]: [EC 33554501] 192.168.100.2 Unexpected afi/safi/next-hop afi: IPv4/multicast/2 in Extended Next-hop capability, ignoring
Feb 15 15:16:29 vyos bgpd[875]: [EC 33554501] 192.168.100.2 Unexpected afi/safi/next-hop afi: IPv4/vpn/2 in Extended Next-hop capability, ignoring
Feb 15 15:16:29 vyos bgpd[875]: %ADJCHANGE: neighbor 192.168.100.2(Unknown) in vrf default Up
Feb 15 15:16:30 vyos bgpd[875]: %NOTIFICATION: sent to neighbor 192.168.100.2 6/6 (Cease/Other Configuration Change) 0 bytes
Feb 15 15:16:30 vyos bgpd[875]: %ADJCHANGE: neighbor 192.168.100.2(Unknown) in vrf default Down BGP Notification send
Feb 15 15:16:32 vyos bgpd[875]: [EC 33554501] 192.168.100.2 Unexpected afi/safi/next-hop afi: IPv4/multicast/2 in Extended Next-hop capability, ignoring
Feb 15 15:16:32 vyos bgpd[875]: [EC 33554501] 192.168.100.2 Unexpected afi/safi/next-hop afi: IPv4/vpn/2 in Extended Next-hop capability, ignoring
Feb 15 15:16:32 vyos bgpd[875]: %ADJCHANGE: neighbor 192.168.100.2(Unknown) in vrf default Up
Feb 15 15:16:37 vyos bgpd[875]: bgp_update_receive: rcvd End-of-RIB for IPv4 Unicast from 192.168.100.2 in vrf default
Feb 15 15:16:52 vyos bgpd[875]: [EC 33554503] 192.168.101.2 unrecognized capability code: 70 - ignored
Feb 15 15:16:52 vyos bgpd[875]: [EC 33554503] 192.168.101.2 unrecognized capability code: 71 - ignored
Feb 15 15:16:52 vyos bgpd[875]: %ADJCHANGE: neighbor 192.168.101.2(Unknown) in vrf default Up
Feb 15 15:16:52 vyos bgpd[875]: bgp_update_receive: rcvd End-of-RIB for IPv4 Unicast from 192.168.101.2 in vrf default

Can you explain code EC errors?

Ok so looking into the error more 9kv is throwing that the AS_PATH is invalid on the redistribution.

So trying to figure that out.

As I see the vyos send prefixes, but xr9kv don’t accept it?
Try on the xr9kv site

no bgp enforce first-as

Can you explain why this is needed with VYOS?

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