Contents

Introduction

Este documento descreve como configurar o HSRP (Hot Standby Routing Protocol) para IPv6. O HSRP é usado em um grupo de roteadores para selecionar um roteador ativo e um roteador em standby. Em um grupo de interfaces do roteador, o roteador ativo é o roteador de escolha para rotear pacotes; o roteador em standby é o roteador que assume quando o roteador ativo falha ou quando as condições predefinidas são atendidas. O HSRP foi projetado para fornecer apenas um primeiro salto virtual para hosts IPv6.

Um grupo de HSRP IPv6 tem um endereço MAC virtual derivado do número de grupo do HSRP e um endereço de link local IPv6 virtual que é, por padrão, derivado do endereço MAC virtual do HSRP. Anúncios periódicos de roteador (RAs) são enviados para o endereço local de link IPv6 virtual do HSRP quando o grupo do HSRP está ativo. Esses RAs param após um RA final ser enviado quando o grupo deixa o estado ativo.

O HSRP usa um mecanismo de prioridade para determinar qual roteador configurado para HSRP é o roteador ativo padrão. Para configurar um roteador como o roteador ativo, você deve atribuir a ele uma prioridade mais alta que a prioridade de todos os outros roteadores configurados para HSRP. A prioridade padrão é 100; portanto, se você configurar apenas um roteador para ter uma prioridade mais alta, esse roteador será o roteador ativo padrão. O HSRP versão 2 usa o novo endereço IP multicast 224.0.0.102 para enviar pacotes hello em vez do endereço multicast 224.0.0.2, usado pela versão 1.

Prerequisites

Requirements

Certifique-se de atender a estes requisitos antes de tentar esta configuração:

Componentes Utilizados

As configurações neste documento são baseadas no Cisco 3700 Series Router no Cisco IOS Software Release 12.4 (15)T 13.

Observação: verifique as informações de licença dos comandos IPv6.

Conventions

Consulte as Convenções de Dicas Técnicas da Cisco para obter informações sobre convenções de documentos.

Configurar

Os roteadores R1 e R2 estão conectados a R3 através de uma interface serial. As interfaces Fast Ethernet de R1 e R2 são configuradas com HSRP IPv6 de forma que R1 atue como o roteador ativo e R2 atue como o roteador em standby. Caso a interface serial0/0 de R1 fique inativa, o roteador R2 altera seu estado de Standby para Ative.

Nota:Use a Command Lookup Tool (somente clientes registrados) para obter mais informações sobre os comandos usados neste documento.

Diagrama de Rede

Este documento utiliza a seguinte configuração de rede:

ipv6-hsrp-01.gif

Configurações

Este documento utiliza as seguintes configurações:

Aqui está um link para um vídeo (disponível na Comunidade de Suporte da Cisco leavingcisco.com) que demonstra como configurar o HSRP para IPv6 em roteadores Cisco IOS:

Configuração do HSRP para IPv6 leavingcisco.com

ipv6-hsrp-02.gif

Configuração do roteador R1
R1#show run
Building configuration...
!
hostname R1
!
ip cef
!
ipv6 unicast-routing
!
interface FastEthernet0/0
 no ip address
 duplex auto
 speed auto
 ipv6 address 2020:AB8:2001::1010/64
 ipv6 enable
 standby version 2
 standby 1 ipv6 autoconfig

!--- Assigns a standby group and standby IP address.


 standby 1 priority 120


!--- R1 is configured as the active router. !--- This is done by assigning a priority value !--- (in this case 120) to the router's Fa0/0 interface. !--- The default priority value is 100.


 standby 1 preempt delay minimum 30

 !--- The preempt command allows the router to become the !--- active router when it has the priority higher than !--- all the other HSRP-configured routers. !---- Without this command, even if a router has higher !--- priority value, it will not become an active router. !--- The delay minimum value causes the local router to postpone !--- taking over the active role for a minimum of 30 seconds. 

 standby 1 track Serial0/0 90

 !--- Indicates that HSRP tracks serial0/0. !--- The interface priority is configured (in this case 90) which !--- indicates that if the tracked interface goes down the router !--- priority value is to be decremented by 90. !--- Default decrement value is 10.

!
interface Serial0/0
 no ip address
 ipv6 enable
 ipv6 address 2010:AB8:2001::1010/64
 clock rate 2000000
!
end

Configuração do roteador R2
R2#show run
Building configuration...
!
hostname R2
!
ip cef
!
ipv6 unicast-routing
!
interface FastEthernet0/0

