Rumen Hristov
Rumen Hristov

Reputation: 887

Routing table interpretation

Given the following table, where the network is using 8-bit host addresses, I am asked to compute the associated range of destination host addresses for every interface. Then I am also asked about the number of addresses in every range.

Table:
prefix match         Interface
    00                  0
    010                 1
    011                 2
    10                  2
    11                  3

I determined that I am given the prefixes of the 8-bit binary IP's and the concluded that:

00000000 to 00111111 (0-63 in decimal) uses interface 0

addresses in the range = 2 to the power of (8 - the number of bits in the prefix, so 2) = 64

01000000 to 01011111 (64-95 in decimal) uses interface 1

addresses in range = 2^(8-3) = 32

01100000 to 10111111 (96-191 in decimal) uses interface 2

addresses in range = 2^5 = 32

11000000 and higer (192+ in decimal) uses interface 3

addresses in range = 2^5 = 32

Is my reasoning correct?

Upvotes: 0

Views: 90

Answers (1)

Barmar
Barmar

Reputation: 781096

The number of addresses in each range is 2(8 - prefixlen). So if the prefix has 2 bits, the number of addresses is 26 = 64.

Upvotes: 2

Related Questions