Professional Documents
Culture Documents
IPaddressing Problems
IPaddressing Problems
IP addressing
1. An Internet Service Provider(ISP) has the following
chunk of CIDR-based IP addresses available with
it:245.248.128.0/20. The ISP wants to give half of this
chunk of addresses to Organization A, and a quarter
to Organization B, while retaining the remaining with
itself. Which of the following is a valid allocation of
addresses to A and B?
(A) 245.248.136.0/21 and 245.248.128.0/22
(B) 245.248.128.0/21 and 245.248.128.0/22
(C) 245.248.132.0/22 and 245.248.132.0/21
(D) 245.248.136.0/22 and 245.248.132.0/21
Solution for problem
Since routing prefix is 20,
the ISP has 2^(32-20) or 2^12 addresses.
Out of these 2^12 addresses, half (or 2^11) addresses have to be given to organization A
and quarter (2^10) addresses have to be given to organization B.
So routing prefix for organization A will be 21. For B, it will be 22.
If we see all options given in question, only options (A) and (B) are left as only these
options have same number of routing prefixes. Now we need to choose from option (A)
and (B).
To assign addresses to organization A, ISP needs to take first 20 bits from 245.248.128.0
and fix the 21st bit as 0 or 1. Similarly, ISP needs to fix 21st and 22nd bits for organization
B. If we take a closer look at the options (A) and (B),
we can see the 21st and 22nd bits for organization B are considered as 0 in both options.
So 21st bit of organization A must be 1. Now take the first 20 bits from 245.248.128.0 and
21st bit as 1, we get addresses for organization A as 245.248.136.0/21
Block address and subnet
In a block address, we know the IP address of
one host is 182.44.82.16/26. What are the first
address (network address) and the last address
(limited broadcast address) in this block?
Block address and subnet
In a block address, we know the IP address of
one host is 182.44.82.16/26. What are the first
address (network address) and the last address
(limited broadcast address) in this block?
Answer
182.44.82.0 is the subnet address
182.44.82.63 is the broadcast address
Block address and subnet
An organization is granted the block
130.56.0.0/16. The administrator wants to
create 1024 subnets.
a. Find the subnet mask.
b. Find the number of addresses in each subnet.
c. Find the first and last addresses in subnet 1.
d. Find the first and last addresses in subnet
1024.
Block address and subnet
Answer
Answer (C)
Answer (C)
Maximum number of subnets = 2^6-2 =62.
Note that 2 is subtracted from 2^6. The RFC 950 specification reserves the subnet values consisting of
all zeros (see above) and all ones (broadcast), reducing the number of available subnets by two.
The identifier of the output interface on which this packet will be forwarded is ______.
(A) 1
(B) 2
(C) 3
(D) 5
Longest Prefix Matching
Answer: (A)
Explanation: In this question, we need to find out Netmask for each entry and BITWISE
AND with given packet address, whichever equals the Netid, is the ans. Ex. 1st entry in
table: 131.16.0.0/12.
its MASK is first 12 bits of network(they are all 1) and remaining 20 bits of host(they are all
0). so MASK is 255.240.0.0 AND 131.23.151.76 = 131.16.0.0. Last entry is 131.22.0.0/15
MASK—>255.254.0.0 AND 131.23.151.76 = 131.22.0.0. Two ans coming interfaces 1,3.
Longest Prefix Matching is used to decide among two. When one destination address
matches more than one forwarding table entry. The most specific of the matching table
entries is used as the interface.
The interface 1 has the longest matching prefix with the input IP address. Therefore 1 is
chosen.
• Thank you