Interactive end-of-chapter exercises


Supplement to Computer Networking: A Top Down Approach 8th Edition


"Tell me and I forget. Show me and I remember. Involve me and I understand." Chinese proverb

Textbook Cover

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 01011011. To which interface will this datagram be forwarded using longest-prefix matching?

2. Suppose a datagram arrives at the router, with destination address 00110000. To which interface will this datagram be forwarded using longest-prefix matching?

3. Suppose a datagram arrives at the router, with destination address 01110101. To which interface will this datagram be forwarded using longest-prefix matching?




Solution


1. Since the address is 01011011, it will go to interface 4.

2. Since the address is 00110000, it will go to interface 5.

3. Since the address is 01110101, it will go to interface 2.



That's incorrect

That's correct

The answer was: 4

Question 1 of 3

The answer was: 5

Question 2 of 3

The answer was: 2

Question 3 of 3

Try Another Problem

We gratefully acknowledge the programming and problem design work of John Broderick (UMass '21), which has really helped to substantially improve this site.

Copyright © 2010-2021 J.F. Kurose, K.W. Ross
Comments welcome and appreciated: kurose@cs.umass.edu