You are on page 1of 29

BGP

Cesar Aguirre Ancco

11 August 2018
https://www.submarinecablemap.com/#/
© 2016 Cisco and/or its affiliates. All rights reserved. 2
RIP
EIGRP
OSPF
IS-IS

BGP

• http://bgp.potaroo.net/

© 2016 Cisco and/or its affiliates. All rights reserved. 3


Reliability (confiabilidad)
Establecimiento de conexión
Mantenimiento de la conexión
Precisión de información de enrutamiento
Stability
Timers (30s eBGP 5s iBGP)
Route dampening

© 2016 Cisco and/or its affiliates. All rights reserved. 4


Scalability
Numero de peers
Numero de prefijos
Flexibility
ATributos

© 2016 Cisco and/or its affiliates. All rights reserved. 5


• BGP Objectives:
Exchange Public Networks between different Autonomous Systems (ASs)
Manipulate Incoming and Outgoing paths for Network Updates
Rich Manipulation and Filtering Tools.

• BGP Basic Configuration:


Session Establishment between Neighbors
Internal BGP (iBGP): Neighbors in the same AS. More complex than External BGP -Out of scope-
External BGP (eBGP): Neighbors in different AS.
Network Updates between Neighbors
Advertise the networks we want reachability
A router can advertise any route in its routing table

© 2016 Cisco and/or its affiliates. All rights reserved. 6


• Usado para intercambiar prefijos entre ASs
• usa puerto 179 TCP
• Se recomienda usar IGP
• Solo un proceso por router
• Necesita neighbors (no necesita estar directamente conectado)
• iBGP (en el mismo AS)
• eBGP (en diferente AS)

© 2016 Cisco and/or its affiliates. All rights reserved. 7


• No acepta rutas que fueron originadas en su propio sistema autónomo
• AS : Es un conjunto de routers bajo un unica administración

• 1 -64511 publicos
• 64512 65535 privados

© 2016 Cisco and/or its affiliates. All rights reserved. 8


Interior or Hierarchy
Protocol Type Metric
Exterior Required?

RIP Interior Distance vector No Hop count

OSPF Interior Link state Yes Cost

IS-IS Interior Link state Yes Metric

Advanced
EIGRP Interior No Composite
distance vector

Path vectors
BGP Exterior Path vector No
(attributes)

© 2016 Cisco and/or its affiliates. All rights reserved. 9


• AS numbers can be between 1 to 65,535.
RIRs manage the AS numbers between 1 and 64,511.
The 64,512 - 65,535 numbers are reserved for private use (similar to IP Private addresses).
The IANA is enforcing a policy whereby organizations that connect to a single provider use an AS number
from the private pool.

© 2016 Cisco and/or its affiliates. All rights reserved. 10


• http://bgp.he.net/

© 2016 Cisco and/or its affiliates. All rights reserved. 11


© 2016 Cisco and/or its affiliates. All rights reserved. 12
BGP defines the following message types:
• Open
• Keepalive
• Update
• Notification

© 2016 Cisco and/or its affiliates. All rights reserved. 13


Hard reset
Dynamic Soft Reset (route refresh)
Soft reset with pre-stored information

© 2016 Cisco and/or its affiliates. All rights reserved. 14


Connecting to One ISP Connecting to Two or more ISPs

Single-homed Multihomed

Dual-homed Dual-multihomed

© 2016 Cisco and/or its affiliates. All rights reserved. 15


