Vrf leaking to default vrf

Hello,

I need to leak route from INET-VRF to default vrf.
for example:

set interfaces ethernet eth0 vif 496 vrf ‘INET-VRF’
set protocols vrf INET-VRF static route 0.0.0.0/0 next-hop 1.1.1.1
set protocols vrf default static route 4.4.4.0/29 next-hop 1.1.1.1 next-hop-vrf ‘INET-VRF’

after that I see in configuration:

show protocols vrf

vrf INET-VRF {
static {
route 0.0.0.0/0 {
next-hop 77.236.229.161 {
}
}
}
}
vrf default {
static {
route 194.186.83.144/29 {
next-hop 77.236.229.161 {
next-hop-vrf INET-VRF
}
}
}
}

but in frr configuration INET-VRF is absent:
!
ip route 4.4.4.0/29 1.1.1.1
!
vrf INET-VRF
ip route 0.0.0.0/0 1.1.1.1
exit-vrf
!

I suspect that ip route string should be the floowing:
!
ip route 4.4.4.0/29 1.1.1.1
!
vrf INET-VRF
ip route 0.0.0.0/0 1.1.1.1 next-hop-vrf INET-VRF
exit-vrf
!

did I missed something or this is a bug ?

Hi @vzotov,

nice to see someone besides me playing around with VRFs in VyOS. The following should do the trick:

set vrf name red table 1000
set interfaces ethernet eth0 vif 400 vrf red
set protocols vrf red static route 0.0.0.0/0 next-hop 1.1.1.1
set protocols static route 4.4.4.0/29 next-hop 1.1.1.1 next-hop-vrf red

This will result in the following FRR configuration:

ip route 4.4.4.0/29 1.1.1.1 nexthop-vrf red
!
vrf red
 ip route 0.0.0.0/0 1.1.1.1
 exit-vrf
!

This will instruct the OS that if you want to read 4.4.4.0/20 from default routing table you will cross over into the VRF red and then exit through 1.1.1.1

Oh, thank you very much,
simply I was inattentive.