0% found this document useful (0 votes)
20 views5 pages

IP Address Host ID Analysis

The document discusses IP addressing concepts like network IDs, host IDs, subnet masks, and CIDR notation. It provides answers to questions about classifying IP addresses, finding network and host addresses, calculating subnets and hosts, and allocating IP ranges to organizations.

Uploaded by

Jayanthkumar
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
20 views5 pages

IP Address Host ID Analysis

The document discusses IP addressing concepts like network IDs, host IDs, subnet masks, and CIDR notation. It provides answers to questions about classifying IP addresses, finding network and host addresses, calculating subnets and hosts, and allocating IP ranges to organizations.

Uploaded by

Jayanthkumar
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

1. Give the network id and host id of the following IPv4 address: a) [Link] b) 165.25.242.

8
c)[Link] d) [Link] e) [Link]
Ans. a) [Link] Network id 56, Host id: 89.34.25 (CLASS A)
b) [Link] Network id 165.25, Host id: 242.8 (CLASS B)
c)[Link] Network id 212.115.65, Host id: 24 (CLASS C)
d) [Link] In Class D, an IP address is reserved for multicast addresses. It does not
possess subnetting. Class D IP addresses are not allocated to hosts and are used for
multicasting. Multicasting allows a single host to send a single stream of data to thousands of
hosts across the Internet at the same time. It is often used for audio and video streaming, such
as IP-based cable TV networks. Another example is the delivery of real-time stock market data
from one source to many brokerage companies.
e) [Link] This class is reserved for research and Development Purposes. (CLASS E)
2. If a class B network on the Internet has a subnet mask of [Link], what is the maximum
number of hosts per subnet.
Ans. The 'subnet mask [Link]' has binary representation as, '11111111 11111111
11110000 00000000'. Here in this '20 bits' set in the subnet. So (32-20) = 12 bits are taken for
host ids.
Hence, the 'Total possible values of host ids' are '2^12 = ‘4096'. Out of these '4096' values,
two 'addresses' are reserved. The 'address' with all 'bits as 1' is reserved as 'broadcast address'
and 'address' with all 'host' id bits as '0' is used as the subnet network address.
The number of 'addresses' usable for 'addressing' specific 'hosts in each network' is always
'2^N - 2' where N is the 'number of bits for host id'.
In our 'case for subnet mask [Link]', number of hosts is '2^N - 2' = '2^12 - 2' = '4096 -
2 = 4094'.
3. Given an IP address [Link]. Find the network ID,5th host ID, last host ID and broadcast
ID of the given network.
Ans. [Link], It is belonging to class C and its n value is 24.
The binary representation of the given address is.
11010011 00011001 00100110 00011010
The first address in the block can be found by setting the rightmost 32 − n bits to 0s.
If we set 32−24 rightmost bits to 0, we get,
11010011 00011001 00100110 00000000 or [Link]
The last address (broadcast ID) in the block can be found by setting the rightmost 32 − n bits
to 1s.
If we set 32−24 rightmost bits to 1, we get,
11010011 00011001 00100110 11111111 or [Link]
5th host ID, [Link]
last host ID, [Link]
network ID, [Link]
broadcast ID, [Link]
4. Using fixed length subnetting divide the given network [Link] into two parts. Give the
first host ID, Last host ID, Subnet mask and the number of hosts connected.
Ans. Clearly, the given network belongs to class C.
We have a big single network having IP Address [Link]
Network mask is [Link]
Binary representation is 11000100 11011100 01010100 00100000
For creating two subnets and to represent their subnet IDs, we require 1 bit. So, we borrow
one bit from the Host ID part. After borrowing one bit, Host ID part remains with only 7 bits.
11000100.11011100.01010100.0/1 (host id)
If borrowed bit = 0, then it represents the first subnet.
If borrowed bit = 1, then it represents the second subnet.
IP Address of the two subnets are-

196.220.84.00000000 = [Link]
196.220.84.10000000 = [Link]
For 1st Subnet-
First subnet n1=25
IP Address of the subnet1 = [Link]/25
Total number of IP Addresses = 2^7 = 128
Total number of hosts that can be configured = 128 – 2 = 126
Range of IP Addresses = [196.220.84.00000000, 196.220.84.01111111] = [[Link],
[Link]]
Direct Broadcast Address = 196.220.84.01111111 = [Link]
Subnet1 mask = [Link]
first host ID: [Link]
Last host ID: [Link]
For 2nd Subnet-
First subnet n2=25
IP Address of the subnet2 = [Link]/25
Total number of IP Addresses = 2^7 = 128
Total number of hosts that can be configured = 128 – 2 = 126
Range of IP Addresses = [196.220.84.10000000, 196.220.84.11111111] = [[Link],
[Link]]
Direct Broadcast Address = 196.220.84.11111111 = [Link]
Subnet2 mask = [Link]
first host ID: [Link]
Last host ID: [Link]
5. Find the network address, first host address, last host address, default mask for the following
ip address 1)[Link] 2) [Link] 3) [Link]
Ans. 1)[Link] it is coming under CLASS A, DEFAULT MASK [Link], first host address
is [Link], last host address [Link], network address [Link]
2) [Link] it is coming under CLASS B, DEFAULT MASK [Link], first host address is
[Link], last host address [Link], network address [Link]
3) [Link] it is coming under CLASS C, DEFAULT MASK [Link], first host address
is [Link], last host address [Link], network address [Link]
6. Divide the network using variable length subnetting (2 subnets) for the network
[Link]/26 give the first host ID, last host ID, Subnet mask and network address.
Ans. We have a big single network having IP Address [Link]
Net mask is [Link]
Binary representation is 11000000 00001010 00011001 10000010
For creating two subnets and to represent their subnet IDs, we require 1 bit.
So, we borrow one bit from the Host ID part.
After borrowing one bit, Host ID part remains with only 5 bits.
11000000 00001010 00011001 10 0/1 (host id)
If borrowed bit = 0, then it represents the first subnet.
If borrowed bit = 1, then it represents the second subnet.
Network (IP) Address of the two subnets is-

