HSRP IPv6 Cisco IOS

From Teknologisk videncenter
Jump to: navigation, search

HSRP or Hot Standby Router Protocol is a protocol defined by Cisco.[1]

NOTE

On the Cisco 3560 platform IPv4 and IPv6 HSRP are mutually exclusive. Only one IP version allowed on a interface.

NAVI2-1(config-if)#standby version 2
NAVI2-1(config-if)#standby 10 ip 192.168.142.33
NAVI2-1(config-if)#standby 256 ipv6 autoconfig
<error>%FHRP group not consistent with already configured groups on the switch stack</error>

As a workaround it is possible to set both router advertisments timers to a smaller lifetime. In the following eexample with a lifttime of three seconds, there would be a switchover to the other router after three seconds. It is not possible to track upstream interfaces with this method. Working on a better workaround.

Example of setting router advertisments timer values on one of the routers. Set them to same values on both routers.

int vlan 143
 ipv6 nd ra lifetime 3
 ipv6 nd ra interval msec 1000

Example

HSRP IPv6.png

R1 Config

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
 standby 1 priority 120
 standby 1 preempt delay minimum 30
 standby 1 track Serial0/0 90
!
interface Serial0/0
 no ip address
 ipv6 enable
 ipv6 address 2010:AB8:2001::1010/64
 clock rate 2000000

R2 Config

hostname R2
!
ip cef
!
ipv6 unicast-routing
!
interface FastEthernet0/0
 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

references

R3 Config

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

Verify

R1

R1#<input>show standby</input>
FastEthernet0/0 - Group 1 (version 2)
  <notice>State is Active</notice> 
    4 state changes, last state change 02:51:30
  <notice>Virtual IP address is FE80::5:73FF:FEA0:1</notice>
  <notice>Active virtual MAC address is 0005.73a0.0001</notice>
    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
  <notice>Preemption enabled, delay min 30 secs</notice>
  Active router is local
  <notice>Standby router is FE80::C010:21FF:FE78:0, priority 100 (expires in 7.036 sec)
  Priority 120 (configured 120)</notice>
    Track interface Serial0/0 state Up decrement 10
  Group name is "hsrp-Fa0/0-1" (default)

R2

R2#show standby
FastEthernet0/0 - Group 1 (version 2)
  <notice>State is Standby</notice>
    4 state changes, last state change 02:51:43
  <notice>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)</notice>
  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)

Checking

R1

R1(config)#<input>interface s0/0</input>
R1(config-if)#<input>shut</input>
R1(config-if)#<input>exit</input>
*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

R2

*Mar  1 00:04:35.631: %HSRP-5-STATECHANGE: FastEthernet0/0 Grp 1 state Standby ->Active
R2#<input>show standby</input>
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)