Question 4 options: Consider a datagram network using 32-bit host addresses. Sup
ID: 3813705 • Letter: Q
Question
Question 4 options:
Consider a datagram network using 32-bit host addresses. Suppose a router has four links, numbered 0 through 3, and packets are to be forwarded to the link interfaces as follows:
Destination Address Range
Link Interface
11100000 00000000 00000000 00000000
through
11100000 11111111 11111111 11111111
0
11100001 00000000 00000000 00000000
through
11100001 00000000 11111111 11111111
1
11100001 00000001 00000000 00000000
through
11100001 11111111 11111111 11111111
2
otherwise
3
Compute a forwarding table that has four entries, uses longest-prefix matching, and forwards packets to the correct link interface.
Row 1: bit pattern link interface
Row 2: bit pattern link interface
Row 3: bit pattern link interface
Row 4: bit pattern link interface
Destination Address Range
Link Interface
11100000 00000000 00000000 00000000
through
11100000 11111111 11111111 11111111
0
11100001 00000000 00000000 00000000
through
11100001 00000000 11111111 11111111
1
11100001 00000001 00000000 00000000
through
11100001 11111111 11111111 11111111
2
otherwise
3
Explanation / Answer
I have used the dotted notation to represent the routing table:
pattern interface
Row 1: 225.0.0.0/16 1
Row 2: 224.0.0.0/8 0
Row 3: 225.0.0.0/8 2
#this one is using binary bit pattern
bit pattern mask interface
Row 1: 11100001 00000000 00000000 00000000 11111111 11111111 00000000 00000000 1
Row 2: 11100000 00000000 00000000 00000000 11111111 000000000 00000000 00000000 0
Row 3: 11100001 00000000 00000000 00000000 11111111 000000000 00000000 00000000 2
Row 4: 00000000 000000000 00000000 00000000 00000000 000000000 00000000 00000000 3
So as you can notice Row 1 and Row 3 has the same base address, but only the mask is different. So how do we identify them?
First, identify the link addresses with the longest mask and write them in the routing table
in our case, 11100001 00000000 00000000 00000000 to 11100001 00000000 11111111 11111111 has mask 16
Next, we look for other addresses with a shorter mask than what we have populated last in the routing table.
in our case, 11100000 00000000 00000000 00000000 to 11100000 11111111 11111111 11111111 has mask 8
and 11100001 00000001 00000000 00000000 to 11100001 11111111 11111111 11111111 has mask 8
Once we start populating the table in this way, it eliminates any confusion of filling the routing table. We must follow a simple and straight forward approach and a simple task of identifying the longest mast in our routing data. Once we are done with this, the remaining task is very easy, as you can see. If an ambiguity arises, there is probably an error in the question.
I hope you liked my explanation. If you face any trouble understanding the logic and approach of the problem or even with the solution, feel free to comment below. I shall be glad to help you. :)
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.