3
1
I'm reading one of the Distance vector protocol RIP and come to know maximum hop count it uses is 15 hops but My doubt is why 15 is used as maximum Hop count why not some other number 10,12 or may be 8 ?
3
1
I'm reading one of the Distance vector protocol RIP and come to know maximum hop count it uses is 15 hops but My doubt is why 15 is used as maximum Hop count why not some other number 10,12 or may be 8 ?
3
This was a design decision when RIP was created: http://tools.ietf.org/html/rfc1058:
A specific metric value is chosen to indicate an unreachable
destination; that metric value is larger than the largest valid
metric that we expect to see. In the existing implementation of RIP, 16 is used. This value is normally referred to as "infinity", since
it is larger than the largest valid metric
and later on why it was 16:
You should now see why "infinity" is chosen to be as small as
possible. If a network becomes completely inaccessible, we want
counting to infinity to be stopped as soon as possible. Infinity
must be large enough that no real route is that big. But it
shouldn't be any bigger than required. Thus the choice of infinity
is a tradeoff between network size and speed of convergence in case
counting to infinity happens. The designers of RIP believed that the protocol was unlikely to be practical for networks with a diameter
larger than 15.
The 15 as maximum has nothing to do with size of the field which holds metric - this is in fact 4 BYTES in size (max value: 2^32-1): http://tools.ietf.org/html/rfc1723
TL;DR: It was thought at a time that 16 is a big enough to signify infinity, which makes 15 biggest possible network diameter (hop count).
1
Because in computing, binary form is used for storing numbers. In this case the maximum binary number in four positions would be 15 (1111). So they reserved four digits to count the hops. It seemed to be enough at the time they developed RIP.
Further reading about how the binary system works:
But they can take 8 also as the number we can represent 8 in 111 digits. – AMIT – 2012-09-06T07:35:38.823
Sure, but they chose to dedicate 4 bits for the hop count. So you get a maximum of 15. – Robert – 2012-09-06T08:12:35.793
1This is incorrect - 15 as maximum has nothing to do with metric field size – wmz – 2012-09-06T10:43:18.200
I don't really understand what you are trying to say. If they decided to use 4 bits, your maximum is always 15 (16 possibilities if you count zero). – Robert – 2012-09-06T11:51:11.990
1
so it was indeed TL;DR... The 15 as maximum has nothing to do with size of the field which holds metric - this is in fact 4 BYTES in size (max value: 2^32-1): http://tools.ietf.org/html/rfc1723
– wmz – 2012-09-06T13:44:08.250