miércoles, 21 de julio de 2010

HSRP Tracking

Tarea 1
  • Formar conectividad entre sitios utilizando enrutamiento estático.
  • R1 debe crear la puerta de enlace (Gateway) 172.16.1.100.
  • R6 debe crear la puerta de enlace (Gateway) 172.16.2.100.


Sitio1

R1

ip route 0.0.0.0 0.0.0.0 172.16.1.100

R2

ip route 200.0.0.1 255.255.255.255 172.16.1.1

ip route 172.16.2.0 255.255.255.0 10.1.24.4

R3

ip route 200.0.0.1 255.255.255.255 172.16.1.1

ip route 172.16.2.0 255.255.255.0 10.1.35.5

Sitio2

R6

ip route 0.0.0.0 0.0.0.0 172.16.2.100

R4

ip route 200.0.0.6 255.255.255.255 172.16.2.6

ip route 172.16.1.0 255.255.255.0 10.1.24.2

R5

ip route 200.0.0.6 255.255.255.255 172.16.2.6

ip route 172.16.1.0 255.255.255.0 10.1.35.3

R2#sh ip route static

200.0.0.0/32 is subnetted, 1 subnets

S 200.0.0.1 [1/0] via 172.16.1.1

172.16.0.0/24 is subnetted, 2 subnets

S 172.16.2.0 [1/0] via 10.1.24.4

R2#ping 172.16.2.6

!!!!!

Success rate is 100 percent (5/5), round-trip min/avg/max = 56/78/128 ms

R5#sh ip route static

200.0.0.0/32 is subnetted, 1 subnets

S 200.0.0.6 [1/0] via 172.16.2.6

172.16.0.0/24 is subnetted, 2 subnets

S 172.16.1.0 [1/0] via 10.1.35.3

R5#ping 172.16.1.1 source fastEthernet 0/0

!!!!!

Success rate is 100 percent (5/5), round-trip min/avg/max = 60/112/216 ms


Tarea 2
  • Configurar R2 como router activo HSRP y R3 respaldo (STANDBY).
  • Configurar R4 como router activo HSRP y R5 respaldo (STANDBY).

Un router de respaldo debe tomar el rol activo si:
  • El enlace Frame-Relay en el router activo no presenta señal de linea (L2)
  • El router activo deja de funcionar.

Sitio1
En los routers HSRP definimos la dirección que será usada como puerta de enlace por R1. Modificamos la prioridad tanto en R2 como en R3, lo importante es que R2 siempre tenga un número de prioridad mayor, la prioridad define los roles en un dominio HSRP.
Debemos tener en cuenta que HSRP soporta preempt , esto quiere decir que si un router HSRP con una prioridad mayor se conecta al segmento de red éste adoptará el papel de activo, aunque ya exista otro cumpliendo ese papel.

R2

interface FastEthernet0/0

standby 10 ip 172.16.1.100

standby 10 priority 101

standby 10 preempt

R3

interface FastEthernet0/0

standby 10 ip 172.16.1.100

standby 10 priority 95

standby 10 preempt


Verificamos que R2 sea el router activo y R3 el respaldo:

R2#show standby

FastEthernet0/0 - Group 10

State is Active

2 state changes, last state change 00:55:27

Virtual IP address is 172.16.1.100

Active virtual MAC address is 0000.0c07.ac0a

Local virtual MAC address is 0000.0c07.ac0a (v1 default)

Hello time 3 sec, hold time 10 sec

Next hello sent in 1.744 secs

Preemption enabled

Active router is local

Standby router is 172.16.1.3, priority 95 (expires in 10.112 sec)

Priority 101 (configured 101)

Group name is "hsrp-Fa0/0-10" (default)

R3#show standby

FastEthernet0/0 - Group 10

State is Standby

1 state change, last state change 00:55:55

Virtual IP address is 172.16.1.100

Active virtual MAC address is 0000.0c07.ac0a

Local virtual MAC address is 0000.0c07.ac0a (v1 default)

Hello time 3 sec, hold time 10 sec

Next hello sent in 2.320 secs

Preemption enabled

Active router is 172.16.1.2, priority 101 (expires in 8.272 sec)

Standby router is local

Priority 95 (configured 95)

Group name is "hsrp-Fa0/0-10" (default)


Sitio2

R4

