Skip to content

Instantly share code, notes, and snippets.

@hkwi hkwi/README.md
Last active Nov 26, 2018

Embed
What would you like to do?
frrouting/linux bgp mpls example

frrouting/linux bgp mpls example

Prepare vrf netdev before frrouting configuration. Exit from vtysh and execute following commands in bash, then invoke vtysh again.

ip link add vrfA type vrf table 10
ip link set eth1 master vrfA
ip link set vrfA up

Test

from 192.168.2.2

ping 192.168.1.2

References

https://github.com/FRRouting/frr/issues/1972

http://docs.frrouting.org/en/latest/bgp.html#clicmd-labelvpnexport(0..1048575)|auto

https://docs.cumulusnetworks.com/display/CL34/Virtual+Routing+and+Forwarding+-+VRF https://docs.cumulusnetworks.com/display/DOCS/Management+VRF https://docs.cumulusnetworks.com/display/DOCS/Comparing+NCLU+and+vtysh+Commands

https://www.kernel.org/doc/Documentation/networking/vrf.txt

int eth0
ip addr 192.168.0.1/24
int eth1 vrf vrfA
ip addr 192.168.1.1/24
router bgp 65000
neighbor 192.168.0.2 remote-as 65001
address-family ipv4 vpn
neighbor 192.168.0.2 activate
router bgp 65000 vrf vrfA
address-family ipv4
import vpn
export vpn
rd vpn export 192.168.0.1:1
rt vpn both 65000:1
label vpn export auto
redistribute connected
end
int eth0
ip addr 192.168.0.2/24
int eth1 vrf vrfA
ip addr 192.168.2.1/24
router bgp 65001
neighbor 192.168.0.1 remote-as 65000
address-family ipv4 vpn
neighbor 192.168.0.1 activate
router bgp 65001 vrf vrfA
address-family ipv4
import vpn
export vpn
rd vpn export 192.168.0.2:1
rt vpn both 65000:1
label vpn export auto
redistribute connected
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.