P Commands
This chapter describes the Cisco NX-OS Hot Standby Router Protocol (HSRP) commands that begin with P.
preempt (HSRP)
To configure a preemption delay, use the preempt command. To disable this feature, use the no form of this command.
preempt [delay {minimum min-delay | reload rel-delay | sync sync-delay}]
no preempt [delay {minimum min-delay | reload rel-delay | sync sync-delay}]
Syntax Description
Command Default
The default delay time for all options is 0 seconds.
Command Modes
Interface configuration or HSRP template mode
Command History
|
|
---|---|
5.0(3)N1(1) |
This command was introduced. |
Usage Guidelines
Specifying a minimum delay allows routing tables to be updated before a router becomes active. When a router first comes up, it does not have a complete routing table. A high-priority router will only delay preemption if it first receives a hello packet from a low-priority active router. If the high-priority router does not receive a hello packet from the low-priority active router when it is starting up, it assumes there is no active router for the group and becomes active as soon as possible.
Examples
This example shows how to configure a delay when a router becomes active when its priority is 110:
switch# configure terminal
switch(config)# interface ethernet 0/1
switch(config-if)# no switchport
switch(config-if)# ip address 10.0.0.1 255.255.255.0
switch(config-if)# hsrp 4
switch(config-if-hsrp)# priority 110
switch(config-if-hsrp)# preempt
switch(config-if-hsrp)# authentication text sanjose
switch(config-if-hsrp)# ip 10.0.0.3
switch(config-if-hsrp)# end
Related Commands
|
|
---|---|
feature hsrp |
Enables the HSRP configuration. |
show hsrp |
Displays HSRP information. |
priority (HSRP)
To set the priority level within a Hot Standby Router Protocol (HSRP) group, use the priority command. To remove the priority level, use the no form of this command.
priority level [forwarding-threshold lower lower-value upper upper-value]
no priority level [forwarding-threshold lower lower-value upper upper-value]
Syntax Description
Command Default
level: 100
lower-value: 1
upper-value: 255
Command Modes
HSRP configuration or HSRP template mode
Command History
|
|
---|---|
5.0(3)N1(1) |
This command was introduced. |
Usage Guidelines
Use the priority command to control which virtual router becomes the active router. HSRP compares the priorities of all virtual routers in the HSRP group and selects the router with the numerically highest priority. If two virtual routers have equal priority, HSRP selects the router with the highest IP address.
Examples
This example shows how to configure a virtual router with a priority of 254:
switch# configure terminal
switch(config)# interface ethernet 0/1
switch(config-if)# no switchport
switch(config-if)# ip address 10.0.0.1 255.255.255.0
switch(config-if)# hsrp 4
switch(config-if-hsrp)# priority 254
Related Commands
|
|
---|---|
feature hsrp |
Enables the HSRP configuration. |
show hsrp |
Displays HSRP information. |