Cisco BGP Training Lab (IOS-XR) © 2010 Cisco Systems, Inc. All rights reserved. Cisco Confidential 1 Cisco IOS-XR BGP Routing LAB (Based on IOS-XR) Therdtoon Theerasasana [email protected] Last Updated : April 18, 2011 Rev.1a
Cisco BGP Training Lab (IOS-XR)
© 2010 Cisco Systems, Inc. All rights reserved. Cisco Confidential 1
Cisco IOS-XRBGP Routing LAB
(Based on IOS-XR)
Therdtoon Theerasasana
[email protected] Updated : April 18, 2011
Rev.1a
Cisco Confidential 2Cisco BGP Training Lab (IOS-XR)
© 2010 Cisco Systems, Inc. All rights reserved.
XR Lab Physical Layout
Cisco Confidential 3Cisco BGP Training Lab (IOS-XR)
© 2010 Cisco Systems, Inc. All rights reserved.
XR Lab Traffic Flows (1)
AS100
AS200
AS300
AS999
Cisco Confidential 4Cisco BGP Training Lab (IOS-XR)
© 2010 Cisco Systems, Inc. All rights reserved.
XR Lab Traffic Flows (2)
AS400AS500
Cisco Confidential 5Cisco BGP Training Lab (IOS-XR)
© 2010 Cisco Systems, Inc. All rights reserved.
Lab Information and VPN Configuration
� The Lab is in SJC SPG TME Lab.
� Traffic Generator is Agilent N2X. Each router has one N2X port for traffic generation.
� There are 9 logical routers, GSR1 to GSR7, CRS8 to CRS9 and ASR11-12.
� There are 6 physical routers, GSR1 to GSR4, CRS8 to CRS9 and ASR11-12.
� GSR5 to GSR7 are SDRs of GSR2, and are configured by GSR2 admin config to use slots (2,5), (4,6) and (0,3,7) respectively. GSR2 uses slots (1,8,9)
� GSR2, CRS8, CRS9 and ASR12 have dual RP to support NSR.
� GSR7 is also the RR and is managed by instructors only.
� Cisco IPSEC VPN Client Configuration :
Host : 128.107.78.130, Group Authentication Name : bmt06, Password : bmt06
VPN Username : bmtuser , Password : 365109
Cisco Confidential 6Cisco BGP Training Lab (IOS-XR)
© 2010 Cisco Systems, Inc. All rights reserved.
DMZ XR12K Ethernet 0 and Console Access
� Router/Agilent Username : cisco , Password : cisco
� SDR Username : cisco@admin , Password : cisco
� Agilent Controller : 172.20.165.36
� Upload to TFTP Directory : ftp://cisco:[email protected]
Router Ethernet 0 IP Addr Console Access
GSR1 172.20.165.29/25 172.20.165.33 2009
GSR2:Pri PRP Slot 9 172.20.165.30/25 172.20.165.33 2001
GSR2:Sec PRP Slot 8 172.20.165.37/25 172.20.165.33 2003
GSR3 172.20.165.31/25 172.20.165.33 2010
GSR4 172.20.165.32/25 172.20.165.33 2013
GSR2:SDR5 172.20.165.38/25 172.20.165.33 2006
GSR2:SDR6 172.20.165.39/25 172.20.165.33 2005
GSR2:SDR7 172.20.165.40/25 172.20.165.33 2004
Cisco Confidential 7Cisco BGP Training Lab (IOS-XR)
© 2010 Cisco Systems, Inc. All rights reserved.
DMZ CRS-1 Ethernet 0 and Console Access
� Router/Agilent Username : cisco , Password : cisco
� SDR Username : cisco@admin , Password : cisco
� Agilent Controller : 172.20.165.36
� Upload to TFTP Directory : ftp://cisco:[email protected]
Router Ethernet 0 IP Addr Console Access
CRS8 RP0 Pri 172.20.165.41/25 172.20.165.35 2002
CRS8 RP1 Sec 172.20.165.42/25 172.20.165.35 2001
CRS9 RP0 Pri 172.20.165.43/25 172.20.165.35 2003
CRS9 RP1 Sec 172.20.165.44/25 172.20.165.35 2004
ASR11 172.20.165.45/25 172.20.165.33 2012
ASR12 Pri 172.20.165.47/25 172.20.165.33 2014
ASR12 Sec 172.20.165.48/25 172.20.165.33 2015
Cisco Confidential 8Cisco BGP Training Lab (IOS-XR)
© 2010 Cisco Systems, Inc. All rights reserved.
Basic Configurations
� Configure your router GSR#/CRS#/ASR# where # is your group number. Use the hostname configcommand.
� Configure the management interface, static routes and enable Telnet.
� Configure IPv4 addresses as shown in the map.
GigE, TenGigE interfaces
Loopback 0 interface (your router number repeating in each octet)
� Verify connectivity by pinging the other side of each GE and 10GE interface.
Cisco Confidential 9Cisco BGP Training Lab (IOS-XR)
© 2010 Cisco Systems, Inc. All rights reserved.
Operational Tools Lab (1)
� The goal of this lab is to reinforce your knowledge
of the most common operational tools in IOS XR.
� Explore the system from all of the CLI modes:How many line cards are in the system?
How many router and packet memory do the line cards have?
How many fabric cards are in the system?
How much memory does the RP have?
Which commands did you use to find out the information
above ?
� Display the amount of free memory on a line card.
Which command did you use?
Cisco Confidential 10Cisco BGP Training Lab (IOS-XR)
© 2010 Cisco Systems, Inc. All rights reserved.
Operational Tools Lab (2)
� Configure two additional users – bgp-operator and
bgp-admin.bgp-operator should be able to run basic operator
commands (hint – this is a predefined task group) plus
all BGP show commands
bgp-admin should be able to run operator commands,
run BGP show commands, and to configure and
troubleshoot BGP
� Explore the following CLI commands:Show led
Show context
Show log location
Show redundancy
Show memory summary location
Show cef <prefix> location
Cisco Confidential 11Cisco BGP Training Lab (IOS-XR)
© 2010 Cisco Systems, Inc. All rights reserved.
Operational Tools Lab (3)
� Stopping, restarting and crashing processes:Show process
Process shutdown
Process start
Process restart
Process crash
Monitor process
� System Monitoring:Show tech
Show system verify
Monitor interface
Monitor controller
� Online help:Describe
man
Cisco Confidential 12Cisco BGP Training Lab (IOS-XR)
© 2010 Cisco Systems, Inc. All rights reserved.
01-Static Route Configuration
� Configure the Static routes on ALL Routers for the prefixes behind Agilent N2X as below :
GSR1 – 10.1.5.0/24 > 12.1.1.10
GSR2 – 10.1.6.0/24 > 12.1.4.10
GSR3 – 20.1.5.0/24 > 14.1.1.10
GSR4 – 20.1.6.0/24 > 14.1.4.10
GSR5 – 30.1.5.0/24 > 16.1.1.10
GSR6 – 30.1.6.0/24 > 16.1.4.10
CRS8 – 40.1.5.0/24 > 18.1.1.10
CRS9 – 40.1.6.0/24 > 18.1.4.10
ASR11 – 50.1.5.0/24 > 20.1.1.10
ASR12 – 50.1.6.0/24 > 20.1.4.10
Cisco Confidential 13Cisco BGP Training Lab (IOS-XR)
© 2010 Cisco Systems, Inc. All rights reserved.
01-Static Routes Sample Configuration
***** GSR1 *****Router staticaddress-family ipv4 unicast10.1.5.0/24 12.1.1.10!
***** GSR3 *****Router staticaddress-family ipv4 unicast20.1.5.0/24 14.1.1.10!
***** GSR5 *****Router staticaddress-family ipv4 unicast30.1.5.0/24 16.1.1.10!
***** CRS8 *****Router staticaddress-family ipv4 unicast40.1.5.0/24 18.1.1.10!
***** ASR11 *****Router staticaddress-family ipv4 unicast50.1.5.0/24 20.1.1.10!
***** GSR2 *****Router staticaddress-family ipv4 unicast10.1.6.0/24 12.1.4.10!
***** GSR4 *****Router staticaddress-family ipv4 unicast20.1.6.0/24 14.1.4.10!
***** GSR6 *****Router staticaddress-family ipv4 unicast30.1.6.0/24 16.1.4.10!
***** CRS9 *****Router staticaddress-family ipv4 unicast40.1.6.0/24 18.1.4.10!
***** ASR12 *****Router staticaddress-family ipv4 unicast50.1.6.0/24 20.1.4.10!
Cisco Confidential 14Cisco BGP Training Lab (IOS-XR)
© 2010 Cisco Systems, Inc. All rights reserved.
02-OSPF Configuration
� Configure OSPF Router Process ID = 1, Area = 0
� Configure OSPF MD5 Authentication Password = cisco
� Configure OSPF on Loopback0 of GSR1, GSR2 and GE interfaces between
GSR1-GSR2
� Configure OSPF on Loopback0 of GSR3, GSR4 and GE interfaces between
GSR3-GSR4
� Configure OSPF on Loopback0 of GSR5, GSR6 and GE interfaces between
GSR5-GSR6
� Configure OSPF on Loopback0 of CRS8, CRS9 and GE interfaces between
CRS8-CRS9
� Configure OSPF on Loopback0 of ASR11, ASR12 and 10GE interfaces
between ASR11-ASR12
� Configure OSPF with Static Routes Redistribution
� Verify routing and connectivity(show route, ping, trace)
� Verify the OSPF neighbors(show ospf neighbor)
� Verify the OSPF Process and OSPF Interface Parameters(show ospf, show ospf database, show ospf interface)
Cisco Confidential 15Cisco BGP Training Lab (IOS-XR)
© 2010 Cisco Systems, Inc. All rights reserved.
02-OSPF Sample Configuration (GSR1, GSR2)
***** GSR1 *****
route-policy static2ospfif destination in (10.1.5.0/24) then
passendif
end-policy!router ospf 1log adjacency changes detailrouter-id 1.1.1.1authentication message-digestmessage-digest-key 1 md5 ciscoredistribute static route-policy static2ospfarea 0interface Loopback0!interface GigabitEthernet0/1/1/1!interface GigabitEthernet0/1/1/2!!!
***** GSR2 *****
route-policy static2ospfif destination in (10.1.6.0/24) then
passendif
end-policy!router ospf 1log adjacency changes detailrouter-id 2.2.2.2authentication message-digestmessage-digest-key 1 md5 ciscoredistribute static route-policy static2ospfarea 0interface Loopback0!interface GigabitEthernet0/1/1/1!interface GigabitEthernet0/1/1/2!
!!
Cisco Confidential 16Cisco BGP Training Lab (IOS-XR)
© 2010 Cisco Systems, Inc. All rights reserved.
02-OSPF Sample Configuration (GSR3, GSR4)
***** GSR3 *****
route-policy static2ospfif destination in (20.1.5.0/24) then
passendif
end-policy!router ospf 1log adjacency changes detailrouter-id 3.3.3.3authentication message-digestmessage-digest-key 1 md5 ciscoredistribute static route-policy static2ospfarea 0interface Loopback0!interface GigabitEthernet0/4/1/1!interface GigabitEthernet0/4/1/2!!!
***** GSR4 *****
route-policy static2ospfif destination in (20.1.6.0/24) then
passendif
end-policy!router ospf 1log adjacency changes detailrouter-id 4.4.4.4authentication message-digestmessage-digest-key 1 md5 ciscoredistribute static route-policy static2ospfarea 0interface Loopback0!interface GigabitEthernet0/2/1/1!interface GigabitEthernet0/2/1/2!
!!
Cisco Confidential 17Cisco BGP Training Lab (IOS-XR)
© 2010 Cisco Systems, Inc. All rights reserved.
02-OSPF Sample Configuration (GSR5, GSR6)
***** GSR5 *****
route-policy static2ospfif destination in (30.1.5.0/24) then
passendif
end-policy!router ospf 1log adjacency changes detailrouter-id 5.5.5.5authentication message-digestmessage-digest-key 1 md5 ciscoredistribute static route-policy static2ospfarea 0interface Loopback0!interface GigabitEthernet0/2/1/1!interface GigabitEthernet0/2/1/2!!!
***** GSR6 *****
route-policy static2ospfif destination in (30.1.6.0/24) then
passendif
end-policy!router ospf 1log adjacency changes detailrouter-id 6.6.6.6authentication message-digestmessage-digest-key 1 md5 ciscoredistribute static route-policy static2ospfarea 0interface Loopback0!interface GigabitEthernet0/4/1/1!interface GigabitEthernet0/4/1/2!
!!
Cisco Confidential 18Cisco BGP Training Lab (IOS-XR)
© 2010 Cisco Systems, Inc. All rights reserved.
02-OSPF Sample Configuration (CRS8, CRS9)
***** CRS8 *****
route-policy static2ospfif destination in (40.1.5.0/24) then
passendif
end-policy!router ospf 1log adjacency changes detailrouter-id 8.8.8.8authentication message-digestmessage-digest-key 1 md5 ciscoredistribute static route-policy static2ospfarea 0interface Loopback0!interface GigabitEthernet0/0/0/1!interface GigabitEthernet0/0/0/2!!!
***** CRS9 *****
route-policy static2ospfif destination in (40.1.6.0/24) then
passendif
end-policy!router ospf 1log adjacency changes detailrouter-id 9.9.9.9authentication message-digestmessage-digest-key 1 md5 ciscoredistribute static route-policy static2ospfarea 0interface Loopback0!interface GigabitEthernet0/0/0/1!interface GigabitEthernet0/0/0/2!
!!
Cisco Confidential 19Cisco BGP Training Lab (IOS-XR)
© 2010 Cisco Systems, Inc. All rights reserved.
02-OSPF Sample Configuration (ASR11, ASR12)
***** ASR11*****
route-policy static2ospfif destination in (50.1.5.0/24) then
passendif
end-policy!router ospf 1log adjacency changes detailrouter-id 11.11.11.11authentication message-digestmessage-digest-key 1 md5 ciscoredistribute static route-policy static2ospfarea 0interface Loopback0!interface TenGigE0/1/0/0!interface TenGigE0/1/0/1!!!
***** ASR12 *****
route-policy static2ospfif destination in (50.1.5.0/24) then
passendif
end-policy!router ospf 1log adjacency changes detailrouter-id 12.12.12.12authentication message-digestmessage-digest-key 1 md5 ciscoredistribute static route-policy static2ospfarea 0interface Loopback0!interface TenGigE0/1/0/0!interface TenGigE0/1/0/1!
!!
Cisco Confidential 20Cisco BGP Training Lab (IOS-XR)
© 2010 Cisco Systems, Inc. All rights reserved.
02-OSPF Monitoring Commands (1)
� show ospf
� show ospf interface
� show ospf interface brief
� show ospf neighbor
� show ospf neighbor detail
� show ospf statistics (interface|spf)
� show ospf route
� show route ospf
� show route summary
Cisco Confidential 21Cisco BGP Training Lab (IOS-XR)
© 2010 Cisco Systems, Inc. All rights reserved.
02-OSPF Monitoring Commands (2)
� show ospf database
� show ospf database database-summary
� show ospf database router <lsa-id>
� show ospf database network <lsa-id>
� show ospf database summary <lsa-id>
� show ospf database asbr-summary <lsa-id>
� show ospf database external <lsa-id>
� show ospf database nssa-external <lsa-id>
Cisco Confidential 22Cisco BGP Training Lab (IOS-XR)
© 2010 Cisco Systems, Inc. All rights reserved.
03-BGP Configuration (1)
� Configure iBGP between GSR1-GSR2, GSR3-GSR4, GSR5-GSR6, CRS8-CRS9 and ASR11-ASR12 using Loopback0 as Source IP for BGP.
� Configure eBGP between GSR1-GSR7, GSR3-GSR7, GSR5-GSR7, CRS8-GSR7 and ASR11-GSR7 using Loopback0 as Source IP for BGP.
� Configure eBGP between GSR2-GSR7, GSR4-GSR7, GSR6-GSR7, CRS9-GSR7 and ASR12-GSR7 using Interface IP address as Source IP for BGP.
� Verify BGP Operation
show bgp
show bgp summary
show bgp neighbor <neighbor>
Cisco Confidential 23Cisco BGP Training Lab (IOS-XR)
© 2010 Cisco Systems, Inc. All rights reserved.
03-BGP Route Advertisement Configuration
� Configure GSR1 and GSR2 to advertise the following prefixes :10.1.0.0/21 , 10.1.2.0/24 and 10.1.3.0/24
� Configure GSR3 and GSR4 to advertise the following prefixes :20.1.0.0/21 , 20.1.2.0/24 and 20.1.3.0/24
� Configure GSR5 and GSR6 to advertise the following prefixes :30.1.0.0/21 , 30.1.2.0/24 and 30.1.3.0/24
� Configure CRS8 and CRS9 to advertise the following prefixes :40.1.0.0/21 , 40.1.2.0/24 and 40.1.3.0/24
� Configure ASR11 and ASR12to advertise the following prefixes :50.1.0.0/21 , 50.1.2.0/24 and 50.1.3.0/24
� Configure Basic Route-Policy to Pass ALL. And Apply Route-Policy for both IN and OUT for all eBGP peers.
� Verify BGP Operationshow bgp
show bgp summary
show bgp neighbor <neighbor> advertised-routes
show bgp neighbor <neighbor> routes
show bgp neighbor <neighbor> received routes
Cisco Confidential 24Cisco BGP Training Lab (IOS-XR)
© 2010 Cisco Systems, Inc. All rights reserved.
BGP-02 Sample Configuration (GSR1, GSR2)
***** GSR1 ********** GSR1 *****router staticaddress-family ipv4 unicast7.7.7.7/32 11.1.1.710.1.0.0/21 Null0 25010.1.2.0/24 Null0 25010.1.3.0/24 Null0 250!!route-policy pass-allpass
end-policy!router bgp 100address-family ipv4 unicastnetwork 10.1.0.0/21network 10.1.2.0/24network 10.1.3.0/24!neighbor 2.2.2.2remote-as 100update-source Loopback0address-family ipv4 unicastnext-hop-self
!!neighbor 7.7.7.7remote-as 999ebgp-multihop 2update-source Loopback0address-family ipv4 unicastroute-policy pass-all inroute-policy pass-all outsoft-reconfiguration inbound always
***** GSR2 ********** GSR2 *****router staticaddress-family ipv4 unicast10.1.0.0/21 Null0 25010.1.2.0/24 Null0 25010.1.3.0/24 Null0 250
!!route-policy pass-allpass
end-policy!router bgp 100address-family ipv4 unicastnetwork 10.1.0.0/21network 10.1.2.0/24network 10.1.3.0/24
!neighbor 1.1.1.1remote-as 100update-source Loopback0address-family ipv4 unicastnext-hop-self
!!neighbor 11.1.2.7remote-as 999address-family ipv4 unicastroute-policy pass-all inroute-policy pass-all outsoft-reconfiguration inbound always
Cisco Confidential 25Cisco BGP Training Lab (IOS-XR)
© 2010 Cisco Systems, Inc. All rights reserved.
BGP-02 Sample Configuration (GSR3, GSR4)
***** GSR3 ********** GSR3 *****router staticaddress-family ipv4 unicast7.7.7.7/32 11.1.3.720.1.0.0/21 Null0 25020.1.2.0/24 Null0 25020.1.3.0/24 Null0 250!!route-policy pass-allpass
end-policy!router bgp 200address-family ipv4 unicastnetwork 20.1.0.0/21network 20.1.2.0/24network 20.1.3.0/24!neighbor 4.4.4.4remote-as 200update-source Loopback0address-family ipv4 unicastnext-hop-self
!!neighbor 7.7.7.7remote-as 999ebgp-multihop 2update-source Loopback0address-family ipv4 unicastroute-policy pass-all inroute-policy pass-all outsoft-reconfiguration inbound always
***** GSR4 ********** GSR4 *****router staticaddress-family ipv4 unicast20.1.0.0/21 Null0 25020.1.2.0/24 Null0 25020.1.3.0/24 Null0 250
!!route-policy pass-allpass
end-policy!router bgp 200address-family ipv4 unicastnetwork 20.1.0.0/21network 20.1.2.0/24network 20.1.3.0/24
!neighbor 3.3.3.3remote-as 200update-source Loopback0address-family ipv4 unicastnext-hop-self
!!neighbor 11.1.4.7remote-as 999address-family ipv4 unicastroute-policy pass-all inroute-policy pass-all outsoft-reconfiguration inbound always
Cisco Confidential 26Cisco BGP Training Lab (IOS-XR)
© 2010 Cisco Systems, Inc. All rights reserved.
BGP-02 Sample Configuration (GSR5, GSR6)
***** GSR5 ********** GSR5 *****router staticaddress-family ipv4 unicast7.7.7.7/32 11.1.5.720.1.0.0/21 Null0 25020.1.2.0/24 Null0 25020.1.3.0/24 Null0 250!!route-policy pass-allpass
end-policy!router bgp 300address-family ipv4 unicastnetwork 20.1.0.0/21network 20.1.2.0/24network 20.1.3.0/24!neighbor 6.6.6.6remote-as 300update-source Loopback0address-family ipv4 unicastnext-hop-self
!!neighbor 7.7.7.7remote-as 999ebgp-multihop 2update-source Loopback0address-family ipv4 unicastroute-policy pass-all inroute-policy pass-all outsoft-reconfiguration inbound always
***** GSR6 ********** GSR6 *****router staticaddress-family ipv4 unicast20.1.0.0/21 Null0 25020.1.2.0/24 Null0 25020.1.3.0/24 Null0 250
!!route-policy pass-allpass
end-policy!router bgp 300address-family ipv4 unicastnetwork 20.1.0.0/21network 20.1.2.0/24network 20.1.3.0/24
!neighbor 5.5.5.5remote-as 300update-source Loopback0address-family ipv4 unicastnext-hop-self
!!neighbor 11.1.6.7remote-as 999address-family ipv4 unicastroute-policy pass-all inroute-policy pass-all outsoft-reconfiguration inbound always
Cisco Confidential 27Cisco BGP Training Lab (IOS-XR)
© 2010 Cisco Systems, Inc. All rights reserved.
BGP-02 Sample Configuration (CRS8, CRS9)
***** CRS8 ********** CRS8 *****router staticaddress-family ipv4 unicast7.7.7.7/32 11.1.7.740.1.0.0/21 Null0 25040.1.2.0/24 Null0 25040.1.3.0/24 Null0 250!!route-policy pass-allpass
end-policy!router bgp 400address-family ipv4 unicastnetwork 40.1.0.0/21network 40.1.2.0/24network 40.1.3.0/24!neighbor 9.9.9.9remote-as 400update-source Loopback0address-family ipv4 unicastnext-hop-self !
!neighbor 7.7.7.7remote-as 999ebgp-multihop 2update-source Loopback0address-family ipv4 unicastroute-policy pass-all inroute-policy pass-all outsoft-reconfiguration inbound always
***** CRS9 ********** CRS9 *****router staticaddress-family ipv4 unicast40.1.0.0/21 Null0 25040.1.2.0/24 Null0 25040.1.3.0/24 Null0 250
!!route-policy pass-allpass
end-policy!router bgp 400address-family ipv4 unicastnetwork 40.1.0.0/21network 40.1.2.0/24network 40.1.3.0/24
!neighbor 8.8.8.8remote-as 400update-source Loopback0address-family ipv4 unicastnext-hop-self
!!neighbor 11.1.8.7remote-as 999address-family ipv4 unicastroute-policy pass-all inroute-policy pass-all outsoft-reconfiguration inbound always
Cisco Confidential 28Cisco BGP Training Lab (IOS-XR)
© 2010 Cisco Systems, Inc. All rights reserved.
BGP-02 Sample Configuration (ASR11, ASR12)
***** ASR11 ********** ASR11 *****router staticaddress-family ipv4 unicast7.7.7.7/32 11.1.9.750.1.0.0/21 Null0 25050.1.2.0/24 Null0 25050.1.3.0/24 Null0 250!!route-policy pass-allpass
end-policy!router bgp 500address-family ipv4 unicastnetwork 50.1.0.0/21network 50.1.2.0/24network 50.1.3.0/24!neighbor 12.12.12.12remote-as 400update-source Loopback0address-family ipv4 unicastnext-hop-self !
!neighbor 7.7.7.7remote-as 999ebgp-multihop 2update-source Loopback0address-family ipv4 unicastroute-policy pass-all inroute-policy pass-all outsoft-reconfiguration inbound always
***** ASR12 ********** ASR12 *****router staticaddress-family ipv4 unicast50.1.0.0/21 Null0 25050.1.2.0/24 Null0 25050.1.3.0/24 Null0 250
!!route-policy pass-allpass
end-policy!router bgp 500address-family ipv4 unicastnetwork 50.1.0.0/21network 50.1.2.0/24network 50.1.3.0/24
!neighbor 11.11.11.11remote-as 400update-source Loopback0address-family ipv4 unicastnext-hop-self
!!neighbor 11.1.10.7remote-as 999address-family ipv4 unicastroute-policy pass-all inroute-policy pass-all outsoft-reconfiguration inbound always
Cisco Confidential 29Cisco BGP Training Lab (IOS-XR)
© 2010 Cisco Systems, Inc. All rights reserved.
BGP-03 Inbound Route-Policy Configuration (1)
� Configure GSR1 to receive BGP update from GSR7 and set Local Preference = 200 for the prefixes from AS200
� Configure GSR2 to receive BGP update from GSR7 and set Local Preference = 200 for the prefixes from AS300
� Configure GSR3 to receive BGP update from GSR7 and set Local Preference = 200 for the prefixes from AS300
� Configure GSR4 to receive BGP update from GSR7 and set Local Preference = 200 for the prefixes from AS400
� Configure GSR5 to receive BGP update from GSR7 and set Local Preference = 200 for the prefixes from AS400
� Configure GSR6 to receive BGP update from GSR7 and set Local Preference = 200 for the prefixes from AS500
� Configure CRS8 to receive BGP update from GSR7 and set Local Preference = 200 for the prefixes from AS500
� Configure CRS9 to receive BGP update from GSR7 and set Local Preference = 200 for the prefixes from AS100
� Configure ASR11 to receive BGP update from GSR7 and set Local Preference = 200 for the prefixes from AS100
� Configure ASR12 to receive BGP update from GSR7 and set Local Preference = 200 for the prefixes from AS200
Cisco Confidential 30Cisco BGP Training Lab (IOS-XR)
© 2010 Cisco Systems, Inc. All rights reserved.
BGP-03 Inbound Route-Policy Configuration (2)
� Verify BGP Operation
show bgp
show bgp summary
show bgp neighbor <neighbor> advertised-routes
show bgp neighbor <neighbor> routes
show bgp neighbor <neighbor> received routes
show bgp route-policy <route-policy>
Cisco Confidential 31Cisco BGP Training Lab (IOS-XR)
© 2010 Cisco Systems, Inc. All rights reserved.
BGP-04 Outbound Route-Policy Configuration (1)
� Configure GSR1 to advertise BGP prefixes to GSR7 and set AS-PATH Prepend (3 times) for the prefix = 10.1.3.0/24.
� Configure GSR2 to advertise BGP prefixes to GSR7 and set AS-PATH Prepend (3 times) for the prefix = 10.1.2.0/24.
� Configure GSR3 to advertise BGP prefixes to GSR7 and set AS-PATH Prepend (3 times) for the prefix = 20.1.3.0/24.
� Configure GSR4 to advertise BGP prefixes to GSR7 and set AS-PATH Prepend (3 times) for the prefix = 20.1.2.0/24.
� Configure GSR5 to advertise BGP prefixes to GSR7 and set AS-PATH Prepend (3 times) for the prefix = 30.1.3.0/24.
� Configure GSR6 to advertise BGP prefixes to GSR7 and set AS-PATH Prepend (3 times) for the prefix = 30.1.2.0/24.
� Configure CRS8 to advertise BGP prefixes to GSR7 and set AS-PATH Prepend (3 times) for the prefix = 40.1.3.0/24.
� Configure CRS9 to advertise BGP prefixes to GSR7 and set AS-PATH Prepend (3 times) for the prefix = 40.1.2.0/24.
� Configure ASR11 to advertise BGP prefixes to GSR7 and set AS-PATH Prepend (3 times) for the prefix = 50.1.3.0/24.
� Configure ASR12 to advertise BGP prefixes to GSR7 and set AS-PATH Prepend (3 times) for the prefix = 50.1.2.0/24.
Cisco Confidential 32Cisco BGP Training Lab (IOS-XR)
© 2010 Cisco Systems, Inc. All rights reserved.
BGP-04 Outbound Route-Policy Configuration (2)
� Verify BGP Operation
show bgp
show bgp summary
show bgp neighbor <neighbor> advertised-routes
show bgp neighbor <neighbor> routes
show bgp neighbor <neighbor> received routes
show bgp route-policy <route-policy>
Cisco Confidential 33Cisco BGP Training Lab (IOS-XR)
© 2010 Cisco Systems, Inc. All rights reserved.
BGP-04 Sample Configuration (GSR1, GSR2)
***** GSR1 ********** GSR1 *****
route-policy ASPATH-PREPENDif destination in (10.1.3.0/24) then
prepend as-path 100 3endifpass
end-policy!route-policy LOCAL-PREFif as-path in (ios-regex '_200$') thenset local-preference 200
endifpass
end-policy!router bgp 100!neighbor 7.7.7.7address-family ipv4 unicastroute-policy LOCAL-PREF inroute-policy ASPATH-PREPEND outsoft-reconfiguration inbound
***** GSR2 ********** GSR2 *****
route-policy ASPATH-PREPENDif destination in (10.1.2.0/24) then
prepend as-path 100 3endifpass
end-policy!route-policy LOCAL-PREFif as-path in (ios-regex '_300$') thenset local-preference 200
endifpass
end-policy!router bgp 100!neighbor 11.1.2.7address-family ipv4 unicastroute-policy LOCAL-PREF inroute-policy ASPATH-PREPEND out soft-reconfiguration inbound
Cisco Confidential 34Cisco BGP Training Lab (IOS-XR)
© 2010 Cisco Systems, Inc. All rights reserved.
BGP-04 Sample Configuration (GSR3, GSR4)
***** GSR3 ********** GSR3 *****
route-policy ASPATH-PREPENDif destination in (20.1.3.0/24) then
prepend as-path 200 3endifpass
end-policy!route-policy LOCAL-PREFif as-path in (ios-regex '_300$') thenset local-preference 200
endifpass
end-policy!router bgp 200!neighbor 7.7.7.7address-family ipv4 unicastroute-policy LOCAL-PREF inroute-policy ASPATH-PREPEND outsoft-reconfiguration inbound
***** GSR4 ********** GSR4 *****
route-policy ASPATH-PREPENDif destination in (20.1.2.0/24) then
prepend as-path 200 3endifpass
end-policy!route-policy LOCAL-PREFif as-path in (ios-regex '_400$') thenset local-preference 200
endifpass
end-policy!router bgp 200!neighbor 11.1.4.7address-family ipv4 unicastroute-policy LOCAL-PREF inroute-policy ASPATH-PREPEND out soft-reconfiguration inbound
Cisco Confidential 35Cisco BGP Training Lab (IOS-XR)
© 2010 Cisco Systems, Inc. All rights reserved.
BGP-04 Sample Configuration (GSR5, GSR5)
***** GSR5 ********** GSR5 *****
route-policy ASPATH-PREPENDif destination in (30.1.3.0/24) then
prepend as-path 300 3endifpass
end-policy!route-policy LOCAL-PREFif as-path in (ios-regex '_400$') thenset local-preference 200
endifpass
end-policy!router bgp 300!neighbor 7.7.7.7address-family ipv4 unicastroute-policy LOCAL-PREF inroute-policy ASPATH-PREPEND outsoft-reconfiguration inbound
***** GSR6 ********** GSR6 *****
route-policy ASPATH-PREPENDif destination in (30.1.2.0/24) then
prepend as-path 300 3endifpass
end-policy!route-policy LOCAL-PREFif as-path in (ios-regex ’_500$') thenset local-preference 200
endifpass
end-policy!router bgp 300!neighbor 11.1.6.7address-family ipv4 unicastroute-policy LOCAL-PREF inroute-policy ASPATH-PREPEND out soft-reconfiguration inbound
Cisco Confidential 36Cisco BGP Training Lab (IOS-XR)
© 2010 Cisco Systems, Inc. All rights reserved.
BGP-04 Sample Configuration (CRS8, CRS9)
***** CRS8 ********** CRS8 *****
route-policy ASPATH-PREPENDif destination in (40.1.3.0/24) then
prepend as-path 400 3endifpass
end-policy!route-policy LOCAL-PREFif as-path in (ios-regex ’_500$') thenset local-preference 200
endifpass
end-policy!router bgp 400!neighbor 7.7.7.7address-family ipv4 unicastroute-policy LOCAL-PREF inroute-policy ASPATH-PREPEND outsoft-reconfiguration inbound
***** GSR9 ********** GSR9 *****
route-policy ASPATH-PREPENDif destination in (40.1.2.0/24) then
prepend as-path 400 3endifpass
end-policy!route-policy LOCAL-PREFif as-path in (ios-regex ’_100$') thenset local-preference 200
endifpass
end-policy!router bgp 400!neighbor 11.1.8.7address-family ipv4 unicastroute-policy LOCAL-PREF inroute-policy ASPATH-PREPEND out soft-reconfiguration inbound
Cisco Confidential 37Cisco BGP Training Lab (IOS-XR)
© 2010 Cisco Systems, Inc. All rights reserved.
BGP-04 Sample Configuration (ASR11, ASR12)
***** ASR11 ********** ASR11 *****
route-policy ASPATH-PREPENDif destination in (50.1.3.0/24) then
prepend as-path 500 3endifpass
end-policy!route-policy LOCAL-PREFif as-path in (ios-regex ’_100$') thenset local-preference 200
endifpass
end-policy!router bgp 500!neighbor 7.7.7.7address-family ipv4 unicastroute-policy LOCAL-PREF inroute-policy ASPATH-PREPEND outsoft-reconfiguration inbound
***** ASR12 ********** ASR12 *****
route-policy ASPATH-PREPENDif destination in (50.1.2.0/24) then
prepend as-path 500 3endifpass
end-policy!route-policy LOCAL-PREFif as-path in (ios-regex ’_200$') thenset local-preference 200
endifpass
end-policy!router bgp 500!neighbor 11.1.10.7address-family ipv4 unicastroute-policy LOCAL-PREF inroute-policy ASPATH-PREPEND out soft-reconfiguration inbound
Cisco Confidential 38Cisco BGP Training Lab (IOS-XR)
© 2010 Cisco Systems, Inc. All rights reserved.
NSR-05 NSR for OSPF and BGP Configuration
� Configure OSPF NSR
� Check the status to be OSPF NSR-Ready
� Configure BGP NSR
� Check the status to be BGP NSR-Ready
� Perform Manual Redundancy Switchover and observe any service impact.
� Process restart BGP or TCP and observe any service impact
� Configured “nsr process-failure switchover” and process restart BGP or TCP again, and observe any service impact
Cisco Confidential 39Cisco BGP Training Lab (IOS-XR)
© 2010 Cisco Systems, Inc. All rights reserved.