© 2016 Cisco and/or its affiliates. All rights reserved. 16
© 2016 Cisco and/or its affiliates. All rights reserved. 17
• WEIGHT: Sólo equipos Cisco.
• LOCAL PREFERENCE: Mayor valor es preferido y es local al número de Sistema Autónomo.
• Se preferirán aquellos originados localmente (comandos network/redistribute/aggregate-address)
• AS PATH: El más corto es preferido.
• ORIGIN: Se prefiere IGP sobre EGP y éste último es preferido sobre INCOMPLETE (?). Ojo!, IGP
• no tiene nada que ver con OSPF , EIGRP, etc. en este caso y no creeránlo antiguo que es EGP.
• MED: También conocido como metric. Menor valor es preferido.
• eBGP sobre iBGP paths. De existir un desempate, se pasa al paso 9.
• Menor métrica IGP al next hop.
• Chequea si Multipath está activo.
• Si ambos paths son externos, preferir el que fue recibido primero (si es que bgp bestpath compare-routerid no está
activo).
• Menor router ID.
• Menor longitud de cluster list (escenarios con Route Reflectors).
• Menor dirección IP del neighbor.

© 2016 Cisco and/or its affiliates. All rights reserved. 18


• Scenario:
Consider 10.0.0.0 address as Public
Consider 172.16.0.0 address as Private

• Objective:
• R1 will advertise 10.1.1.0/24 and
10.1.2.0 / 24 to R4
• R4 will advertise 10.2.1.0 /24 to R1

© 2016 Cisco and/or its affiliates. All rights reserved. 19


• Configure and Verify Neighbors
• Advertise Networks
Verify BGP only advertises networks
available in Routing Table, no matter if
they are directly connected.

© 2016 Cisco and/or its affiliates. All rights reserved. 20


• Neighbors configuration and verification:

R1(config)# router bgp 65501 R4(config)# router bgp 65502


neighbor 10.1.4.4 remote-as 65502 neighbor 10.1.4.1 remote-as 65501

© 2016 Cisco and/or its affiliates. All rights reserved. 21


• Neighbors configuration and verification:

R1#show ip bgp neighbors R4#show ip bgp neighbors


BGP neighbor is 10.1.4.4, remote AS 65502, external link BGP neighbor is 10.1.4.1, remote AS 65501, external link
BGP version 4, remote router ID 10.2.1.4 BGP version 4, remote router ID 10.1.1.1
BGP state = Established, up for 00:07:17 BGP state = Established, up for 00:08:04
… (output omitted) … (output omitted)

© 2016 Cisco and/or its affiliates. All rights reserved. 22


• Networks Advertisements and Verification:
R1 configured to advertise both networks, only advertises directly connected. R4 only learns directly
connected to R1.
Reason: 10.1.2.0/24 is not on R1 Routing Table.
R1(config)# router bgp 65501
neighbor 10.1.4.4 remote-as 65502
network 10.1.1.0 mask 255.255.255.0
network 10.1.2.0 mask 255.255.255.0

R4#show ip bgp
BGP table version is 6, local router ID is 10.2.1.4
(… output omitted)
Origin codes: i - IGP, e - EGP, ? - incomplete
RPKI validation codes: V valid, I invalid, N Not found

Network Next Hop Metric LocPrf Weight Path


*> 10.1.1.0/24 10.1.4.1 0 0 65501 i

© 2016 Cisco and/or its affiliates. All rights reserved. 23


• Networks Advertisements and Verification:
Eigrp configuration on R1 to make 10.1.2.0 available on R1 Routing Table:
R1(config)# router bgp 65501
neighbor 10.1.4.4 remote-as 65502
network 10.1.1.0 mask 255.255.255.0
network 10.1.2.0 mask 255.255.255.0
!
router eigrp 1
network 10.0.0.0
network 172.16.0.0
passive-interface Serial1/0
!

R1#sh ip route eigrp


(… output omitted)

10.0.0.0/8 is variably subnetted, 5 subnets, 2 masks


D 10.1.2.0/24 [90/156160] via 172.16.1.2, 00:11:22, FastEthernet0/0

© 2016 Cisco and/or its affiliates. All rights reserved. 24


• Networks Advertisements and Verification:
R4 shows both networks from R1

R4#show ip bgp
BGP table version is 7, local router ID is 10.2.1.4
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,
r RIB-failure, S Stale, m multipath, b backup-path, f RT-Filter,
x best-external, a additional-path, c RIB-compressed,
Origin codes: i - IGP, e - EGP, ? - incomplete
RPKI validation codes: V valid, I invalid, N Not found

