cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
8014
Views
0
Helpful
5
Replies

HSRP standby 1 ip command ---Virtual address learning

mahesh18
Level 6
Level 6

Hi all,

I have HSRP running fine between 2 switches.

For Vlan 30 which is standby  i have this config

sh run int vlan 30

Building configuration...

Current configuration : 204 bytes

!

interface Vlan30

ip address 192.168.30.2 255.255.255.0

ip ospf hello-interval 40

standby preempt

  standby 2 ip ************************************************************************

standby 2 preempt delay minimum 300

end

Here i have no put the standby 2 virtual ip knowingly

3550SMIB#sh stan

3550SMIB#sh standby vlan 30

Vlan30 - Group 2

  State is Standby

    1 state change, last state change 6d08h

  Virtual IP address is 192.168.30.3 (learnt)*******************************

  Active virtual MAC address is 0000.0c07.ac02

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

  Hello time 3 sec, hold time 10 sec

    Next hello sent in 2.300 secs

  Preemption enabled, delay min 300 secs

  Active router is 192.168.30.1, priority 150 (expires in 7.896 sec)

  Standby router is local

  Priority 100 (default 100)

  IP redundancy name is "hsrp-Vl30-2" (default)

So standby switch has learned the virtual mac address need to know how it leanred virtual IP?

  Did it learn  the virtual address when it exchanged  first time the hello packets with nei switch?

Thanks

Mahesh

1 Accepted Solution

Accepted Solutions

InayathUlla Sharieff
Cisco Employee
Cisco Employee

Hi Mahesh,

Please find my understanding below:

=>When you configure the HSRP standby group number and IP at one end and other end  just with the standby group number, the interface will send the HSRP hello message over the interface in which the subset of CHSRP message contains the VIP ip address of the HSRP hence the other side learns it.

=>Active and Standby routers send periodic HSRP messages once the protocol has completed the election process.

=> I have done the Packet Capture on R3 F0/1 interface and you would see the hsrp hello packet which is coming from R2 ,see the subset of the packet you would find the CHSRP packet which will contain the Virtual IP this is how the other end will be able to learn the virtual ip address.


=>Please find the config and behaviour below:

R2---F0/1--------------------F0/1 --R3 (R3 has been configured with standby 3 ip 1.1.1.7)

R2#sh run int f0/1
Building configuration...

Current configuration : 114 bytes
!
interface FastEthernet0/1
ip address 1.1.1.5 255.255.255.0
duplex auto
speed auto
standby 3 ip 1.1.1.7
end


R3#sh run int f0/1
Building configuration...

Current configuration : 106 bytes
!
interface FastEthernet0/1
ip address 1.1.1.6 255.255.255.0
duplex auto
speed auto
standby 3 ip <<<
end