interface FastEthernet0/0

standby 10 ip 172.16.2.100

standby 10 priority 101

standby 10 preempt

R5

interface FastEthernet0/0

standby 10 ip 172.16.2.100

standby 10 priority 95

standby 10 preempt

R4#show standby

FastEthernet0/0 - Group 10

State is Active

2 state changes, last state change 01:04:37

Virtual IP address is 172.16.2.100

Active virtual MAC address is 0000.0c07.ac0a

Local virtual MAC address is 0000.0c07.ac0a (v1 default)

Hello time 3 sec, hold time 10 sec

Next hello sent in 2.048 secs

Preemption enabled

Active router is local

Standby router is 172.16.2.5, priority 95 (expires in 10.112 sec)

Priority 101 (configured 101)

Group name is "hsrp-Fa0/0-10" (default)

R5#show standby

FastEthernet0/0 - Group 10

State is Standby

1 state change, last state change 01:04:40

Virtual IP address is 172.16.2.100

Active virtual MAC address is 0000.0c07.ac0a

Local virtual MAC address is 0000.0c07.ac0a (v1 default)

Hello time 3 sec, hold time 10 sec

Next hello sent in 0.896 secs

Preemption enabled

Active router is 172.16.2.4, priority 101 (expires in 9.920 sec)

Standby router is local

Priority 95 (configured 95)

Group name is "hsrp-Fa0/0-10" (default)


Tener presente que no debemos establecer cualquier número en la prioridad (esto aplica tanto a VRRP como HSRP). Debe ser consistente con el valor de decremento, es decir, si por ejemplo R2 con prioridad 100 no tiene señal del enlace FR, este disminuirá su prioridad en 10. Si R3 tiene configurada una prioridad HSRP de 90 se producirá un problema (ambos routers con la misma prioridad), el proceso HSRP tomará como router activo el que tenga la dirección IP mayor, y puede darse la casualidad que sea el mismo router que debería pasar al modo Standby. Para evitar esto debemos establecer números relativamente cercanos, por ejemplo 101 para el router activo, y 95 para el router respaldo, si el activo cae disminuye a 91 su prioridad, el respaldo con 95 toma de inmediato el rol activo.

Para sondear el enlace Frame-Relay podemos utilizar el comando track como se muestra a continuación:
Sitio1

R2

track 23 interface Serial1/0 line-protocol

interface FastEthernet0/0

standby 10 track 23 decrement 10

R3

track 23 interface Serial1/0 line-protocol

interface FastEthernet0/0

standby 10 track 23 decrement 10

R2#show standby | b Track

Track object 23 state Up decrement 10

Group name is "hsrp-Fa0/0-10" (default)

R4#show standby | b Track

Track object 45 state Up decrement 10

Group name is "hsrp-Fa0/0-10" (default)


Sitio2

R4

track 45 interface Serial1/0 line-protocol

interface FastEthernet0/0

standby 10 track 45 decrement 10

R5

track 45 interface Serial1/0 line-protocol

interface FastEthernet0/0

standby 10 track 45 decrement 10


En este punto podemos ver si nuestra red se comporta según lo esperado.
R1 tiene conectividad con el GW virtual:

R1#ping 172.16.1.100

Type escape sequence to abort.

Sending 5, 100-byte ICMP Echos to 172.16.1.100, timeout is 2 seconds:

!!!!!

Success rate is 100 percent (5/5), round-trip min/avg/max = 20/45/76 ms

R1 sale a través de R2. R2 es el router Active.

R1#traceroute 172.16.2.6

1 172.16.1.2 68 msec 28 msec 40 msec

2 10.1.24.4 56 msec 60 msec 40 msec

3 172.16.2.6 164 msec * 92 msec


Para comprobar que funciona este esquema generamos tráfico con un simple ping desde R1 a R6.

En R2 cerramos la interface serial

R2(config)#interface serial 1/0

R2(config-if)#shutdown

R1#ping 172.16.2.6 repeat 10000

Type escape sequence to abort.

Sending 10000, 100-byte ICMP Echos to 172.16.2.6, timeout is 2 seconds:

!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

!!!.....................


A pesar de todos los esfuerzos no se produce el comportamiento esperado, R1 pierde conectividad con R6.
La razón es que ciertas tecnologías L2 como Frame-Relay son localmente significativas y solo requieren mantener conexión con el SW FR local; en nuestro caso, la serial de R2 está caída:

