rfc2338.txt
来自「RFC 的详细文档!」· 文本 代码 · 共 1,516 行 · 第 1/4 页
TXT
1,516 行
Master election. However, the typical scenario assumptions are
likely to cover the vast majority of deployments, loss of the Master
router is infrequent, and the expected duration in Master election
convergence is quite small ( << 1 second ). Thus the VRRP
optimizations represent significant simplifications in the protocol
design while incurring an insignificant probability of brief network
degradation.
Knight, et. al. Standards Track [Page 7]
RFC 2338 VRRP April 1998
4. Sample Configurations
4.1 Sample Configuration 1
The following figure shows a simple network with two VRRP routers
implementing one virtual router. Note that this example is provided
to help understand the protocol, but is not expected to occur in
actual practice.
+-----+ +-----+
| MR1 | | BR1 |
| | | |
| | | |
VRID=1 +-----+ +-----+
IP A ---------->* *<--------- IP B
| |
| |
| |
------------------+------------+-----+--------+--------+--------+--
^ ^ ^ ^
| | | |
(IP A) (IP A) (IP A) (IP A)
| | | |
+--+--+ +--+--+ +--+--+ +--+--+
| H1 | | H2 | | H3 | | H4 |
+-----+ +-----+ +--+--+ +--+--+
Legend:
---+---+---+-- = Ethernet, Token Ring, or FDDI
H = Host computer
MR = Master Router
BR = Backup Router
* = IP Address
(IP) = default router for hosts
The above configuration shows a very simple VRRP scenario. In this
configuration, the end-hosts install a default route to the IP
address of virtual router #1 (IP A) and both routers run VRRP. The
router on the left becomes the Master for virtual router #1 (VRID=1)
and the router on the right is the Backup for virtual router #1. If
the router on the left should fail, the other router will take over
virtual router #1 and its IP addresses, and provide uninterrupted
service for the hosts.
Note that in this example, IP B is not backed up by the router on the
left. IP B is only used by the router on the right as its interface
address. In order to backup IP B, a second virtual router would have
to be configured. This is shown in the next section.
Knight, et. al. Standards Track [Page 8]
RFC 2338 VRRP April 1998
4.2 Sample Configuration 2
The following figure shows a configuration with two virtual routers
with the hosts spitting their traffic between them. This example is
expected to be very common in actual practice.
+-----+ +-----+
| MR1 | | MR2 |
| & | | & |
| BR2 | | BR1 |
VRID=1 +-----+ +-----+ VRID=2
IP A ---------->* *<---------- IP B
| |
| |
| |
------------------+------------+-----+--------+--------+--------+--
^ ^ ^ ^
| | | |
(IP A) (IP A) (IP B) (IP B)
| | | |
+--+--+ +--+--+ +--+--+ +--+--+
| H1 | | H2 | | H3 | | H4 |
+-----+ +-----+ +--+--+ +--+--+
Legend:
---+---+---+-- = Ethernet, Token Ring, or FDDI
H = Host computer
MR = Master Router
BR = Backup Router
* = IP Address
(IP) = default router for hosts
In the above configuration, half of the hosts install a default route
to virtual router #1's IP address (IP A), and the other half of the
hosts install a default route to virtual router #2's IP address (IP
B). This has the effect of load balancing the outgoing traffic,
while also providing full redundancy.
5.0 Protocol
The purpose of the VRRP packet is to communicate to all VRRP routers
the priority and the state of the Master router associated with the
Virtual Router ID.
VRRP packets are sent encapsulated in IP packets. They are sent to
the IPv4 multicast address assigned to VRRP.
Knight, et. al. Standards Track [Page 9]
RFC 2338 VRRP April 1998
5.1 VRRP Packet Format
This section defines the format of the VRRP packet and the relevant
fields in the IP header.
0 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| Type | Virtual Rtr ID| Priority | Count IP Addrs|
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Auth Type | Adver Int | Checksum |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| IP Address (1) |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| . |
| . |
| . |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| IP Address (n) |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Authentication Data (1) |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Authentication Data (2) |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
5.2 IP Field Descriptions
5.2.1 Source Address
The primary IP address of the interface the packet is being sent
from.
5.2.2 Destination Address
The IP multicast address as assigned by the IANA for VRRP is:
224.0.0.18
This is a link local scope multicast address. Routers MUST NOT
forward a datagram with this destination address regardless of its
TTL.
5.2.3 TTL
The TTL MUST be set to 255. A VRRP router receiving a packet with
the TTL not equal to 255 MUST discard the packet.
Knight, et. al. Standards Track [Page 10]
RFC 2338 VRRP April 1998
5.2.4 Protocol
The IP protocol number assigned by the IANA for VRRP is 112
(decimal).
5.3 VRRP Field Descriptions
5.3.1 Version
The version field specifies the VRRP protocol version of this packet.
This document defines version 2.
5.3.2 Type
The type field specifies the type of this VRRP packet. The only
packet type defined in this version of the protocol is:
1 ADVERTISEMENT
A packet with unknown type MUST be discarded.
5.3.3 Virtual Rtr ID (VRID)
The Virtual Router Identifier (VRID) field identifies the virtual
router this packet is reporting status for.
5.3.4 Priority
The priority field specifies the sending VRRP router's priority for
the virtual router. Higher values equal higher priority. This field
is an 8 bit unsigned integer field.
The priority value for the VRRP router that owns the IP address(es)
associated with the virtual router MUST be 255 (decimal).
VRRP routers backing up a virtual router MUST use priority values
between 1-254 (decimal). The default priority value for VRRP routers
backing up a virtual router is 100 (decimal).
The priority value zero (0) has special meaning indicating that the
current Master has stopped participating in VRRP. This is used to
trigger Backup routers to quickly transition to Master without having
to wait for the current Master to timeout.
5.3.5 Count IP Addrs
The number of IP addresses contained in this VRRP advertisement.
Knight, et. al. Standards Track [Page 11]
RFC 2338 VRRP April 1998
5.3.6 Authentication Type
The authentication type field identifies the authentication method
being utilized. Authentication type is unique on a per interface
basis. The authentication type field is an 8 bit unsigned integer.
A packet with unknown authentication type or that does not match the
locally configured authentication method MUST be discarded.
The authentication methods currently defined are:
0 - No Authentication
1 - Simple Text Password
2 - IP Authentication Header
5.3.6.1 No Authentication
The use of this authentication type means that VRRP protocol
exchanges are not authenticated. The contents of the Authentication
Data field should be set to zero on transmission and ignored on
reception.
5.3.6.2 Simple Text Password
The use of this authentication type means that VRRP protocol
exchanges are authenticated by a clear text password. The contents
of the Authentication Data field should be set to the locally
configured password on transmission. There is no default password.
The receiver MUST check that the Authentication Data in the packet
matches its configured authentication string. Packets that do not
match MUST be discarded.
Note that there are security implications to using Simple Text
password authentication, and one should see the Security
Consideration section of this document.
5.3.6.3 IP Authentication Header
The use of this authentication type means the VRRP protocol exchanges
are authenticated using the mechanisms defined by the IP
Authentication Header [AUTH] using "The Use of HMAC-MD5-96 within ESP
and AH" [HMAC]. Keys may be either configured manually or via a key
distribution protocol.
If a packet is received that does not pass the authentication check
due to a missing authentication header or incorrect message digest,
then the packet MUST be discarded. The contents of the
Authentication Data field should be set to zero on transmission and
ignored on reception.
Knight, et. al. Standards Track [Page 12]
RFC 2338 VRRP April 1998
5.3.7 Advertisement Interval (Adver Int)
The Advertisement interval indicates the time interval (in seconds)
between ADVERTISEMENTS. The default is 1 second. This field is used
for troubleshooting misconfigured routers.
5.3.8 Checksum
The checksum field is used to detect data corruption in the VRRP
message.
The checksum is the 16-bit one's complement of the one's complement
sum of the entire VRRP message starting with the version field. For
computing the checksum, the checksum field is set to zero.
5.3.9 IP Address(es)
One or more IP addresses that are associated with the virtual router.
The number of addresses included is specified in the "Count IP Addrs"
field. These fields are used for troubleshooting misconfigured
routers.
5.3.10 Authentication Data
The authentication string is currently only utilized for simple text
authentication, similar to the simple text authentication found in
the Open Shortest Path First routing protocol [OSPF]. It is up to 8
characters of plain text. If the configured authentication string is
shorter than 8 bytes, the remaining space MUST be zero-filled. Any
VRRP packet received with an authentication string that does not
match the locally configured authentication string MUST be discarded.
The authentication string is unique on a per interface basis.
There is no default value for this field.
6. Protocol State Machine
6.1 Parameters
6.1.1 Parameters per Interface
Authentication_Type Type of authentication being used. Values
are defined in section 5.3.6.
Authentication_Data Authentication data specific to the
Authentication_Type being used.
Knight, et. al. Standards Track [Page 13]
RFC 2338 VRRP April 1998
6.1.2 Parameters per Virtual Router
VRID Virtual Router Identifier. Configured item
in the range 1-255 (decimal). There is no
default.
Priority Priority value to be used by this VRRP
router in Master election for this virtual
router. The value of 255 (decimal) is
reserved for the router that owns the IP
addresses associated with the virtual
router. The value of 0 (zero) is reserved
for Master router to indicate it is
releasing responsibility for the virtual
router. The range 1-254 (decimal) is
available for VRRP routers backing up the
virtual router. The default value is 100
(decimal).
IP_Addresses One or more IP addresses associated with
this virtual router. Configured item. No
default.
Advertisement_Interval Time interval between ADVERTISEMENTS
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?