This is a static archive of our old Q&A Site. Please post any new questions and answers at ask.wireshark.org.

How routers handle IPv4 TTL value 0

0

I have a following setup:

http://s4.postimage.org/yox35cbbh/TTL_test.png

If I send IPv4 packets with TTL value 0 from T60 I receive:

ICMP time exceeded in-transit

..message from 10.10.10.2(R1) as I should. Now if I send IPv4 packets with TTL value 1 from T60 I receive once again:

ICMP time exceeded in-transit

message from 10.10.10.2(R1). If I change TTL to 2, then I receive

ICMP time exceeded in-transit

..from 10.10.11.2(R2).

Looks like routers do not send out packets with TTL value of 0. Am I correct that the reason for this is that before router will send the packet it reduces the TTL by one and if it sees that the TTL value became 0, it will process the packet further and will not send the packet towards destination, but sends ICMP error message back to the source IP instead? This means that it's not possible to send packets with TTL value of 0 to hosts which are not in the same broadcast domain with the sender?

asked 31 Jan '13, 04:20

mrtn's gravatar image

mrtn
11669
accept rate: 0%

edited 31 Jan '13, 04:21


2 Answers:

1

Routers always decrement the TTL by 1 and forward the packet if the new TTL is greater than zero. If it is zero, some routers issue a ICMP time exceeded in transit packet as you've noticed, but some don't (mostly for security reasons). It is not possible to send IP packets to hosts in other broadcast domains if the TTL is less than 2.

answered 31 Jan '13, 04:28

Jasper's gravatar image

Jasper ♦♦
23.8k551284
accept rate: 18%

edited 31 Jan '13, 04:28

0

IPv4 TTL value 0 , when set to 0 the packet will not even leave the current host , so in this case its rejected at T60 level itself. When you set TTL 1 , it reaches till Fa0/0 on R1 (10.10.10.2) and R1 deducts 1 from it , hence making it zero again and you receive ICMP time exceeded in-transit from 10.10.10.2 this time.

answered 02 Sep '14, 00:37

unixmaster's gravatar image

unixmaster
1
accept rate: 0%