Now I am trying to leak OSPF only routes from a VRF to another, it seems that import/export support BGP routes only? Is there any way to leak OSPF routes between VRFs?
Thank you @Viacheslav , then I may need to redistribute OSPF into BGP to make those OSPF routes to be able to leak via BGP. Or does the VyOS support virtual tunnel between VRFs on the same instance? Something like Juniper logical-tunnel, it can link the different VRFs via a virtual interface.
yes , you could redistribute OSPF into BGP ,however it’s not the same that using VRF import/export targets on BGP . regarding the another feature , I don’t recall on FRR that the functionality is supported.
Below are the config steps. Should I add these commands on /config/scripts/vyos-postconfig-bootup.script to make it to be executed after reboot?
Step1: create a VRFs
sudo ip link add dev VRF1 type vrf table 101
sudo ip link add dev VRF2 type vrf table 102
sudo ip link add dev VRF3 type vrf table 103
sudo ip link set dev VRF1 up
sudo ip link set dev VRF2 up
sudo ip link set dev VRF3 up
Step2: create and configure veth interface
sudo ip link add VRF1-VE1 type veth peer name BR10-VRF1-VE1
sudo ip link add VRF2-VE1 type veth peer name BR10-VRF2-VE1
sudo ip link add VRF3-VE1 type veth peer name BR10-VRF3-VE1
sudo ip addr add 10.85.228.5/25 dev VRF1-VE1
sudo ip addr add 10.85.228.6/25 dev VRF2-VE1
sudo ip addr add 10.85.228.7/25 dev VRF2-VE1
sudo ip link set dev VRF1-VE1 up
sudo ip link set dev VRF2-VE1 up
sudo ip link set dev VRF3-VE1 up
sudo ip link set dev BR10-VRF1-VE1 up
sudo ip link set dev BR10-VRF2-VE1 up
sudo ip link set dev BR10-VRF3-VE1 up
Step3: associate veth with VRF
sudo ip link set VRF1-VE1 vrf VRF1
sudo ip link set VRF2-VE1 vrf VRF2
sudo ip link set VRF3-VE1 vrf VRF3
Step4: create a bridge then bridge those veths
sudo ip link add BR10 type bridge
sudo ip link set dev BR10 up
sudo ip link set BR10-VRF1-VE1 master BR10
sudo ip link set BR10-VRF2-VE1 master BR10
sudo ip link set BR10-VRF3-VE1 master BR10
Step5: configure OSPF on frr vtysh mode
vtysh
configure
router ospf vrf VRF1
network 10.85.228.0/25 area 0
router ospf vrf VRF2
network 10.85.228.0/25 area 0
router ospf vrf VRF3
network 10.85.228.0/25 area 0