📄 rfc2281.txt
字号:
Network Working Group T. LiRequest for Comments: 2281 Juniper NetworksCategory: Informational B. Cole Juniper Networks P. Morton Cisco Systems D. Li Cisco Systems March 1998 Cisco Hot Standby Router Protocol (HSRP)Status of this Memo This memo provides information for the Internet community. It does not specify an Internet standard of any kind. Distribution of this memo is unlimited.Copyright Notice Copyright (C) The Internet Society (1998). All Rights Reserved.IESG Note This document reflects an existing deployed protocol. The IETF does have a working group which is in the process of producing a standards track protocol to address the same issues.Abstract The memo specifies the Hot Standby Router Protocol (HSRP). The goal of the protocol is to allow hosts to appear to use a single router and to maintain connectivity even if the actual first hop router they are using fails. Multiple routers participate in this protocol and in concert create the illusion of a single virtual router. The protocol insures that one and only one of the routers is forwarding packets on behalf of the virtual router. End hosts forward their packets to the virtual router. The router forwarding packets is known as the active router. A standby router is selected to replace the active router should it fail. The protocol provides a mechanism for determining active and standby routers, using the IP addresses on the participating routers. If an active router fails a standby router can take over without a major interruption in the host's connectivity. This memo also discusses the ARP, MAC address, and security issues with this protocol.Li, et. al. Informational [Page 1]RFC 2281 Cisco HSRP March 1998TABLE OF CONTENTS 1 Introduction .............................................. 2 2 Conditions of Use ......................................... 3 3 Scope ..................................................... 4 3.1 Terminology ............................................... 4 4 Definitions ............................................... 4 5 Protocol .................................................. 4 5.1 Packet formats ............................................ 4 5.2 Operational parameters .................................... 7 5.3 States .................................................... 8 5.4 Timers .................................................... 9 5.5 Events .................................................... 9 5.6 Actions ................................................... 10 5.7 State Transitions.......................................... 11 6 MAC address considerations ................................ 13 6.1 General ................................................... 13 6.2 Address Filter ............................................ 14 6.3 ICMP Redirect ............................................. 14 6.4 Proxy ARP ................................................. 15 7 Security Considerations ................................... 15 8 References ................................................ 15 9 Authors' Addresses ........................................ 16 10 Full Copyright Statement .................................. 171. Introduction The Hot Standby Router Protocol, HSRP, provides a mechanism which is designed to support non-disruptive failover of IP traffic in certain circumstances. In particular, the protocol protects against the failure of the first hop router when the source host cannot learn the IP address of the first hop router dynamically. The protocol is designed for use over multi-access, multicast or broadcast capable LANs (e.g., Ethernet). HSRP is not intended as a replacement for existing dynamic router discovery mechanisms and those protocols should be used instead whenever possible [1]. A large class of legacy host implementations that do not support dynamic discovery are capable of configuring a default router. HSRP provides failover services to those hosts. All of the routers participating in HSRP are assumed to be running appropriate IP routing protocols and have a consistent set of routes. The discussion of which protocols are appropriate and whether routing is consistent in any given situation is beyond the scope of this specification.Li, et. al. Informational [Page 2]RFC 2281 Cisco HSRP March 1998 Using HSRP, a set of routers work in concert to present the illusion of a single virtual router to the hosts on the LAN. This set is known as an HSRP group or a standby group. A single router elected from the group is responsible for forwarding the packets that hosts send to the virtual router. This router is known as the active router. Another router is elected as the standby router. In the event that the active router fails, the standby assumes the packet forwarding duties of the active router. Although an arbitrary number of routers may run HSRP, only the active router forwards the packets sent to the virtual router. To minimize network traffic, only the active and the standby routers send periodic HSRP messages once the protocol has completed the election process. If the active router fails, the standby router takes over as the active router. If the standby router fails or becomes the active router, another router is elected as the standby router. On a particular LAN, multiple hot standby groups may coexist and overlap. Each standby group emulates a single virtual router. For each standby group, a single well-known MAC address is allocated to the group, as well as an IP address. The IP address SHOULD belong to the primary subnet in use on the LAN, but MUST differ from the addresses allocated as interface addresses on all routers and hosts on the LAN, including virtual IP addresses assigned to other HSRP groups. If multiple groups are used on a single LAN, load splitting can be achieved by distributing hosts among different standby groups. The remainder of this specification discusses the operation of a single standby group. In the case of multiple groups, each group operates independently of other groups on the LAN and according to this specification. Note that individual routers may participate in multiple groups. In this case, the router maintains separate state and timers for each group.2 Conditions of Use US Patent number 5,473,599 [2], assigned to Cisco Systems, Inc. may be applicable to HSRP. If an implementation requires the use of any claims of patent no. 5,473,599, Cisco will license such claims on reasonable, nondiscriminatory terms for use in practicing the standard. More specifically, such license will be available for a one-time, paid up fee.Li, et. al. Informational [Page 3]RFC 2281 Cisco HSRP March 19983 Scope This document describes the packets, messages, states, and events used to implement the protocol. It does not discuss network management or internal implementation issues.3.1 Terminology The language conventions of RFC 2119 [3] are used in this document.4 Definitions Active Router - the router that is currently forwarding packets for the virtual router Standby Router - the primary backup router Standby Group - the set of routers participating in HSRP that jointly emulate a virtual router Hello Time - the interval between successive HSRP Hello messages from a given router Hold Time - the interval between the receipt of a Hello message and the presumption that the sending router has failed5 Protocol Within a standby group, the routers periodically advertise state information using various messages.5.1 Packet formats The standby protocol runs on top of UDP, and uses port number 1985. Packets are sent to multicast address 224.0.0.2 with TTL 1. Routers use their actual IP address as the source address for protocol packets, not the virtual IP address. This is necessary so that the HSRP routers can identify each other. The format of the data portion of the UDP datagram is:Li, et. al. Informational [Page 4]RFC 2281 Cisco HSRP March 1998 1 2 3 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Version | Op Code | State | Hellotime | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Holdtime | Priority | Group | Reserved | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Authentication Data | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Authentication Data | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Virtual IP Address | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ Version: 1 octet The version of the HSRP messages. This document describes version 0. Op Code: 1 octet The Op Code describes the type of message contained in this packet. Possible values are: 0 - Hello 1 - Coup 2 - Resign Hello messages are sent to indicate that a router is running and is capable of becoming the active or standby router. Coup messages are sent when a router wishes to become the active router. Resign messages are sent when a router no longer wishes to be the active router. State: 1 octet Internally, each router in the standby group implements a state machine. The State field describes the current state of the router sending the message. Details on the individual states are described below. Possible values are:Li, et. al. Informational [Page 5]RFC 2281 Cisco HSRP March 1998 0 - Initial 1 - Learn 2 - Listen 4 - Speak 8 - Standby 16 - Active Hellotime: 1 octet This field is only meaningful in Hello messages. It contains the approximate period between the Hello messages that the router sends. The time is given in seconds. If the Hellotime is not configured on a router, then it MAY be learned from the Hello message from the active router. The Hellotime SHOULD only be learned if no Hellotime is configured and the Hello message is authenticated. A router that sends a Hello message MUST insert the Hellotime that it is using in the Hellotime field in the Hello message. If the Hellotime is not learned from a Hello message from the active router and it is not manually configured, a default value of 3 seconds is RECOMMENDED. Holdtime: 1 octet This field is only meaningful in Hello messages. It contains the amount of time that the current Hello message should be considered valid. The time is given in seconds. If a router sends a Hello message, then receivers should consider that Hello message to be valid for one Holdtime. The Holdtime SHOULD be at least three times the value of the Hellotime and MUST be greater than the Hellotime. If the Holdtime is not configured on a router, then it MAY be learned from the Hello message from
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -