Transcript Chapter 3
Chapter 3
Address Resolution Protocol (ARP)
ARP
• ARP is a protocol that is part of the TCP/IP
protocol suite
• Responsible for translating a logical IP
address into a hardware address
Hardware Address
• Consists of six two-digit hexadecimal characters
separated by hyphens
• Example: 00-E0-98-00-DE-D5
• Pre-assigned to network interface cards when they
are manufactured
• Also called:
–
–
–
–
NIC address
MAC address – most common term
Physical address
Ethernet address
Hardware Address – Cont.
• Hardware address is unique
• Used to identify source and destination
• No good in identifying what network the
host is located on
• Difficult for humans to remember
IP addresses
• Logical address that specifies what network the
host is on as well as identifies a specific host on
the network
• Used by TCP/IP protocol suite
• Example: 118.14.126.57
• 32 bits in length
• Some bits specify the network segment
• Subnet mask is used to determine which bits
specify the network
• Example subnet: 255.255.255.0
IP Conversion
• When a packet of data is being encapsulated
on the source computer, the destination’s
hardware address must be included in the
packet header.
• ARP is responsible for determining the
hardware address of the destination before
the frame can be sent out
ARP
• ARP determines the MAC address of the
destination from the destination’s IP address
• This process is called resolving the address
Host Initialization
• Each host must initialize itself on the local
network
• The host sends out an ARP broadcast
containing its IP address and its hardware
address to all hosts on the local network
Local Destination Host Vs.
Remote Destination Host
• The sending host can determine if the frame is
being sent to a local host or a remote host
• This can be determined from the destination’s IP
address
• Example:
–
–
–
–
Source IP: 118.14.126.17
Destination IP: 118.14.126.32
Subnet Mask: 255.255.255.0
Local destination in this example
Resolution on a Local Network
• ARP cache on the host sending the frame is
checked to see if the destination IP address is
found. If so, the specified MAC address is used
• If no mapping is found in the local ARP cache, an
ARP request is sent out
• This request asks: “Who does this IP address
belong to and what is your hardware address?”
• This ARP request is sent out as a broadcast frame
which goes to each host on the hetwork
Local ARP Resolution – Cont.
• Each host receiving the ARP request checks the IP
address to see if it matches theirs
• If the IP address does not match, the request is
ignored
• If the IP address does match, an ARP reply is sent
back to the source host that originated the ARP
request
• The ARP reply can be sent back because the
source IP and hardware address are contained in
the ARP request
Local ARP Resolution – Cont.
• The ARP cache on both machines is
updated with the correct IP and
corresponding hardware addresses
• Communication can now be established
between the two hosts
Remote ARP Resolution
• In this case, the destination is located on a remote
network instead of the local network
• The destination will have to be reached through
one or more routers
• ARP must resolve the address of each router that
stands between the source and destination
• Each stop through a router is called a hop
• ARP adds the hardware address for the first router
when sending the frames out
Remote ARP Resolution – Cont.
• The IP address of the destination is determined to
be remote
• The routing table on the source is checked to see if
a known route exists to the network that the
destination host is on
• If a route is found,the ARP cache is checked to see
whether the mapping to the router that’s needed to
reach the destination is in place
• If no route is found, the source machine checks its
ARP cache for the default gateway IP address and
corresponding MAC address-ARP resolution may
be needed here for default gateway
Remote ARP Resolution –Cont.
• The source sends the destination IP address to the
default gateway (router) in order for the router to
determine which network the destination is on
• The router determines whether the IP address of
the destination is local or remote
• If the destination is remote, the router consults its
own routing table for a route to the network where
the destination node is found
• The router also consults its own ARP cache to
determine the hardware address of the next router
Remote ARP Resolution – Cont.
• The source host was on a remote network, so the
destination host has to consult its own routing
table for a path back to the source.
• It also must consult its own ARP cache as well to
get the hardware address of the router that will be
used to get the packet back to the source
• The packet travels back through the routers to the
original network where the source host is found
Utilities
• Arp –a
• Ping
• Ipconfig /all