0% found this document useful (0 votes)
174 views13 pages

The ARP Packet Is Encapsulated Within An Ethernet Packet

The ARP packet is encapsulated within an Ethernet frame and uses a type field of 0x0806. ARP is used to map IP addresses to MAC addresses so that a host can resolve the hardware address of a destination before sending an IP packet over Ethernet. When a host wants to send an IP packet, it first checks its ARP table for the MAC address corresponding to the destination IP address. If not found, the host broadcasts an ARP request to get the MAC address before encapsulating and transmitting the IP packet.

Uploaded by

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

The ARP Packet Is Encapsulated Within An Ethernet Packet

The ARP packet is encapsulated within an Ethernet frame and uses a type field of 0x0806. ARP is used to map IP addresses to MAC addresses so that a host can resolve the hardware address of a destination before sending an IP packet over Ethernet. When a host wants to send an IP packet, it first checks its ARP table for the MAC address corresponding to the destination IP address. If not found, the host broadcasts an ARP request to get the MAC address before encapsulating and transmitting the IP packet.

Uploaded by

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

The ARP packet is encapsulated within an Ethernet packet.

Note: Type field for Ethernet is x0806


The ARP packet is encapsulated within an Ethernet packet.
Note: Type field for Ethernet is x0806
3

ARP Packet Format


Ethernet II header

Destination Source Type


address address 0x8060
ARP Request or ARP Reply Padding CRC

6 6 2 28 10 4

Hardware type (2 bytes) Protocol type (2 bytes)


Hardware address Protocol address
Operation code (2 bytes) Request = 1 : Reply = 2
length (1 byte) length (1 byte)
Source hardware address*

Source protocol address*

Target hardware address*

Target protocol address*

* Note: The length of the address fields is determined by the corresponding address length fields
4

What is ARP used for?

•Suppose want to send a packet over (say) an


Ethernet.

• We only know the destination's IP address to build


the Ethernet frame we have to know the Ethernet
address that the destination has.

This is what ARP does: Find the hardware address


corresponding to an IP address
Figure 8.5 Four cases using ARP
6 TCP/IP
Protocol Suite
Figure 8.6 Example 8.1
7 TCP/IP
Protocol Suite
8

Address Resolution Protocol Table


• Every node maintains an ARP table
▫ (IP address, MAC address) pair
• Consult the table when sending a packet
▫ Map destination IP address to destination MAC
address
▫ Encapsulate and transmit the data packet

• But, what if the IP address is not in the table?


▫ Sender broadcasts: “Who has IP address
1.2.3.156?”
9

How does host A send an IP packet to host B?


Example: A Sending a Packet to B

R
B

A sends packet to R, and R sends packet to B.


10

• Host A constructs an IP packet to send to B


Host A Decides to Send Through R
▫ Source 111.111.111.111, destination 222.222.222.222
• Host A has a gateway router R
▫ Used to reach destinations outside of
111.111.111.0/24
▫ Address 111.111.111.110 for R learned via DHCP

R
B
11

• Host A learns the MAC address of R’s interface


Host A Sends Packet Through R
▫ ARP request: broadcast request for 111.111.111.110
▫ ARP response: R responds with E6-E9-00-17-BB-
4B
• Host A encapsulates the packet and sends to R

R
B
12

• Router R’s adaptor receives the packet


R ▫Decides how
R extracts the to Forward
IP packet Packet
from the Ethernet frame
▫ R sees the IP packet is destined to 222.222.222.222
• Router R consults its forwarding table
▫ Packet matches 222.222.222.0/24 via other adaptor

R
B
13

• Router R’s learns the MAC address of host B


R ▫Sends Packet to B
ARP request: broadcast request for
222.222.222.222
▫ ARP response: B responds with 49-BD-D2-C7-56-
2A
• Router R encapsulates the packet and sends to B

R
B

You might also like