Redistributing routes between VRF and INET.0 with logical tunnels

Vendor: Juniper
Device: MX series
Software: 11.4R9.4

If you don't want to use RIB groups to leak routes between the inet.0 \ VRF routing tables do not fear there is another solution. Using logical tunnels we can form adjancies between the inet.0 and l3vpn tables and redistribute routes. In this example we will use ibgp as the igp. 

Note: MX Series routers must be equipped with a Trio MPC/MIC module


###################################################################

set interfaces lt-1/2/0 unit 13 description "GLOBAL"
Configure the Global IBGP Session
set routing-instances L3VPN_(groupname) interface lt-1/2/0.14
show route receive-protocol bgp 1.1.1.2

Configure the lt interfaces 

set interfaces lt-1/2/0 unit 13 encapsulation ethernet
set interfaces lt-1/2/0 unit 13 peer-unit 14
set interfaces lt-1/2/0 unit 13 family inet address 192.168.0.1/30

set interfaces lt-1/2/0 unit 14 description "L3VPN"
set interfaces lt-1/2/0 unit 14 encapsulation ethernet
set interfaces lt-1/2/0 unit 14 peer-unit 13

set interfaces lt-1/2/0 unit 14 family inet address 192.168.0.1/30


set protocols bgp group (groupname) type internal
set protocols bgp group (groupname) export (groupname)_CUSTOMERS_ROUTES
set protocols bgp group (groupname) export REJECT_ANY
set protocols bgp group (groupname) cluster xxx.xxx.xxx.xxx
set protocols bgp group (groupname) neighbor xxx.xxx.xxx.xxx

Configure import export policies

set policy-options policy-statement (groupname)_CUSTOMERS_ROUTES term CUSTOMERS_ROUTES from prefix-list (groupname)_CUSTOMERS_ROUTES
set policy-options policy-statement (groupname)_CUSTOMERS_ROUTES term CUSTOMERS_ROUTES then community delete DELETE_ALL
set policy-options policy-statement (groupname)_CUSTOMERS_ROUTES term CUSTOMERS_ROUTES then next-hop self
set policy-options policy-statement (groupname)_CUSTOMERS_ROUTES term CUSTOMERS_ROUTES then accept

set policy-options prefix-list (groupname)_CUSTOMERS_ROUTES xxx.xxx.xxx.xxx/24
set policy-options prefix-list (groupname)_CUSTOMERS_ROUTES yyy.yyy.yyy.yyy/24
set policy-options prefix-list (groupname)_CUSTOMERS_ROUTES zzz.zzz.zzz.zzz/26

Add the lt interface into the VRF


Configure the VRF IBGP Session

set routing-instances L3VPN_(groupname)  protocols bgp group GLOBAL type internal
set routing-instances L3VPN_(groupname)  protocols bgp group GLOBAL export ABSEC200080_SOURCE_ROUTES
set routing-instances L3VPN_(groupname)  protocols bgp group GLOBAL export REJECT_ANY
set routing-instances L3VPN_(groupname)  protocols bgp group GLOBAL cluster 192.168.0.
set routing-instances L3VPN_(groupname)  protocols bgp group GLOBAL neighbor 83.151.126.49

Configure import export policies

set policy-options policy-statement (groupname) _SOURCE_ROUTES term SOURCE_ROUTES from prefix-list (groupname) _SOURCE_ROUTES
set policy-options policy-statement (groupname) _SOURCE_ROUTES term SOURCE_ROUTES then community delete DELETE_ALL
set policy-options policy-statement (groupname) _SOURCE_ROUTES term SOURCE_ROUTES then next-hop self
set policy-options policy-statement (groupname) _SOURCE_ROUTES term SOURCE_ROUTES then accept

set policy-options prefix-list (groupname) _SOURCE_ROUTES xxx.xxx.xxx.xxx/30
set policy-options prefix-list (groupname) _SOURCE_ROUTES yyy.yyy.yyy.yyy/30

###################################################################

Verify bgp is established and you are learning routes in the global and vrf  tables.

show bgp neighbor 1.1.1.1 
show bgp neighbor 1.1.1.2

show bgp summary | match 1.1.1.1 
show bgp summary | match 1.1.1.2

show route receive-protocol bgp 1.1.1.1
show route receive-protocol bgp 1.1.1.1

show route receive-protocol bgp 1.1.1.2

Comments

Popular posts from this blog

Configure OSPF Juniper SRX

Upgrading JUNOS via USB