
BGP peering in IOS-XR
Hi,
In IOS-XR which peering is recommended. loopback or physical interface peering.
Ex.
RA -POS0/0---------------------POS 0/0--RB
(AS-100) (AS-200)
OR
RA- L0/0 ------------------ L0/0 - RB
L0/0- 2.2.0.1 L0/0- 2.2.0.2
POS0/0 - 2.2.10.1 POS0/0- 2.2.10.2
In which case router static configuration is required.
What is the use of ROUTE-POLICY ?
WR.,
Comments
Hmm...is this question IOS XR specific? Sounds to me like a general BGP design question though.
Peering with the loopback is good, because you have the possibility to do load sharing in the future....the IP address is always up and it can be used equally as the bgp router-id.
What do you mean by route-policy? Usually you have a route-map assigned to a BGP neighbor. In that route-map you specify specific filter options, conditions and sometimes changes. So you only recieve or send updates that come under a specific policy.
I dont know if I got your question. Let me know!
Regards!
Hi cciesp,
Your two questions are common of BGP peering on IOS or IOS-XR,
1. IOS-XR peering is recommended loopback or physical
- It depends on scenario, if you have more than one link, go for Loopback(for redudant purposes) and if you have single link go for physical (doesn't matters).
2. If you are peering with non-directly connected address (Let's say loopback IP address) and if you don't have any IGP advertising peering addresses, you need static route (similar to IOS) but in IOS-XR we configure with router static command.
3. What is the use of ROUTE-POLICY Language?
A routing policy instructs the router to inspect routes, filter them, and potentially modify their attributes as they are accepted from a peer, advertised to a peer, or redistributed from one routing protocol to another.
For EBGP peering, you must have an inbound and outbound policy configured. If no policy is configured, no routes are accepted from the neighbor, nor are any routes advertised to it. This added security measure ensures that routes cannot accidentally be accepted or advertised in the case of a configuration omission error and for iBGP you don't need, it allows by default.
Better go through this documentation page:
http://www.cisco.com/en/US/docs/routers/crs/software/crs_r3.9/routing/configuration/guide/crs1rcr39_chapter1.html#con_1197962
And
INE's CCIE SPv3 ATC, most of the features covered there.
HAPPY STUDY
[:D]
Hi Zool85,
Not all but something is specific to IOS-XR, like Routing Policy Languge, syntax of each protocol. IOS-XR has very nice structure of configuration and verification, which looks like JUNIPER.
HAPPY STUDY
[:D]
RA:
router bgp 100
neighbor 2.2.10.2
remote-as 200
address-family ipv4 unicast
router=policy PASS in
router=policy PASS out
!
router-policy PASS
pass
!
is it a correct configuration for ebgp peering ?
Besides the two typos, yes it's a valid configuration for eBGP peering.
route-policy PASS
pass
!
router bgp 100
neighbor 2.2.10.2
remote-as 200
address-family ipv4 unicast
route-policy PASS in
route-policy PASS out
what is Besides the two typos ?
I saw in ATC video defining static routes.
router static
address-family ipv4 unicast
2.2.10.2/32 POS0/0/0
!
what is the use of static routers ? is it required to form ebgp peering.
cciesp
It looks like you used:
router=policy PASS in
router=policy PASS out
Where you actually need:
route-policy PASS in
route-policy PASS out
To answer your other question about static routes - if your eBGP peer uses the directly-connected interface address for peering, you will not need a static route. However, if the peer is using a loopback interface address for peering, you will need either a dynamic IGP protocol running with your peer, or will need to set up static routes to the peer's loopback address.
Hi cciesp,
If you are peering with non-directly connected address (Let's say
loopback address) and if you don't have any IGP advertising peering
addresses, you need static route (similar to IOS) but in IOS-XR we
configure with router static command. See this example
R2(config-if)#router bgp 2
R2(config-router)#nei
R2(config-router)#neighbor 1.1.1.1 remote-as 1
R2(config-router)#neighbor 1.1.1.1 update-source lo0
R2(config-router)#neighbor 1.1.1.1 eb
R2(config-router)#neighbor 1.1.1.1 ebgp-multihop
R2(config-router)#exit
R2(config)#ip route 1.1.1.1 255.255.255.255 12.12.12.1
R2(config)#
*Mar 1 00:02:15.035: %BGP-5-ADJCHANGE: neighbor 1.1.1.1 Up
R2(config)#do show ip bgp sum
BGP router identifier 2.2.2.2, local AS number 2
BGP table version is 1, main routing table version 1
Neighbor V AS MsgRcvd MsgSent TblVer InQ OutQ Up/Down State/PfxRcd
1.1.1.1 4 1 2 2 0 0 0 00:00:12 0
!
R1(config-if)#router bgp 1
R1(config-router)#nei
R1(config-router)#neighbor 2.2.2.2 remote-as 2
R1(config-router)#neighbor 2.2.2.2 upda
R1(config-router)#neighbor 2.2.2.2 update-source lo0
R1(config-router)#nei
R1(config-router)#neighbor 2.2.2.2 eb
R1(config-router)#neighbor 2.2.2.2 ebgp-multihop
R1(config-router)#exit
R1(config)#ip route 2.2.2.2 255.255.255.255 12.12.12.2
R1(config)#
*Mar 1 00:02:13.171: %BGP-5-ADJCHANGE: neighbor 2.2.2.2 Up
R1(config)#do show ip bgp sum
BGP router identifier 1.1.1.1, local AS number 1
BGP table version is 1, main routing table version 1
Neighbor V AS MsgRcvd MsgSent TblVer InQ OutQ Up/Down State/PfxRcd
2.2.2.2 4 2 3 3 1 0 0 00:00:38 0
HAPPY STUDY
[:D]
This is the correct config for your scenario:
route-policy ALLOW_EBGP
pass
!
router bgp 100
address-family ipv4 unicast
neighbor 2.2.10.2
remote-as 200
address-family ipv4 unicast
route-policy ALLOW_EBGP in
route-policy ALLOW_EBGP out
router-static
address-family ipv4 unicast
2.2.10.2/32 2.2.10.2
HAPPY STUDY
To add to nnn's post, the static route is required for VPNv4 to ensure proper label forwarding. In a IPv4 eBGP only scenario it would work without the static route. Because IOS-XR does not automatically learn directly connected host route, a static host route is required to ensure Inter-AS label switching.
Dear,
To make BGP session in XR is same as IOS. But BGP operation is little bit different:
1. EBGP:
- EBGP prefixes don't import/export automatically
- EBGP don't send BGP community automatically
2. IBGP:
- IBGP prefixes do import/export automatically
- IBGP do send BGP community automatically
In 2 cases, you can use ROUTE-POLICY (it can be called RPL Routing Policy Language) to control what you want