R2#show ip int brief serial 1/0

Interface IP-Address OK? Method Status Protocol

Serial1/0 10.1.24.2 YES manual administratively down down


Sin embargo la interface que conecta R4 con el SW Frame-Relay está UP:

R4#show ip int brief serial 1/0

Interface IP-Address OK? Method Status Protocol

Serial1/0 10.1.24.4 YES manual up up

R2#show standby all brief

P indicates configured to preempt.

|

Interface Grp Pri P State Active Standby Virtual IP

Fa0/0 10 91 P Standby 172.16.1.3 local 172.16.1.100

R3#show standby all brief

P indicates configured to preempt.

|

Interface Grp Pri P State Active Standby Virtual IP

Fa0/0 10 95 P Active local 172.16.1.2 172.16.1.100


Puesto que R2 sondea el enlace y nota de inmediato que la interface serial 1/0 está caída, se convierte en Stanby HSRP en Sitio1, sin embargo, no sucede lo mismo en Sitio2 y R4 sigue actuando como router activo a pesar de no tener conectividad con R2. Podemos solucionar este problema con alguno protocolo de enrutamiento interior (IGP) que genere keepalive, o generar artificialmente keepalive usando IP SLA, como veremos más adelante.
Si volvemos a levantar la interface serial de R2 veremos el comportamiento de preempt. El tracking comprueba ahora que la interface serial está UP. R2 se publica a si mismo con una prioridad de 101 en HSRP que es mayor que 95 de R3, y se convierte nuevamente en el router activo.

R2(config)#interface serial 1/0

R2(config-if)#no shutdown

R2#show standby all brief

P indicates configured to preempt.

Interface Grp Pri P State Active Standby Virtual IP

Fa0/0 10 101 P Active local 172.16.1.3 172.16.1.100


Tarea 3
Para corregir el problema y mantener conectividad entre los sitios podemos utilizar una combinación de IP SLA y tracking. IP SLA nos permiten en esta sección sondear las seriales de nuestros vecinos, vale decir, la actividad que se produce a través de todo el enlace FR.
La forma de configurar SLA varía entre plataformas. La que presentamos aquí corresponde al IOS 12.4(20)T

R2

ip sla 10

icmp-echo 10.1.24.4

frequency 5

ip sla schedule 10 life forever start-time now

track 10 ip sla 10 reachability

interface FastEthernet0/0

standby 10 preempt delay minimum 1

standby 10 track 10 decrement 10

R3

ip sla 10

icmp-echo 10.1.35.5

frequency 5

ip sla schedule 10 life forever start-time now

track 10 ip sla 10 reachability

interface FastEthernet0/0

standby 10 preempt delay minimum 1

standby 10 track 10 decrement 10

R4

ip sla 10

icmp-echo 10.1.24.2

frequency 5

ip sla schedule 10 life forever start-time now

track 10 ip sla 10 reachability

interface FastEthernet0/0

standby 10 preempt delay minimum 1

standby 10 track 10 decrement 10

R5

ip sla 10

icmp-echo 10.1.35.3

frequency 5

ip sla schedule 10 life forever start-time now

track 10 ip sla 10 reachability

interface FastEthernet0/0

standby 10 preempt delay minimum 1

standby 10 track 10 decrement 10


R2(config-if)#int s1/0

R2(config-if)#shutdown

R2(config-if)#

%TRACKING-5-STATE: 23 interface Se1/0 line-protocol Up->Down

R2(config-if)#

%LINK-5-CHANGED: Interface Serial1/0, changed state to administratively down

R2(config-if)#

%ENTITY_ALARM-6-INFO: ASSERT INFO Se1/0 Physical Port Administrative State Down

R2(config-if)#

%HSRP-5-STATECHANGE: FastEthernet0/0 Grp 10 state Active -> Speak

%LINEPROTO-5-UPDOWN: Line protocol on Interface Serial1/0, changed state to down

R2(config-if)#

%TRACKING-5-STATE: 10 ip sla 10 reachability Up->Down

R2(config-if)#

%HSRP-5-STATECHANGE: FastEthernet0/0 Grp 10 state Speak -> Standby


