MPLS. Dual CE + HSRP

     En este laboratorio vamos a simular la conexión de un cliente a la red e-VPN a través de dos CE's instalados en su site. Dotaremos de alta disponibilidad o redundancia al tráfico saliente mediante el protocolo propietario de Cisco HSRP. Con este protocolo uno de los CE será el primario o activo y el otro estará como standby o pasivo. El secundario pasará a activo si se produce un fallo en el enlace con el CE o una caída del router primario. Los servidores tendrán configurado como gateway la dirección IP virtual de HSRP.

      Se definirá una sesión I-BGP entre los CE's. La red MPLS tendrá los PE's fully-meshed.

     Además se contempla la ubicación de un router del cliente en la LAN que hablará OSPF con los CE's.


      El esquema de la red implementada en el lab es el siguiente:


Configuraciones de los router Cisco:
----------------------------------------------------------------------------------------------------------------
hostname CE1!
dlsw local-peer peer-id 192.168.1.1
dlsw remote-peer 0 tcp 192.168.2.1
!
interface Loopback0
ip address 10.20.10.20 255.255.255.255
!
interface Ethernet0
ip address 192.168.1.1 255.255.255.0
no ip redirects
no ip route-cache
no ip mroute-cache
standby 1 priority 105 /* Asignamos un valor mayor que 100 (valor por defecto)
standby 1 preempt /* Permite a CE1 convertirse en Activo por comparación de prioridad con CE2
standby 1 ip 192.168.1.4 /* IP Virtual a configurar como Gateway en los PCs en la LAN
standby 1 track Serial0 /* En caso de caída del Ser0 la prioridad se decrementa en 10, de manera que CE2->Activo
!
interface Serial0
ip address 10.1.1.42 255.255.255.252
encapsulation ppp
no ip route-cache
no ip mroute-cache
clockrate 2000000
!
interface Serial1
description Direct Attach I-BGP /* Direct Attach con CE2 para la sesión I-BGP
ip address 10.1.1.61 255.255.255.252
encapsulation ppp
no ip route-cache
no ip mroute-cache
!
router ospf 100
network 192.168.1.0 0.0.0.255 area 0
default-information originate always route-map ospf-default /* Envío a CSR ruta por defecto con métric menor que CE2 si Ser0 Activo
!
router bgp 6501
no synchronization
redistribute connected
redistribute static
redistribute ospf 100 match internal external 1 external 2 /* Incluyo rutas OSPF en el BGP
neighbor 10.1.1.41 remote-as 100 /* Sesión E-BGP con Mauricio-PE1-PE2
neighbor 10.1.1.41 route-map setmedprimary out /* Marcamos updates con MED menor que CE2 y excluimos WANs
neighbor 10.1.1.62 remote-as 6501 /* Sesion I-BGP
neighbor 10.1.1.62 next-hop-self /* Los updates de CE2 se marcan con su WAN como next-thop
no auto-summary
!
ip classless
ip route 0.0.0.0 0.0.0.0 Serial0
!
access-list 11 permit 10.1.1.34 /* Esta ruta solo se conoce si link CE1-PE1 activo
access-list 11 permit 10.20.10.0 0.0.0.255
access-list 12 deny 10.1.1.60 0.0.0.3
access-list 40 permit 10.1.1.40 0.0.0.3
access-list 60 permit any
route-map ospf-default permit 10
match ip address 11
set metric 50
!
route-map ospf-default permit 20
match ip address 60
set metric 150
!
route-map setmedprimary deny 10
match ip address 40
set metric 50
!
route-map setmedprimary permit 20
set metric 200

----------------------------------------------------------------------------------------------------------
hostname CE2!
enable password cisco
!
dlsw local-peer peer-id 192.168.1.2
dlsw remote-peer 0 tcp 192.168.2.1
!
interface Loopback0
ip address 10.20.10.20 255.255.255.255
!
interface Ethernet0
ip address 192.168.1.2 255.255.255.0
no ip redirects
no ip route-cache
no ip mroute-cache
standby 1 priority 100 /* Asignamos un valor valor por defecto
standby 1 preempt /* Permite a CE2 convertirse en Activo por comparación de prioridad con CE1
standby 1 ip 192.168.1.4 /* IP Virtual a configurar como Gateway en los PCs en la LAN
standby 1 track Serial0
!
interface Serial0
description Direct Attach I-BGP /* Direct Attach con CE1 para la session I-BGP
ip address 10.1.1.62 255.255.255.252
encapsulation ppp
no ip route-cache
no ip mroute-cache
clockrate 2000000
!
interface Serial1
description to Hawaii-pe2
ip address 10.1.1.54 255.255.255.252
encapsulation ppp
no ip route-cache
no ip mroute-cache
!
router ospf 100
network 10.20.10.0 0.0.0.255 area 0
network 192.168.1.0 0.0.0.255 area 0
default-information originate always metric 100 /* Envío a CSR ruta por defecto con metrica mayor CE1
!
router bgp 6501
no synchronization
redistribute connected
redistribute static
redistribute ospf 100 match internal external 1 external 2 /* Incluyo rutas OSPF en el BGP
neighbor 10.1.1.53 remote-as 100 /* Sesion E-BGP con Hawaii-pe2-PE2
neighbor 10.1.1.53 route-map ebgpin in /* Marcamos updates que vienen con Hawaii-pe2 con localpref =90 < default
neighbor 10.1.1.53 route-map setmedsecondary out /* Marcamos updates “locales” e IBGP con MED mayor que CE1 , excluimos WANs
neighbor 10.1.1.61 remote-as 6501 /* Sesion I-BGP
neighbor 10.1.1.61 next-hop-self /* Los updates de CE1 se marcan con su WAN como next-thop
no auto-summary
!
ip classless
ip route 0.0.0.0 0.0.0.0 Serial1
!
access-list 40 permit 10.1.1.52 0.0.0.3
access-list 50 permit 10.1.1.61
route-map ebgpin permit 10
set local-preference 90
!
route-map setmedprimary permit 10
set metric 50
!
route-map setmedsecondary permit 10
match ip next-hop 50
set metric 600
!
route-map setmedsecondary permit 30
set metric 400
!
route-map setmedsecondary deny 40
match ip address 40

--------------------------------------------------------------------------------------------------
hostname CSR-OSPF!
ip subnet-zero
!
interface Loopback0
ip address 10.20.10.70 255.255.255.0
!
interface Ethernet0
ip address 192.168.1.3 255.255.255.0
!
interface Serial0
ip address 10.1.1.53 255.255.255.252
encapsulation ppp
no ip mroute-cache
no keepalive
clockrate 2000000
!
interface Serial1
ip address 10.1.1.34 255.255.255.252
encapsulation ppp
no ip mroute-cache
no keepalive
!
router ospf 100
network 192.168.1.0 0.0.0.255 area
0
---------------------------------------------------------------------------------------------------------------
hostname MAURICIO-PE1!
ip subnet-zero
!
ip vrf customer_a_prim
rd 100:1300
route-target export 100:999
route-target import 100:2000
route-target import 100:888
!
ip cef
!
interface Loopback0
ip address 10.20.10.5 255.255.255.255
!
interface Ethernet0
ip address 135.76.35.99 255.255.255.0
no ip mroute-cache
!
interface Serial0
ip address 10.1.1.18 255.255.255.252
encapsulation ppp
tag-switching ip
clockrate 2000000
!
interface Serial1
ip vrf forwarding customer_a_prim
ip address 10.1.1.41 255.255.255.252
encapsulation ppp
!
router ospf 100
log-adjacency-changes
network 10.1.1.0 0.0.0.255 area 0
network 10.20.10.0 0.0.0.255 area 0
!
router bgp 100
no synchronization
bgp router-id 10.1.1.41
bgp cluster-id 169085445

neighbor 10.20.10.6 remote-as 100
neighbor 10.20.10.6 update-source Loopback0
neighbor 10.20.10.7 remote-as 100
neighbor 10.20.10.7 update-source Loopback0
no auto-summary
!
address-family ipv4 vrf customer_a_prim
redistribute connected
redistribute static
neighbor 10.1.1.42 remote-as 6501
neighbor 10.1.1.42 activate
neighbor 10.1.1.42 as-override
neighbor 10.1.1.42 route-map S00 in
no auto-summary
no synchronization
exit-address-family
!
address-family vpnv4
neighbor 10.20.10.6 activate
neighbor 10.20.10.6 send-community both
neighbor 10.20.10.7 activate
neighbor 10.20.10.7 send-community both
no auto-summary
exit-address-family
!
ip classless
ip route 135.76.35.0 255.255.255.0 10.10.10.2
ip route 135.76.35.0 255.255.255.0 Ethernet0
ip route vrf customer_a 10.20.10.20 255.255.255.255 Serial1
ip route vrf customer_a_prim 10.20.10.20 255.255.255.255 Serial1
no ip http server
!
route-map S00 permit 10
set extcommunity soo 100:1000

------------------------------------------------------------------------------------------------------------------------------
hostname HAWAII-PE2!
ip subnet-zero
!
ip vrf customer_a_sec
rd 100:1200 /* defino RD diferente para el Segundo link
route-target export 100:1000
route-target import 100:1000
route-target import 100:3000 /* defino un import adicional para LAN sec de PE remoto
!
ip cef
!
interface Loopback0
ip address 10.20.10.7 255.255.255.255
!
interface Serial0
ip vrf forwarding customer_a_sec
ip address 10.1.1.53 255.255.255.252
encapsulation ppp
no ip mroute-cache
no keepalive
clockrate 2000000
!
interface Serial1
ip address 10.1.1.1 255.255.255.252
encapsulation ppp
no ip mroute-cache
no keepalive
clockrate 2000000
!
router ospf 100
log-adjacency-changes
redistribute connected
redistribute static
network 0.0.0.0 255.255.255.255 area 0
!
router bgp 100
no synchronization
bgp router-id 10.1.1.53
bgp always-compare-med
bgp cluster-id 169085447
neighbor 10.20.10.5 remote-as 100
neighbor 10.20.10.5 update-source Loopback0
neighbor 10.20.10.6 remote-as 100
neighbor 10.20.10.6 update-source Loopback0
no auto-summary
!

address-family ipv4 vrf customer_a_sec
redistribute connected
redistribute static
neighbor 10.1.1.54 remote-as 6501
neighbor 10.1.1.54 activate
neighbor 10.1.1.54 as-override
neighbor 10.1.1.54 route-map S00 in
no auto-summary
no synchronization
exit-address-family
!
address-family vpnv4
neighbor 10.20.10.5 activate
neighbor 10.20.10.5 send-community both
neighbor 10.20.10.6 activate
neighbor 10.20.10.6 send-community both
no auto-summary
exit-address-family
!
ip classless
ip route 0.0.0.0 0.0.0.0 10.10.10.2
ip route 0.0.0.0 0.0.0.0 Serial0
ip route 0.0.0.0 0.0.0.0 Serial1
ip route 135.76.35.0 255.255.255.0 10.10.10.2
ip route vrf customer_a_sec 10.20.10.20 255.255.255.255 Serial0
no ip http server
!
route-map S00 permit 10
set extcommunity soo 100:1000
!
route-map setmedprimary permit 10
set metric 50
!
route-map setmedsecondary permit 10
set metric 100

---------------------------------------------------------------------------------------------------------

Vamos a hacer una serie de comprobaciones:

En CE1 (router primario) Las rutas a la LAN remota tienen como next-hop a Mauricio-PE1:
____________________________________________________________________________
CE1#sh ip bgp
BGP table version is 27, local router ID is 10.20.10.20
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal
Origin codes: i - IGP, e - EGP, ? - incomplete
Network Next Hop Metric LocPrf Weight Path
*> 10.1.1.32/30 10.1.1.41 0 100 ?
*> 10.1.1.34/32 10.1.1.41 0 100 ?
*> 10.1.1.40/30 0.0.0.0 0 32768 ?
* 10.1.1.41 0 0 100 ?
*> 10.1.1.41/32 0.0.0.0 0 32768 ?
*>i10.1.1.52/30 10.1.1.62 0 100 0 ?
*>i10.1.1.53/32 10.1.1.62 0 100 0 ?
*> 10.1.1.60/30 0.0.0.0 0 32768 ?
* i 10.1.1.62 0 100 0 ?
*> 10.1.1.62/32 0.0.0.0 0 32768 ?
*>i10.20.10.0/24 10.1.1.62 0 100 0 ?
*> 10.20.10.20/32 0.0.0.0 0 32768 ?
*> 10.20.10.50/32 192.168.1.2 11 32768 ?
*>i64.33.2.0/24 10.1.1.62 90 0 100 ?
*> 135.76.35.0/24 0.0.0.0 0 32768 ?
*> 192.168.1.0 0.0.0.0 0 32768 ?
* i 10.1.1.62 0 100 0 ?
*> 192.168.2.0 10.1.1.41 0 100 ?
_______________________________________________________________________________

En CE2 (router secundario) las rutas a la LAN remota tienen como next-hop a CE1. También tiene un camino alternativo “directo” via Hawaii-PE2 pero con un local-pref 90:
________________________________________________________________________________
CE2#sh ip bgp
BGP table version is 98, local router ID is 10.20.10.20
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal
Origin codes: i - IGP, e - EGP, ? - incomplete
Network Next Hop Metric LocPrf Weight Path
*>i10.1.1.32/30 10.1.1.61 100 0 100 ?
* 10.1.1.53 90 0 100 ?
*>i10.1.1.34/32 10.1.1.61 100 0 100 ?
* 10.1.1.53 90 0 100 ?
*>i10.1.1.40/30 10.1.1.61 0 100 0 ?
* 10.1.1.53 90 0 100 ?
*>i10.1.1.41/32 10.1.1.61 0 100 0 ?
*> 10.1.1.42/32 10.1.1.53 90 0 100 ?
* 10.1.1.52/30 10.1.1.53 0 90 0 100 ?
*> 0.0.0.0 0 32768 ?
*> 10.1.1.53/32 0.0.0.0 0 32768 ?
* i10.1.1.60/30 10.1.1.61 0 100 0 ?
*> 0.0.0.0 0 32768 ?
*> 10.1.1.61/32 0.0.0.0 0 32768 ?
*> 10.20.10.20/32 0.0.0.0 0 32768 ?
*> 64.33.2.0/24 10.1.1.53 90 0 100 ?
* i192.168.1.0 10.1.1.61 0 100 0 ?
*> 0.0.0.0 0 32768 ?
*>i192.168.2.0 10.1.1.61 100 0 100 ?
* 10.1.1.53 90 0 100 ?
_________________________________________________________________________________

En Mauricio-PE1 (PE primario ) las rutas a la LAN “local” se rutean solo vía CE1 y se puede apreciar el MED con valor inferior 200.

La WAN de CE1-CE2 se ve con 400

Las WANs de CE1 se ven con 600 atraves de Hawaii-PE2
__________________________________________________________________________________
MAURICIO-PE1#sh ip bgp vpnv4 vrf customer_a_prim
BGP table version is 58, local router ID is 10.1.1.41
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal
Origin codes: i - IGP, e - EGP, ? - incomplete
Network Next Hop Metric LocPrf Weight Path
Route Distinguisher: 100:1300 (default for vrf customer_a_prim)
*>i10.1.1.32/30 10.20.10.6 0 100 0 ?
*>i10.1.1.34/32 10.20.10.6 0 100 0 ?
*> 10.1.1.40/30 0.0.0.0 0 32768 ?
*>i10.1.1.41/32 10.20.10.7 600 100 0 6501 ?
*> 10.1.1.42/32 0.0.0.0 0 32768 ?
* 10.1.1.52/30 10.1.1.42 200 0 6501 ?
*>i 10.20.10.7 0 100 0 ?
*> 10.1.1.53/32 10.1.1.42 200 0 6501 ?
*>i10.1.1.54/32 10.20.10.7 0 100 0 ?
*> 10.1.1.60/30 10.1.1.42 200 0 6501 ?
*>i10.1.1.61/32 10.20.10.7 400 100 0 6501 ?
*> 10.1.1.62/32 10.1.1.42 200 0 6501 ?
*> 10.20.10.0/24 10.1.1.42 200 0 6501 ?
* 10.20.10.20/32 10.1.1.42 200 0 6501 ?
* i 10.20.10.7 0 100 0 ?
*> 0.0.0.0 0 32768 ?
*> 10.20.10.50/32 10.1.1.42 200 0 6501 ?
*> 135.76.35.0/24 10.1.1.42 200 0 6501 ?
*> 192.168.1.0 10.1.1.42 200 0 6501 ?
*>i192.168.2.0 10.20.10.6 0 100 0 ?
__________________________________________________________________________________

En Hawaii-PE2 (PE secundario) las rutas a la LAN “local” se rutean vía Mauricio-PE1 de manera preferencial al tener un MED menor. La conexión vía CE2 se presenta como alternativa:
__________________________________________________________________________________

HAWAII-PE2#sh ip bgp vpnv4 vrf customer_a_sec
BGP table version is 206, local router ID is 10.1.1.53
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal
Origin codes: i - IGP, e - EGP, ? - incomplete
Network Next Hop Metric LocPrf Weight Path
Route Distinguisher: 100:1200 (default for vrf customer_a_sec)
*>i10.1.1.32/30 10.20.10.6 0 100 0 ?
*>i10.1.1.34/32 10.20.10.6 0 100 0 ?
*> 10.1.1.40/30 10.1.1.54 600 0 6501 ?
*> 10.1.1.41/32 10.1.1.54 600 0 6501 ?
* 10.1.1.52/30 10.1.1.54 400 0 6501 ?
*> 0.0.0.0 0 32768 ?
*>i10.1.1.53/32 10.20.10.5 200 100 0 6501 ?
*> 10.1.1.54/32 0.0.0.0 0 32768 ?
*>i10.1.1.60/30 10.20.10.5 200 100 0 6501 ?
* 10.1.1.54 400 0 6501 ?
*> 10.1.1.61/32 10.1.1.54 400 0 6501 ?
*>i10.1.1.62/32 10.20.10.5 200 100 0 6501 ?
*>i10.20.10.0/24 10.20.10.5 200 100 0 6501 ?
* 10.1.1.54 400 0 6501 ?
* 10.20.10.20/32 10.1.1.54 600 0 6501 ?
*> 0.0.0.0 0 32768 ?
*>i10.20.10.50/32 10.20.10.5 200 100 0 6501 ?
*>i192.168.1.0 10.20.10.5 200 100 0 6501 ?
* 10.1.1.54 400 0 6501 ?
* 192.168.2.0 10.1.1.54 400 0 6501 ?
*>i 10.20.10.6 0 100 0 ?
___________________________________________________________________________________

En FIYI-PE3(PE remoto) las rutas a la LAN de Cuba se rutean vía Mauricio-PE1 de manera preferencial al tener un MED menor:
___________________________________________________________________________________
FIYI#sh ip bgp vpnv4 vrf customer_a
BGP table version is 1052, local router ID is 10.1.1.33
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal
Origin codes: i - IGP, e - EGP, ? - incomplete
Network Next Hop Metric LocPrf Weight Path
Route Distinguisher: 100:2000 (default for vrf customer_a)
*> 10.1.1.32/30 0.0.0.0 0 32768 ?
*> 10.1.1.34/32 0.0.0.0 0 32768 ?
*>i10.1.1.40/30 10.20.10.5 0 100 0 ?
*>i10.1.1.41/32 10.20.10.7 600 100 0 6501 ?
*>i10.1.1.42/32 10.20.10.5 0 100 0 ?
*>i10.1.1.52/30 10.20.10.7 0 100 0 ?
*>i10.1.1.53/32 10.20.10.5 200 100 0 6501 ?
*>i10.1.1.54/32 10.20.10.7 0 100 0 ?
*>i10.1.1.60/30 10.20.10.5 200 100 0 6501 ?
*>i10.1.1.61/32 10.20.10.7 400 100 0 6501 ?
*>i10.1.1.62/32 10.20.10.5 200 100 0 6501 ?
*>i10.20.10.0/24 10.20.10.5 200 100 0 6501 ?
*>i10.20.10.20/32 10.20.10.5 0 100 0 ?
* i 10.20.10.5 0 100 0 ?
* i 10.20.10.7 0 100 0 ?
* i 10.20.10.7 0 100 0 ?
*>i10.20.10.50/32 10.20.10.5 200 100 0 6501 ?
*> 64.33.2.0/24 0.0.0.0 0 32768 ?
*>i135.76.35.0/24 10.20.10.5 200 100 0 6501 ?
*>i192.168.1.0 10.20.10.5 200 100 0 6501 ?
*> 192.168.2.0 0.0.0.0 0 32768 ?
___________________________________________________________________________________

Consideraciones I-BGP y next-hop-self
Sin la utilización de next-hop-self, las rutas aprendidas a través de I-BGP no presentan como siguiente next-hop la del neighbour sino la IP del next-hop del router que la propaga:
___________________________________________________________________________________
CE1#sh ip bgp
BGP table version is 109, local router ID is 10.20.10.20
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal
Origin codes: i - IGP, e - EGP, ? - incomplete
Network Next Hop Metric LocPrf Weight Path
*> 10.1.1.32/30 10.1.1.41 200 100 ?
* i 10.1.1.53 100 0 100 ?
*> 10.1.1.34/32 10.1.1.41 200 100 ?
* i 10.1.1.53 100 0 100 ?
* 10.1.1.40/30 10.1.1.41 0 200 100 ?
*> 0.0.0.0 0 32768 ?
*> 10.1.1.41/32 0.0.0.0 0 32768 ?
*>i10.1.1.52/30 10.1.1.62 0 100 0 ?
*>i10.1.1.53/32 10.1.1.62 0 100 0 ?
* i10.1.1.60/30 10.1.1.62 0 100 0 ?
*> 0.0.0.0 0 32768 ?
*> 10.1.1.62/32 0.0.0.0 0 32768 ?
*> 10.20.10.20/32 0.0.0.0 0 32768 ?
*>i64.33.2.0/24 10.1.1.53 100 0 100 ?
*> 135.76.35.0/24 0.0.0.0 0 32768 ?
* i192.168.1.0 10.1.1.62 0 100 0 ?
*> 0.0.0.0 0 32768 ?
*> 192.168.2.0 10.1.1.41 200 100 ?
* i 10.1.1.53 100 0 100 ?
___________________________________________________________________________________


Pruebas HSRP
1-. Inactivamos link CE1-PE1: CE2 se convierte en activo.
Al inactivar la línea de conexión con la red MPLS de CE1, vemos que CE1 decrementa su prioridad en 10 , quedandose a 95 , por lo que CE2 se convierte en el router activo, ruteando el trafico de los servidores en la LAN al “hacerse cargo” de la IP virtual:
___________________________________________________________________________________
CE2#debug standby
00:23:55: SB1:Ethernet0 Hello out 192.168.1.2 Standby pri 100 hel 3 hol 10 ip 192.168.1.4
00:23:57: SB1:Ethernet0 Hello in 192.168.1.1 Active pri 105 hel 3 hol 10 ip 192.168.1.4
00:23:57: SB1:Ethernet0 Hello out 192.168.1.2 Standby pri 100 hel 3 hol 10 ip 192.168.1.4
00:24:00: SB1:Ethernet0 Hello in 192.168.1.1 Active pri 105 hel 3 hol 10 ip 192.168.1.4
00:24:00: SB1:Ethernet0 Hello out 192.168.1.2 Standby pri 100 hel 3 hol 10 ip 192.168.1.4
00:24:02: SB1:Ethernet0 Hello in 192.168.1.1 Active pri 105 hel 3 hol 10 ip 192.168.1.4
00:24:03: SB1:Ethernet0 Hello out 192.168.1.2 Standby pri 100 hel 3 hol 10 ip 192.168.1.4
00:24:03: SB1:Ethernet0 Hello in 192.168.1.1 Active pri 95 hel 3 hol 10 ip 192.168.1.4
00:24:03: SB1:Ethernet0 Coup out 192.168.1.2 Standby pri 100 hel 3 hol 10 ip 192.168.1.4
00:24:03: %STANDBY-6-STATECHANGE: Standby: 1: Ethernet0 state Standby -> Active
00:24:03: SB1:Ethernet0 Hello out 192.168.1.2 Active pri 100 hel 3 hol 10 ip 192.168.1.4
00:24:03: SB: Ethernet0 changing MAC address to 0000.0c07.ac01
00:24:03: SB1:Ethernet0 Resign in 192.168.1.1 Speak pri 95 hel 3 hol 10 ip 192.168.1.4
00:24:03: SB1:Ethernet0 Hello in 192.168.1.1 Speak pri 95 hel 3 hol 10 ip 192.168.1.4
00:24:06: SB1:Ethernet0 Hello out 192.168.1.2 Active pri 100 hel 3 hol 10 ip 192.168.1.4
00:24:06: SB1:Ethernet0 Hello in 192.168.1.1 Speak pri 95 hel 3 hol 10 ip 192.168.1.4
___________________________________________________________________________________
CE1#sh standby
Ethernet0 - Group 1
Local state is Standby, priority 95, may preempt
Hellotime 3 holdtime 10
Next hello sent in 00:00:00.474
Hot standby IP address is 192.168.1.4 configured
Active router is 192.168.1.2 expires in 00:00:07
Standby router is local Standby virtual mac address is 0000.0c07.ac01
Tracking interface states for 1 interface, 0 up:
Down Serial0
CE2#sh standby
Ethernet0 - Group 1
Local state is Active, priority 100, may preempt
Hellotime 3 holdtime 10
Next hello sent in 00:00:02.588
Hot standby IP address is 192.168.1.4 configured
Active router is local
Standby router is 192.168.1.1 expires in 00:00:07
Standby virtual mac address is 0000.0c07.ac01
Tracking interface states for 1 interface, 1 up:
Up Serial0
___________________________________________________________________________________

2-. CE1 caído: CE2 pasa a ser el activo.
CE2 se convierte en activo al no recibir 3 hellos del router activo (CE1):
___________________________________________________________________________________
CE1(config)#
2d03h: %LINEPROTO-5-UPDOWN: Line protocol on Interface Ethernet0, changed state to down
2d03h: %LINK-5-CHANGED: Interface Ethernet0, changed state to administratively down
__________________________________________________________________________________
CE2#debug standby
SB1:Ethernet0 Hello in 192.168.1.1 Active pri 105 hel 3 hol 10 ip 192.168.1.4
SB1:Ethernet0 Hello out 192.168.1.2 Standby pri 100 hel 3 hol 10 ip 192.168.1.4
SB1:Ethernet0 Hello out 192.168.1.2 Standby pri 100 hel 3 hol 10 ip 192.168.1.4
SB1:Ethernet0 Hello out 192.168.1.2 Standby pri 100 hel 3 hol 10 ip 192.168.1.4
SB1:Ethernet0 Hello out 192.168.1.2 Standby pri 100 hel 3 hol 10 ip 192.168.1.4
SB1: Ethernet0 state Standby -> Active
SB: Ethernet0 changing MAC address to 0000.0c07.ac01

__________________________________________________________________________________
CE2#sh standby
Ethernet0 - Group 1
Local state is Active, priority 100
Hellotime 3 holdtime 10
Next hello sent in 00:00:00
Hot standby IP address is 192.168.1.4 configured
Active router is local
Standby router is unknown
Tracking interface states for 1 interface, 1 up:
Up Serial0
__________________________________________________________________________________

Se recupera CE1, que como tiene una prioridad más alta se convierte en activo:
__________________________________________________________________________________

CE1#debug standby
2d04h: %LINK-3-UPDOWN: Interface Ethernet0, changed state to up
2d04h: SB1:Ethernet0 Hello in 192.168.1.2 Active pri 100 hel 3 hol 10 ip 192.168.1.4
2d04h: SB1:Ethernet0 Coup out 192.168.1.1 Listen pri 105 hel 3 hol 10 ip 192.168.1.4
2d04h: %STANDBY-6-STATECHANGE: Standby: 1: Ethernet0 state Listen -> Active
2d04h: SB1:Ethernet0 Hello out 192.168.1.1 Active pri 105 hel 3 hol 10 ip 192.168.1.4
2d04h: SB: Ethernet0 changing MAC address to 0000.0c07.ac01
2d04h: SB1:Ethernet0 Resign in 192.168.1.2 Speak pri 100 hel 3 hol 10 ip 192.168.1.4
2d04h: SB1:Ethernet0 Hello out 192.168.1.1 Active pri 105 hel 3 hol 10 ip 192.168.1.4
2d04h: SB1:Ethernet0 Hello in 192.168.1.2 Speak pri 100 hel 3 hol 10 ip 192.168.1.4
2d04h: SB1:Ethernet0 Hello out 192.168.1.1 Active pri 105 hel 3 hol 10 ip 192.168.1.4
__________________________________________________________________________________
CE2#debug standby
Hot standby protocol debugging is on
CE2#
SB1:Ethernet0 Hello out 192.168.1.2 Active pri 100 hel 3 hol 10 ip 192.168.1.4
CE2#
SB1:Ethernet0 Hello out 192.168.1.2 Active pri 100 hel 3 hol 10 ip 192.168.1.4
SB1:Ethernet0 Hello out 192.168.1.2 Active pri 100 hel 3 hol 10 ip 192.168.1.4
SB1:Ethernet0 Hello out 192.168.1.2 Active pri 100 hel 3 hol 10 ip 192.168.1.4
SB1:Ethernet0 Hello out 192.168.1.2 Active pri 100 hel 3 hol 10 ip 192.168.1.4
SB1:Ethernet0 Coup in 192.168.1.1 Listen pri 105 hel 3 hol 10 ip 192.168.1.4
SB1: Ethernet0 state Active -> Speak
SB1:Ethernet0 Resign out 192.168.1.2 Speak pri 100 hel 3 hol 10 ip 192.168.1.4

SB1:Ethernet0 Hello in 192.168.1.1 Active pri 105 hel 3 hol 10 ip 192.168.1.4
SB1:Ethernet0 Hello in 192.168.1.1 Active pri 105 hel 3 hol 10 ip 192.168.1.4
SB1:Ethernet0 Hello out 192.168.1.2 Speak pri 100 hel 3 hol 10 ip 192.168.1.4
SB1:Ethernet0 Hello in 192.168.1.1 Active pri 105 hel 3 hol 10 ip 192.168.1.4
SB1:Ethernet0 Hello out 192.168.1.2 Speak pri 100 hel 3 hol 10 ip 192.168.1.4
__________________________________________________________________________________
CE1#sh standby
Ethernet0 - Group 1
Local state is Active, priority 105, may preempt
Hellotime 3 holdtime 10
Next hello sent in 00:00:00.062
Hot standby IP address is 192.168.1.4 configured
Active router is local
Standby router is 192.168.1.2 expires in 00:00:09
Standby virtual mac address is 0000.0c07.ac01
Tracking interface states for 1 interface, 1 up:
Up Serial
__________________________________________________________________________________
CE2#sh standby
Ethernet0 - Group 1
Local state is Standby, priority 100
Hellotime 3 holdtime 10
Next hello sent in 00:00:02
Hot standby IP address is 192.168.1.4 configured
Active router is 192.168.1.1 expires in 00:00:09
Standby router is local
Tracking interface states for 1 interface, 1 up:
Up Serial0
___________________________________________________________________________________

No preempt definido en CE2
La inclusión de preempt es necesaria tanto en el router primario como en el de back-up. Su uso permite al router adoptar el “rol” de activo si recibe Hellos con una prioridad menor que la definida.
En caso contrario, por ejemplo, si se cae el link de CE1-PE1 , aunque CE2 vea los hellos con prioridad 95, CE1 seguiría siendo el primario. El tráfico seguirá usándolo pero saldría a la red MPLS a traves del Direct Attach.
___________________________________________________________________________________
CE1#sh standby
Ethernet0 - Group 1
Local state is Active, priority 105, may preempt Hellotime 3 holdtime 10
Next hello sent in 00:00:01.070
Hot standby IP address is 192.168.1.4 configured
Active router is local Standby router is 192.168.1.2 expires in 00:00:09
Standby virtual mac address is 0000.0c07.ac01
Tracking interface states for 1 interface, 1 up:
Up Serial0
___________________________________________________________________________________
CE2#sh standby
Ethernet0 - Group 1
Local state is Standby, priority 100 Hellotime 3 holdtime 10
Next hello sent in 00:00:00
Hot standby IP address is 192.168.1.4 configured
Active router is 192.168.1.1 expires in 00:00:07
Standby router is local Tracking interface states for 1 interface, 1 up:
Up Serial0
___________________________________________________________________________________

Inactivamos link CE1-PE1, CE1 decrementa su prioridad en 10, pero sigue siendo el router activo.
___________________________________________________________________________________
CE1#debug standby
Hot standby protocol debugging is on
2d03h: %LINK-3-UPDOWN: Interface Serial0, changed state to down
2d03h: SB1: Ethernet0 Now 0/1 tracked interfaces up
2d03h: SB1: Ethernet0 Priority was 105 now 95, configured as 105
2d03h: SB1:Ethernet0 Hello out 192.168.1.1 Active pri 95 hel 3 hol 10 ip 192.168.1.4
2d03h: SB1:Ethernet0 Hello in 192.168.1.2 Standby pri 100 hel 3 hol 10 ip 192.16
___________________________________________________________________________________
CE1#sh standby
Ethernet0 - Group 1
Local state is Active, priority 95, may preempt
Hellotime 3 holdtime 10
Next hello sent in 00:00:02.952
Hot standby IP address is 192.168.1.4 configured
Active router is local Standby router is 192.168.1.2 expires in 00:00:07
Standby virtual mac address is 0000.0c07.ac01
Tracking interface states for 1 interface, 0 up:
 Down Serial0

___________________________________________________________________________________

CE2 recibe los hellos con prioridad menor .....
___________________________________________________________________________________
CE2#debug standby
Hot standby protocol debugging is on
E2#
SB1:Ethernet0 Hello in 192.168.1.1 Active pri 95 hel 3 hol 10 ip 192.168.1.4
SB1:Ethernet0 Hello out 192.168.1.2 Standby pri 100 hel 3 hol 10 ip 192.168.1.4
SB1:Ethernet0 Hello in 192.168.1.1 Active pri 95 hel 3 hol 10 ip 192.168.1.4
SB1:Ethernet0 Hello out 192.168.1.2 Standby pri 100 hel 3 hol 10 ip 192.168.1.4
SB1:Ethernet0 Hello in 192.168.1.1 Active pri 95 hel 3 hol 10 ip 192.168.1.4
SB1:Ethernet0 Hello out 192.168.1.2 Standby pri 100 hel 3 hol 10 ip 192.168.1.4
SB1:Ethernet0 Hello in 192.168.1.1 Active pri 95 hel 3 hol 10 ip 192.168.1.4
___________________________________________________________________________________

Pero no adopta el rol de primario
___________________________________________________________________________________
CE2#sh standby
Ethernet0 - Group 1
Local state is Standby, priority 100
Hellotime 3 holdtime 10
Next hello sent in 00:00:01
Hot standby IP address is 192.168.1.4 configured
Active router is 192.168.1.1 expires in 00:00:07
Standby router is local
Tracking interface states for 1 interface, 1 up:
Up Serial0
___________________________________________________________________________________


Distribución de rutas por defecto a través de OSPF.
___________________________________________________________________________________
router ospf 100
network 192.168.1.0 0.0.0.255 area 0
default-information originate always route-map ospf-default
!
access-list 11 permit 10.1.1.34
access-list 60 permit any
!
route-map ospf-default permit 10
match ip address 11
set metric 50
!
route-map ospf-default permit 20
match ip address 60
set metric 150
___________________________________________________________________________________

Con el link CE1-PE1 activo:
___________________________________________________________________________________
CE1#sh ip ospf da ext 0.0.0.0
OSPF Router with ID (10.20.10.20) (Process ID 100)

Type-5 AS External Link States
LS age: 955
Options: (No TOS-capability, DC)
LS Type: AS External Link
Link State ID: 0.0.0.0 (External Network Number )
Advertising Router: 10.20.10.20
LS Seq Number: 80000002
Checksum: 0x6878
Length: 36
Network Mask: /0
Metric Type: 2 (Larger than any link state path)
TOS: 0
Metric: 50
Forward Address: 0.0.0.0
External Route Tag: 100

LS age: 1718
Options: (No TOS-capability, DC)
LS Type: AS External Link
Link State ID: 0.0.0.0 (External Network Number )
Advertising Router: 10.20.10.50
LS Seq Number: 80000030
Checksum: 0x4D15
Length: 36
Network Mask: /0
Metric Type: 2 (Larger than any link state path)
TOS: 0
Metric: 100
Forward Address: 0.0.0.0
External Route Tag: 100
___________________________________________________________________________________
CSR-OSPF#sh ip ospf da ext 0.0.0.0
       OSPF Router with ID (10.20.10.70) (Process ID 100)

                Type-5 AS External Link States
  Routing Bit Set on this LSA
  LS age: 55
  Options: (No TOS-capability, DC)
  LS Type: AS External Link
  Link State ID: 0.0.0.0 (External Network Number )
  Advertising Router: 10.20.10.20
  LS Seq Number: 80000003
  Checksum: 0x6679
  Length: 36
  Network Mask: /0
        Metric Type: 2 (Larger than any link state path)
        TOS: 0
        Metric: 50
        Forward Address: 0.0.0.0
        External Route Tag: 100
  LS age: 13
  Options: (No TOS-capability, DC)
  LS Type: AS External Link
  Link State ID: 0.0.0.0 (External Network Number )
  Advertising Router: 10.20.10.50
  LS Seq Number: 80000031
  Checksum: 0x4B16
  Length: 36
  Network Mask: /0
        Metric Type: 2 (Larger than any link state path)
        TOS: 0
        Metric: 100
        Forward Address: 0.0.0.0
        External Route Tag: 100
___________________________________________________________________________________
CSR-OSPF#trace 192.168.2.1
Type escape sequence to abort.
Tracing the route to 192.168.2.1
  1 192.168.1.1 184 msec 4 msec 0 msec
  2 10.1.1.41 4 msec 4 msec 4 msec
  3 10.1.1.17 8 msec 8 msec 8 msec
  4 10.1.1.6 4 msec 8 msec 8 msec
  5 10.1.1.33 4 msec 8 msec 8 msec
  6 10.1.1.34 8 msec 8 msec *
___________________________________________________________________________________

No hay comentarios:

Publicar un comentario

Nota: solo los miembros de este blog pueden publicar comentarios.