hi
when you need to do a vrf route-leaking between default and vrf X ,you need add a static with the prefix in another vrf table ,for example :
$ show ip route vrf TEST1 VRF TEST1: S>* 0.0.0.0/0 [1/0] via 192.168.125.1, eth0 (vrf default), weight 1, 00:37:06 C>* 192.168.0.0/24 is directly connected, eth1, 01:16:11 ----------------{prefix to add }
if i want to add on vyos-cli this command doesn't exist :
vyos@rt-vrf-test# set protocols static route 192.168.0.0/24
Possible completions:
> blackhole Silently discard pkts when matched
dhcp-interface
DHCP interface supplying next-hop IP address
+> next-hop Next-hop router
[edit]I add it config with FRR:
vyos@rt-vrf-test:~$ sudo vtysh -c" show run" Building configuration... Current configuration: ! frr version 7.5.1-20210625-00-gf07d935a2 ! ip route 0.0.0.0/0 192.168.125.1 eth0 tag 210 210 ip route 192.168.0.0/24 eth1 nexthop-vrf TEST1
it works well :
vyos@rt-vrf-test:~$ show ip route
Codes: K - kernel route, C - connected, S - static, R - RIP,
O - OSPF, I - IS-IS, B - BGP, E - EIGRP, N - NHRP,
T - Table, v - VNC, V - VNC-Direct, A - Babel, D - SHARP,
F - PBR, f - OpenFabric,
> - selected route, * - FIB route, q - queued, r - rejected, b - backup
S>* 0.0.0.0/0 [210/0] via 192.168.125.1, eth0, weight 1, 01:25:33
C>* 10.10.10.0/24 is directly connected, dum10, 01:25:37
S>* 192.168.0.0/24 [1/0] is directly connected, eth1 (vrf TEST1), weight 1, 00:46:30 /// prefix add
C>* 192.168.125.0/24 is directly connected, eth0, 01:25:33
vyos@rt-vrf-test:~$ ping 192.168.0.40
PING 192.168.0.40 (192.168.0.40) 56(84) bytes of data.
64 bytes from 192.168.0.40: icmp_seq=1 ttl=64 time=1.88 ms
64 bytes from 192.168.0.40: icmp_seq=2 ttl=64 time=2.92 ms
^C
--- 192.168.0.40 ping statistics ---
2 packets transmitted, 2 received, 0% packet loss, time 3ms
rtt min/avg/max/mdev = 1.879/2.400/2.921/0.521 msPD: ro
