I Commands
This chapter describes the Cisco NX-OS Hot Standby Router Protocol (HSRP) commands that begin with I.
ip (HSRP)
To assign a virtual address to an HSRP group, use the ip command. To disable HSRP in the group, use the no form of this command.
ip [autoconfig | ip-address [secondary]]
no ip [autoconfig | ip-address [secondary]]
Syntax Description
Command Default
Disabled
Command Modes
HSRP configuration mode
Command History
|
|
---|---|
5.0(3)N1(1) |
This command was introduced. |
Usage Guidelines
Use the ip command to activate HSRP on the configured interface. If you configure a virtual IP address, that address is the designated virtual IP address for the entire HSRP group. For IPv4 groups, if you do not configure a virtual IP address, the gateway learns the virtual IP address from another gateway in the same HSRP group. To allow HSRP to elect an active virtual gateway (AVG), you must configure at least one gateway on the LAN with a virtual IP address.
Configuring the virtual IP address on the AVG always overrides a virtual IP address that is in use.
When you configure the ip command for an IPv4 HSRP group on an interface, the handling of proxy Address Resolution Protocol (ARP) requests changes (unless proxy ARP was disabled). Hosts send ARP requests to map an IP address to a MAC address. The HSRP gateway intercepts the ARP requests and replies to the ARP requests on behalf of the connected nodes. If a forwarder in the HSRP group is active, proxy ARP requests are answered using the MAC address of the first active forwarder in the group. If no forwarder is active, proxy ARP responses are suppressed.
Note You must configure all HSRP options before you use the ip command to assign a virtual IP address and activate the HSRP group so that you can avoid authentication error messages and unexpected state changes that can occur in other routers when a group is enabled first and then there is a delay before the configuration is created. We recommend that you always specify an IP address.
Examples
This example shows how to activate HSRP for group 10 on Ethernet interface 1/1. The virtual IP address used by the HSRP group is set to 192.0.2.10.
switch# configure terminal
switch(config)# interface ethernet 1/1
switch(config-if)# no switchport
switch(config-if)# ip address 192.0.2.32 255.255.255.0
switch(config-if)# hsrp 10
switch(config-if-hsrp)# ip 192.0.2.10
This example shows how to activate HSRP for group 10 on Ethernet interface 2/1. The virtual IP address used by the HSRP group will be learned from another gateway configured to be in the same HSRP group.
switch(config)# interface ethernet 2/1
switch(config-if)# no switchport
switch(config-if)# hsrp 10
switch(config-if-hsrp)#
This example shows how to activate HSRP for group 2 on Ethernet interface 1/1 and creates a secondary IP address on the interface:
switch# configure terminal
switch(config)# interface ethernet 1/1
switch(config-if)# no switchport
switch(config-if)# ip address 20.20.20.1 255.255.255.0 secondary
switch(config-if)# ip address 10.10.10.1 255.255.255.0
switch(config-if)# hsrp 2
switch(config-if-hsrp)# ip 10.10.10.2
switch(config-if-hsrp)# ip 20.20.20.2 secondary
Related Commands
|
|
---|---|
feature hsrp |
Enables the HSRP configuration. |
show hsrp |
Displays HSRP information. |
ipv6 (HSRP)
To assign a virtual address to an HSRP group, use the ip command. To disable HSRP in the group, use the no form of this command.
ipv6 [autoconfig | ip-address [secondary]]
no ipv6 [autoconfig | ip-address [secondary]]
Syntax Description
Command Default
Disabled
Command Modes
HSRP configuration mode
Command History
|
|
---|---|
5.2(1)N1(1) |
This command was introduced. |
Usage Guidelines
Use the ipv6 command to activate HSRP on the configured interface. If you configure a virtual IPv6 address, that address is the designated virtual IPv6 address for the entire HSRP group. For IPv6 groups, if you do not configure a virtual IPv6 address, the gateway learns the virtual IPv6 address from another gateway in the same HSRP group. To allow HSRP to elect an active virtual gateway (AVG), you must configure at least one gateway on the LAN with a virtual IPv6 address.
Configuring the virtual IPv6 address on the AVG always overrides a virtual IPv6 address that is in use.
When you configure the ipv6 command for an IPv6 HSRP group on an interface, the handling of proxy Address Resolution Protocol (ARP) requests changes (unless proxy ARP was disabled). Hosts send ARP requests to map an IPv6 address to a MAC address. The HSRP gateway intercepts the ARP requests and replies to the ARP requests on behalf of the connected nodes. If a forwarder in the HSRP group is active, proxy ARP requests are answered using the MAC address of the first active forwarder in the group. If no forwarder is active, proxy ARP responses are suppressed.
Note You must configure all HSRP options before you use the ipv6 command to assign a virtual IPv6 address and activate the HSRP group so that you can avoid authentication error messages and unexpected state changes that can occur in other routers when a group is enabled first and then there is a delay before the configuration is created. We recommend that you always specify an IPv6 address.
Examples
This example shows how to activate HSRP for group 10 on Ethernet interface 1/1. The virtual IPv6 address used by the HSRP group is set to 192.0.2.10.
switch# configure terminal
switch(config)# interface ethernet 1/1
switch(config-if)# no switchport
switch(config-if)# ipv6 address 192.0.2.32 255.255.255.0
switch(config-if)# hsrp 10
switch(config-if-hsrp)# ipv6 192.0.2.10
This example shows how to activate HSRP for group 10 on Ethernet interface 2/1. The virtual IPv6 address used by the HSRP group will be learned from another gateway configured to be in the same HSRP group.
switch(config)# interface ethernet 2/1
switch(config-if)# no switchport
switch(config-if)# hsrp 10
switch(config-if-hsrp)#
This example shows how to activate HSRP for group 2 on Ethernet interface 1/1 and creates a secondary IPv6 address on the interface:
switch# configure terminal
switch(config)# interface ethernet 1/1
switch(config-if)# no switchport
switch(config-if)# ipv6 address 20.20.20.1 255.255.255.0 secondary
switch(config-if)# ipv6 address 10.10.10.1 255.255.255.0
switch(config-if)# hsrp 2
switch(config-if-hsrp)# ipv6 10.10.10.2
switch(config-if-hsrp)# ipv6 20.20.20.2 secondary
Related Commands
|
|
---|---|
feature hsrp |
Enables the HSRP configuration. |
show hsrp |
Displays HSRP information. |