Sie sind auf Seite 1von 8

Computer Communication Network

LAB REPORT # 05 (IP ADDRESSES AND SUBNETTING)


Submitted To:

Engr. Hina Abrar

Submitted By:

Usama Ibrahim

Qadeer Ahmed

Reg No:

14-EE (E&T)-054

14-EE (E&T)-070

Section: B

Dated: ___________

Presentation Configuration Results TOTAL


Lab#05

(IP ADDRESSES AND SUBNETTING)


Objective
In this lab we will learn about IP addresses and sub netting.

Theory

1. Class A IP address
Class A IP addresses were used for networks that had a large number of hosts on the
network. The class permitted up to 126 networks by using the first octet of the address for
the network identification. The first bit in this octet was always fixed or set to be zero.
The following seven bits in the octet were then set to one which would complete the
network identification. The remaining octets (24 bits) represented the hosts ID and would
allow up to 126 networks with 17 million hosts per network. In a Class A address, the
network number values start at the number and end at 127.
2. Class B IP Address
Class B IP address were assigned to medium to large networks. They allow 16,384
networks by using the first two octets in the address for the network identification. The
first two bits of the first octet are fixed to 1 0. The next 6 bits along with the following
octet then complete the network identification. The third and fourth octet (16 bits) then
represents the host ID. This allows approximately 65,000 hosts per network. Class B
network number values start at 128 and finish at 191.
3. Class C IP Address
Class C IP addresses were used in small LAN configurations. They allow for
approximately 2 million networks by using the first three octets of the address for the
network identification. In a Class C address, the first three bits are fixed to 1 1 0. In the
following three octets, 21 bits make up the network identification. The last octet then
represents the host identification. This allows for 254 hosts per network. A Class C
network number value starts at 192 and ends at 223.
4. Class D IP Address
Class D IP addresses were reserved for multicasting purposes. These addresses begin with an
octet in the 224-239 range. They would have leading bits of 1 1 1 0 and includes addresses
from 224.0.0.0 to 239.255.255.255.
5. Class E IP Address
Class E IP addresses are reserved for experimental use. The first octet of these addresses
ranges between 240 and 255. This range is reserved by the IETF and similar to Class D
networks, should not be assigned to a host device.

Range Of Classes IP Addresses:

Lab Tasks

1. Task No 01
. Find the class of each address.
a) 00000001 00001011 00001011 11101111
b) 11000001 10000011 00011011 11111111
c) 14.23.120.8
d) 252.5.15.111
Procedure:
 First of all convert the binary Numbers into Decimals.
 Check the range of classes and named the IP Addresses according to range of classes.

a) 00000001 00001011 00001011 11101111 (Binary)


1.11.11.239 (Decimal)

This IP Address lies in the range of Class A.


b) 11000001 10000011 00011011 11111111 (Binary)
193.131.27.255 (Decimal)

This IP Address lies in the range of Class C.

c) 14.23.120.8 (Decimal)
This IP Address lies in the range of Class A.
d) 252.5.15.111
This IP Address lies in the range of Class E.
2. Task No 02

1. A block of addresses is granted to a small organization. We know that one of the


addresses is:
205.16.37.39/28. Find
a) Network Address
b) The first usable address
c) The last usable address
d) The broadcast address
e) The number of addresses.

2. Your company would like to break the Class B private IP address range 172.16.0.0 into 60
different subnets
.
Procedure:

 First of all check how many (CDIR) networks required.


 Then check how many bits to be borrowed from the host ID.
 Then check that in which class IP Address lies and according to that class make
the subnet mask of that class.
 Convert the host ID Address into binary and then borrow the number of required
bits from the host ID.
 Toggle the 0’s of host ID bits to 1 according to required number of n.
 Then convert the Given IP Address and subnet mask into Binary and perform
“AND” operation to obtain the Network Address.
 Then change the remaining bits of host ID from 0 to 1. This will give the broad
cast Address.
 Add 1 in the given IP Address to obtain the first usable address and subtract 1
from Network Address to obtain the last usable address.

 For calculating the number of addresses in network use following formulas


No of Network Addresses: 2n-m

No of Host Addresses: 2n -2
 While n= no of bits in Host ID (borrowed); m=no of bits in Host ID (remaining)

Solution (1):

Given IP Address: 205.16.37.39/28

Required number of bits to be borrowed (n)

2n -2= 28
25 -2=30
So, n=5.
This IP Address lies in the range of “Class C”.
Subnet Mask of Class C is:
255.255.255.0
255 Network Address
0Host Address
Binary of Host ID
00000000 (As n=5; so change 1st 5 bits from 0’s to 1) Left to Right

11111000= 248 (Add the 1’s according to binary addition)


Subnet mask is changed to 255.255.255.248
Given IP Address: 205.16.37.39 (Decimal)
11001101.00010000.00100101.00100111 (Binary)
Subnet Mask of Class C is: 255.255.255.0 (Decimal)
11111111.11111111.11111111.11111000 (Binary)
Perform AND operation to these binary addresses:
11001101. 00010000.00100101.00100000 (Binary)
205.16.37.32 (Network Address)

Toggle the last three bits of given IP Address 0 1 and 1  1

205.16.37.39 (Broadcast Address)

Add 1 in Network Address: 205.16.37. (32+1)

205.16.37.33 (First Usable Address)

Subtract 1 from Broadcast Address: 205.16.37. (39-1)

205.16.37.38 (Last Useable Address)

Use formulas for calculating number of Addresses as given above:

No of Network Addresses: 2n-m = 229-3=536870912

No of Host Addresses: 2n -2=23 -2 =6

---------------------------------------------------

Solution (2):

Given IP Address: 172.16.0.0/60S

Required number of bits to be borrowed (n)

2n -2= 60
26 -2=62
So, n=6.
This IP Address lies in the range of “Class B”.
Subnet Mask of Class B is:
255.255.0.0
255 Network Address
0Host Address
Binary of Host ID
00000000 (As n=6; so change 1st 6 bits from 0’s to 1) Left to Right

11111100= 252 (Add the 1’s according to binary addition)


Subnet mask is changed to 255.255.252.0

Given IP Address: 172.16.0.0 (Decimal)


10101100.00010000.00000000.00000000 (Binary)
Subnet Mask of Class C is: 255.255.252.0 (Decimal)
11111111.11111111.11111100.00000000 (Binary)
Perform AND operation to these binary addresses:
11001101. 00010000.00000000.00000000 (Binary)
172.16.0.0 (Network Address)

Toggle the last two bits of given IP Address 0 1 and 1  1

172.16.0.3 (Broadcast Address)

Add 1 in Network Address: 205.16.37. (32+1)

172.16.0.1 (First Usable Address)

Subtract 1 from Broadcast Address: 205.16.37. (39-1)

172.16.0.2 (Last Useable Address)

Use formulas for calculating number of Addresses as given above:

No of Network Addresses: 2n-m = 230-2=268435456

No of Host Addresses: 2n -2=22 -2 =2


Conclusion

In this lab we concluded that by using the concept of sub netting we can assign the
different IP Addresses to many users only by using the one given IP Address.

(Engr. Hina Abrar)

Das könnte Ihnen auch gefallen