You are on page 1of 4

King Abdul-Aziz University Computer Networks

Faculty of Computing and Information Technology CPIT370


Department of Information Technology

Lab#10: IP address Design and Subnetting

Lab Instructor: Akbar Badhusha MOHIDEEN

Objectives:
The objective of this lab is to design the IP addresses for a network topology from the given
requirement specification. IP addresses are designed using both FLSM (Fixed Length Subnet Mask)
and also VLSM (Variable Length Subnet Mask).

Outline of this lab:


1. Classes in IP v4 addresses.
2. IP address design using FLSM.
3. IP address design using VLSM.

Activity Outcomes
At the end of this lab the student will be able to design IP addresses for a network topology using
VLSM and FLSM methods.

Lab Tasks

Classes of IPv4 addresses:

1
Designing IP addresses using FLSM:
You have purchased the network address 192.168.10.0 / 24. You need to do IP addressing for the
following specification. Your company has four Departments. Each department has 20 PCs and 3
network printers.

Solution:

From the given network address, the subnetting must be done using the last octet (last 8 bits).

-------------- network portion ---------  host portion

192 . 168 . 10 . 0 Decimal form

1100 0000 . 1010 1000 . 0000 1010 . 0000 0000 Binary form

As the company has 4 departments, you need to have 4 subnets and each of those subnets must
accommodate all the PCs and printers. Each network will need an address for the gateway. So for each
subnet we need 20 PCs + 3 printers + 1 gateway = 24 IPs. We have 8 bits in the last octet of the
network address (host portion in the given network address). Among these we have to decide how
many bits for host part and how many bits for subnet part.

To find the number of bits needed to accommodate m hosts the formula is: 2n – 2 ≥ m
Where n is the number of host bits and m is the total number of host IPs needed.
Using this formula for 24 hosts, we need 5 bits. ( 25 - 2 = 30 ≥ 23)

If the last octet is considered,

.0 0 0 0 0 0 0 0
|-sub net part-|-----host part--------|

The new subnet mask can be found after deciding on the number of host bits, by the following formula.
Host bits are the last few bits. So (32 – n) will be the subnet mask number which is 32 – 5 = 27 here.
Subnet mask is /27 and in decimal form it is 27 ones among 32 bits.
Subnet mask in prefix notation: /27
Subnet mask in binary form: 1111 1111. 1111 1111. 1111 1111. 1110 0000
Subnet Mask in decimal form: 255 . 255 . 255 . 224

The four network addresses are: only last octet is shown:


.000 00000 = .0
.001 00000 = .32
.010 00000 = .64
.011 00000 = .96

Now try to fill up the following table which has all the needed IP addresses for the network topology.

S.No Subnet Subnet Network Fist usable Last usable Broadcast


Mask addresses address address address
1 Department A /27 192.168.10.0 192.168.10.1 192.168.10.30 192.168.10.31
2 Department B /27 192.168.10.32 192.168.10.33 192.168.10.62 192.168.10.63
2
3 Department C /27 192.168.10.64 192.168.10.65 192.168.10.94 192.168.10.95
4 Department E /27 192.168.10.96 192.168.10.97 192.168.10.126 192.168.10.127

Allocate the IP addresses from the first usable to last usable IPs rage to all the PCs, printers and
gateway in the respective departments.

IP address Design using FLSM:

Given an IP network address and mask of 172.20.0.0 / 24 (address / mask), design an IP addressing
scheme that satisfies the following requirements:

Subnet Number of Hosts


Subnet A 2
Subnet B 6
Subnet C 47
Subnet D 125

Host computers from each subnet will use the first available IP address in the address block. Router
interfaces will use the last available IP address in the address block.

Start with largest host requirement network.

Step 1: Design Subnet D address block.


Begin the logical network design by satisfying the requirement of Subnet D, which requires the largest
block of IP addresses. Refer to the subnet chart, and pick the first address block that will support
Subnet D.

First find the subnet mask by calculating the number of bits needed for the hosts in the network using
the formula
2n – 2 ≥ m
Where n is the number of host bits and m is the total number of host IPs needed.
n
Here 2 – 2 ≥ 125, so n will be 7

To find the subnet mask using n use the formula: subnet mask = 32 – n

Mask is 32 – 7 = /25

Network address of the first network will be the given network address. First host address will be one
greater than network address.

Broad cast address will be the address one less than the next network address. Last usable address will
be the address one less than the broadcast address. So it will be easy to find Broadcast addresses and
last usable address after finding the next network address.

To find the next network address, use this formula:

Next network address is = current network address + 2n


Here the next network address = 172.20.0.0 + 27 = 172.20.0.0 + 128 = 172.20.0.128
One less than this address will be broadcast – 172.20.0.127 and one less than this will be last usable
address 172.20.0.126

3
Fill in the following table with IP address information for SubnetD:

Network Mask First Host Last Host Broadcast


Address address address address
172.20.0.0 255.255.255.128 172.20.0.1 172.20.0.126 172.20.0.127
OR /25

Then select the next largest host requirement subnet which is C here.

Step 2: Design Subnet C address block.


Satisfy the requirement of Subnet C, the next largest IP address block. Refer to the subnet chart, and
pick the next available address block that will support Subnet C.

Use the above procedure to fill in the following table with IP address information for Subnet C:

Network Mask First Host Last Host Broadcast


Address address address address
172.20.0.128 255.255.255.192 172.20.0.129 172.20.0.190 172.20.0.191
OR /26

Then select the next largest host requirement subnet which is B here.

Step 3: Design Subnet B address block.


Satisfy the requirement of Subnet B, the next largest IP address block. Refer to the subnet chart, and
pick the next available address block that will support Subnet B.
Use above procedure in step 1 to fill in the following table with IP address information for Subnet B:

Network Mask First Host Last Host Broadcast


Address address address address
172.20.0.192 255.255.255.248 172.20.0.193 172.20.0.198 172.20.0.199
OR /29

Then select the next largest host requirement subnet which is A here.

Step 4: Design Subnet A address block.


Satisfy the requirement of Subnet A. Refer to the subnet chart, and pick the next available address
block that will support Subnet A. Using the above procedure fill in the following table with IP address
information for Subnet A:

Network Mask First Host Last Host Broadcast


Address address address address
172.20.0.200 255.255.255.252 172.20.0.201 172.20.0.202 172.20.0.203
OR /30

Now you may allocate IPs to different hosts in all the subnets

You might also like