Hop significado (medição TTL)

10

Quando eu uso o comando ping, recebo os próximos resultados (Windows):

C:\>ping example.microsoft.com
Pinging example.microsoft.com [192.168.239.132] with 32 bytes of data:
Reply from 192.168.239.132: bytes=32 time=101ms TTL=124
...

Na documentação de tais utilitários, o TTL é medido em hops . De acordo com a especificação do ICMP RFC 792 :

Time to Live. Time to live in seconds; as this field is decremented at each machine in which the datagram is processed, the value in this field should be at least as great as the number of gateways which this datagram will traverse.

Assim, todos os hosts reduzem o TTL pelo menos 1 segundo . Nada foi dito sobre o hops . Então, por que o lúpulo é usado? Por que não usar, digamos ms , se os hosts processam os datagramas rápido demais? E por que a especificação não diz nada sobre o hops ?

    
por Kyrylo M 07.03.2011 / 21:41

1 resposta

7

O TTL é projetado para interromper permanentemente os pacotes (e consumir recursos) se houver um loop de roteamento.

Originalmente, os roteadores podem levar mais de um segundo para processar um pacote.

Quando os roteadores se tornaram muito mais rápidos e começaram a processar os pacotes em menos de um segundo, seria tolo que eles reduzissem o TTL a zero, porque não parariam os loops.

Então, em vez disso, ele diminui o TTL em um segundo.

Essa alteração foi documentada na RFC 1716 seção 5.3.1.

The Time-to-Live (TTL) field of the IP header is defined to be a timer limiting the lifetime of a datagram. It is an 8-bit field and the units are seconds. Each router (or other module) that handles a packet MUST decrement the TTL by at least one, even if the elapsed time was much less than a second. Since this is very often the case, the TTL is effectively a hop count limit on how far a datagram can propagate through the Internet.

When a router forwards a packet, it MUST reduce the TTL by at least one. If it holds a packet for more than one second, it MAY decrement the TTL by one for each second.

Veja também:

Wikipedia - Tempo de vida :

The TTL field is set by the sender of the datagram, and reduced by every host on the route to its destination.

Maxi-pedia - Tempo de vida (TTL)

Each router that the packet travels through is required to subtract at least one count from the TTL field.

    
por 07.03.2011 / 21:50

Tags