Page MenuHomeVyOS Platform

vrf - route-leak not work using route-target both command.
Closed, ResolvedPublicBUG

Description

when we try to add different RTs using the command `set vrf name red protocols bgp address-family ipv4-unicast route-target vpn both 'xxx:xxx' and we want to a different new rt , it doesn't applied the new rt on frr , basic example :

VyOS : 

set vrf name red protocols bgp address-family ipv4-unicast export vpn
set vrf name red protocols bgp address-family ipv4-unicast import vpn
set vrf name red protocols bgp address-family ipv4-unicast rd vpn export '64496:100'
set vrf name red protocols bgp address-family ipv4-unicast redistribute connected
set vrf name red protocols bgp address-family ipv4-unicast route-target vpn both '64496:100'
set vrf name red protocols bgp address-family ipv4-unicast route-target vpn import '65500:200'

frr on :

router bgp 64496 vrf red
 no bgp ebgp-requires-policy
 no bgp default ipv4-unicast
 no bgp network import-check
 !
 address-family ipv4 unicast
  redistribute connected
  rd vpn export 64496:100
  rt vpn both 64496:100
  export vpn
  import vpn
 exit-address-family

this issue was reported for our forum and I've replicated it in 1.5 as well :

https://forum.vyos.io/t/1-4-0-rc1-cannot-leak-between-vrfs-when-using-route-target-both-xxxxx-xxxxx/13353/1

Details

Difficulty level
Normal (likely a few hours)
Version
VyOS 1.5-rolling-202401080717
Why the issue appeared?
Will be filled on close
Is it a breaking change?
Perfectly compatible
Issue type
Unspecified (please specify)

Event Timeline

a.apostoliuk changed the task status from Open to In progress.Jan 30 2024, 2:03 PM
a.apostoliuk claimed this task.

In this case, 'both'' is preferred now.
If you use in frr

rt vpn both 64496:100
rt vpn import 65500:200

you will receive

rt vpn export 64496:100
rt vpn import 65500:200

I think it is better to raise Config Error and do not allow to add import/export and both simultaneously.

it makes seens , agree with add a Config Error to do not allow both options simultaneously ,.

Viacheslav changed the task status from In progress to Needs testing.Feb 13 2024, 11:12 AM
a.apostoliuk moved this task from Need Triage to Finished on the VyOS 1.4 Sagitta board.
a.apostoliuk moved this task from Need Triage to Finished on the VyOS 1.5 Circinus board.