Вы находитесь на странице: 1из 7

.

2014

Subnetting -
Exercise Questions
Networking
abdulsami.pk@gmail.com
PUCIT

Punjab University College of Information Technology, University of the Punjab.

Prepared by Abdul SaMi PakITSolutions.com 1/7
IP Addressing and Subnetting
Exercise


1. Write the default subnet Masks for the Class A, Class B and Class C IP addresses.
Ans:
For class A: 255.0.0.0
For class B: 255.255.0.0
For class C: 255.255.255.0



2. How we can distinguish Class A, Class B, Class C, Class D and Class E IP addresses from each
other. Write the range of first octet in binary and decimal for all the 5 IP address classes
Ans:
Class Address Ending Address
A 1.0.0.0 127.255.255 255
B 128.0.0.0 191.255.255.255
C 192.0.0.0 233.255.255.255
D 224.0.0.0 239.255.255.255
E 240.0.0.0 255.255.255.255



3. Write the default subnet Masks for the following IP addresses:
a. 100.100.225.100
b. 200.0.0.2
c. 190.47.115.0
d. 192.11.39.2
e. 101.7.80.0
Ans:
a: 255.0.0.0
b: 255.255.255.0
c: 255.255.0.0
d: 255.255.255.0
e: 255.0.0.0



4. Write down the three available ranges for assigning Private IP addresses recommended by IANA
(Internet Assigned Number Authority).
Ans:
10.0.0.0 10.255.255.255
172.16.0.0 172.31.255.255
192.168.0.0 192.168.255.255



Punjab University College of Information Technology, University of the Punjab.

Prepared by Abdul SaMi PakITSolutions.com 2/7
5. What do we mean by Loopback address? Write down a Loopback address and its use.

Ans:
The loopback interface is not a physical interface and has no hardware associated
with it. It is a software interface that is always reachable regardless of the physical
interface status. RFC3513 defines the loopback interface address as 0:0:0:0:0:0:0:1,
or: 1 in condensed form. An IPv6 node uses the loopback interface to send packets to
it. The standard prohibits anode from forwarding a packet with a destination address
of a loopback.

6. What is the difference between a broadcast address and Network address? Why the all zeros
and all ones addresses are usually not assigned as host IP addresses?
Ans:
Network address
This is the designation used in routing to send packets to a remote network
For example, 10.0.0.0, 172.16.0.0, and 192.168.10.0.

Broadcast address
The address used by applications and hosts to send information to all nodes on a
network is called the broadcast address.
For example, 255.255.255.255, which is all networks, All nodes;
172.16.255.255, which is all subnets and hosts on network 172.16.0.0;
And 10.255.255.255, which broadcasts to all subnets and hosts on network 10.0.0.0.

7. A mask is used to distinguish how many bits are there in Network ID portion and how many are in
host ID portion. We can extract the Network Address from the given IP address using the mask.
(Assume that no subnetting is done). Extract the network address from the following IP addresses:
a. 139.65.225.4
b. 201.35.20.18
c. 190.47.115.6
d. 192.11.39.2
e. 10.7.80.0
Ans:
a: It belongs to class B(16-bit) so 2 portion is for network address and 2
portion is for hosted address.

b: It belongs to class C(24-bit) so 3 portion is for network address and 1 portion is for
hosted address.

c: It belongs to class B(16-bit) so 2 portion is for network address and 2 portion is for hosted
address.

d: It belongs to class C(24-bit) so 3 portion is for network address and 1 portion is for
hosted address.

e: It belongs to class A(8-bit) so 1 portion is for network address and 3 portion
is for hosted address.



Punjab University College of Information Technology, University of the Punjab.

Prepared by Abdul SaMi PakITSolutions.com 3/7
8. A broadcast address is the one that addresses to all the hosts in any network. State that to create a
broadcast address, all the bits of network ID portion, or all the bits of host ID portion are set to 1?
Write down the broadcast addresses of the networks to which the following IP addresses belong.
(No subnetting)
a. 139.65.225.4
b. 201.35.20.18
c. 190.47.115.6
d. 192.11.39.2
e. 10.7.80.0
Note: First of all find network address of each address then find broadcast of that network.

Ans:
A: Network Address: 139.65.0.0 Broadcast Address: 139.65.255.255
B: Network Address: 201.35.20.0 Broadcast Address: 201.35.20.255
C: Network Address: 190.47.0.0 Broadcast Address: 190.47.255.255
D: Network Address: 192.11.39.0 Broadcast Address: 192.11.39.255
E: Network Address: 10.0.0.0 Broadcast Address: 10.255.255.255


9. In subnetting, we actually borrow some bits of Host ID to be used as Subnet ID. Each Subnet ID
is used to identify a unique subnet and each host ID is used to identify a unique host within a
subnet. If you add more bits to the subnet ID portion, then the hosts per subnet will increase or
decrease?

Ans:
If we add more bits to the Subnet ID Portion, then the Host ID Portion will be
decrease.

Punjab University College of Information Technology, University of the Punjab.

