Consider a datagram network using 8-bit host addresses. Suppose a router uses longest prefix matching and has the following forwarding table:
For each of the four interfaces, give the associated range of destination host addresses and the number of addresses in the range.
Destination Address Range Link Interface
------------------------------------------------------------------------------------
00000000
through 0
00111111
01000000
through 1
01111111
10000000
through 2
10111111
11000000
through 3
11111111
Number of addresses in each range =
the answer is really not satisfied. lets see now:
you see table prefix and interface. in an 8 bit host adress u will remove consider first digits as given in prefix match.
for example
00 means 00-000000 ->00-111111 destinations address between these.
010 means 010,00000 ->010-11111 destinations address between these.
011 means 011-00000 ->011-11111 destinations address between these.
10 means 10-000000 ->10-111111 destinations address between these.
11 means 11-000000 ->11-111111 destinations address between these.
when we will calculate number of addresses for interface the only the thing we need is counting number that are out of prefix.
2^6=64 for prefix 00
2^5=32 for prefix 010
2^5=32 for prefix 011 and so on.
if u didnt understand JUST GO THIS LINK:<rf>https://wiki.eecs.yorku.ca/course_archive/2012-13/W/3214/_media/chapter4_examples_problems_1-slide.pdf</rf>
The correct Answer is given below:
Post the discussion to improve the above solution.