📄 rfc2281.txt
字号:
the active router. The Holdtime SHOULD only be learned if the
Hello message is authenticated. A router that sends a Hello
message MUST insert the Holdtime that it is using in the Holdtime
field in the Hello message.
A router which is in active state MUST NOT learn new values for
the Hellotime and the Holdtime from other routers, although it may
continue to use values which it learned from the previous active
router. It MAY also use the Hellotime and Holdtime values learned
through manual configuration. The active router MUST NOT use one
configured time and one learned time. If the Holdtime is not
learned and it is not manually configured, a default value of 10
seconds is RECOMMENDED.
Li, et. al. Informational [Page 6]
RFC 2281 Cisco HSRP March 1998
Priority: 1 octet
This field is used to elect the active and standby routers. When
comparing priorities of two different routers, the router with the
numerically higher priority wins. In the case of routers with
equal priority the router with the higher IP address wins.
Group: 1 octet
This field identifies the standby group. For Token Ring, values
between 0 and 2 inclusive are valid. For other media values
between 0 and 255 inclusive are valid.
Authentication Data: 8 octets
This field contains a clear-text 8 character reused password.
If no authentication data is configured, the RECOMMENDED default
value is 0x63 0x69 0x73 0x63 0x6F 0x00 0x00 0x00.
Virtual IP Address: 4 octets
The virtual IP address used by this group.
If the virtual IP address is not configured on a router, then it
MAY be learned from the Hello message from the active router. An
address SHOULD only be learned if no address was configured and
the Hello message is authenticated.
5.2 Operational parameters
The following information MUST be known to each router in the standby
group. The mechanisms used to determine this information are outside
of the scope of this document.
Standby group number
Virtual MAC address
Priority
Authentication Data
Hellotime
Holdtime
Li, et. al. Informational [Page 7]
RFC 2281 Cisco HSRP March 1998
The following information MUST be known to at least one router in
each standby group and MAY be known by any of the other routers in
the group.
Virtual IP Address
The following information MAY be configured on any router:
Preemption capability
If a router has higher priority than the active router and
preemption is configured, it MAY take over as the active router
using a Coup message.
5.3 States
Each router in the group participates in the protocol by implementing
a simple state machine. This specification describes the externally
visible behavior of this state machine. Implementations MAY vary
their internal implementations within the functional description of
the state machine.
All routers begin in the Initial state. This section discusses the
intent of each state. For specific details on the actions taken in
each state, please see the state transition table in section 5.7.
1. Initial
This is the starting state and indicates that HSRP is not running.
This state is entered via a configuration change or when an
interface first comes up.
2. Learn
The router has not determined the virtual IP address, and not yet
seen an authenticated Hello message from the active router. In
this state the router is still waiting to hear from the active
router.
3. Listen
The router knows the virtual IP address, but is neither the active
router nor the standby router. It listens for Hello messages from
those routers.
Li, et. al. Informational [Page 8]
RFC 2281 Cisco HSRP March 1998
4. Speak
The router sends periodic Hello messages and is actively
participating in the election of the active and/or standby router.
A router cannot enter Speak state unless it has the virtual IP
address.
5. Standby
The router is a candidate to become the next active router and
sends periodic Hello messages. Excluding transient conditions,
there MUST be at most one router in the group in Standby state.
6. Active
The router is currently forwarding packets that are sent to the
group's virtual MAC address. The router sends periodic Hello
messages. Excluding transient conditions, there MUST be at most
one router in Active state in the group.
5.4 Timers
Each router maintains three timers, an Active timer, a Standby timer,
and a Hello timer.
The Active timer is used to monitor the active router. The active
timer is started anytime an authenticated Hello message is seen from
the active router. It is set to expire in the Holdtime seen in the
Hello message.
The Standby timer is used to monitor the standby router The Standby
timer is started anytime an authenticated Hello message is seen from
the standby router. It is set to expire in the Holdtime seen in the
Hello message.
The Hello timer expires once per Hellotime period. If the router is
in Speak, Standby, or Active states, it should generate a Hello
message upon Hello timer expiry. The Hello timer MUST be jittered.
5.5 Events
These are the events in the HSRP finite state machine.
a - HSRP is configured on an enabled interface.
b - HSRP is disabled on an interface or the interface is disabled.
Li, et. al. Informational [Page 9]
RFC 2281 Cisco HSRP March 1998
c - Active timer expiry. The Active timer was set to the Holdtime
when the last Hello message was seen from the active router.
d - Standby timer expiry. The Standby timer was set to the
Holdtime when the last Hello message was seen from the standby
router.
e - Hello timer expiry. The periodic timer for sending Hello
messages has expired.
f - Receipt of a Hello message of higher priority from a router in
Speak state.
g - Receipt of a Hello message of higher priority from the active
router.
h - Receipt of a Hello message of lower priority from the active
router.
i - Receipt of a Resign message from the active router.
j - Receipt of a Coup message from a higher priority router.
k - Receipt of a Hello message of higher priority from the standby
router.
l - Receipt of a Hello message of lower priority from the standby
router.
5.6 Actions
This section specifies the actions to be taken as part of the state
machine.
A Start Active Timer
If this action occurred as the result of the receipt of a an
authenticated Hello message from the active router, the Active
timer is set to the Holdtime field in the Hello message.
Otherwise the Active timer is set to the current Holdtime value
in use by this router. The Active timer is then started.
B Start Standby Timer
If this action occurred as the result of the receipt of an
authenticated Hello message from the standby router, the
Standby timer is set to the Holdtime field in the Hello
message. Otherwise the Standby timer is set to the current
hold time value in use by this router. The Standby timer is
then started.
Li, et. al. Informational [Page 10]
RFC 2281 Cisco HSRP March 1998
C Stop Active Timer
The Active timer is stopped.
D Stop Standby Timer
The Standby timer is stopped.
E Learn Parameters
This action is taken when an authenticated message is received
from the active router. If the virtual IP address for this
group was not manually configured, the virtual IP address MAY
be learned from the message. The router MAY learn Hellotime
and Holdtime values from the message.
F Send Hello Message
The router sends a Hello message with its current State,
Hellotime and Holdtime.
G Send Coup Message
The router sends a Coup message to inform the active router
that there is a higher priority router available.
H Send Resign Message
The router sends a Resign message to allow another router to
become the active router.
I Send Gratuitous ARP Message
The router broadcasts an ARP response packet advertising the
group's virtual IP address and virtual MAC address. The packet
is sent using the virtual MAC address as the source MAC address
in the link layer header, as well as within the ARP packet.
5.7 State Transitions
This table describes the state transitions of the state machine. For
each event and current state of the router, the router MUST perform
the set of actions specified and transition to the designated state.
If no action is specified, no action should be taken. If no state
change is specified, no state change should be performed.
The notation used in this table has the specified set of actions
listed as letters corresponding to the actions listed in section 5.6.
The next state is listed as a number as specified in section 5.3. A
slash ('/') separates the actions and states. Certain state
transitions have alternatives which depend on external state.
Alternatives are separated by a '|'. See the attached notes for
details on these transitions.
Li, et. al. Informational [Page 11]
RFC 2281 Cisco HSRP March 1998
States
+-----+----------+----------+----------+----------+----------+----------+
| | 1 | 2 | 3 | 4 | 5 | 6 |
| | Initial | Learn | Listen | Speak | Standby | Active |
+-----+----------+----------+----------+----------+----------+----------+
|Event| |
+-----+----------+----------+----------+----------+----------+----------+
| a | AB/2|3+ | | | | | |
+-----+----------+----------+----------+----------+----------+----------+
| b | | CD/1 | CD/1 | CD/1 | CD/1 | CDH/1 |
+-----+----------+----------+----------+----------+----------+----------+
| c | | | AB/4 | | CDFI/6 | |
+-----+----------+----------+----------+----------+----------+----------+
| d | | | B/4 | D/5 | | |
+-----+----------+----------+----------+----------+----------+----------+
| e | | | | F | F | F |
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -