VRF

Virtual Routing and Forwarding

Route Leaking with MP-BGP

  • Exporting tags a prefix with the RT value. This is entered into BGP, and shared with other routers as extended communities. Hint: Make sure you enable extended communities!

  • Importing selects routes based on their RT, and inserts them into a VRF.

Router(config)#vrf definition VRF-A
Router(config-vrf)#rd 65535:1

Router(config)#vrf definition VRF-B
Router(config-vrf)#rd 65535:2          

Router(config)#vrf definition VRF-C
Router(config-vrf)#rd 65535:3

Router(config)#router bgp 65535
Router(config-router)#address-family ipv4 vrf VRF-A
Router(config-router-af)#redistribute connected 

Router(config-router)#address-family ipv4 vrf VRF-B
Router(config-router-af)#redistribute connected       

Router(config-router)#address-family ipv4 vrf VRF-C
Router(config-router-af)#redistribute connected

Router(config)#vrf definition VRF-A
Router(config-vrf)#route-target export 65535:1

Router(config)#vrf definition VRF-B       
Router(config-vrf)#route-target export 65535:2

Router(config)#vrf definition VRF-C       
Router(config-vrf)#route-target export 65535:3

Router(config)#vrf definition VRF-C
Router(config-vrf)#route-target import 65535:1
Router(config-vrf)#route-target import 65535:2

Router(config)#vrf definition VRF-A
Router(config-vrf)#route-target import 65535:3

Router(config)#vrf definition VRF-B
Router(config-vrf)#route-target import 65535:3

Reference

  • Leaking Routes with MP-BGP: https://networkdirection.net/articles/routingandswitching/mp-bgp/leakingrouteswithmp-bgp

  • Configure Route Leak Between Global and VRF Routing Table without Next-Hop: https://www.cisco.com/c/en/us/support/docs/ip/ip-routing/200158-Configure-Route-Leaking-between-Global-a.html

  • Route Leaking in MPLS/VPN Networks: https://www.cisco.com/c/en/us/support/docs/multiprotocol-label-switching-mpls/multiprotocol-label-switching-vpns-mpls-vpns/47807-routeleaking.html

Last updated