Escenario BGP con topología hub and
spoke
Fecha: 10 de diciembre del 2014 Clase: Discovery 2 (becas Empleartec)
Escenario
En este escenario todos los routers de cada localidad tienen como vecino BGP sólo al router de Telecom,
el cual tiene como vecinos a todos los routers, informando a todos las rutas BGP de cada uno.
Este escenario -salvando las distancias, repito, salvando las distancias - se comporta como un DR en OSPF.
El router de Telecom es el que establece todas las vecindades y los sitios sólo le reportan a el.
Cuando se genera un cambio de
topología en un AS, se reporta sólo al router Telecom y este envía las
actualizaciones al resto de los routers evitando el intercambio entre cada vecino. Esto lo convierte en
un
punto único de falla, pero considerando la topología… es realmente el punto
único de falla.
En este ejemplo el router Rosario descartará la actualización dependiendo del cambio de topología.
Ejemplo de vecindad en el router Telecom
Telecom#
*Dec 10 20:56:03.278: %LINK-3-UPDOWN: Interface GigabitEthernet0/1, changed state to up
*Dec 10 20:56:04.278: %LINEPROTO-5-UPDOWN: Line protocol on Interface GigabitEthernet0/1, changed state to up
*Dec 10 20:56:06.594: %BGP-5-ADJCHANGE: neighbor 200.45.0.3 Up
*Dec 10 20:56:20.982: %BGP-5-ADJCHANGE: neighbor 200.45.0.2 Up
*Dec 10 20:56:31.218: %BGP-5-ADJCHANGE: neighbor 200.45.0.1 Up
*Dec 10 20:56:34.290: %BGP-5-ADJCHANGE: neighbor 200.45.0.4 Up
Telecom#
Pueden apreciarse las distintas sesiones TCP y el posterior intercambio BGP entre Telecom y cada vecino.
Telecom#sh ip bgp (verificación en la tabla de rutas BGP)
BGP table version is 32, local router ID is 200.45.100.1
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,
r RIB-failure, S Stale
Origin codes: i - IGP, e - EGP, ? - incomplete
Network Next Hop Metric LocPrf Weight Path
*> 200.1.0.0/20 200.45.0.1 0 0 100 i
*> 200.2.0.0/21 200.45.0.2 0 0 200 i
*> 200.3.0.0/20 200.45.0.3 0 0 300 i
*> 200.4.0.0/22 200.45.0.4 0 0 400 i
*> 200.45.100.0/27 0.0.0.0 0 32768 i
Telecom#sh ip route (verificación en la tabla de enrutamiento)
---resumido---
B 200.1.0.0/20 [20/0] via 200.45.0.1, 00:00:31
B 200.2.0.0/21 [20/0] via 200.45.0.2, 00:00:41
B 200.3.0.0/20 [20/0] via 200.45.0.3, 00:00:55
B 200.4.0.0/22 [20/0] via 200.45.0.4, 00:00:27
200.45.0.0/24 is variably subnetted, 2 subnets, 2 masks
C 200.45.0.0/28 is directly connected, GigabitEthernet0/1
L 200.45.0.5/32 is directly connected, GigabitEthernet0/1
200.45.100.0/24 is variably subnetted, 2 subnets, 2 masks
C 200.45.100.0/27 is directly connected, GigabitEthernet0/0
L 200.45.100.1/32 is directly connected, GigabitEthernet0/0
Telecom#
Rosario#sh ip bgp (verificación en la tabla de rutas BGP)
BGP table version is 21, local router ID is 200.45.0.1
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,
r RIB-failure, S Stale
Origin codes: i - IGP, e - EGP, ? - incomplete
Network Next Hop Metric LocPrf Weight Path
*> 200.1.0.0/20 0.0.0.0 0 32768 i
*> 200.2.0.0/21 200.45.0.2 0 500 200 i
*> 200.3.0.0/20 200.45.0.3 0 500 300 i
*> 200.4.0.0/22 200.45.0.4 0 500 400 i
*> 200.45.100.0/27 200.45.0.5 0 0 500 i
Rosario#
Rosario#sh ip route (verificación
en la tabla de enrutamiento)
---resumido---
200.45.0.0/28 is subnetted, 1 subnets
C 200.45.0.0 is directly connected, FastEthernet0/1
200.45.100.0/27 is subnetted, 1 subnets
B 200.45.100.0 [20/0] via 200.45.0.5, 00:03:15 (aunque todos reportan a Telecom, se puede apreciar
C 200.1.0.0/20 is directly connected,
FastEthernet0/0 que el gateway de cada red se respeta)
B 200.2.0.0/21 [20/0] via 200.45.0.2, 00:03:10
B 200.3.0.0/20 [20/0] via 200.45.0.3, 00:03:10
B 200.4.0.0/22 [20/0] via 200.45.0.4, 00:03:10
Rosario#
Cordoba#sh ip bgp (verificación en la tabla de rutas BGP)
BGP table version is 20, local router ID is 200.45.0.2
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,
r RIB-failure, S Stale
Origin codes: i - IGP, e - EGP, ? - incomplete
Network Next Hop Metric LocPrf Weight Path
*> 200.1.0.0/20 200.45.0.1 0 500 100 i
*> 200.2.0.0/21 0.0.0.0 0 32768 i
*> 200.3.0.0/20 200.45.0.3 0 500 300 i
*> 200.4.0.0/22 200.45.0.4 0 500 400 i
*> 200.45.100.0/27 200.45.0.5 0 0 500 i
Cordoba#
Cordoba#sh ip route (verificación en la tabla de enrutamiento)
---resumido---
200.45.0.0/28 is subnetted, 1 subnets
C 200.45.0.0 is directly connected, FastEthernet0/1
200.45.100.0/27 is subnetted, 1 subnets
B 200.45.100.0 [20/0] via 200.45.0.5, 00:04:03
B 200.1.0.0/20 [20/0] via 200.45.0.1, 00:03:47
C 200.2.0.0/21 is directly connected, FastEthernet0/0
B 200.3.0.0/20 [20/0] via 200.45.0.3, 00:03:47
B 200.4.0.0/22 [20/0] via 200.45.0.4, 00:03:47
Cordoba#
Tucuman#sh ip bgp (verificación en la tabla de rutas BGP)
BGP table version is 20, local router ID is 200.3.0.1
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,
r RIB-failure, S Stale
Origin codes: i - IGP, e - EGP, ? - incomplete
Network Next Hop Metric LocPrf Weight Path
*> 200.1.0.0/20 200.45.0.1 0 500 100 i
*> 200.2.0.0/21 200.45.0.2 0 500 200 i
*> 200.3.0.0/20 0.0.0.0 0 32768 i
*> 200.4.0.0/22 200.45.0.4 0 500 400 i
*> 200.45.100.0/27 200.45.0.5 0 0 500 i
Tucuman#sh ip route (verificación en la tabla de enrutamiento)
---resumido---
200.45.0.0/28 is subnetted, 1 subnets
C 200.45.0.0 is directly connected, FastEthernet0/1
200.45.100.0/27 is subnetted, 1 subnets
B 200.45.100.0 [20/0] via 200.45.0.5, 00:04:59
B 200.1.0.0/20 [20/0] via 200.45.0.1, 00:04:29
B 200.2.0.0/21 [20/0] via 200.45.0.2, 00:04:29
C 200.3.0.0/20 is directly connected, FastEthernet0/0
B 200.4.0.0/22 [20/0] via 200.45.0.4, 00:04:29
Tucuman#
Mendoza#sh ip bgp (verificación en la tabla de rutas BGP)
BGP table version is 27, local router ID is 200.45.0.4
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,
r RIB-failure, S Stale
Origin codes: i - IGP, e - EGP, ? - incomplete
Network Next Hop Metric LocPrf Weight Path
*> 200.1.0.0/20 200.45.0.1 0 500 100 i
*> 200.2.0.0/21 200.45.0.2 0 500 200 i
*> 200.3.0.0/20 200.45.0.3 0 500 300 i
*> 200.4.0.0/22 0.0.0.0 0 32768 i
*> 200.45.100.0/27 200.45.0.5 0 0 500 i
Mendoza#sh ip route (verificación
en la tabla de enrutamiento)
---resumido---
200.45.0.0/28 is subnetted, 1 subnets
C 200.45.0.0 is directly connected, FastEthernet0/1
200.45.100.0/27 is subnetted, 1 subnets
B 200.45.100.0 [20/0] via 200.45.0.5, 00:05:22
B 200.1.0.0/20 [20/0] via 200.45.0.1, 00:05:20
B 200.2.0.0/21 [20/0] via 200.45.0.2, 00:05:20
B 200.3.0.0/20 [20/0] via 200.45.0.3, 00:05:20
C 200.4.0.0/22 is directly connected, FastEthernet0/0
Mendoza#
Verificación de la ruta desde un PC en Rosario hasta Córdoba, sin pasar por el router Telecom.
C:\>ipconfig
Configuración IP de Windows
Adaptador de Ethernet Conexión
de área local:
Sufijo DNS específico para la conexión. . :
Dirección IPv4. . . . . . . . . . . . . . .
. . . . . . . . : 200.1.0.4
Máscara de subred .
. . . . . . . . . . . . . . . . . : 255.255.240.0
Puerta de enlace predeterminada
. . . . . : 200.1.0.1
C:\>tracert 200.4.0.2
Traza a la dirección CIT03
[200.4.0.2]
sobre
un máximo de 30 saltos:
1
<1 ms 1 ms 1 ms
200.1.0.1 (gateway Rosario)
2
<1 ms 1 ms 1 ms
200.45.0.4 (router Córdoba)
3
<1 ms 1 ms 1 ms
CIT03 [200.4.0.2]
Traza completa.
C:\>
Configuración de equipos
Telecom#sh runn (sólo lo mas relevante)
Building configuration...
Current configuration : 1194 bytes
!
hostname Telecom
!
interface GigabitEthernet0/0
ip address 200.45.100.1 255.255.255.224
!
interface GigabitEthernet0/1
ip address 200.45.0.5 255.255.255.240
!
router bgp 500
no synchronization
bgp log-neighbor-changes
network 200.45.100.0 mask 255.255.255.224
neighbor
200.45.0.1 remote-as 100
neighbor
200.45.0.2 remote-as 200
neighbor
200.45.0.3 remote-as 300
neighbor
200.45.0.4 remote-as 400
no auto-summary
!
end
Telecom#
Rosario#sh runn (sólo lo mas relevante)
Building configuration...
Current configuration : 1332 bytes
!
hostname Rosario
!
interface FastEthernet0/0
ip address 200.1.0.1 255.255.240.0
!
interface FastEthernet0/1
ip address 200.45.0.1 255.255.255.240
!
router bgp 100
no synchronization
bgp log-neighbor-changes
network 200.1.0.0 mask 255.255.240.0
neighbor 200.45.0.5
remote-as 500
no auto-summary
!
end
Rosario#
Cordoba#sh runn (sólo lo mas relevante)
Building configuration...
Current configuration : 1199 bytes
!
hostname Cordoba
!
interface FastEthernet0/0
ip address 200.2.0.1 255.255.248.0
!
interface FastEthernet0/1
ip address 200.45.0.2 255.255.255.240
!
router bgp 200
no synchronization
bgp log-neighbor-changes
network 200.2.0.0 mask 255.255.248.0
neighbor 200.45.0.5
remote-as 500
no auto-summary
!
end
Cordoba#
Tucuman#sh runn (sólo lo mas relevante)
Building configuration...
Current configuration : 1183 bytes
!
hostname Tucuman
!
interface FastEthernet0/0
ip address 200.3.0.1 255.255.240.0
!
interface FastEthernet0/1
ip address 200.45.0.3 255.255.255.240
!
router bgp 300
no synchronization
bgp log-neighbor-changes
network 200.3.0.0 mask 255.255.240.0
neighbor
200.45.0.5 remote-as 500
no auto-summary
!
end
Tucuman#
Mendoza#sh runn (sólo lo mas relevante)
Building configuration...
Current configuration : 1202 bytes
!
hostname Mendoza
!
!
interface FastEthernet0/0
ip address 200.4.0.1 255.255.252.0
!
interface FastEthernet0/1
ip address 200.45.0.4 255.255.255.240
!
router bgp 400
no synchronization
bgp log-neighbor-changes
network 200.4.0.0 mask 255.255.252.0
neighbor 200.45.0.5
remote-as 500
no auto-summary
!
end
Mendoza#
(2014) Sensei, St Claus
deliver packets with BGP ?
Rosario, Argentina