rfc2003.txt
来自「RFC 的详细文档!」· 文本 代码 · 共 788 行 · 第 1/3 页
TXT
788 行
See also Section 4.4.
The encapsulator may use any existing IP mechanisms appropriate for
delivery of the encapsulated payload to the tunnel exit point. In
particular, use of IP options is allowed, and use of fragmentation is
allowed unless the "Don't Fragment" bit is set in the inner IP
header. This restriction on fragmentation is required so that nodes
employing Path MTU Discovery [7] can obtain the information they
seek.
3.2. Routing Failures
Routing loops within a tunnel are particularly dangerous when they
cause datagrams to arrive again at the encapsulator. Suppose a
datagram arrives at a router for forwarding, and the router
Perkins Standards Track [Page 5]
RFC 2003 IP-within-IP October 1996
determines that the datagram has to be encapsulated before further
delivery. Then:
- If the IP Source Address of the datagram matches the router's own
IP address on any of its network interfaces, the router MUST NOT
tunnel the datagram; instead, the datagram SHOULD be discarded.
- If the IP Source Address of the datagram matches the IP address
of the tunnel destination (the tunnel exit point is typically
chosen by the router based on the Destination Address in the
datagram's IP header), the router MUST NOT tunnel the datagram;
instead, the datagram SHOULD be discarded.
See also Section 4.4.
4. ICMP Messages from within the Tunnel
After an encapsulated datagram has been sent, the encapsulator may
receive an ICMP [9] message from any intermediate router within the
tunnel other than the tunnel exit point. The action taken by the
encapsulator depends on the type of ICMP message received. When the
received message contains enough information, the encapsulator MAY
use the incoming message to create a similar ICMP message, to be sent
to the originator of the original unencapsulated IP datagram (the
original sender). This process will be referred to as "relaying" the
ICMP message from the tunnel.
ICMP messages indicating an error in processing a datagram include a
copy of (a portion of) the datagram causing the error. Relaying an
ICMP message requires that the encapsulator strip off the outer IP
header from this returned copy of the original datagram. For cases
in which the received ICMP message does not contain enough data to
relay the message, see Section 5.
4.1. Destination Unreachable (Type 3)
ICMP Destination Unreachable messages are handled by the encapsulator
depending upon their Code field. The model suggested here allows the
tunnel to "extend" a network to include non-local (e.g., mobile)
nodes. Thus, if the original destination in the unencapsulated
datagram is on the same network as the encapsulator, certain
Destination Unreachable Code values may be modified to conform to the
suggested model.
Perkins Standards Track [Page 6]
RFC 2003 IP-within-IP October 1996
Network Unreachable (Code 0)
An ICMP Destination Unreachable message SHOULD be returned
to the original sender. If the original destination in
the unencapsulated datagram is on the same network as the
encapsulator, the newly generated Destination Unreachable
message sent by the encapsulator MAY have Code 1 (Host
Unreachable), since presumably the datagram arrived at the
correct network and the encapsulator is trying to create the
appearance that the original destination is local to that
network even if it is not. Otherwise, if the encapsulator
returns a Destination Unreachable message, the Code field MUST
be set to 0 (Network Unreachable).
Host Unreachable (Code 1)
The encapsulator SHOULD relay Host Unreachable messages to the
sender of the original unencapsulated datagram, if possible.
Protocol Unreachable (Code 2)
When the encapsulator receives an ICMP Protocol Unreachable
message, it SHOULD send a Destination Unreachable message with
Code 0 or 1 (see the discussion for Code 0) to the sender of
the original unencapsulated datagram. Since the original
sender did not use protocol 4 in sending the datagram, it would
be meaningless to return Code 2 to that sender.
Port Unreachable (Code 3)
This Code should never be received by the encapsulator, since
the outer IP header does not refer to any port number. It MUST
NOT be relayed to the sender of the original unencapsulated
datagram.
Datagram Too Big (Code 4)
The encapsulator MUST relay ICMP Datagram Too Big messages to
the sender of the original unencapsulated datagram.
Source Route Failed (Code 5)
This Code SHOULD be handled by the encapsulator itself.
It MUST NOT be relayed to the sender of the original
unencapsulated datagram.
Perkins Standards Track [Page 7]
RFC 2003 IP-within-IP October 1996
4.2. Source Quench (Type 4)
The encapsulator SHOULD NOT relay ICMP Source Quench messages to the
sender of the original unencapsulated datagram, but instead SHOULD
activate whatever congestion control mechanisms it implements to help
alleviate the congestion detected within the tunnel.
4.3. Redirect (Type 5)
The encapsulator MAY handle the ICMP Redirect messages itself. It
MUST NOT not relay the Redirect to the sender of the original
unencapsulated datagram.
4.4. Time Exceeded (Type 11)
ICMP Time Exceeded messages report (presumed) routing loops within
the tunnel itself. Reception of Time Exceeded messages by the
encapsulator MUST be reported to the sender of the original
unencapsulated datagram as Host Unreachable (Type 3, Code 1). Host
Unreachable is preferable to Network Unreachable; since the datagram
was handled by the encapsulator, and the encapsulator is often
considered to be on the same network as the destination address in
the original unencapsulated datagram, then the datagram is considered
to have reached the correct network, but not the correct destination
node within that network.
4.5. Parameter Problem (Type 12)
If the Parameter Problem message points to a field copied from the
original unencapsulated datagram, the encapsulator MAY relay the ICMP
message to the sender of the original unencapsulated datagram;
otherwise, if the problem occurs with an IP option inserted by the
encapsulator, then the encapsulator MUST NOT relay the ICMP message
to the original sender. Note that an encapsulator following
prevalent current practice will never insert any IP options into the
encapsulated datagram, except possibly for security reasons.
4.6. Other ICMP Messages
Other ICMP messages are not related to the encapsulation operations
described within this protocol specification, and should be acted on
by the encapsulator as specified in [9].
Perkins Standards Track [Page 8]
RFC 2003 IP-within-IP October 1996
5. Tunnel Management
Unfortunately, ICMP only requires IP routers to return 8 octets (64
bits) of the datagram beyond the IP header. This is not enough to
include a copy of the encapsulated (inner) IP header, so it is not
always possible for the encapsulator to relay the ICMP message from
the interior of a tunnel back to the original sender. However, by
carefully maintaining "soft state" about tunnels into which it sends,
the encapsulator can return accurate ICMP messages to the original
sender in most cases. The encapsulator SHOULD maintain at least the
following soft state information about each tunnel:
- MTU of the tunnel (Section 5.1)
- TTL (path length) of the tunnel
- Reachability of the end of the tunnel
The encapsulator uses the ICMP messages it receives from the interior
of a tunnel to update the soft state information for that tunnel.
ICMP errors that could be received from one of the routers along the
tunnel interior include:
- Datagram Too Big
- Time Exceeded
- Destination Unreachable
- Source Quench
When subsequent datagrams arrive that would transit the tunnel, the
encapsulator checks the soft state for the tunnel. If the datagram
would violate the state of the tunnel (for example, the TTL of the
new datagram is less than the tunnel "soft state" TTL) the
encapsulator sends an ICMP error message back to the sender of the
original datagram, but also encapsulates the datagram and forwards it
into the tunnel.
Using this technique, the ICMP error messages sent by the
encapsulator will not always match up one-to-one with errors
encountered within the tunnel, but they will accurately reflect the
state of the network.
Tunnel soft state was originally developed for the IP Address
Encapsulation (IPAE) specification [4].
5.1. Tunnel MTU Discovery
When the Don't Fragment bit is set by the originator and copied into
the outer IP header, the proper MTU of the tunnel will be learned
from ICMP Datagram Too Big (Type 3, Code 4) messages reported to the
encapsulator. To support sending nodes which use Path MTU Discovery,
Perkins Standards Track [Page 9]
RFC 2003 IP-within-IP October 1996
all encapsulator implementations MUST support Path MTU Discovery [5,
7] soft state within their tunnels. In this particular application,
there are several advantages:
- As a benefit of Path MTU Discovery within the tunnel, any
fragmentation which occurs because of the size of the
encapsulation header is performed only once after encapsulation.
This prevents multiple fragmentation of a single datagram, which
improves processing efficiency of the decapsulator and the
routers within the tunnel.
- If the source of the unencapsulated datagram is doing Path MTU
Discovery, then it is desirable for the encapsulator to know
the MTU of the tunnel. Any ICMP Datagram Too Big messages from
within the tunnel are returned to the encapsulator, and as noted
in Section 5, it is not always possible for the encapsulator to
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?