Cisco Support Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Announcements

Welcome to Cisco Support Community. We would love to have your feedback.

For an introduction to the new site, click here. And see here for current known issues.

New Member

OSPF Hop Count Limitation

In a practice test for CCNA exam 640-801, the correct answer given to a question re OSPF hop count limitation was that this is unlimited when OSPF is being used on a network. I am confused by this as there is an 8-bit TTL field in the IP datagram header, and this is decremented by 1 by each router traversed. When this TTL count reaches zero the IP packet should be discarded. The max for 8-bit field is 255, so shouldn't there be a hop count limit of 255 for OSPF, and indeed ANY routing protocol ?

1 ACCEPTED SOLUTION

Accepted Solutions
Hall of Fame Super Silver

Re: OSPF Hop Count Limitation

Mohammed

When an OSPF router receives an advertisement from a neighbor it will NEVER just relay it. (for one thing the multicast address used by OSPF for advertisements is a link local address which should never be forwarded) The router takes the information from the advertisement, puts it into its link state data base, and then generates a new advertisement reflecting the information.

I do not think that we have articulated it clearly yet, but it seems to me that this whole discussion is confusing the functionality of 2 protocols. There is TTL which is used by the IP protocol to minimize the impact of any packet that happens to get into a routing loop. And there is hop count which is used by some routing protocols to determine if something is so far away that it should no longer be advertised. These are 2 different functions in 2 different protocols and we should not treat them as if they were the same.

So the answer to the original question is that in OSPF hop count is unlimited. The delivery of data packets may be bounded by TTL but advertisement of destinations in OSPF is not limited at all by hop count.

HTH

Rick

10 REPLIES

Re: OSPF Hop Count Limitation

This is a good question.

According to me the unlimited hop count limitation in OSPF would mean that the routes would still be installed in the RT eventhough the hop count values exceeded 255.

There is no TTL field in the OSPF packets

But the Packet would definitley be dropped at the device where the TTL has been decremented to 0

Somebody in this forum may have a better and valid answer though

Narayan

Hall of Fame Super Silver

Re: OSPF Hop Count Limitation

It seems to me that we can look at it in at least 2 ways to see the answer.

1) It is a matter of semantics: while the TTL may enforce a limit on how far a data packet may be forwarded before it is dropped, the drop is not done by the routing protocol. Also since there is not anything in the protocol specification that identifies hop count as a limiting factor potentially the protocol will accept and advertise routes with any number of hops.

2) As Narayan points out, there is no field for hop count in the OSPF advertisement. So when OSPF receives an advertisement there is not any way at that point to know exactly how many hops this destination is.

HTH

Rick

Re: OSPF Hop Count Limitation

Hi,

Rick, please correct me if i am wrong, the reason is simply because OSPF uses its own IP protocol (number 89) which has no TTL in the packet structure, and thus hops won't be detected.

BR,

Mohammed Mahmoud.

Hall of Fame Super Silver

Re: OSPF Hop Count Limitation

Mohammed

I think we need to be very careful about saying that there is no TTL in the packet structure. In fact there is a TTL in the IP header of the OSPF packet. There is a TTL in the IP header of every IP packet.

Part of the point is that there is nothing in the specification of OSPF that says that OSPF should care about the TTL or about hop count.

Also since an OSPF advertisement is never forwarded off of the local segment, the TTL of the OSPF packet tells nothing about the hop count of the route being advertised.

HTH

Rick

Re: OSPF Hop Count Limitation

Rick,

Ok, the point is, if the TTL works normally in the OSPF header, then the router not the OSPF process is going to drop the packet even if the OSPF process doesn't care for the TTL value.

If we take this issue from another prospective, a router getting a certain LSA, will it originate it with a new packet or would it just relay it with its original received header info (after decreasing the TTL).

HTH,

Mohammed Mahmoud.

Hall of Fame Super Silver

Re: OSPF Hop Count Limitation

Mohammed

When an OSPF router receives an advertisement from a neighbor it will NEVER just relay it. (for one thing the multicast address used by OSPF for advertisements is a link local address which should never be forwarded) The router takes the information from the advertisement, puts it into its link state data base, and then generates a new advertisement reflecting the information.

I do not think that we have articulated it clearly yet, but it seems to me that this whole discussion is confusing the functionality of 2 protocols. There is TTL which is used by the IP protocol to minimize the impact of any packet that happens to get into a routing loop. And there is hop count which is used by some routing protocols to determine if something is so far away that it should no longer be advertised. These are 2 different functions in 2 different protocols and we should not treat them as if they were the same.

So the answer to the original question is that in OSPF hop count is unlimited. The delivery of data packets may be bounded by TTL but advertisement of destinations in OSPF is not limited at all by hop count.

HTH

Rick

Re: OSPF Hop Count Limitation

Rick,

Perfectly formalized.

BR,

Mohammed Mahmoud.

New Member

Re: OSPF Hop Count Limitation

Thanks for all replies. The final conclusion that OSPF has no hop count limitation is in keeping with the answer expected in the practice test question. Some routing protocols DO have hop count limits, namely RIP has a limit of 15, and IGRP has a limit of 100 by default (configurable up to 255).

Hop count limitations also exist in general owing to the TTL field in an IP datagram, but this is not due to the routing protocol.

Its a subtle distinction but I now see where they are coming from. Such subtle questions are typical in exams.

Hall of Fame Super Silver

Re: OSPF Hop Count Limitation

Ross

Your summary of the discussion about hop count in routing protocols (and of TTL) is quite correct.

I think that your comment about subtle distinctions and their importance is Cisco certification exams is quite insightful. I hope that many participants in the forum will read and remember your comment.

HTH

Rick

New Member

Re: OSPF Hop Count Limitation

Thanks for your comment Rick. I took CompTIA A+ and N+ exams last year, and I note that these also include this type of question. Maybe its a general feature in certification exams.

16921
Views
5
Helpful
10
Replies