Question about datagrams and TTL and routers in general

214 views

1.Does routers before sending datagram to the next router check if the value of TTL is equal to 0?

2. Does router increase the value of TTL before sending datagram to the next router?

I searched everywhere for this information but I can’t find it.

​

Also, speaking of routers in general, besides their main function, but can we use them for example for finding the IP address if we know computer name?

In: 1

4 Answers

Anonymous 0 Comments

A router will indeed check if the TTL is equal to 0 before sending it on and then drop the package, and maybe sending back a “time exceeded” to the sender. Then the router decreases the TTL by one before passing it on to the next router. The references to time here are an old concept, the standards say that the TTL field is in seconds but this turned out to be impractical and all hops were rounded up to an entire second causing the TTL field to become a hop counter in practice. The purpose of the TTL field is primarily to prevent packages from going in infinite loops around an improperly configured networks, which inevitably happens.

As for the name resolution, we have found out that the best way to handle standards and protocols is to make things do one thing only so that it can do it well. If we want something else done we create a new system for this. So a router just routes IP packets between different networks and does this very well. For name resolution we have the DNS system which works on completely different principles and in a completely different way. Many end point routers do also have software to allow it to work as a DNS resolver but this is independent from its router related software.

Anonymous 0 Comments

A router will indeed check if the TTL is equal to 0 before sending it on and then drop the package, and maybe sending back a “time exceeded” to the sender. Then the router decreases the TTL by one before passing it on to the next router. The references to time here are an old concept, the standards say that the TTL field is in seconds but this turned out to be impractical and all hops were rounded up to an entire second causing the TTL field to become a hop counter in practice. The purpose of the TTL field is primarily to prevent packages from going in infinite loops around an improperly configured networks, which inevitably happens.

As for the name resolution, we have found out that the best way to handle standards and protocols is to make things do one thing only so that it can do it well. If we want something else done we create a new system for this. So a router just routes IP packets between different networks and does this very well. For name resolution we have the DNS system which works on completely different principles and in a completely different way. Many end point routers do also have software to allow it to work as a DNS resolver but this is independent from its router related software.

Anonymous 0 Comments

>1.Does routers before sending datagram to the next router check if the value of TTL is equal to 0?

Yes. If the TTL is 0, the datagram is not forwarded, and an *ICMP TTL time exceeded* is returned to the source IP.

>1. Does router increase the value of TTL before sending datagram to the next router?

Routers **decrease** the TTL by one as the datagram is forwarded.

>Also, speaking of routers in general, besides their main function, but can we use them for example for finding the IP address if we know computer name?

Some routers can also act as DNS resolvers/caches – this is common functionality for home internet routers/gateways. This is not functionality that all routers have, though.

Anonymous 0 Comments

>1.Does routers before sending datagram to the next router check if the value of TTL is equal to 0?

Yes. If the TTL is 0, the datagram is not forwarded, and an *ICMP TTL time exceeded* is returned to the source IP.

>1. Does router increase the value of TTL before sending datagram to the next router?

Routers **decrease** the TTL by one as the datagram is forwarded.

>Also, speaking of routers in general, besides their main function, but can we use them for example for finding the IP address if we know computer name?

Some routers can also act as DNS resolvers/caches – this is common functionality for home internet routers/gateways. This is not functionality that all routers have, though.