Longest Prefix Matching
Consider a datagram network using 8-bit host addresses.
Suppose a router uses longest-prefix matching, and has the following forwarding table:
Question List
1. Suppose a datagram arrives at the router, with destination address 00100000. To which interface will this datagram be forwarded using longest-prefix matching?
2. Suppose a datagram arrives at the router, with destination address 10011100. To which interface will this datagram be forwarded using longest-prefix matching?
3. Suppose a datagram arrives at the router, with destination address 01001101. To which interface will this datagram be forwarded using longest-prefix matching?
Solution
1. Since the address is 00100000, it will go to interface 2.
2. Since the address is 10011100, it will go to interface 3.
3. Since the address is 01001101, it will go to interface 5.
That's incorrect
That's correct
The answer was: 2
The answer was: 3
The answer was: 5