SlideShare a Scribd company logo
1 of 6
Download to read offline
This document is Prepared by George Micheal Gerges (CCIE-SP#44120, JNCIE-SP#2150)
1
Per vrf Tunnel selection
On cisco ios-xr
This document is Prepared by George Micheal Gerges (CCIE-SP#44120, JNCIE-SP#2150)
2
Introduction:
This document is about per VRF tunnel selection in IOS-XR . during this document we are going to use the following
topology
Our final goal is the following
1) CN traffic from VRT_CO_01 to NRT_CO_01 will go through Green TX path ( tunnel-te1 on VRT_CO_01)
2) IN traffic from VRT_CO_01 to NRT_CO_01 will go through Black TX path ( tunnel-te2 on VRT_CO_01)
3) CN traffic from VRT_CO_01 to XRT_CO_01 will go through Red TX path ( tunnel-te3 on VRT_CO_01)
4) IN traffic from VRT_CO_01 to XRT_CO_01 will go through both Red and Blue TX path ( tunnel-te 3 and tunnel-
te4 on VRT_CO_01)
Also during our test will use the following VRFs
VRF name RD Import/Export RT
CN 100:100 100:100
IN 200:200 200:200
Before applying any changes the current BGP configurations on VRT_CO_01 are as the following
This document is Prepared by George Micheal Gerges (CCIE-SP#44120, JNCIE-SP#2150)
3
RP/0/0/CPU0:VRT_CO_01#show run router bgp
Thu Sep 11 03:48:49.160 UTC
router bgp 100
address-family ipv4 unicast
!
address-family vpnv4 unicast
!
neighbor-group IBGP
remote-as 100
update-source Loopback0
address-family ipv4 unicast
next-hop-self
!
address-family vpnv4 unicast
next-hop-self
!
!
neighbor 10.64.0.7
use neighbor-group IBGP
!
neighbor 10.64.0.11
use neighbor-group IBGP
Let’s check the forwarding table for each VRF
RP/0/0/CPU0:VRT_CO_01#show cef vrf CN 100.100.100.11
next hop 10.64.0.11/32 tt1 labels imposed {ImplNull 16}
next hop 10.64.0.11/32 tt2 labels imposed {ImplNull 16}
RP/0/0/CPU0:VRT_CO_01#show cef vrf IN 200.200.200.11
next hop 10.64.0.11/32 tt1 labels imposed {ImplNull 17}
next hop 10.64.0.11/32 tt2 labels imposed {ImplNull 17}
RP/0/0/CPU0:VRT_CO_01#show cef vrf CN 100.100.100.7
next hop 10.64.0.7/32 tt3 labels imposed {ImplNull 16}
next hop 10.64.0.7/32 tt4 labels imposed {ImplNull 16}
RP/0/0/CPU0:VRT_CO_01#show cef vrf IN 200.200.200.7
next hop 10.64.0.7/32 tt3 labels imposed {ImplNull 17}
next hop 10.64.0.7/32 tt4 labels imposed {ImplNull 17}
As seen before applying any changes , there is no separation in the traffic of the VRFs ( traffic of all the VRFs use the
same tunnels)
This document is Prepared by George Micheal Gerges (CCIE-SP#44120, JNCIE-SP#2150)
4
And Now let’s configure the policy to achieve our required final goal
route-policy PPLB
#Term NRT_CO_01 IN
if extcommunity rt matches-any (200:200) and next-hop in (10.64.0.11) then
set next-hop 1.1.1.1
endif
#Term NRT_CO_01 CN
if extcommunity rt matches-any (100:100) and next-hop in (10.64.0.11) then
set next-hop 2.2.2.2
endif
# Term XRT_CO_01 CN
if extcommunity rt matches-any (100:100) and next-hop in (10.64.0.7) then
set next-hop 3.3.3.3
endif
pass
end-policy
This policy will match on certain BGP next-hop ( Which represents the remote PE ) and certain BGP extended
community ( To determine the traffic of certain VRF) and then will change the BGP next-hop to a new value ( this
new value is virtual IPs not used in our network like 1.1.1.1 and 2.2.2.2 , …)
Then After changing the BGP next-hop to the new virtual IP , this policy must be applied to all the BGP neighbors
under VPNv4 unicast address family . this new virtual IP will be reachable through certain tunnel by using static
routes .
To apply this policy for all the BGP neighbors use the following
router bgp 100
neighbor-group IBGP
address-family vpnv4 unicast
route-policy PPLB in
After the policy is applied we have the following
RP/0/0/CPU0:VRT_CO_01(config)#do sho bgp vpnv4 unicast
Status codes: s suppressed, d damped, h history, * valid, > best
i - internal, r RIB-failure, S stale, N Nexthop-discard
Origin codes: i - IGP, e - EGP, ? - incomplete
Network Next Hop Metric LocPrf Weight Path
Route Distinguisher: 100:100 (default for vrf CN)
* i100.100.100.7/32 3.3.3.3 0 100 0 ?  to use tunnel-te 3
* i100.100.100.11/32 2.2.2.2 0 100 0 ?  to Use tunnel-te1
Route Distinguisher: 200:200 (default for vrf IN)
*>i200.200.200.7/32 10.64.0.7 0 100 0 ?  to use both tunnels te3 and te4
* i200.200.200.11/32 1.1.1.1 0 100 0 ?  to use tunnel-te2
This document is Prepared by George Micheal Gerges (CCIE-SP#44120, JNCIE-SP#2150)
5
As shown , all the BGP next-hops have been changed as the policy , then final step is the configuring of the static routes
to the required tunnels as following
router static
address-family ipv4 unicast
1.1.1.1/32 tunnel-te2 tag 100
2.2.2.2/32 tunnel-te1 tag 100
3.3.3.3/32 tunnel-te3 tag 100
This tag value can be added so that to avoid the redistribution of these static routes into BGP so that the same
IPs can be used in another site
Now let’s check the forwarding table again
RP/0/0/CPU0:VRT_CO_01#show cef vrf CN 100.100.100.11
next hop 2.2.2.2 via 16013/0/21
next hop 0.0.0.0/32 tt1 labels imposed {ImplNull 16}
RP/0/0/CPU0:VRT_CO_01#show cef vrf IN 200.200.200.11
next hop 1.1.1.1 via 16014/0/21
next hop 0.0.0.0/32 tt2 labels imposed {ImplNull 17}
RP/0/0/CPU0:VRT_CO_01#show cef vrf CN 100.100.100.7
next hop 3.3.3.3 via 16015/0/21
next hop 0.0.0.0/32 tt3 labels imposed {ImplNull 16}
RP/0/0/CPU0:VRT_CO_01#show cef vrf IN 200.200.200.7
next hop 10.64.0.7 via 16006/0/21
next hop 10.64.0.7/32 tt3 labels imposed {ImplNull 17}
next hop 10.64.0.7/32 tt4 labels imposed {ImplNull 17}
As Per the previous output we have achieved our goal and next is final notes on configuring the PPLB policy
1) The policy must have an explicit pass key word at it’s end as the default behavior of the policy is reject all
2) If We want to modify the policy for any reason or any future change we must change it in the following order ( This
point is under investigation)
RP/0/0/CPU0:VRT_CO_01(config)#route-policy PPLB
Thu Sep 11 04:48:42.654 UTC
% WARNING: Policy object route-policy PPLB' exists! Reconfiguring it via CLI will replace current definition. Use
'abort to cancel.
As per the previous marked warning , if any changed done in the policy it will be deleted , so we must apply same
configurations again and then add or remove the required term
3) Finally we can have some sophisticated backup mechanism for the VRFs traffic ( not recommended as tunnels
are already backup in our network and to avoid more complexity) by adding floating static routes ( with higher
admin distance) to the dynamic tunnel that is found for each side .
4) by using this technique there is no need to apply any changes in all other routers that are already up and running .
This document is Prepared by George Micheal Gerges (CCIE-SP#44120, JNCIE-SP#2150)
6

More Related Content

What's hot

CGNAT Wide Screen
CGNAT Wide ScreenCGNAT Wide Screen
CGNAT Wide ScreenZCorum
 
Build a High Available NFS Cluster Based on CephFS - Shangzhong Zhu
Build a High Available NFS Cluster Based on CephFS - Shangzhong ZhuBuild a High Available NFS Cluster Based on CephFS - Shangzhong Zhu
Build a High Available NFS Cluster Based on CephFS - Shangzhong ZhuCeph Community
 
Dynamic Routing IGRP
Dynamic Routing IGRPDynamic Routing IGRP
Dynamic Routing IGRPKishore Kumar
 
Switching conditions in SDH protection schemes.
Switching conditions in SDH protection schemes.Switching conditions in SDH protection schemes.
Switching conditions in SDH protection schemes.MapYourTech
 
MPLS Traffic Engineering
MPLS Traffic EngineeringMPLS Traffic Engineering
MPLS Traffic EngineeringAPNIC
 
초단타매매 전략 소개 및 트렌드
초단타매매 전략 소개 및 트렌드초단타매매 전략 소개 및 트렌드
초단타매매 전략 소개 및 트렌드NAVER Engineering
 
Convolutional neural neworks
Convolutional neural neworksConvolutional neural neworks
Convolutional neural neworksLuis Serrano
 
Migrating from OSPF to IS-IS by Philip Smith
Migrating from OSPF to IS-IS by Philip SmithMigrating from OSPF to IS-IS by Philip Smith
Migrating from OSPF to IS-IS by Philip SmithMyNOG
 
Distributed Multi-GPU Computing with Dask, CuPy and RAPIDS
Distributed Multi-GPU Computing with Dask, CuPy and RAPIDSDistributed Multi-GPU Computing with Dask, CuPy and RAPIDS
Distributed Multi-GPU Computing with Dask, CuPy and RAPIDSPeterAndreasEntschev
 
Segment Routing Advanced Use Cases - Cisco Live 2016 USA
Segment Routing Advanced Use Cases - Cisco Live 2016 USASegment Routing Advanced Use Cases - Cisco Live 2016 USA
Segment Routing Advanced Use Cases - Cisco Live 2016 USAJose Liste
 
Beginners: Non Terrestrial Networks (NTN)
Beginners: Non Terrestrial Networks (NTN)Beginners: Non Terrestrial Networks (NTN)
Beginners: Non Terrestrial Networks (NTN)3G4G
 
WAN SDN meet Segment Routing
WAN SDN meet Segment RoutingWAN SDN meet Segment Routing
WAN SDN meet Segment RoutingAPNIC
 
Model-Based Reinforcement Learning @NIPS2017
Model-Based Reinforcement Learning @NIPS2017Model-Based Reinforcement Learning @NIPS2017
Model-Based Reinforcement Learning @NIPS2017mooopan
 
Вопросы балансировки трафика
Вопросы балансировки трафикаВопросы балансировки трафика
Вопросы балансировки трафикаSkillFactory
 
Horovod: Uber’s Open Source Distributed Deep Learning Framework for TensorFlow
Horovod: Uber’s Open Source Distributed Deep Learning Framework for TensorFlowHorovod: Uber’s Open Source Distributed Deep Learning Framework for TensorFlow
Horovod: Uber’s Open Source Distributed Deep Learning Framework for TensorFlowDatabricks
 
Traffic Engineering Using Segment Routing
Traffic Engineering Using Segment Routing Traffic Engineering Using Segment Routing
Traffic Engineering Using Segment Routing Cisco Canada
 
Deploying Carrier Ethernet Features on Cisco ASR 9000
Deploying Carrier Ethernet Features on Cisco ASR 9000Deploying Carrier Ethernet Features on Cisco ASR 9000
Deploying Carrier Ethernet Features on Cisco ASR 9000Vinod Kumar Balasubramanyam
 

What's hot (20)

CGNAT Wide Screen
CGNAT Wide ScreenCGNAT Wide Screen
CGNAT Wide Screen
 
Build a High Available NFS Cluster Based on CephFS - Shangzhong Zhu
Build a High Available NFS Cluster Based on CephFS - Shangzhong ZhuBuild a High Available NFS Cluster Based on CephFS - Shangzhong Zhu
Build a High Available NFS Cluster Based on CephFS - Shangzhong Zhu
 
MENOG-Segment Routing Introduction
MENOG-Segment Routing IntroductionMENOG-Segment Routing Introduction
MENOG-Segment Routing Introduction
 
製品コンフィグレーションガイド
製品コンフィグレーションガイド製品コンフィグレーションガイド
製品コンフィグレーションガイド
 
Dynamic Routing IGRP
Dynamic Routing IGRPDynamic Routing IGRP
Dynamic Routing IGRP
 
Switching conditions in SDH protection schemes.
Switching conditions in SDH protection schemes.Switching conditions in SDH protection schemes.
Switching conditions in SDH protection schemes.
 
MPLS Traffic Engineering
MPLS Traffic EngineeringMPLS Traffic Engineering
MPLS Traffic Engineering
 
초단타매매 전략 소개 및 트렌드
초단타매매 전략 소개 및 트렌드초단타매매 전략 소개 및 트렌드
초단타매매 전략 소개 및 트렌드
 
Convolutional neural neworks
Convolutional neural neworksConvolutional neural neworks
Convolutional neural neworks
 
Migrating from OSPF to IS-IS by Philip Smith
Migrating from OSPF to IS-IS by Philip SmithMigrating from OSPF to IS-IS by Philip Smith
Migrating from OSPF to IS-IS by Philip Smith
 
Distributed Multi-GPU Computing with Dask, CuPy and RAPIDS
Distributed Multi-GPU Computing with Dask, CuPy and RAPIDSDistributed Multi-GPU Computing with Dask, CuPy and RAPIDS
Distributed Multi-GPU Computing with Dask, CuPy and RAPIDS
 
Segment Routing Advanced Use Cases - Cisco Live 2016 USA
Segment Routing Advanced Use Cases - Cisco Live 2016 USASegment Routing Advanced Use Cases - Cisco Live 2016 USA
Segment Routing Advanced Use Cases - Cisco Live 2016 USA
 
Beginners: Non Terrestrial Networks (NTN)
Beginners: Non Terrestrial Networks (NTN)Beginners: Non Terrestrial Networks (NTN)
Beginners: Non Terrestrial Networks (NTN)
 
WAN SDN meet Segment Routing
WAN SDN meet Segment RoutingWAN SDN meet Segment Routing
WAN SDN meet Segment Routing
 
Cisco MPLS
Cisco MPLSCisco MPLS
Cisco MPLS
 
Model-Based Reinforcement Learning @NIPS2017
Model-Based Reinforcement Learning @NIPS2017Model-Based Reinforcement Learning @NIPS2017
Model-Based Reinforcement Learning @NIPS2017
 
Вопросы балансировки трафика
Вопросы балансировки трафикаВопросы балансировки трафика
Вопросы балансировки трафика
 
Horovod: Uber’s Open Source Distributed Deep Learning Framework for TensorFlow
Horovod: Uber’s Open Source Distributed Deep Learning Framework for TensorFlowHorovod: Uber’s Open Source Distributed Deep Learning Framework for TensorFlow
Horovod: Uber’s Open Source Distributed Deep Learning Framework for TensorFlow
 
Traffic Engineering Using Segment Routing
Traffic Engineering Using Segment Routing Traffic Engineering Using Segment Routing
Traffic Engineering Using Segment Routing
 
Deploying Carrier Ethernet Features on Cisco ASR 9000
Deploying Carrier Ethernet Features on Cisco ASR 9000Deploying Carrier Ethernet Features on Cisco ASR 9000
Deploying Carrier Ethernet Features on Cisco ASR 9000
 

Similar to Per VRF tunnel Seclection IOS-XR

Ccn pv7 route_lab2-1_eigrp-load-balancing_student
Ccn pv7 route_lab2-1_eigrp-load-balancing_studentCcn pv7 route_lab2-1_eigrp-load-balancing_student
Ccn pv7 route_lab2-1_eigrp-load-balancing_studentAngel Clavel
 
Troubleshooting BGP Juniper Examples
Troubleshooting BGP Juniper ExamplesTroubleshooting BGP Juniper Examples
Troubleshooting BGP Juniper ExamplesSalachudin Emir
 
MPLS SDN 2015 - SPRING interoperability testing
MPLS SDN 2015 - SPRING interoperability testingMPLS SDN 2015 - SPRING interoperability testing
MPLS SDN 2015 - SPRING interoperability testingStephane Litkowski
 
Juniper JNCIA – Juniper RIP Route Configuration
Juniper JNCIA – Juniper RIP Route ConfigurationJuniper JNCIA – Juniper RIP Route Configuration
Juniper JNCIA – Juniper RIP Route ConfigurationHamed Moghaddam
 
L3 Vpn Diagnosing Common Problems
L3 Vpn Diagnosing Common ProblemsL3 Vpn Diagnosing Common Problems
L3 Vpn Diagnosing Common ProblemsAmir Malik
 
MPLS-based Layer 3 VPNs.pdf
MPLS-based Layer 3 VPNs.pdfMPLS-based Layer 3 VPNs.pdf
MPLS-based Layer 3 VPNs.pdfHuynh MVT
 
CSC3407 Assigment 2 Question 1 (50 marks) USQ College .docx
CSC3407 Assigment 2 Question 1 (50 marks) USQ College .docxCSC3407 Assigment 2 Question 1 (50 marks) USQ College .docx
CSC3407 Assigment 2 Question 1 (50 marks) USQ College .docxfaithxdunce63732
 
IP Infusion Application Note for 4G LTE Fixed Wireless Access
IP Infusion Application Note for 4G LTE Fixed Wireless AccessIP Infusion Application Note for 4G LTE Fixed Wireless Access
IP Infusion Application Note for 4G LTE Fixed Wireless AccessDhiman Chowdhury
 
VXLAN and FRRouting
VXLAN and FRRoutingVXLAN and FRRouting
VXLAN and FRRoutingFaisal Reza
 
2015.7.17 JANOG36 BGP Flowspec Interoperability Test @ Interop Tokyo 2015 Sho...
2015.7.17 JANOG36 BGP Flowspec Interoperability Test @ Interop Tokyo 2015 Sho...2015.7.17 JANOG36 BGP Flowspec Interoperability Test @ Interop Tokyo 2015 Sho...
2015.7.17 JANOG36 BGP Flowspec Interoperability Test @ Interop Tokyo 2015 Sho...Shuichi Ohkubo
 
Cisco CCNA IP SLA with tracking configuration
Cisco CCNA IP SLA  with tracking  configurationCisco CCNA IP SLA  with tracking  configuration
Cisco CCNA IP SLA with tracking configurationHamed Moghaddam
 
Lab_5_OSPF_MPLS_sham_link_on_MPLS_VPN_1698700003.pdf
Lab_5_OSPF_MPLS_sham_link_on_MPLS_VPN_1698700003.pdfLab_5_OSPF_MPLS_sham_link_on_MPLS_VPN_1698700003.pdf
Lab_5_OSPF_MPLS_sham_link_on_MPLS_VPN_1698700003.pdfEnRios1
 
QoS Pre-Classify on Cisco IOS
QoS Pre-Classify on Cisco IOSQoS Pre-Classify on Cisco IOS
QoS Pre-Classify on Cisco IOSNetProtocol Xpert
 
M1 lte e nodeb integration work flow v1.8 19oct2011
M1 lte e nodeb integration work flow v1.8 19oct2011M1 lte e nodeb integration work flow v1.8 19oct2011
M1 lte e nodeb integration work flow v1.8 19oct2011Emilson Cruz
 
Telnet configuration
Telnet configurationTelnet configuration
Telnet configurationMdAlAmin187
 
Digital Wave vs. Nodal Analysis for Circuit Simulation: an experimental compa...
Digital Wave vs. Nodal Analysis for Circuit Simulation: an experimental compa...Digital Wave vs. Nodal Analysis for Circuit Simulation: an experimental compa...
Digital Wave vs. Nodal Analysis for Circuit Simulation: an experimental compa...Piero Belforte
 
Juniper JNCIA – Juniper RIP and OSPF Route Configuration
Juniper JNCIA – Juniper RIP and OSPF Route ConfigurationJuniper JNCIA – Juniper RIP and OSPF Route Configuration
Juniper JNCIA – Juniper RIP and OSPF Route ConfigurationHamed Moghaddam
 
Lab 9 instructions
Lab 9 instructionsLab 9 instructions
Lab 9 instructionstrayyoo
 

Similar to Per VRF tunnel Seclection IOS-XR (20)

Ccn pv7 route_lab2-1_eigrp-load-balancing_student
Ccn pv7 route_lab2-1_eigrp-load-balancing_studentCcn pv7 route_lab2-1_eigrp-load-balancing_student
Ccn pv7 route_lab2-1_eigrp-load-balancing_student
 
Juniper Bgp
Juniper BgpJuniper Bgp
Juniper Bgp
 
Troubleshooting BGP Juniper Examples
Troubleshooting BGP Juniper ExamplesTroubleshooting BGP Juniper Examples
Troubleshooting BGP Juniper Examples
 
MPLS SDN 2015 - SPRING interoperability testing
MPLS SDN 2015 - SPRING interoperability testingMPLS SDN 2015 - SPRING interoperability testing
MPLS SDN 2015 - SPRING interoperability testing
 
Juniper JNCIA – Juniper RIP Route Configuration
Juniper JNCIA – Juniper RIP Route ConfigurationJuniper JNCIA – Juniper RIP Route Configuration
Juniper JNCIA – Juniper RIP Route Configuration
 
L3 Vpn Diagnosing Common Problems
L3 Vpn Diagnosing Common ProblemsL3 Vpn Diagnosing Common Problems
L3 Vpn Diagnosing Common Problems
 
MPLS-based Layer 3 VPNs.pdf
MPLS-based Layer 3 VPNs.pdfMPLS-based Layer 3 VPNs.pdf
MPLS-based Layer 3 VPNs.pdf
 
CSC3407 Assigment 2 Question 1 (50 marks) USQ College .docx
CSC3407 Assigment 2 Question 1 (50 marks) USQ College .docxCSC3407 Assigment 2 Question 1 (50 marks) USQ College .docx
CSC3407 Assigment 2 Question 1 (50 marks) USQ College .docx
 
Inter as vpn option c
Inter as vpn option c Inter as vpn option c
Inter as vpn option c
 
IP Infusion Application Note for 4G LTE Fixed Wireless Access
IP Infusion Application Note for 4G LTE Fixed Wireless AccessIP Infusion Application Note for 4G LTE Fixed Wireless Access
IP Infusion Application Note for 4G LTE Fixed Wireless Access
 
VXLAN and FRRouting
VXLAN and FRRoutingVXLAN and FRRouting
VXLAN and FRRouting
 
2015.7.17 JANOG36 BGP Flowspec Interoperability Test @ Interop Tokyo 2015 Sho...
2015.7.17 JANOG36 BGP Flowspec Interoperability Test @ Interop Tokyo 2015 Sho...2015.7.17 JANOG36 BGP Flowspec Interoperability Test @ Interop Tokyo 2015 Sho...
2015.7.17 JANOG36 BGP Flowspec Interoperability Test @ Interop Tokyo 2015 Sho...
 
Cisco CCNA IP SLA with tracking configuration
Cisco CCNA IP SLA  with tracking  configurationCisco CCNA IP SLA  with tracking  configuration
Cisco CCNA IP SLA with tracking configuration
 
Lab_5_OSPF_MPLS_sham_link_on_MPLS_VPN_1698700003.pdf
Lab_5_OSPF_MPLS_sham_link_on_MPLS_VPN_1698700003.pdfLab_5_OSPF_MPLS_sham_link_on_MPLS_VPN_1698700003.pdf
Lab_5_OSPF_MPLS_sham_link_on_MPLS_VPN_1698700003.pdf
 
QoS Pre-Classify on Cisco IOS
QoS Pre-Classify on Cisco IOSQoS Pre-Classify on Cisco IOS
QoS Pre-Classify on Cisco IOS
 
M1 lte e nodeb integration work flow v1.8 19oct2011
M1 lte e nodeb integration work flow v1.8 19oct2011M1 lte e nodeb integration work flow v1.8 19oct2011
M1 lte e nodeb integration work flow v1.8 19oct2011
 
Telnet configuration
Telnet configurationTelnet configuration
Telnet configuration
 
Digital Wave vs. Nodal Analysis for Circuit Simulation: an experimental compa...
Digital Wave vs. Nodal Analysis for Circuit Simulation: an experimental compa...Digital Wave vs. Nodal Analysis for Circuit Simulation: an experimental compa...
Digital Wave vs. Nodal Analysis for Circuit Simulation: an experimental compa...
 
Juniper JNCIA – Juniper RIP and OSPF Route Configuration
Juniper JNCIA – Juniper RIP and OSPF Route ConfigurationJuniper JNCIA – Juniper RIP and OSPF Route Configuration
Juniper JNCIA – Juniper RIP and OSPF Route Configuration
 
Lab 9 instructions
Lab 9 instructionsLab 9 instructions
Lab 9 instructions
 

Per VRF tunnel Seclection IOS-XR

  • 1. This document is Prepared by George Micheal Gerges (CCIE-SP#44120, JNCIE-SP#2150) 1 Per vrf Tunnel selection On cisco ios-xr
  • 2. This document is Prepared by George Micheal Gerges (CCIE-SP#44120, JNCIE-SP#2150) 2 Introduction: This document is about per VRF tunnel selection in IOS-XR . during this document we are going to use the following topology Our final goal is the following 1) CN traffic from VRT_CO_01 to NRT_CO_01 will go through Green TX path ( tunnel-te1 on VRT_CO_01) 2) IN traffic from VRT_CO_01 to NRT_CO_01 will go through Black TX path ( tunnel-te2 on VRT_CO_01) 3) CN traffic from VRT_CO_01 to XRT_CO_01 will go through Red TX path ( tunnel-te3 on VRT_CO_01) 4) IN traffic from VRT_CO_01 to XRT_CO_01 will go through both Red and Blue TX path ( tunnel-te 3 and tunnel- te4 on VRT_CO_01) Also during our test will use the following VRFs VRF name RD Import/Export RT CN 100:100 100:100 IN 200:200 200:200 Before applying any changes the current BGP configurations on VRT_CO_01 are as the following
  • 3. This document is Prepared by George Micheal Gerges (CCIE-SP#44120, JNCIE-SP#2150) 3 RP/0/0/CPU0:VRT_CO_01#show run router bgp Thu Sep 11 03:48:49.160 UTC router bgp 100 address-family ipv4 unicast ! address-family vpnv4 unicast ! neighbor-group IBGP remote-as 100 update-source Loopback0 address-family ipv4 unicast next-hop-self ! address-family vpnv4 unicast next-hop-self ! ! neighbor 10.64.0.7 use neighbor-group IBGP ! neighbor 10.64.0.11 use neighbor-group IBGP Let’s check the forwarding table for each VRF RP/0/0/CPU0:VRT_CO_01#show cef vrf CN 100.100.100.11 next hop 10.64.0.11/32 tt1 labels imposed {ImplNull 16} next hop 10.64.0.11/32 tt2 labels imposed {ImplNull 16} RP/0/0/CPU0:VRT_CO_01#show cef vrf IN 200.200.200.11 next hop 10.64.0.11/32 tt1 labels imposed {ImplNull 17} next hop 10.64.0.11/32 tt2 labels imposed {ImplNull 17} RP/0/0/CPU0:VRT_CO_01#show cef vrf CN 100.100.100.7 next hop 10.64.0.7/32 tt3 labels imposed {ImplNull 16} next hop 10.64.0.7/32 tt4 labels imposed {ImplNull 16} RP/0/0/CPU0:VRT_CO_01#show cef vrf IN 200.200.200.7 next hop 10.64.0.7/32 tt3 labels imposed {ImplNull 17} next hop 10.64.0.7/32 tt4 labels imposed {ImplNull 17} As seen before applying any changes , there is no separation in the traffic of the VRFs ( traffic of all the VRFs use the same tunnels)
  • 4. This document is Prepared by George Micheal Gerges (CCIE-SP#44120, JNCIE-SP#2150) 4 And Now let’s configure the policy to achieve our required final goal route-policy PPLB #Term NRT_CO_01 IN if extcommunity rt matches-any (200:200) and next-hop in (10.64.0.11) then set next-hop 1.1.1.1 endif #Term NRT_CO_01 CN if extcommunity rt matches-any (100:100) and next-hop in (10.64.0.11) then set next-hop 2.2.2.2 endif # Term XRT_CO_01 CN if extcommunity rt matches-any (100:100) and next-hop in (10.64.0.7) then set next-hop 3.3.3.3 endif pass end-policy This policy will match on certain BGP next-hop ( Which represents the remote PE ) and certain BGP extended community ( To determine the traffic of certain VRF) and then will change the BGP next-hop to a new value ( this new value is virtual IPs not used in our network like 1.1.1.1 and 2.2.2.2 , …) Then After changing the BGP next-hop to the new virtual IP , this policy must be applied to all the BGP neighbors under VPNv4 unicast address family . this new virtual IP will be reachable through certain tunnel by using static routes . To apply this policy for all the BGP neighbors use the following router bgp 100 neighbor-group IBGP address-family vpnv4 unicast route-policy PPLB in After the policy is applied we have the following RP/0/0/CPU0:VRT_CO_01(config)#do sho bgp vpnv4 unicast Status codes: s suppressed, d damped, h history, * valid, > best i - internal, r RIB-failure, S stale, N Nexthop-discard Origin codes: i - IGP, e - EGP, ? - incomplete Network Next Hop Metric LocPrf Weight Path Route Distinguisher: 100:100 (default for vrf CN) * i100.100.100.7/32 3.3.3.3 0 100 0 ?  to use tunnel-te 3 * i100.100.100.11/32 2.2.2.2 0 100 0 ?  to Use tunnel-te1 Route Distinguisher: 200:200 (default for vrf IN) *>i200.200.200.7/32 10.64.0.7 0 100 0 ?  to use both tunnels te3 and te4 * i200.200.200.11/32 1.1.1.1 0 100 0 ?  to use tunnel-te2
  • 5. This document is Prepared by George Micheal Gerges (CCIE-SP#44120, JNCIE-SP#2150) 5 As shown , all the BGP next-hops have been changed as the policy , then final step is the configuring of the static routes to the required tunnels as following router static address-family ipv4 unicast 1.1.1.1/32 tunnel-te2 tag 100 2.2.2.2/32 tunnel-te1 tag 100 3.3.3.3/32 tunnel-te3 tag 100 This tag value can be added so that to avoid the redistribution of these static routes into BGP so that the same IPs can be used in another site Now let’s check the forwarding table again RP/0/0/CPU0:VRT_CO_01#show cef vrf CN 100.100.100.11 next hop 2.2.2.2 via 16013/0/21 next hop 0.0.0.0/32 tt1 labels imposed {ImplNull 16} RP/0/0/CPU0:VRT_CO_01#show cef vrf IN 200.200.200.11 next hop 1.1.1.1 via 16014/0/21 next hop 0.0.0.0/32 tt2 labels imposed {ImplNull 17} RP/0/0/CPU0:VRT_CO_01#show cef vrf CN 100.100.100.7 next hop 3.3.3.3 via 16015/0/21 next hop 0.0.0.0/32 tt3 labels imposed {ImplNull 16} RP/0/0/CPU0:VRT_CO_01#show cef vrf IN 200.200.200.7 next hop 10.64.0.7 via 16006/0/21 next hop 10.64.0.7/32 tt3 labels imposed {ImplNull 17} next hop 10.64.0.7/32 tt4 labels imposed {ImplNull 17} As Per the previous output we have achieved our goal and next is final notes on configuring the PPLB policy 1) The policy must have an explicit pass key word at it’s end as the default behavior of the policy is reject all 2) If We want to modify the policy for any reason or any future change we must change it in the following order ( This point is under investigation) RP/0/0/CPU0:VRT_CO_01(config)#route-policy PPLB Thu Sep 11 04:48:42.654 UTC % WARNING: Policy object route-policy PPLB' exists! Reconfiguring it via CLI will replace current definition. Use 'abort to cancel. As per the previous marked warning , if any changed done in the policy it will be deleted , so we must apply same configurations again and then add or remove the required term 3) Finally we can have some sophisticated backup mechanism for the VRFs traffic ( not recommended as tunnels are already backup in our network and to avoid more complexity) by adding floating static routes ( with higher admin distance) to the dynamic tunnel that is found for each side . 4) by using this technique there is no need to apply any changes in all other routers that are already up and running .
  • 6. This document is Prepared by George Micheal Gerges (CCIE-SP#44120, JNCIE-SP#2150) 6