I noticed that I can't be a BGP peer between different VRFs on the same VyOS 1.4.
An error will occur at commit with the following config:
set vrf name R1 table '1001' set vrf name R5 table '1005' set interfaces ethernet eth1 vif 915 address '192.168.15.1/24' set interfaces ethernet eth1 vif 915 vrf 'R1' set interfaces ethernet eth2 vif 915 address '192.168.15.5/24' set interfaces ethernet eth2 vif 915 vrf 'R5' set vrf name R1 protocols bgp local-as '65001' set vrf name R1 protocols bgp neighbor 192.168.15.5 address-family ipv4-unicast set vrf name R1 protocols bgp neighbor 192.168.15.5 remote-as '65005' set vrf name R1 protocols bgp parameters router-id '1.1.1.1' set vrf name R5 protocols bgp address-family ipv4-unicast network 10.5.0.0/24 set vrf name R5 protocols bgp local-as '65005' set vrf name R5 protocols bgp neighbor 192.168.15.1 address-family ipv4-unicast set vrf name R5 protocols bgp neighbor 192.168.15.1 remote-as '65001' set vrf name R5 protocols bgp parameters router-id '5.5.5.5'
vyos@VyOS1# commit Can not configure a local address as neighbor "192.168.15.5" [[vrf name R1 protocols bgp]] failed Commit failed [edit] vyos@VyOS1#
As a workaround, I did the following:
vyos@VyOS1:~$ sudo vi /usr/libexec/vyos/conf_mode/protocols_bgp.py # Only checks for ipv4 and ipv6 neighbors # Check if neighbor address is assigned as system interface address if is_ip(peer) and is_addr_assigned(peer): #raise ConfigError(f'Can not configure a local address as neighbor "{peer}"') <-- Comment out pass <--Insert vyos@VyOS1:~$ reboot
I would like to ask you to correct it so that it does not become inconsistent with other functions.