0% found this document useful (0 votes)
5 views7 pages

Lab 06 - IP Addressing and ARP-2

Uploaded by

i222153
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)
5 views7 pages

Lab 06 - IP Addressing and ARP-2

Uploaded by

i222153
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
You are on page 1/ 7

Data Communication and Network

(EL-2007)
LABORATORY MANUAL
Fall 2024

(LAB# 06)
IP Addressing and ARP
Dr. Aamer Hafeez

Student Name: Abdullah Ali

Roll No: 22i-2153

Date: sep 25, 2024

_______________________________
LAB ENGINEER SIGNATURE & DATE

MARKS AWARDED: /10

DCN LAB NUCES, ISLAMABAD Page 1 of 7


Objective
Understand the address translation, and IP addressing

IP addressing (Revision)

NetID and HostID has variable length depending on the size of the network.

Example: Finding NetID and HostID

Task 01: Find the range of IP addresses for the above network. Write at least the first 5 IP
addresses, and the last 5 IP addresses.

227.82.144.0

227.82.144.1

227.82.144.2

DCN LAB NUCES, ISLAMABAD Page 2 of 7


227.82.144.3

227.82.144.4

LAST IP ADDRESS:

227.82.159.251

227.82.159.252

227.82.159.253

227.82.159.254

227.82.159.255

Task 02: Find the range of IP addresses. Write at least the first 5 IP addresses, and the last
5 IP addresses in their range.

a. 21.16.55.231 / 255.255.0.0
First5IPAddresses:
1. 21.16.0.1
2. 21.16.0.2
3. 21.16.0.3
4. 21.16.0.4
5. 21.16.0.5
Last5IPAddresses:
1. 21.16.255.250
2. 21.16.255.251
3. 21.16.255.252
4. 21.16.255.253
5. 21.16.255.254
b. 164.28.96.18 / 255.255.192.0
First5IPAddresses:
1. 164.28.96.1
2. 164.28.96.2
3. 164.28.96.3
4. 164.28.96.4
5. 164.28.96.5

DCN LAB NUCES, ISLAMABAD Page 3 of 7


Last5IPAddresses:
1. 164.28.159.250
2. 164.28.159.251
3. 164.28.159.252
4. 164.28.159.253
5. 164.28.159.254

c. 178.210.98.122 / 255.255.255.252
1. 178.210.98.252
2. 178.210.98.253
3. 178.210.98.254

Task 03: Make a network as shown below, where three networks are connected to each
other via a router. Configure the computers and router so that these computers can
communicate to each other. Select one network ID from the last task for each network given
in the following diagram. Assign the IP addresses to each computer and the router. Label
each device with its IP and MAC address.

MAC Address of Router:

Task 04: Send a packet from host H1 to host H3. Will there be any change in the addresses
contained in the packet? If yes, show that change, and provide reason for that.

Yes, the MAC address changes when a packet passes through a router, but the source IP
remains the same. The packet from Host 1 contains its source IP and MAC address, but once it
reaches the router, the router forwards the packet with the same source IP. However, the router
replaces Host 1’s MAC address with its own outgoing interface MAC address, as routers forward
packets based on IP addresses while updating MAC addresses for the next hop at each layer 2
segment.

DCN LAB NUCES, ISLAMABAD Page 4 of 7


ARP (Address Resolution Protocol)

The Address Resolution itself is a two-step process – a request and a response.

It starts with the initiator sending an ARP Request as a broadcast frame to the entire network. This
request must be a broadcast, because at this point the initiator does not know the target’s MAC
address, and is therefore unable to send a unicast frame to the target.

Since it was a broadcast, all nodes on the network will receive the ARP Request. All nodes will take
a look at the content of the ARP request to determine whether they are the intended target. The
nodes which are not the intended target will silently discard the packet.

The node which is the target of the ARP Request will then send an ARP Response back to the
original sender. Since the target knows who sent the initial ARP Request, it is able to send the ARP
Response unicast, directly back to the initiator.

The entire process is illustrated in this animation:

DCN LAB NUCES, ISLAMABAD Page 5 of 7


Task 05: Run Wireshark to capture some ARP packets. Find an ARP request packet which is
broadcasted by your computer. Check out its packet contents for the source and destination
MAC address in the Ethernet header. Paste its screenshot, and comment on the addresses.

Task 06: From the ARP packets captured above, look for any ARP reply packet. What was
the request for which this reply packet was sent? Also paste the screenshot of this reply
packet.

Task 07: What is an ARP header, and what are its different fields? Comment on the values
of ARP header in the packet of last task.

Arp means address resolution protocol. It maps mac address to IP address. The IP header specifies the
types of network that used at Layer 2 and layer 3 as well as the length of each address. The IP header
includes: Destination Mac address Source Mac address

ETHER TYPE:

DCN LAB NUCES, ISLAMABAD Page 6 of 7


ARP table:

An ARP table/cache is a collection of Address Resolution Protocol entries that are created when
an IP address is resolved to a MAC address. Every computer maintains this table based on the
communication it does with other computers on its network. To view this table on your computer,
run the following command.

> arp –a

To delete the arp table entries, replace -a with -d

Task08: Using the network diagram of Task04, observe the ARP tables of hosts and the router
before and after every communication mentioned below. Show, highlight and comment on any
changes in the ARP tables after every communication.

• host H1 sends a data packet to host H3,


• host H2 sends a data packet to host H3 and
• host H1 sends a data packet to host H2.

You may clear ARP table entries of the computers and the router before a packet is sent.

HOST 1:

HOST 2:

Yes, ARP table changes, As it a dynamic table so it changes with communication. When data is
transferred from host one after some time it start giving no entries found in arp table while arp of host 2
was giving the entries

DCN LAB NUCES, ISLAMABAD Page 7 of 7

You might also like