Escolar Documentos
Profissional Documentos
Cultura Documentos
Alp ISIK
Objectives
Part 1 (bgp introduction) - IBGP Peering - Update source - EBGP Peering - Network command - Next-hop-self - Route-Reflector - Synchronization - Authentication - IBGP Confederation - Redistribute internal - Peer group Part 2 (bgp best-path selection)
Objectives
Part 3 (Aggregation) Aggregation Summary-only Suppress-map Unsuppress-map AS-SET Advertise-map Allowas-in Part 4 (Communities) No-export No-advertise Local-as
ebgp
OSPF 1 area 0
IBGP Peering
Internet network divided by BGP autonomous systems, each ISP/company represented by AS number. There are two kind of BGP peering IBGP and EBGP; for IBGP peering, peers need to be in the same AS; EBGP Peering is between different ASs. For IBGP Peering we need full mesh topology or similating full-mesh. Because updates coming from IBGP peer does not sent to other IBGP peers, its also called ibgp split-horizon
In order to test if the router is listenning the TCP port : ------------------------------------------------------------------------------show tcp brief all TCB Local Address Foreign Address (state) 67701674 *.179 1.1.1.1.* LISTEN R2# clear ip bgp * R2#debug ip bgp events R2#debug ip bgp updates
EBGP Peering
For EBGP the default TTL value is 1. So in order to make the neighborhood over loopback interfaces we need to increase the value to the required hop value. disable-connected-check is an alternate configuration. Its used for EBGP peers configured over loopback addresses. Provides not to look at TTL value, and send the information. If thare are plenty of neighboorhood over loopback addresses, it provides efficiantly use of sources.
Network command
In IGP; via network command we make the neighborship but in BGP we use this command for the prefixes that we want to advertise. Need to be careful while writing the mask it should exact match to the routing table. What is r, >, ?, i, * ???
r is the rib failure; its saying that same root is learnt from IGB with higher AD. show ip bgp rib-failure.
Next-hop Self
Why cant we ping 55.55.55.55 from R1- R2 - R3 ?
At AS1234 routers we see as the next-hop for 55.55.55.55, 5.5.5.5 but except R4, the other routers dont know how to reach 5.5.5.5. So next-hop-self command needed at R4 for the IBGP neighbor, to be a next-hop of AS5 originated prefixes.
Route-Reflector
R5 55.55.55.55 ebgp R4 55.55.55.55 ibgp R3 ibgp R1
55.55.55.55
Remember the rule that the route learnt from ibgp peer does not sent to other ibgp peer. With route reflector configuration we can send the route learnt from ibgp peer to an other one.
RR ebgp ibgp ibgp
R5
55.55.55.55
R4
55.55.55.55
R3
R1
55.55.55.55
Route-reflector-client
RR
ibgp
BB3
as54 RR
Cluster id 150.1.5.5
as100
R5
sw2 BB1 As 54
sw4
R2 as200
R1; does not sent R3 learnt routes to R5, but send them to R4 and R6. R3; does not sent R1 learnt routes to R5, but send them to SW1 and SW3.
In order to make Full-mesh redundancy between R1,R3, R5 routereflector-client can be configured.
IBGP Confederations
AS65034
cbgp
AS65012
cbgp
IBGP Confederation
Configure with the Sub-AS. // router bgp 65012 configure AS as identifier. // bgp confed ide 1234 Configure peer ASes. // bgp confed peer 65034 PS: between different sub AS peers, TTL is counting, need to configure TTL higher.
iBGP Synchronization
If IBGP synchronizatin is enabled, for a route to be valid, it should be learnt from IGP first. Sometimes for Full redundancy need to redistribute Ebgp learnt routes into IGP.
nternet cloud
BB1
BB2
ebgp
CE1
C1
In this scenario, while CE1 sending the routes learnt from BB1, it will first send to C1 as physical way. Because of C1 does no spoke IBGP it can not make next-hop resolution and the routes couldnt be sent to CE2; there are coubple ways to fix that 1- at C1, we can open IBBGP 2- we can redistribute the interface IP of CE1, CE2 connection of BB to IGP. 3- we can make a tunnel between CE1 - CE2 and IBGP from that tunnel.
10.0.0.2/24 tunnel
AS54
10.0.0.4/24
AS100
At R2 interface Tunnel0 ip address 10.0.0.2 255.255.255.0 tunnel source 155.1.23.2 tunnel destination 155.1.146.4 router bgp 200 network 150.1.2.0 mask 255.255.255.0 neighbor 155.1.146.4 remote-as 100 neighbor 155.1.146.4 ebgp-multihop 5 neighbor 192.10.1.254 remote-as 254 neighbor 192.10.1.254 password CISCO
At R4 interface Tunnel0 ip address 10.0.0.4 255.255.255.0 tunnel source 155.1.146.4 tunnel destination 155.1.23.2 router bgp 100 network 150.1.4.0 mask 255.255.255.0 neighbor 155.1.23.2 remote-as 200 neighbor 155.1.23.2 ebgp-multihop 5 neighbor 155.1.23.2 route-map FROM_R2 in neighbor 155.1.23.2 route-map TO_R2 out neighbor 204.12.1.254 remote-as 54
route-map TO_R2 permit 10 set ip next-hop 10.0.0.4 route-map FROM_R2 permit 10 set ip next-hop 10.0.0.2
RR
AS54
AS100 AS54
Advertise 112.0.0.1/24 to bgp
At R1, configured EIGRP external AD higher then IBGP. Since originally R1 is learning these 112.0.0.1 routes from R4 and R6 via IBGP AD200; while redistributing them into IGP at R3 with 170AD(EIGRP EX) it begun to learn them from R3; and R3s Route reflector is R1, (R1 will sent to R3 and R3 will sent to R1) it will become a routing loop.
At R3 router bgp 100 bgp redistribute-internal neighbor 155.1.13.1 remote-as 100 neighbor 155.1.13.1 route-map FROM_R1 in route-map FROM_R1 permit 10 set ip next-hop 155.1.13.1
router eigrp 100 redistribute bgp 100 metric 10000 1000 255 1 1500 network 155.1.0.0
Its putting the max value 32768 for locally originated prefixes
AS Path
Each time a route pass through an AS, each AS information is added to prevent loop. we can modify the passed AS as well.
Origin with ?
In normal situation BGP only compares med for learnt from same AS.
But if we configure (config-router)#bgp always-comparemed; it will check all the time.
cloud
BGP Aggregation
We can aggregate prefixes from different ASes as well. All prefixes (both summary and specific ones) are send. With summary-only command we can suppress the specific ones. With suppress-map we can send some individual prefixes. With unsuppress-map we can implement this to a neighbor.
BGP Aggregation
10.0.0.0 /24 10.0.1.0 /24 10.0.2.0 /24 10.0.3.0 /24 10.0.0.0 /22
10.0.0.0 /22
10.0.0.0 /22
No bgp
No bgp
Bgp communities
There are 4 well known community : Internet : useless Local-AS : dont send outside the local AS; (not send to confederation as well) no-advertise : dont advertise to any peer no-export : dont export to the next AS
What is the function: it provides grouping the prefixes so that inside the AS there is no need to catch the prefixes one by one to modify or filtering, bind the community according to AS number and modify whole prefixes.
No bgp
AS65012
55.55.55.55/32 Send community no export
AS65034
No bgp
AS65012
55.55.55.55/32 Send community no advertise
AS65034
No bgp
AS65012
33.33.33.33/32
AS65034
BGP Dampening
At R2, R3, R5, SW2, SW4 router bgp 200 bgp dampening 4 750 2000 16