Arp, DHCP, Icmp
Arp, DHCP, Icmp
Computer Networks
Module : Data Link Layer and Network Layer
Topic : 2.11 ARP, DHCP and ICMP
21-1 ADDRESS MAPPING
21.2
Address Resolution Protocol (ARP)
■ It is a communication protocol used for
discovering the link layer address, such as a
MAC address, associated with a given internet
layer address, typically an IPv4 address.
■ Address Resolution Protocol (ARP) is a protocol
or procedure that connects an ever-changing
Internet Protocol (IP) address to a fixed physical
machine address, also known as a media
access control (MAC) address
■ It is a network protocol used to find out the
hardware (MAC) address of a device from an IP
address.
■ The sending device uses ARP to translate IP
addresses to MAC addresses.
■ The device sends an ARP request message
containing the IP address of the receiving device.
■ Two part protocol:
■ Request from source asking for hardware
address
■ Reply from destination carrying hardware
address
21.4
Figure 21.1 ARP operation
21.5
Figure 21.2 ARP packet
21.6
Figure 21.3 Encapsulation of ARP packet
21.7
Figure 21.4 Four cases using ARP
21.8
Note
21.9
Example
21.1
A host with IP address 130.23.43.20 and physical address
B2:34:55:10:22:10 has a packet to send to another host
with IP address 130.23.43.25 and physical address
A4:6E:F4:59:83:AB. The two hosts are on the same
Ethernet network. Show the ARP request and reply
packets encapsulated in Ethernet frames.
Solution
Figure 21.5 shows the ARP request and reply packets.
Note that the ARP data field in this case is 28 bytes, and
that the individual addresses do not fit in the 4-byte
boundary. That is why we do not show the regular 4-byte
boundaries for these addresses.
21.10
Figure 21.5 Example 21.1, an ARP request and reply
21.11
Figure 21.6 Proxy ARP
21.12
DHCP
■ It is a method for assigning Internet Protocol
(IP) addresses permanently or to individual
computers in an organization’s network
■ DHCP lets a network administrator supervise
and distribute IP addresses from a central
point and automatically sends a new IP
address when a computer is plugged into a
different place in the network
■ Configuration parameters for network hosts
✔IP address , Router, Subnet Mask , Others
21.13
DHCP provides static and dynamic
address allocation that can be
manual or automatic.
▪ Static
❖Is a number that is assigned to a computer by an
Internet service provider (ISP) to be its permanent
address on the Internet
✔Dynamic
❖The temporary IP address is called a dynamic IP
address
21.14
Why is DHCP Important?
223.1.3.1 223.1.3.2
223.1.3.0/24
17
DHCP Client Server Interaction
DHCP server: 223.1.2.5 DHCP discover arriving
client
src : 0.0.0.0, 68
Broadcast: is there a
dest.: 255.255.255.255,67
DHCPyiaddr:
server 0.0.0.0
out there?
transaction ID: 654
DHCP offer
src: 223.1.2.5, 67
Broadcast: I’m a DHCP
dest: 255.255.255.255, 68
server!
yiaddrr:Here’s an IP
223.1.2.4
transaction
address youID:can
654use
lifetime: 3600 secs
DHCP request
src: 0.0.0.0, 68
dest:: 255.255.255.255, 67
Broadcast: OK. I’ll take
yiaddrr: 223.1.2.4
that IP address!
transaction ID: 655
lifetime: 3600 secs
DHCP ACK
src: 223.1.2.5, 67
dest: 255.255.255.255,
Broadcast: 68
OK. You’ve
yiaddrr: 223.1.2.4
got that IPID:
transaction address!
655
lifetime: 3600 secs
18
Advantages of DHCP
▪ DHCP minimizes the administrative burden
19
Disadvantages of DHCP
▪ When DHCP server is unavailable, client is unable to
access enterprises network
20
21-2
ICMP
The IP protocol has no error-reporting or error-
correcting mechanism. The IP protocol also lacks a
mechanism for host and management queries. The
Internet Control Message Protocol (ICMP) has been
designed to compensate for the above two deficiencies.
It is a companion to the IP protocol.
Topics discussed in this section:
Types of Messages
Message Format
Error Reporting and Query
Debugging Tools
21.21
ICMP Protocol
■ It is a classic example of a client server
application.
■ Part of the Internet protocol suite.
■ The ICMP server executes on all IP end
system computers and all IP intermediate
systems (i.e routers).
■ Protocol for the exchange of error messages
and other vital information between
Internet entities such as hosts and routers.
21.22
■ The protocol is used to report problems with
delivery of IP datagrams within an IP network.
■ when a particular End system is not responding
■ when an IP network is not reachable
■ when a node is overloaded
■ when error occurs in IP header information, etc.
❑The protocol is also frequently used by Internet
managers to
❑ verify correct operations of End Systems and
❑ to check that routers are correctly routing packets to
the specified destinations.
21.23
Figure 21.8 General format of ICMP
messages
21.24
Code Definition
0 Net Unreachable
1 Host Unreachable
2 Protocol Unreachable
3 Port Unreachable
4 Fragmentation needed & Don’t Fragment was set
5 Source Route failed
6 Destination Network Unknown
7 Destination Host Unknown
8 Source Host Isolated
9 Communication Destination Network is Administratively
Prohibited
10 Communication Destination Host is Administratively
Prohibited
11 Destination Network Unreachable for Type of Service
12 Destination Host Unreachable for Type of Service
13 Communication Administratively Prohibited
14 Host Precedence Violation
15 Precedence Cutoff Violation
21.25
■ ICMP functions
■ Announce network errors: such as a host or
entire portion of the network being
unreachable, due to some type of failure.
■ Announce network congestion: When a router
begins buffering too many packets, due to an
inability to transmit them as fast as they are
being received, it will generate ICMP Source
Quench messages. Directed at the sender,
these messages should cause the rate of
packet transmission to be slowed.
21.26
■ Assist Troubleshooting: ICMP supports an Echo
function, which just sends a packet on a round--
trip between two hosts. Ping, a common network
management tool, is based on this feature. Ping
will transmit a series of packets, measuring
average round-- trip times and computing loss
percentages.
■ Announce Timeouts: If an IP packet's TTL field
drops to zero, the router discarding the packet will
often generate an ICMP packet announcing this
fact. TraceRoute is a tool which maps network
routes by sending packets with small TTL values
and watching the ICMP timeout announcements.
21.27
ICMP Applications
■ There are two simple and widely used applications which
are based on ICMP:
■ Ping
■ The ping utility checks whether a host is alive &
reachable or not. This is done by sending an ICMP
Echo Request packet to the host, and waiting for
an ICMP Echo Reply from the host
■ Traceroute.
■ Trace route is a utility that records the route
through the Internet between your computer and a
specified destination computer. It also calculates
and displays the amount of time each hop took
21.28
Figure 21.9 Error-reporting
messages
21.29
Note
21.30
Figure 21.10 Contents of data field for the error
messages
21.31
Figure 21.12 Query
messages
21.32