192.10.25.10000000 = [Link]
192.10.25.10100000 = [Link]

For 1st Subnet-


First subnet n1=27
IP Address of the subnet = [Link]/27
Total number of IP Addresses = 2^5 = 32
Total number of hosts that can be configured = 32 – 2 = 30
Range of IP Addresses = [192.10.25.10000000, 192.10.25.10011111] = [[Link],
[Link]]
Direct Broadcast Address = 192.10.25.10011111= [Link]
Subnet1 mask= [Link]
first host ID: [Link]
Last host ID: [Link]
For 2nd Subnet-
Second subnet n2=27
IP Address of the subnet = [Link]/27
Total number of IP Addresses = 2^5 = 32
Total number of hosts that can be configured = 32 – 2 = 30
Range of IP Addresses = [192.10.25.10100000, 192.10.25.10111111] = [[Link],
[Link]]
Direct Broadcast Address = 192.10.25.10111111= [Link]
Subnet2 mask=[Link]
first host ID: [Link]
Last host ID: [Link]
7. The subnet mask of a particular network is [Link] which of the following pairs of the IP
address could belong to this network a) [Link] and [Link] b) [Link] and
[Link] c) [Link] and [Link] d) 128.8 129.43 and [Link]. Justify your
answer.

Ans. The set bits of a subnet mask indicate the network bits and the unset bits indicate the
host bits for an IP address in that network.

Here the subnet mask = 11111111 11111111 00011111 00000000.

The first two octet and the last 5 bits of the 3rd octet give us the network bits of any IP address
in that network. For two IP addresses belonging to the same network these specific bits should
match. So, in the options the first 2 octet and the last 5 bits of the 3 rd octet of both the IP
addresses should match.

In options A. and C., the addresses clearly have different 2nd octet.

In option B., the first IP address has an even 3rd octet, and the second IP address has an odd
3rd octet, so they differ in the last bit of the 3rd octet. Hence, they are from different networks.

In option D., the first two octet match. 129= (1000 0001) 2 and 161= (1010 0001) 2, so the last 5
bits of their 3rd octet also match. Hence, they belong to the same network.
∴ D. is the answer.

Or (Another method)
Suppose we have a host A with IP Address IP A and Subnet mask of the subnet of which A is a
part is Ms. Now when A wants to send packet to a host B with an IP address say IP B , then A will
first AND the subnet-Mask Ms with IPA to find out the subnet-id IDN of the subnet to identif y
whether IPB belongs to the same network. Now if B also belongs to the same network, then IPB
BITWISE-AND Ms must be equal to IDN which A has calculated. If IPA and IPB belongs to same
network, we must have IPA BITWISE-AND Ms == IPB BITWISE-AND Ms

Out of the 4 options, only option D matches.

[Link] BITWISE-AND [Link] = [Link]

[Link] BITWISE-AND [Link] = [Link]

∴ D. is the answer.
8. Given an IP address [Link] Give the following. 1. Network address 2. Default mask
3.1st host ID 4. Last host ID 5. Broadcast address.
Ans. Given IP Address is 192. 168.12.56
Binary representation is 11000000 10101000 00001100 00111000
Total number of IP Addresses possible are 2^8 = 256
Total number of hosts that can be configured = 256– 2 = 254
Network address: [Link]
Default mask: [Link]
1st host ID: [Link]
Last host ID: [Link]
Broadcast address: [Link]
9. An Internet Service Provider (ISP) has the following chunk of CIDR-based IP addresses available
with it:[Link]/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) [Link]/21 &
[Link]/22 b) [Link]/21 & [Link]/22 c)[Link]/22 &
[Link]/21 d) [Link]/22 & [Link]/21 justify your answer?
Ans. IP addresses available with it:[Link]/20, Net id 20 bits and host id 12 bits
Binary representation is 11110101 11111000 10000000 00000000
Total number of IP Addresses = 2^12 = 4096
Out of these 2^12 addresses, half (or 2^11) addresses must be given to organization A and
quarter (2^10) addresses must be given to organization B. So, routing prefix for organization
A will be 21. For B, it will be 22.
ORGANIZATION A:
If we fix the 21st bit as 0.

[Link]/ 21
For organization A in bit 21st, now take 1
⇒ [Link]/ 21
Organization B:
NID = 11110101 11111000 10000000 00000000. So, for B network ID will be.
CASE A: If we fix for organization A, 21st bit as 1

So, bit number 22 could be 0 or 1.


⇒ [Link]/ 22 or ⇒ [Link]/ 22.
CASE B: If we fix for organization A, 21st bit as 0.
So, bit number 22 could be 0 or 1.
⇒ [Link]/ 22 or ⇒ [Link]/ 22.
Conclusion: Since half of 4096 host addresses must be given to organization A, we can
set 21st bit to 1 and include that bit into network part of organization A, so the valid
allocation of addresses to A is 245 .248.136.0/21.

Now for organization B, 21st bit is set to '0 ' but since we need only half of 2048 addresses,
22nd bit can be set to '0 ' and include that bit into network part of organization B so the valid
allocation of addresses to B is 245 .248.128 .0/22.
So, answer is B, [Link]/21 and [Link]/22.

You might also like