!--- R2 is configured as a standby router !--- with a default priority value of 100.

 no ip address
 duplex auto
 speed auto
 ipv6 address 2020:AB8:2001::1011/64
 ipv6 enable
 standby version 2
 standby 1 ipv6 autoconfig
 standby 1 preempt delay minimum 30
 standby 1 track Serial0/0
!
interface Serial0/0
 no ip address
 ipv6 address 2010:AB8:2010::1020/64
 ipv6 enable
 clock rate 2000000
!
end

Configuração do roteador R3
R3#show run
Building configuration...
!
hostname R3
!
ip cef
!
ipv6 unicast-routing
!
interface Serial0/0
 no ip address
 ipv6 address 2010:AB8:2001::1011/64
 ipv6 enable
 clock rate 2000000
!
interface Serial0/1
 no ip address
 ipv6 address 2010:AB8:2010::1021/64
 clock rate 2000000
!
end

Verificar

Use o comando show standby nos roteadores R1 e R2 para verificar a configuração.

Roteador R1
R1#show standby
FastEthernet0/0 - Group 1 (version 2)
  State is Active 
!--- R1 router is in Active state.

    4 state changes, last state change 02:51:30
  Virtual IP address is FE80::5:73FF:FEA0:1
  Active virtual MAC address is 0005.73a0.0001
    Local virtual MAC address is 0005.73a0.0001 (v2 IPv6 default)
  Hello time 3 sec, hold time 10 sec
    Next hello sent in 2.480 secs
  Preemption enabled, delay min 30 secs
  Active router is local
  Standby router is FE80::C010:21FF:FE78:0, priority 100 (expires in 7.036 sec)
  Priority 120 (configured 120)
    Track interface Serial0/0 state Up decrement 10
  Group name is "hsrp-Fa0/0-1" (default)

Roteador R2
R2#show standby
FastEthernet0/0 - Group 1 (version 2)
  State is Standby
!--- R2 router is in Standby state.

    4 state changes, last state change 02:51:43
  Virtual IP address is FE80::5:73FF:FEA0:1
  Active virtual MAC address is 0005.73a0.0001
    Local virtual MAC address is 0005.73a0.0001 (v2 IPv6 default)
  Hello time 3 sec, hold time 10 sec
    Next hello sent in 0.900 secs
  Preemption enabled, delay min 30 secs
  Active router is FE80::C00F:21FF:FE78:0, priority 120 (expires in 9.928 sec)
    MAC address is c20f.2178.0000
  Standby router is local
  Priority 100 (default 100)
    Track interface Serial0/0 state Up decrement 10
  Group name is "hsrp-Fa0/0-1" (default)

Caso o roteador ativo (R1 neste exemplo) seja desativado, o roteador em standby altera seu estado imediatamente para Ativo, como mostrado nesta tabela:

Quando o roteador ativo (R1) fica inativo...
Roteador R1
R1(config)#interface s0/0
R1(config-if)#shut
R1(config-if)#exit
*Mar  1 00:01:34.879: %LINK-5-CHANGED: Interface Serial0/0, changed state to 
      administratively down
*Mar  1 00:01:35.879: %LINEPROTO-5-UPDOWN: Line protocol on Interface Serial0/0, 
      changed state to down
R1#
*Mar  1 00:04:06.691: %SYS-5-CONFIG_I: Configured from console by console
R1#
*Mar  1 00:04:36.175: %HSRP-5-STATECHANGE: FastEthernet0/0 Grp 1 state Active -> Speak
R1#
*Mar  1 00:04:46.175: %HSRP-5-STATECHANGE: FastEthernet0/0 Grp 1 state Speak -> Standby

!--- When the interface goes down, the active router changes its state to Standby.

Roteador R2
*Mar  1 00:04:35.631: %HSRP-5-STATECHANGE: FastEthernet0/0 Grp 1 state Standby ->Active


!--- The standby router is now the active router.
 

R2#show standby
FastEthernet0/0 - Group 1 (version 2)
  State is Active
    2 state changes, last state change 00:10:39
  Virtual IP address is FE80::5:73FF:FEA0:1
  Active virtual MAC address is 0005.73a0.0001
    Local virtual MAC address is 0005.73a0.0001 (v2 IPv6 default)
  Hello time 3 sec, hold time 10 sec
    Next hello sent in 2.532 secs
  Preemption enabled, delay min 30 secs
  Active router is local
  Standby router is FE80::C00F:21FF:FE78:0, priority 30 (expires in 7.524 sec)
  Priority 100 (default 100)
    Track interface Serial0/0 state Up decrement 10
  Group name is "hsrp-Fa0/0-1" (default)

Troubleshoot

Atualmente, não existem informações disponíveis específicas sobre Troubleshooting para esta configuração.

Informações Relacionadas