-2

I'm IT student and I'm learning basic network. As you know, when a message is sent, hop count increases 1 and TTL decreases 1. So why do we need two parameters while I can just use TTL to avoid loop? Thank you.

lenhhoxung
  • 2,530
  • 2
  • 30
  • 61

1 Answers1

1

TTL is on IP packets so that they don't loop forever. Hop count is on the RIP routing protocol. These are two separate protocols.

RIP uses the hop count to determine the best path to a network.

TTL is s field in the IP header which is decremented until the receiving router receives an IP packet with a hop count of 1, at which point it discards the packet.

Ron Maupin
  • 6,180
  • 4
  • 29
  • 36
  • Thank you for answering, but I think RIP works at "Network" layer, which is the same layer for IP protocol. So I guess RIP just wraps IP packet which means TTL and Hop Count exists in the same message. Is that correct? – lenhhoxung Jan 15 '16 at 00:23
  • No. RIP is a routing protocol which uses IP to transfer information with other RIP routers. It doesn't wrap IP. TTL is in every IP header (so, yes, it is in the headers of IP packets which carry RIP information) and it prevents an IP packet from looping forever. The hop count in RIP messages has no relation to the TTL of the packet which carried it. That TTL will merely be decremented by 1 from the next hop neighbor, but the route information it carries may have a hop count of 12 because the network could be 12 hops away. – Ron Maupin Jan 15 '16 at 00:29