Prepared by Abdul SaMi PakITSolutions.com 4/7
10. Subnet Mask or Custom mask tells us that how many bits are used for Subnet ID portion and how
many for host ID portion. Remember, that in a subnet mask, we place 1s against all network ID
and subnet ID bits and 0s against all the host ID bits. Identify how many bits are used for
subnetting in the following IP address using its subnet mask:

a. IP Address: 139.65.225.4 Subnet Mask: 255.255.224.0
Bits for Subnet ID Portion: 19 (11111111.11111111.11100000.00000000)
Bits for Host ID Portion: 13 (11111111.11111111.11100000.00000000)

b. IP Address: 139.65.225.4 Subnet Mask: 255.255.248.0
Bits for Subnet ID Portion: 21
Bits for Host ID Portion: 11

c. IP Address: 201.35.20.18 Subnet Mask: 255.255.255.128
Bits for Subnet ID Portion: 25
Bits for Host ID Portion: 7

d. IP Address: 201.35.20.18 Subnet Mask: 255.255.255.240
Bits for Subnet ID Portion: 28
Bits for Host ID Portion: 4

e. IP Address: 190.47.115.6 Subnet Mask: 255.255.128.0
Bits for Subnet ID Portion: 17
Bits for Host ID Portion: 15

f. IP Address: 190.47.115.6 Subnet Mask: 255.255.252.0
Bits for Subnet ID Portion: 22
Bits for Host ID Portion: 10

g. IP Address: 192.11.39.2 Subnet Mask: 255.255.255.192
Bits for Subnet ID Portion: 26
Bits for Host ID Portion: 6

h. IP Address: 192.11.39.2 Subnet Mask: 255.255.255.224
Bits for Subnet ID Portion: 27
Bits for Host ID Portion: 5

i. IP Address: 10.7.80.0 Subnet Mask: 255.240.0.0
Bits for Subnet ID Portion: 12
Bits for Host ID Portion: 20

j. IP Address: 10.7.80.0 Subnet Mask: 255.255.128.0
Bits for Subnet ID Portion: 17
Bits for Host ID Portion: 15


11. Extract the Network Addresses of the given IP addresses in question number 10, using the subnet
masks given with them. (Remember that ANDing the IP address with the Mask extracts the
network address from the given IP address).


Punjab University College of Information Technology, University of the Punjab.

Prepared by Abdul SaMi PakITSolutions.com 5/7
12. Specify a suitable Subnet Mask for the following cases: (You have to decide how many bits
should be taken as subnet ID from the host ID portion to satisfy the required number of subnets).

Ans:
a. Class A Network with 10 subnets
255.240.0.0 is Suitable Subnet Mask.
b. Class B Network with 120 subnets
255.255.254.0 is Suitable Subnet Mask.
c. Class B Network with 13 subnets
255.255.240.0 is Suitable Subnet Mask.
d. Class C Network with 20 subnets
255.255.255.248 is Suitable Subnet Mask.
e. Class A Network with 1115 subnets
255.255.224.0 is Suitable Subnet Mask.
f. Class A Network with 5000 subnets
255.255.248.0 is Suitable Subnet Mask.
g. Class B Network with 500 subnets
255.255.128.0 is Suitable Subnet Mask.
h. Class C Network with 21 subnets
255.255.255.248 is Suitable Subnet Mask.

13. Suppose you have a class B Network 172.121.225.0. Your task is to design a subnet scheme so
that we can create 130 Network segments (subnets) within this Network.

Ans:
a. How many bits would you use for the subnet ID?
24 bits would be used by Subnet ID.
b. How many bits would you use for the Host ID?
8 bits would be used by Host ID.
c. How many maximum possible subnets will be there?
256 Subnet are Possible.
d. How many maximum possible hosts will be there in each subnet?
256 Host per Subnet is Possible.
e. Write down the Subnet Mask of your scheme.
255.255.255.0
f. Write down the first valid IP address, last valid IP address and the
broadcast address of the Third subnet of your scheme.
First Valid IP --- 172.121.0.1
Last Valid IP --- 172.121.255.254
Broadcast address of 3
rd
Subnet of your Scheme is 172.121.3.255


Punjab University College of Information Technology, University of the Punjab.

Prepared by Abdul SaMi PakITSolutions.com 6/7
14. Suppose you have a class C Network 206.94.115.0. Your task is to design a subnet scheme so
that we can create 14 Network segments (subnets) within this Network. Each subnet should
support 10-12 hosts.
Ans:

a. How many bits would you use for the subnet ID?
28 bits would be used as Subnet ID.
b. How many bits would you use for the Host ID?
24 bits would be used as Host ID.
c. How many maximum possible subnets will be there?
16 possible Subnets
d. How many maximum possible hosts will be there in each subnet?
16 Hosts per Subnet
e. Write down the Subnet Mask of your scheme.
255.255.255.240

15. You joined an ISP and your first assignment to distribute the 160.16.0.0 /16 address among these
blocks of customers as follows:
a. The first group has 200 medium size businesses, each need 128 addresses.
b. The second group has 400 small businesses, each need 16 addresses.
c. The third group has 2048 households, each need 4 addresses.

Design the sub blocks and give the slash notation for each sub block. Find out how many addresses are still
available after these allocations.

Ans:

Subnets Hosts

a: 200 128
b: 400 16
c: 2048 4

Оценить