Solution of IP Related problems
Quns: IP address 192.168.10.44/29, Calculate its subnet mask.
Soln: Default subnet mask:
In decimal: 255.255.255.0
In binary: 11111111.11111111.11111111.00000000
Subnet mask of given IP address.11111111.11111111.11111111.11111000
Decimal equivalent: 255.255.255.248 (Ans)
Quns: IP address 172.168.0.0/19, Calculate its subnet mask.
Soln: Default subnet mask:
In decimal: 255.255.0.0
In binary: 11111111.11111111.00000000.00000000
Subnet mask of given IP address.11111111.11111111.11100000.00000000
Decimal equivalent: 255.255.224.0 (Ans)
Quns: Calculate the total number of subnets and hosts in IP address 192.168.10.44/29
Soln:
Step-I: Find out the subnet mask belongs to this IP address whose:
Decimal equivalent is 255.255.255.248
Binary equivalent is:11111111.11111111.11111111. 11111000
Here, 248 (11111000) indicates that 5 (1's bits) are used to identify the subnet and 3(0's)bits
are used to identify the host .
Total number of subnets: 2^no.of subnets bit
=2^5 = 32
No. of Usable(Valid)Subnets= 32-2=30
Total number of hosts: 2^no.of host bit
=2^3 = 8
No. of Usable (Valid) hosts=8 – 2 = 6
Quns: For IP address 192.168.10.44/29 calculate the host address and broadcast address.
Soln:
Step-I: Calculate the subnet mask of given IP address i.e. 255.255.255.248
Step-II: First host address= Network address+1
Network address: Subnet mask (Bitwise AND) IP address,i.e.
AND Operation:
11111111.11111111.11111111.11111000
11000000.10101000.00001010.00101100
11000000.10101000.00001010.00101000
Decimal equivalent is: 192.168.10.40
First host address = 192.168.10.40 +1
=192.168.10.41
Step-III : For last host address: Broadcast address -1
Broad Cast address: Complement of Subnet mask (Bitwise OR) IP address,i.e.
OR operation
00000000.00000000.00000000.00000111
11000000.10101000.00001010.00101100
11000000.10101000.00001010.00101111
Decimal equivalent: 192.168.10.47(Broadcast Address)
Last host address: 192.168.10.47 -1
: 192.168.10.46
Quns: Your Organization requires 5 subnets for the IP address 192.223.5.28. Define the subnet
mask and calculate how many hosts can be connected to each other?
Soln:
Given,
Number of subnet=5
We know the formula:
Number of usable subnet = 2^no.of subnets bit -2=2^n -2
5 = 2^n -2
Number of subnet bits ( n)=3
Default subnet mask is 255.255.255.255.0
Binary equivalent 11111111.11111111.11111111.00000000
Subnet mask of given IP address is 11111111.11111111.11111111.subnet bits +host bits
i.e. 11111111.11111111.11111111.11100000
Decimal equivalent is 255.255.255.224 (Ans)
Number of host can be connected=2^no.of host bit -2=2^5 -2=30 (Ans)
Quns: For an IP address, if the subnet mask is 255.255.255.224 , how many hosts per subset are
possible?
Soln: This mask is belongs to Class C
Binary equivalent of 224 is 11100000 where
subnet bits=3(111) and host bits=5(00000)
No. of subnets= 2^no.of subnets bit =2^3=8
No. of Usable (Valid) Subnets= 8-2 = 6
No. of hosts= 2^no. of hosts bits-2 =2^5=32=32
No. of Usable (Valid) host= 32 – 2 = 30
Quns 5 .b. Suppose you are given the IP address as 192.168.0.12/26 .Answer the following
questions.
i. Which class does this IP belongs to?
ii. How many valid hosts are available per subnet?
iii. Calculate the subnet mark of given IP.
Soln:
i. This IP belongs to the Class C.
ii. Subnet mask : 11111111.11111111.11111111.11000000
Decimal equivalent: 255.255.255.192
iii. No. of subnet bits= 11, No. of host bits=000000
No. of host= 2^no.of host bits = 2^6 =64
No. of valid (Usable) host = 64-2 = 62
Quns- VII: If IP address given is 223.124.123.89 , what is the network address and what is the
host address?
Soln:
Network address: 223.124.123.0 (All host bits are 0s)-Ans
Broadcast address:223.124.123.255 (All host bits are 1s)
Host addresses
Range= Network address+1 to Broadcast address-1
i.e. 223.124.123.1 to 223.124.123.254( Ans)
Quns-6.b: For IP address 192.168.1.0 and default subnet mask 255.255.255.0 of organization.
Find out the subnets for 4 departments.
Soln:
Given , default subnet mask: 255.255.255.0
Binary equivalent: 11111111.11111111.11111111.00000000
Now,
No. of subnets= 2^no.of subnets bit
4 = 2^n
n=2
No. of hosts= 2^no.of host bit=2^6 =64
Thus, Subnet mask: 11111111.11111111.11111111.11000000
Binary equivalent : 255.255.255.192/26
Last subnet: 192.168.1.192/26
Subnets,
192.168.1.0/26
192.168.1.64/26
192.168.1.128/26
192.168.1.192/26
Note: For usable subnet: Ignore First and Last Subnet
Quns: For IP address 192.17.5.0 and subnet mask 255.255.255.224 of organization . Find out the
subnets.
Soln:
Given Subnet mask,
255.255.255.224 ---- 11111111.11111111.11111111.11100000
Here, No. of subnet bits=111
No. of host bits= 00000
Use, subnet bits (111) to create subnets
No. of subnets= 2^no.of subnets bit=2^3 = 8
No. of hosts= 2^no.of host bit=2^5 =32
Subnets are:
192.17.5.0/27
192.17.5.32/27
192.17.5.64/27
192.17.5.96/27
192.17.5.128/27
192.17.5.160/27
192.17.5.192/27
192.17.5.224/27
Note: For usable subnet: Ignore First and Last Subnet
Quns: For IP address 157.110.88.0 , find out the 30 subnets for department.
Soln:
This IP address is belongs to the Class B. So default subnet mask is 255.255.0.0
Binary equivalent is 11111111.11111111.00000000.00000000
No. of subnets= 2^no.of subnets bit
30 = 2^no.of subnets bit
No. of subnet bits = 5
No. of Host = 2^no.of host bit = 2^11
No. of Valid (Usable) host= 2^11-2
Thus Subnet mask is 11111111.11111111.11111000.00000000
Decimal equivalent is :255.255.248.0
Last subnet is 157.110.88.248/21
In the third octet ,
No. of Host= 2^no.of host bit = 2^3 = 8
So, Subnets are:
157.110.0.0/21
157.110.8.0/21
157.110.16.0/21
157.110.24.0/21
…………………
157.110.248/21
Note: There are total 32 subnets but first and last subnets are not usable so total number of valid subnets are 30
Quns: If an institution has IP address 198.167.45.0 and it need 6 subnets. Answer the following :
i. Which class does this IP belongs?
ii. How many valid hosts are available in each subnet?
iii. Calculate the subnet mask of given IP
Ans:
i. This IP address is belongs to the class C.
ii. No. of subnets= 2^no.of subnets bit
6 = 2^n
No. of subnet bits (n) = 3
No. of host = 2^no.of host bits
= 2^5 = 32
Thus , no. of valid hosts= 32- 2 =30
iii. Default Subnet mask: 255.255.255.0
In Binary form: 11111111.11111111.11111111.00000000
Subnet mask: 11111111.11111111.11111111.11100000
Decimal Equivalent: 255.255.255.224
2015:
Quns-8: Suppose you are network administrator at XYZ organizations. XYZ organizations have
five department. You need to subnet the IP address 131.215.0.0/20 among these departments
identify subnet mask and department IP address range.
Soln:
Given, IP address: 131.215.0.0/20
This IP address is belongs to the class B. So, default subnet mask is 255.255.0.0
Binary equivalent :11111111.11111111.00000000.00000000
Subnet mask of given IP address is: 11111111.11111111.11110000.00000000
Decimal Equivalent of subnet mask : 255.255.240.0
Subnet bits =1111, host bit in third octet = 0000
i. No. of subnets= 2^no.of subnets bit
= 2^4 =16
No. of valid subnet = 16-2 = 14
No. of host = 2^no.of host bits
= 2^4 = 16
Thus , no. of valid hosts= 16- 2 =14
Last subnet: 131.215.240.0/20
Other subnets:
131.215.0.0/20
131.215.16.0/20
131.215.32.0/20
131.215.48.0/20
131.215.64.0/20
131.215.80.0/20
131.215.96.0/20
131.215.112.0/20
131.215.128.0/20
131.215.144.0/20
131.215.160.0/20
131.215.176.0/20
131.215.192.0/20
131.215.208.0/20
131.215.224.0/20
131.215.240.0/20
Note: First and Last Subnet are not usable
Range : Network address+1 to broadcast address-1
131.215.1.0 to 131.215.254.0
Quns: We have the following IP address and a subnet mask: IP address: 192.168.1.0 ,Subnet
mask: 255.255.255.0. Create four subnets.
How many hosts per subet will we have?
Write the network and broadcast address for every subnet.
Write the first and last address that we can use for hosts on a subnet.
Soln:
Answer: To create four subnets we have to add two ones in the fourth octet (because 22=4). The
decimal notation for that subnet mask is 255.255.255.192. We use this mask for all our new
subnets. Note that the change is in the fourth octet. We have 6 zeros in the changing octet which
gives us 26-2=62 hosts per subnet. The step to get to the next subnet is 26=64.
The first subnet is 192.168.1.0, subnet mask is 255.255.255.192. In short we can write
192.168.1.0 /26. The “/26” tells us that we have 26 ones (binnary) in the subnet mask. The step
to get to the next subnet is 64 (192.168.1.64), which means that the last address in the first subnet
is 192.168.1.63 /26. This is the broadcast address in first subnet. The last addreThe second subnet
is 192.168.1.64 /26. First address that we can use for hosts is 192.168.1.65. The step to get to the next
subnet is 64 (102.168.1.128), which means that the broadcast address for the second subnet is
192.168.1.127 (the last address in subnet). That gives us the last address that we can use for our hosts,
which is 192.168.1.126.ss that we can use for our hosts is 192.168.1.62 /26.
So, the third subnet is 192.168.1.128. First address for hosts is 192.168.1.129. The next subnet is
192.168.1.192, so the broadcast address is 192.168.1.191. The last address for hosts is
192.168.1.190.
The fourth subnet is 192.168.1.192. First address for hosts is 192.168.1.193 and the last host
address is 192.168.1.254. The broadcast address is 192.168.1.255.
Quns: Suppose you are network administrator at ABC organization. ABC organization
have three department A, B and C. Which consists of 32,110 and 25 computer respectively.
You need to subnet the Class C IP address 216.215.214.0 among these departments. Now
perform the sub netting using suitable technique.
Soln:
Department B (110 computers): Since the largest department requires 110 computers, we
need a subnet with at least 128 host addresses to accommodate future growth. We'll use a /25
subnet mask, which provides 128 addresses (2^7 = 128). So, the subnet for Department B
will be 216.215.214.0/25.
Department A (32 computers): Department A requires 32 computers, so we need a subnet
with at least 32 host addresses. We'll use a /27 subnet mask, which provides 32 addresses
(2^5 = 32). So, the subnet for Department A will be 216.215.214.128/27.
Department C (25 computers): Department C requires 25 computers, so we'll allocate a
subnet with at least 32 host addresses to accommodate future growth. We can use the next
available subnet after Department A. So, the subnet for Department C will be
216.215.214.160/27.
Here's the summary of the subnets allocated:
Department B: 216.215.214.0/25 (255.255.255.128) - Range: 216.215.214.0 to
216.215.214.127 (126 usable IP addresses)
Department A: 216.215.214.128/27 (255.255.255.224) - Range: 216.215.214.128 to
216.215.214.159 (30 usable IP addresses)
Department C: 216.215.214.160/27 (255.255.255.224) - Range: 216.215.214.160 to
216.215.214.191 (30 usable IP addresses)
Quns-8: Write the importance of super netting. Find the summarize route and common subnet
mask if a router has the following mentioned networks in its routing table.
198.132.98.0
198.132.99.0
198.132.100.0
198.132.101.0
198.132.105.0
Soln:
Super netting is about aggregating networks together to form a larger network (a super network or super
net). The main purpose of supernetting is reducing the size of the routing table on routers. For
example, instead of a router having 8 individual routes (pointing to the same next hop), it can have an
aggregated route of these 8 individual routes.
This is important for several reasons:
It saves memory and processing resources on routing devices. Basically, they need less
space to store their routing table and less processing power to search through the routing
table.
It provides stability on the network because fluctuations in one part of the network are
not propagated to all parts of the network i.e. fluctuations can be isolated.
Rules for supernetting:
1. All the IP address should be contiguous.
2. Size of all the small networks should be equal and must be in form of 2n.
3. First IP address should be exactly divisible by whole size of supernet.
4 address contiguous networks
11000110.10000100. 01100010.00000000
11000110.10000100. 01100011.00000000
11000110.10000100.01100100.00000000
11000110.10000100.01100101.00000000
11000110.10000100. 01101001.00000000
In the above IP addresses first two octets are common and in the third octet first four bits are different and
other remaining four bits are same i.e.
11000110.10000100. 01100010.00000000
11000110.10000100. 01100011.00000000
11000110.10000100.01100100.00000000
11000110.10000100.01100101.00000000
11000110.10000100. 01101001.00000000
To calculate the supernet mask change different bits in third octet in zeros and same bits into one i.e.
11000110.10000100. 11110000.00000000
Its equivalent decimal form are: 198.132.240.0/20 (20 is because8+8+4=20) It is supernet mask
Supernet address is: 11000110.10000100. 01100000.00000000(convert different four bits in third
octet in to zero) and other four remain unchanged
The decimal equivalent supernet address is 198.132.96.0/20
Question: Available Subnet 19.0.0.0/8 required 20000 hosts per subnet write down the new
subnet mark. Write the number is networks. Write down the subnet ranges.
Ans
19.0.0.0
255.0.0.0
11111111.00000000.00000000.00000000
11111111.11111111.10000000.00000000
2 ^15 =32768
Fifteen host bit have been saved
New subnet marks – 255.255.128.0
128 is the increment
32768 -2 =32766
2 ^9 = 512 networks
Subnet Ranges
19.0.0.0 - 19.0.127.255
19.0.128.0 -19.0.255.255
19.1.0.0 - 19.1.125.255
Ans so on