Como podemos ver R2 y R4 cambian de estado Active a Standby. R3 y R5 cambian de estado Standby a Active. Es el comportamiento deseado.

R2#show standby

FastEthernet0/0 - Group 10

State is Standby

9 state changes, last state change 00:01:56

Virtual IP address is 172.16.1.100

Active virtual MAC address is 0000.0c07.ac0a

Local virtual MAC address is 0000.0c07.ac0a (v1 default)

Hello time 3 sec, hold time 10 sec

Next hello sent in 1.904 secs

Preemption enabled, delay min 1 secs

Active router is 172.16.1.3, priority 95 (expires in 10.896 sec)

Standby router is local

Priority 81 (configured 101)

Track object 10 state Down decrement 10

Group name is "hsrp-Fa0/0-10" (default)

R3#show standby all brief

P indicates configured to preempt.

|

Interface Grp Pri P State Active Standby Virtual IP

Fa0/0 10 95 P Active local 172.16.1.2 172.16.1.100

R4#show standby all brief

P indicates configured to preempt.

|

Interface Grp Pri P State Active Standby Virtual IP

Fa0/0 10 91 P Standby 172.16.2.5 local 172.16.2.100

R5#show standby all brief

P indicates configured to preempt.

|

Interface Grp Pri P State Active Standby Virtual IP

Fa0/0 10 95 P Active local 172.16.2.4 172.16.2.100


Generamos nuevamente tráfico con un ping desde R1 a R6. Esta vez solo existe un pequeño retardo y luego R3 actúa como GW y R1 puede alcanzar a R6.

R1#ping 172.16.2.6 repeat 10000

Type escape sequence to abort.

Sending 10000, 100-byte ICMP Echos to 172.16.2.6, timeout is 2 seconds:

!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

!!.........!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!.

Success rate is 88 percent (123/139), round-trip min/avg/max = 32/98/180 ms



R2#show ip sla statistics

IPSLAs Latest Operation Statistics

IPSLA operation id: 10

Latest RTT: NoConnection/Busy/Timeout

Latest operation start time: *22:38:46.546 UTC Wed Mar 17 2010

Latest operation return code: Timeout

Number of successes: 0

Number of failures: 177

Operation time to live: Forever

R3#show ip sla statistics

IPSLAs Latest Operation Statistics

IPSLA operation id: 10

Latest RTT: 52 milliseconds

Latest operation start time: *22:38:21.254 UTC Wed Mar 17 2010

Latest operation return code: OK

Number of successes: 347

Number of failures: 0

Operation time to live: Forever

R4#show ip sla statistics

IPSLAs Latest Operation Statistics

IPSLA operation id: 10

Latest RTT: NoConnection/Busy/Timeout

Latest operation start time: *22:39:16.122 UTC Wed Mar 17 2010

Latest operation return code: Timeout

Number of successes: 0

Number of failures: 177

Operation time to live: Forever

R5#show ip sla statistics

IPSLAs Latest Operation Statistics

IPSLA operation id: 10

Latest RTT: 32 milliseconds

Latest operation start time: *22:39:39.830 UTC Wed Mar 17 2010

Latest operation return code: OK

Number of successes: 357

Number of failures: 0

Operation time to live: Forever

Rehabilitamos el enlace R2/R4

R2(config)#interface serial 1/0

R2(config-if)#no shutdown

R2(config-if)#

%TRACKING-5-STATE: 23 interface Se1/0 line-protocol Down->Up

R2(config-if)#

%LINK-3-UPDOWN: Interface Serial1/0, changed state to up

R2(config-if)#

%ENTITY_ALARM-6-INFO: CLEAR INFO Se1/0 Physical Port Administrative State Down

R2(config-if)#

%LINEPROTO-5-UPDOWN: Line protocol on Interface Serial1/0, changed state to up

R2(config-if)#

%TRACKING-5-STATE: 10 ip sla 10 reachability Down->Up

R2#

%HSRP-5-STATECHANGE: FastEthernet0/0 Grp 10 state Standby -> Active

R1#traceroute 172.16.2.6

Type escape sequence to abort.

Tracing the route to 172.16.2.6

1 172.16.1.2 84 msec 72 msec 28 msec

2 10.1.24.4 76 msec 40 msec 72 msec

3 172.16.2.6 120 msec * 100 msec

No hay comentarios:

Publicar un comentario