[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Revised drafts -- Arch, AH, ESP
In message <7380.bsimpson@morningstar.com>, "William Allen Simpson" writes:
> > Note: The decrementing of the TTL is one of the usual actions
> > that takes place when forwarding a packet. Packets
> > originating from the same node as the encapsulator do not
> > have their TTL's decremented, as the sending node is
> > originating the packet rather than forwarding it.
> >
> The note is in error. The TTL is required to be decremented when
> encapsulating into a tunnel in exactly the same way as when forwarding
> into any other interface, even when the sending node originated the
> packet, in order to prevent loops where the packet is decapsulated and
> encapsulated and forwarded again.
The note is correct.
TTL decrement is done when a packet arrives on an interface *and* leaves via
an interface (possibly the same one). This includes a packet that arrives on
an interface and then enters a tunnel, and a packet that is decapsulated and
then re-encapsulated. It does *not* include a packet locally originated or,
for that matter, a packet that arrives destined to the local host.
RFC 1853 is incorrect in this regard. OTOH, RFC 2002 says:
When encapsulating a datagram, the TTL in the inner IP header is
decremented by one if the tunneling is being done as part of
forwarding the datagram; otherwise, the inner header TTL is not
changed during encapsulation. If the resulting TTL in the inner IP
header is 0, the datagram is discarded and an ICMP Time Exceeded
message SHOULD be returned to the sender. An encapsulator MUST NOT
encapsulate a datagram with TTL = 0.
The TTL in the inner IP header is not changed when decapsulating.
If, after decapsulation, the inner datagram has TTL = 0, the
decapsulator MUST discard the datagram. If, after decapsulation, the
decapsulator forwards the datagram to one of its network interfaces,
it will decrement the TTL as a result of doing normal IP forwarding.
See also Section 4.4.
The Architecture document is merely restating this passage in a slightly less
clear fashion.
--
Harald Koch <chk@utcc.utoronto.ca>
References: