cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
25656
Views
52
Helpful
4
Replies

TTL=1 and router default behavior

sarahr202
Level 5
Level 5

Hi everybody

Please consider the following example:

 

R1(12.12.12.1)-f0/0---------------f0/0(12.12.12.2) R2

If R2 receives a packet with TTL=1 on f0/0, R2 will decrement 1, since new ttl is zero, R2 discards the packets and  sends ICMP ( time exceeed ) message to R1.

However if we enable EBGP between the two using directly connected IP, we see EBGP establishes, even though TTL value is 1 in IP packet. We see R1 or R2 does not discard message even though TTL =1 ,as they would normally do for other packets.

My question is : does R2/R1 make an exception for EBGP in this case?

Thanks

 

2 Accepted Solutions

Accepted Solutions

Rolf Fischer
Level 9
Level 9

Hi,

I think the exception is (link local) control traffic in general.

A router must decrement the TTL when forwarding the packet; but in the case of control traffic the router is the final destination / IP host, and a packet with TTL=1 is perfectly valid.

HTH
Rolf

View solution in original post

Hi Sarah, Rolf,

I agree with Rolf's explanation. A router cares about TTL only when routing a packet. However, if the packet's destination is the router itself, then the router behaves as an end host. It does not really matter whether the packet is a control plane traffic - what matters is whether the router is the final destination.

RFC 1812 Section 4.2.2.9 says it even more plainly:

   A router MUST NOT discard a datagram just because it was received
   with TTL equal to zero or one; if it is to the router and otherwise
   valid, the router MUST attempt to receive it.

How a router could receive a packet with TTL=0 is not commented in the RFC, and RFC 1122 Section 3.2.1.7 states explicitly that a host must not send an IP packet with a TTL=0. I suppose it is more of a robustness requirement than a real life need.

Best regards,
Peter

View solution in original post

4 Replies 4

Rolf Fischer
Level 9
Level 9

Hi,

I think the exception is (link local) control traffic in general.

A router must decrement the TTL when forwarding the packet; but in the case of control traffic the router is the final destination / IP host, and a packet with TTL=1 is perfectly valid.

HTH
Rolf

Hi Sarah, Rolf,

I agree with Rolf's explanation. A router cares about TTL only when routing a packet. However, if the packet's destination is the router itself, then the router behaves as an end host. It does not really matter whether the packet is a control plane traffic - what matters is whether the router is the final destination.

RFC 1812 Section 4.2.2.9 says it even more plainly:

   A router MUST NOT discard a datagram just because it was received
   with TTL equal to zero or one; if it is to the router and otherwise
   valid, the router MUST attempt to receive it.

How a router could receive a packet with TTL=0 is not commented in the RFC, and RFC 1122 Section 3.2.1.7 states explicitly that a host must not send an IP packet with a TTL=0. I suppose it is more of a robustness requirement than a real life need.

Best regards,
Peter

Great inputs, much appreciated. Let  me illustrate my question that just popped up in my small brain:)

HOST --12.12.12.1------12.12.12.2 R2

If i do tracert from HOST as:

tracert 12.12.12.2

We see R2 will send ICMP error message  ( Time exceeded) even though packet is destined to R2 and has TTL 1 but yet R1 still discards and sends ICMP error back to Host.

 

 

 

Well, i labbed it up, it does corroborate Peter and Rolf's statements.

The reason when I issued tracert to R2 from host, and  get ICMP error ( Destination port not available), is not because of TTL value being 0, it is because R2 is not listening on the port.

I took Brocade routers which use ICMP ping  for traceroute. and see routers indeed accept packets destined to them with TTL value 1 and do not generate any ICM errors.

So TTL value 1 packets will be processed without any ICMP errors as long as packets are destined to router. However transit traffic with TTL value 1 will be dropped .

Thanks for all the knowledge you guys shared with me .

Have a nice day:)