R3(config)#int f0/1
R3(config-if)#standby 3 ip <<<<<<<<<<<< HSRP enabled.
R3(config-if)#
*Mar  1 00:11:05.291: HSRP: Fa0/1 Starting minimum interface delay (1 secs)
*Mar  1 00:11:05.295: HSRP: Fa0/1 Grp 3 Set group MAC 0000.0000.0000 -> 0000.0c07.ac03 <<< HSRP hello sent.
*Mar  1 00:11:05.295: HSRP: Fa0/1 MAC entry 0000.0c07.ac03 created
*Mar  1 00:11:05.295: HSRP: Fa0/1 MAC entry 0000.0c07.ac03, Added Fa0/1 Grp 3 to list
*Mar  1 00:11:05.315: HSRP: Fa0/1 Grp 3 Disabled -> Init
*Mar  1 00:11:05.315: HSRP: Fa0/1 Grp 3 Redundancy "hsrp-Fa0/1-3" state Disabled -> Init
*Mar  1 00:11:05.319: HSRP: Fa0/1 IP Redundancy "hsrp-Fa0/1-3" added
*Mar  1 00:11:05.319: HSRP: Fa0/1 IP Redundancy "hsrp-Fa0/1-3" update, Disabled -> Init
R3(config-if)#
*Mar  1 00:11:05.611: HSRP: Fa0/1 Grp 3 Hello  in  1.1.1.5 Active  pri 100 vIP 1.1.1.7  <<<<< Deducted the priority of the HSRP group and also learn the virtual ip address.
*Mar  1 00:11:05.615: HSRP: Fa0/1 Grp 3 Active router is 1.1.1.5
*Mar  1 00:11:05.615: HSRP: Fa0/1 Nbr 1.1.1.5 created
*Mar  1 00:11:05.615: HSRP: Fa0/1 Nbr 1.1.1.5 active for group 3
*Mar  1 00:11:05.615: HSRP: Fa0/1 Added 1.1.1.7 to hash table
*Mar  1 00:11:05.619: HSRP: Fa0/1 IP Redundancy "hsrp-Fa0/1-3" address change 1.1.1.7 added
*Mar  1 00:11:06.291: HSRP: Fa0/1 Interface min delay expired
*Mar  1 00:11:06.291: HSRP: Fa0/1 Grp 3 Init: a/HSRP enabled
*Mar  1 00:11:06.291: HSRP: Fa0/1 Grp 3 Init -> Listen
*Mar  1 00:11:06.291: HSRP: Fa0/1 Interface adv out, Passive, active 0 passive 1
*Mar  1 00:11:06.295: HSRP: Fa0/1 Grp 3 Redundancy "hsrp-Fa0/1-3" state Init -> Backup
*Mar  1 00:11:06.295: HSRP: Fa0/1 IP Redundancy "hsrp-Fa0/1-3" update, Init -> Backup
*Mar  1 00:11:08.559: HSRP: Fa0/1 Grp 3 Hello  in  1.1.1.5 Active  pri 100 vIP 1.1.1.7
*Mar  1 00:11:09.315: HSRP: Fa0/1 Grp 3 Hello  in  1.1.1.5 Active  pri 100 vIP 1.1.1.7
*Mar  1 00:11:11.567: HSRP: Fa0/1 Grp 3 Hello  in  1.1.1.5 Active  pri 100 vIP 1.1.1.7
*Mar  1 00:11:14.531: HSRP: Fa0/1 Grp 3 Hello  in  1.1.1.5 Active  pri 100 vIP 1.1.1.7
*Mar  1 00:11:16.291: HSRP: Fa0/1 Grp 3 Listen: d/Standby timer expired (unknown)
*Mar  1 00:11:16.291: HSRP: Fa0/1 Grp 3 Listen -> Speak
*Mar  1 00:11:16.291: HSRP: Fa0/1 Grp 3 Redundancy "hsrp-Fa0/1-3" state Backup -> Speak
*Mar  1 00:11:16.295: HSRP: Fa0/1 Grp 3 Hello  out 1.1.1.6 Speak   pri 100 vIP 1.1.1.7
*Mar  1 00:11:16.295: HSRP: Fa0/1 IP Redundancy "hsrp-Fa0/1-3" update, Backup -> Speak
*Mar  1 00:11:17.631: HSRP: Fa0/1 Grp 3 Hello  in  1.1.1.5 Active  pri 100 vIP 1.1.1.7
*Mar  1 00:11:18.047: HSRP: Fa0/1 Grp 3 Hello  in  1.1.1.5 Active  pri 100 vIP 1.1.1.7
*Mar  1 00:11:19.295: HSRP: Fa0/1 Grp 3 Hello  out 1.1.1.5 Speak   pri 100 vIP 1.1.1.7
*Mar  1 00:11:20.515: HSRP: Fa0/1 Grp 3 Hello  in  1.1.1.5 Active  pri 100 vIP 1.1.1.7
*Mar  1 00:11:22.295: HSRP: Fa0/1 Grp 3 Hello  out 1.1.1.6 Speak   pri 100 vIP 1.1.1.7
*Mar  1 00:11:23.527: HSRP: Fa0/1 Grp 3 Hello  in  1.1.1.5 Active  pri 100 vIP 1.1.1.7
*Mar  1 00:11:25.295: HSRP: Fa0/1 Grp 3 Hello  out 1.1.1.6 Speak   pri 100 vIP 1.1.1.7
*Mar  1 00:11:26.291: HSRP: Fa0/1 Grp 3 Speak: d/Standby timer expired (unknown)
*Mar  1 00:11:26.291: HSRP: Fa0/1 Grp 3 Standby router is local
*Mar  1 00:11:26.291: HSRP: Fa0/1 Grp 3 Speak -> Standby
*Mar  1 00:11:26.291: %HSRP-5-STATECHANGE: FastEthernet0/1 Grp 3 state Speak -> Standby
*Mar  1 00:11:26.295: HSRP: Fa0/1 Grp 3 Redundancy "hsrp-Fa0/1-3" state Speak -> Standby
*Mar  1 00:11:26.295: HSRP: Fa0/1 Grp 3 Hello  out 1.1.1.5 Standby pri 100 vIP 1.1.1.7
*Mar  1 00:11:26.299: HSRP: Fa0/1 IP Redundancy "hsrp-Fa0/1-3" standby, unknown -> local
*Mar  1 00:11:26.299: HSRP: Fa0/1 IP Redundancy "hsrp-Fa0/1-3" update, Speak -> Standby

*
R3#show standby
FastEthernet0/1 - Group 3
  State is Standby
    1 state change, last state change 00:01:16
  Virtual IP address is 1.1.1.7 (learnt)
  Active virtual MAC address is 0000.0c07.ac03
    Local virtual MAC address is 0000.0c07.ac03 (v1 default)
  Hello time 3 sec, hold time 10 sec
    Next hello sent in 1.456 secs
  Preemption disabled
  Active router is 1.1.1.6, priority 100 (expires in 8.732 sec)
  Standby router is local
  Priority 100 (default 100)
  Group name is "hsrp-Fa0/1-3" (default)

HTH.

REgards

Inayath

*Plz rate if this is helpfull.

View solution in original post

5 Replies 5

mahmoodmkl
Level 7
Level 7

Hi

The virtual IP is configured on both the switches which are participating in HSRP and the virtual MAC is assigned by default based on u r group number.

The message exchange will decide which switch will be active and which one will be stanby.

Thanks

Hi,

Virtual IP i config only on 1 Switch  other switch has this config

Standby 2  IP

So my question was  this 2nd switch will learn the standby IP when it exchange HSRP hellos initially?

Thanks

Mahesh

mahmoodmkl
Level 7
Level 7

Hi
i havent tried this pratically but logically it should be learned

Sent from Cisco Technical Support iPhone App

InayathUlla Sharieff
Cisco Employee
Cisco Employee

Hi Mahesh,

Please find my understanding below:

=>When you configure the HSRP standby group number and IP at one end and other end  just with the standby group number, the interface will send the HSRP hello message over the interface in which the subset of CHSRP message contains the VIP ip address of the HSRP hence the other side learns it.

=>Active and Standby routers send periodic HSRP messages once the protocol has completed the election process.

=> I have done the Packet Capture on R3 F0/1 interface and you would see the hsrp hello packet which is coming from R2 ,see the subset of the packet you would find the CHSRP packet which will contain the Virtual IP this is how the other end will be able to learn the virtual ip address.


=>Please find the config and behaviour below:

R2---F0/1--------------------F0/1 --R3 (R3 has been configured with standby 3 ip 1.1.1.7)

R2#sh run int f0/1
Building configuration...

Current configuration : 114 bytes
!
interface FastEthernet0/1
ip address 1.1.1.5 255.255.255.0
duplex auto
speed auto
standby 3 ip 1.1.1.7
end