Network Next Hop Metric LocPrf Weight Path


*> 10.1.1.0/24 10.1.4.1 0 0 65501 i
*> 10.1.2.0/24 10.1.4.1 156160 0 65501 i

© 2016 Cisco and/or its affiliates. All rights reserved. 25


• Full R1 and R4 Configuration

R1(config)# router bgp 65501 R4(config)# router bgp 65502


neighbor 10.1.4.4 remote-as 65502 neighbor 10.1.4.1 remote-as 65501
network 10.1.1.0 mask 255.255.255.0 network 10.2.1.0 mask 255.255.255.0
network 10.1.2.0 mask 255.255.255.0
!
router eigrp 1
network 10.0.0.0
network 172.16.0.0
passive-interface Serial1/0

© 2016 Cisco and/or its affiliates. All rights reserved. 26


• Some codes:
* Available Path, not selected by BGP Algorithm
*> Path Selected by BGP Algorithm.
Will be registered in IP Routing table.
Next Hop = 0.0.0.0 for Directly Connected Networks
Path = AS PATH
R1# show ip bgp
BGP table version is 8, local router ID is 10.1.1.1
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,
r RIB-failure, S Stale, m multipath, b backup-path, f RT-Filter,
x best-external, a additional-path, c RIB-compressed,
Origin codes: i - IGP, e - EGP, ? - incomplete
RPKI validation codes: V valid, I invalid, N Not found

Network Next Hop Metric LocPrf Weight Path


*> 10.1.1.0/24 0.0.0.0 0 32768 i
*> 10.1.2.0/24 172.16.1.2 156160 32768 i
*> 10.2.1.0/24 10.1.4.4 0 0 65502 i

© 2016 Cisco and/or its affiliates. All rights reserved. 27


• Some codes:
* Available Path, not selected by BGP Algorithm
*> Path Selected by BGP Algorithm
Will be registered in IP Routing table.
Next Hop = 0.0.0.0 for Directly Connected Networks
Path = AS PATH
R4# show ip bgp
BGP table version is 8, local router ID is 10.2.1.4
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,
r RIB-failure, S Stale, m multipath, b backup-path, f RT-Filter,
x best-external, a additional-path, c RIB-compressed,
Origin codes: i - IGP, e - EGP, ? - incomplete
RPKI validation codes: V valid, I invalid, N Not found

Network Next Hop Metric LocPrf Weight Path


*> 10.1.1.0/24 10.1.4.1 0 0 65501 i
*> 10.1.2.0/24 10.1.4.1 156160 0 65501 i
*> 10.2.1.0/24 0.0.0.0 0 32768 i

© 2016 Cisco and/or its affiliates. All rights reserved. 28


• Complex topic, not a simple solution
Example: R1 Eigrp, does not learn R1 BGP network from R4. Eigrp R1 does not advertise 10.2.1.0 /24 to R2
Solution: Redistribute BGP into EIGRP. Not recommended without filtering.

R1(config)# router eigrp 1


network 10.0.0.0
network 172.16.0.0
redistribute bgp 65501 metric 64 100 255 1 1500
passive-interface Serial1/0

R2#sh ip route eigrp



10.0.0.0/8 is variably subnetted, 5 subnets, 2 masks
D 10.1.1.0/24 [90/156160] via 172.16.1.1, 01:42:43, FastEthernet0/0
D 10.1.4.0/24 [90/2172416] via 172.16.1.1, 01:42:43, FastEthernet0/0
D EX 10.2.1.0/24 [170/40028160] via 172.16.1.1, 00:04:59, FastEthernet0/0

R4# ping 10.1.2.2 source 10.2.1.4


Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 10.1.2.2, timeout is 2 seconds:
Packet sent with a source address of 10.2.1.4
!!!!!

© 2016 Cisco and/or its affiliates. All rights reserved. 29

You might also like