Question

Consider a datagram network using 8-bit IP addresses. Suppose a router uses longest prefix matching and...

  1. Consider a datagram network using 8-bit IP addresses. Suppose a router uses longest prefix matching and has the follwing forwarding table:

Prefix Match

Interface

00

0

010

1

011

2

10

2

11

3

For each of the four interfaces, give the associated range of destination host addresses and the number of addresses in the range.

Solution:

Homework Answers

Answer #1

It is given that the network uses 8 - bit IP addresses.

For Interface 0, one prefix is given - 00
Lowest IP address for this will be when the rest 6 bits are all 0 i.e. 00000000 = 0
Highest IP address will be when the rest 6 bits are all 1 i.e. 00111111 = 63
So Range of addresses is 00000000 - 00111111 i.e., 0 - 63
Number of destination host addresses = 64

For interface 1, one prefix is given - 010
Lowest IP address for this will be when the rest 5 bits are all 0 i.e. 01000000 = 64
Highest IP address will be when the rest 5 bits are all 1 i.e. 01011111 = 95
So Range of addresses is 01000000 - 01011111 i.e., 64 - 95
Number of destination host addresses = 32

For interface 2, two prefixes are given - 011, 10
We have to analyze both separately and then combine the result.
For 010:
Lowest IP address for this will be when the rest 5 bits are all 0 i.e. 01100000 = 96
Highest IP address will be when the rest 5 bits are all 1 i.e. 01111111 = 127
So Range of addresses for the prefix 010 is: 01100000 - 01111111 i.e., 96 - 127
Number of destination host addresses = 32
For 10:
Lowest IP address for this will be when the rest 6 bits are all 0 i.e. 10000000 = 128
Highest IP address will be when the rest 6 bits are all 1 i.e. 10111111 = 191
So Range of addresses for the prefix 10 is: 10000000 - 10111111 i.e., 128 - 191
Number of destination host addresses = 64

Total range for the interface 2: 01100000 - 10111111 i.e., 96 - 191
Number of destination host addresses = 96

For Interface 3, one prefix is given - 11
Lowest IP address for this will be when the rest 6 bits are all 0 i.e. 11000000 = 192
Highest IP address will be when the rest 6 bits are all 1 i.e. 11111111 = 255
So Range of addresses is 11000000 - 11111111 i.e., 192 - 255
Number of destination host addresses = 64

Summary:

Interface Range of addresses Number of addresses
0 0 - 63 64
1 64 - 95 32
2 96 - 191 96
3 192 - 255 64

Hope this helps
If you have any doubt feel free to comment
Thank You!!

Know the answer?
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for?
Ask your own homework help question
Similar Questions