R3#sh run int f0/1
Building configuration...

Current configuration : 106 bytes
!
interface FastEthernet0/1
ip address 1.1.1.6 255.255.255.0
duplex auto
speed auto
standby 3 ip <<<
end


R3(config)#int f0/1
R3(config-if)#standby 3 ip <<<<<<<<<<<< HSRP enabled.
R3(config-if)#
*Mar  1 00:11:05.291: HSRP: Fa0/1 Starting minimum interface delay (1 secs)
*Mar  1 00:11:05.295: HSRP: Fa0/1 Grp 3 Set group MAC 0000.0000.0000 -> 0000.0c07.ac03 <<< HSRP hello sent.
*Mar  1 00:11:05.295: HSRP: Fa0/1 MAC entry 0000.0c07.ac03 created
*Mar  1 00:11:05.295: HSRP: Fa0/1 MAC entry 0000.0c07.ac03, Added Fa0/1 Grp 3 to list
*Mar  1 00:11:05.315: HSRP: Fa0/1 Grp 3 Disabled -> Init
*Mar  1 00:11:05.315: HSRP: Fa0/1 Grp 3 Redundancy "hsrp-Fa0/1-3" state Disabled -> Init
*Mar  1 00:11:05.319: HSRP: Fa0/1 IP Redundancy "hsrp-Fa0/1-3" added
*Mar  1 00:11:05.319: HSRP: Fa0/1 IP Redundancy "hsrp-Fa0/1-3" update, Disabled -> Init
R3(config-if)#
*Mar  1 00:11:05.611: HSRP: Fa0/1 Grp 3 Hello  in  1.1.1.5 Active  pri 100 vIP 1.1.1.7  <<<<< Deducted the priority of the HSRP group and also learn the virtual ip address.
*Mar  1 00:11:05.615: HSRP: Fa0/1 Grp 3 Active router is 1.1.1.5
*Mar  1 00:11:05.615: HSRP: Fa0/1 Nbr 1.1.1.5 created
*Mar  1 00:11:05.615: HSRP: Fa0/1 Nbr 1.1.1.5 active for group 3
*Mar  1 00:11:05.615: HSRP: Fa0/1 Added 1.1.1.7 to hash table
*Mar  1 00:11:05.619: HSRP: Fa0/1 IP Redundancy "hsrp-Fa0/1-3" address change 1.1.1.7 added
*Mar  1 00:11:06.291: HSRP: Fa0/1 Interface min delay expired
*Mar  1 00:11:06.291: HSRP: Fa0/1 Grp 3 Init: a/HSRP enabled
*Mar  1 00:11:06.291: HSRP: Fa0/1 Grp 3 Init -> Listen
*Mar  1 00:11:06.291: HSRP: Fa0/1 Interface adv out, Passive, active 0 passive 1
*Mar  1 00:11:06.295: HSRP: Fa0/1 Grp 3 Redundancy "hsrp-Fa0/1-3" state Init -> Backup
*Mar  1 00:11:06.295: HSRP: Fa0/1 IP Redundancy "hsrp-Fa0/1-3" update, Init -> Backup
*Mar  1 00:11:08.559: HSRP: Fa0/1 Grp 3 Hello  in  1.1.1.5 Active  pri 100 vIP 1.1.1.7
*Mar  1 00:11:09.315: HSRP: Fa0/1 Grp 3 Hello  in  1.1.1.5 Active  pri 100 vIP 1.1.1.7
*Mar  1 00:11:11.567: HSRP: Fa0/1 Grp 3 Hello  in  1.1.1.5 Active  pri 100 vIP 1.1.1.7
*Mar  1 00:11:14.531: HSRP: Fa0/1 Grp 3 Hello  in  1.1.1.5 Active  pri 100 vIP 1.1.1.7
*Mar  1 00:11:16.291: HSRP: Fa0/1 Grp 3 Listen: d/Standby timer expired (unknown)
*Mar  1 00:11:16.291: HSRP: Fa0/1 Grp 3 Listen -> Speak
*Mar  1 00:11:16.291: HSRP: Fa0/1 Grp 3 Redundancy "hsrp-Fa0/1-3" state Backup -> Speak
*Mar  1 00:11:16.295: HSRP: Fa0/1 Grp 3 Hello  out 1.1.1.6 Speak   pri 100 vIP 1.1.1.7
*Mar  1 00:11:16.295: HSRP: Fa0/1 IP Redundancy "hsrp-Fa0/1-3" update, Backup -> Speak
*Mar  1 00:11:17.631: HSRP: Fa0/1 Grp 3 Hello  in  1.1.1.5 Active  pri 100 vIP 1.1.1.7
*Mar  1 00:11:18.047: HSRP: Fa0/1 Grp 3 Hello  in  1.1.1.5 Active  pri 100 vIP 1.1.1.7
*Mar  1 00:11:19.295: HSRP: Fa0/1 Grp 3 Hello  out 1.1.1.5 Speak   pri 100 vIP 1.1.1.7
*Mar  1 00:11:20.515: HSRP: Fa0/1 Grp 3 Hello  in  1.1.1.5 Active  pri 100 vIP 1.1.1.7
*Mar  1 00:11:22.295: HSRP: Fa0/1 Grp 3 Hello  out 1.1.1.6 Speak   pri 100 vIP 1.1.1.7
*Mar  1 00:11:23.527: HSRP: Fa0/1 Grp 3 Hello  in  1.1.1.5 Active  pri 100 vIP 1.1.1.7
*Mar  1 00:11:25.295: HSRP: Fa0/1 Grp 3 Hello  out 1.1.1.6 Speak   pri 100 vIP 1.1.1.7
*Mar  1 00:11:26.291: HSRP: Fa0/1 Grp 3 Speak: d/Standby timer expired (unknown)
*Mar  1 00:11:26.291: HSRP: Fa0/1 Grp 3 Standby router is local
*Mar  1 00:11:26.291: HSRP: Fa0/1 Grp 3 Speak -> Standby
*Mar  1 00:11:26.291: %HSRP-5-STATECHANGE: FastEthernet0/1 Grp 3 state Speak -> Standby
*Mar  1 00:11:26.295: HSRP: Fa0/1 Grp 3 Redundancy "hsrp-Fa0/1-3" state Speak -> Standby
*Mar  1 00:11:26.295: HSRP: Fa0/1 Grp 3 Hello  out 1.1.1.5 Standby pri 100 vIP 1.1.1.7
*Mar  1 00:11:26.299: HSRP: Fa0/1 IP Redundancy "hsrp-Fa0/1-3" standby, unknown -> local
*Mar  1 00:11:26.299: HSRP: Fa0/1 IP Redundancy "hsrp-Fa0/1-3" update, Speak -> Standby

*
R3#show standby
FastEthernet0/1 - Group 3
  State is Standby
    1 state change, last state change 00:01:16
  Virtual IP address is 1.1.1.7 (learnt)
  Active virtual MAC address is 0000.0c07.ac03
    Local virtual MAC address is 0000.0c07.ac03 (v1 default)
  Hello time 3 sec, hold time 10 sec
    Next hello sent in 1.456 secs
  Preemption disabled
  Active router is 1.1.1.6, priority 100 (expires in 8.732 sec)
  Standby router is local
  Priority 100 (default 100)
  Group name is "hsrp-Fa0/1-3" (default)

HTH.

REgards

Inayath

*Plz rate if this is helpfull.

Hi Inayath,

Many thanks for implementing this is in Lab and showing me how  the second switch learn the Virtual IP address.

+ 5 to you.

Best regards

MAhesh

Review Cisco Networking products for a $25 gift card