0% found this document useful (0 votes)
37 views4 pages

Lab No. 9-Updated

The document discusses Address Resolution Protocol (ARP) and the arp command. It provides background on how ARP maintains a table mapping IP addresses to MAC addresses on local networks. The arp command can be used to view the ARP table and lookup MAC addresses corresponding to IP addresses. The document also describes the structure of ARP headers and packets. It provides steps to display the local ARP table, ping addresses to populate the table, and use the arp -? option to view help for the command.

Uploaded by

mayashamaim72002
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
37 views4 pages

Lab No. 9-Updated

The document discusses Address Resolution Protocol (ARP) and the arp command. It provides background on how ARP maintains a table mapping IP addresses to MAC addresses on local networks. The arp command can be used to view the ARP table and lookup MAC addresses corresponding to IP addresses. The document also describes the structure of ARP headers and packets. It provides steps to display the local ARP table, ping addresses to populate the table, and use the arp -? option to view help for the command.

Uploaded by

mayashamaim72002
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 4

Lab 9

Objective:

 Introduce Address Resolution Protocol (ARP) and the arp –a workstation command.
 Explore the arp command help feature using the -? Option.

Background / Preparation

ARP is used as a tool for confirming that a computer is successfully resolving network Layer 3 addresses
to Media Access Control (MAC) Layer 2 addresses.

ARP maintains a table in the computer of IP and MAC address combinations. In other words, it keeps
track of which MAC address is associated with an IP address. If ARP does not know the MAC address of a
local device, it issues a broadcast using the IP address. This broadcast searches for the MAC address that
corresponds to the IP address. If the IP address is active on the LAN, it will send a reply from which ARP
will extract the MAC address. ARP will then add the address combination to the local ARP table of the
requesting computer.

MAC addresses and therefore ARP are only used within the LAN. When a computer prepares a packet for
transmission, it checks the destination IP address to see if it is part of the local network. It does this by
checking to see if the network portion of the IP address is the same as the local network. If it is, the ARP
process is consulted to get the MAC address of the destination device using the IP address. The MAC
address is then applied to the data packet and used for delivery.

If the destination IP address is not local, the computer will need the MAC address of the default gateway.
The default gateway is the router interface that the local network is connected to in order to provide
connectivity with other networks. The gateway MAC address is used because the packet will be delivered
there and the router will then forward it to the network it is intended for.

If the computer does not receive any packets from an IP address after a few minutes, it will drop the
MAC/IP entry from the ARP table assuming the device has logged off. Later attempts to access that IP
address will cause ARP to do another broadcast and update the table.

The Structure of Arp Header:

Below listed fields are there in an ARP message.

1. Hardware Type: This is to specify the type of hardware used by the local network to transmit the
Address Resolution Protocols message. Once common hardware under this category would be
the ‘Ethernet’ with a value equal to 1.
2. Protocol Type: The protocol type is a 16-bit field used to specify the type of protocol.
3. Hardware size: This is the length in bytes for the MAC address; generally, we see the ethernet
has a MAC address of 6 bytes long.
4. Protocol Size: It represents the length of the IPV4 logical address, IPV4 address is generally 4
bytes long.
5. OpCode: . Operation Code indicates that the packet is an ARP Request (1) or an ARP Response
(2).It specifies the nature of the ARP message.An ARP Request has an assigned value of 1,
whereas the ARP reply holds the value of 2.
6. Sender MAC address: Layer 2 (MAC) address for the device sending the message.
7. Sender IP address: Protocol address in IPV4 for the device sending the message.
8. Target MAC address: Layer 2 (MAC) address of the intended receiver. This field does not hold
any value during the request phase and works only during the reply phase.
9. Target IP address: This address the protocol address for the intended receiver.

Step 1

Establish a network connection If the connection to the Internet is dial-up, connect to the ISP to ensure
that the computer has an IP address. In a TCP/IP LAN with a Dynamic Host Configuration Protocol (DHCP)
server it should not be necessary to do this step.

Step 2

Access a command prompt

One of the quickest ways to launch the Command Prompt, in any modern version of Windows, is to use
the Run window. Then, type cmd or cmd.exe and press Enter or click/tap OK

Step 3

a. Display the ARP table a. In the window type arp -a and press Enter. Do not be surprised if there
are no entries. The message displayed will probably be, ‘No ARP Entries Found’. Windows
computers remove any addresses that are unused after a couple minutes.
b. Try pinging a couple local addresses and a website URL. Then re-run the command. The figure
below shows a possible result of the arp -a command. The MAC address for the website will be
listed because it is not local, but that will cause the default gateway to be listed. In the example
below 10.36.13.1 is the default gateway while the 10.36.13.92 and 10.36.13.101 are other
network computers. Notice that for each IP address there is a Physical Address, or MAC, and
type, indicating how the address was learned.
Step 4

Ping several URLs

a. Ping the following URLs and note the IP address of each. Also select one additional URL to ping
and record it below:

www.cisco.com: _____________________________

www.vu.edu.pk:_______________________________

a. Now run the arp –a command again and record the MAC addresses for each of the above next to
their IP addresses.

Use the ARP Help Feature

Try the command arp -? To see the help feature and look over the options.
The purpose of this step is not so much the ARP command options but to demonstrate using the? To
access help, if available.

You might also like