NETWORK LAYER PROTOCOLS
ARP
INTRODUCTION
Need of ARP and RARP
 The Internet is made of a combination of physical networks
connected by devices such as routers
 A packet from source host may pass through several different
networks and finally reaching the destination host
 At the network level the host and routers are recognized by their IP
addresses
 At the physical network the host and routers are recognized by
their MAC addresses(Physical Addresses)
 IP addresses are chosen by the local system administrator to suit the
local network
 Physical addresses are built into the interface hardware by the
manufacturer
INTRODUCTION
 The delivery of a packet to a host or a router requires two levels of
addressing: logical and Physical
 We need to be able to map a logical address to its corresponding
physical address and vice versa
 Mapping Logical to Physical Address
 Mapping Physical to Logical Address
 This can be done by using concept of Address resolution
 Address Resolution Protocol
 Reverse Address Resolution Protocol
ARP(ADDRESS RESOLUTION PROTOCOL )
 It is a protocol which is used to mapping the IP address(logical
address ) to MAC address(Physical or Ethernet address)
 ARP is usually considered to be a part of the data link layer
ARP IDEA
ADDRESS TRANSLATION WITH ARP
 ARP Request:
Argon broadcasts an ARP request to all stations on the network: “What is
the MAC Address of 128.143.71.1?
Argon
128.143.137.144
00:a0:24:71:e4:44
Router137
128.143.137.1
00:e0:f9:23:a8:20
ARP Request:
What is the MAC address
of 128.143.71.1?
ARP Request is Multicast
ADDRESS TRANSLATION WITH ARP
 ARP Reply:
Router 137 responds with an ARP Reply which contains the hardware
address
Argon
128.143.137.144
00:a0:24:71:e4:44
Router137
128.143.137.1
00:e0:f9:23:a8:20
ARP Reply:
The MAC address of 128.143.71.1
is 00:e0:f9:23:a8:20
ARP Reply is Unicast
ARP OPERATION
 A host or router needs to find the MAC Address of the another host or router
sends the ARP Request packet
 ARP Request packet contains the physical and IP address of the sender and IP
address of the receiver
 ARP request packet is broadcast to the network
 All hosts and router on the local network read the request
 The target host recognises the request for its IP address
 The target sends an ARP Reply packet containing its own physical address and
IP address (the other hosts need do nothing)
 The source gets the reply and reads out the target's physical address
 The source can now use that physical address to send IP packets
ARP REQUEST/REPLY FORMAT FIELDS
 Hardware Type field - Type of physical network (e.g., Ethernet)
 Protocol Type field - Higher-layer protocol (e.g., IP)
 HLen (“hardware” address length) and PLen (“protocol” address
length) fields - length of the link-layer address and higher-layer
protocol address, respectively
 Operation field - specifies whether this is a request or a response
 The source and target hardware (Ethernet) and protocol (IP)
addresses
ARP(ADDRESS RESOLUTION PROTOCOL )
 It is a protocol which is used mapping the MAC address (Physical or
Ethernet address) to IP address(logical address )
 Some hosts, such as mobile workstations(laptops), do not know their own
IP address when they are booted
 They only knows the MAC(physical) address saved in ROM
 They need IP address to communicate with the internet and create the
IP datagram
 They can use physical address to get the logical address
 The client host creates a RARP request and broadcast on the local
network
 RARP server exist on the network process the request and response with
available IP address(RARP Reply)
DYNAMIC HOST CONFIGURATION
PROTOCOL (DHCP)
 The RARP is almost out of date. It is replaced by two protocols
BOOTP and DHCP
 Dynamic Host Configuration Protocol (DHCP) is a protocol that
allows a server to dynamically distribute IP addressing and
configuration information to clients
 DHCP allows IP addresses to be “leased” for some period
of time
 DHCP assigns IP addresses for clients on demand
 DHCP relies on the existence of a DHCP server that is
responsible for providing configuration information to hosts
DYNAMIC HOST CONFIGURATION PROTOCOL
(DHCP)
DHCP operation
 To contact a DHCP server, a newly booted or attached host sends a
DHCP DISCOVER message to a special IP address (255.255.255.255)
that is an IP broadcast address
 This message will be received by all hosts and routers on that
network.(Routers do not forward such packets onto other networks,
preventing broadcast to the entire Internet)
 The server then reply to the host that generated the discovery message
by DHCP OFFER(all the other nodes would ignore it)
 Not possible to have one DHCP server on every network
 This still creates a potentially large number of servers that
need to be correctly and consistently configured.
DYNAMIC HOST CONFIGURATION
PROTOCOL (DHCP)
 Thus, DHCP uses the concept of a relay agent
 There is at least one relay agent on each network, and it is
configured with just one piece of information: the IP address of
the DHCP server
 When a relay agent receives a DHCPDISCOVER message, it
Unicast it to the DHCP server
 Then it get the DHCPOFFER response from the DHCP server and
send back to the requesting client
DHCP
SERVER
RELAY
AGENT
160.50.50.1
160.50.50.2
160.50.50.3
Switch
180.130.54.45
180.130.54.45
DHCP
SERVER
RELAY
AGENT
160.50.50.1
160.50.50.2
160.50.50.3
Switch
180.130.54.45 180.130.54.45
Here the black computer wants to register
itself on the network. So it sends a request
packet to the DHCP server requesting an
IP address
DHCP
SERVER
RELAY
AGENT
160.50.50.1
160.50.50.2
160.50.50.3
Switch
180.130.54.45
180.130.54.45
It broadcasts
DHCPDISCOVER msg
over local network with
dest address
255.255.255.255
DHCP
SERVER
RELAY
AGENT
160.50.50.1
160.50.50.2
160.50.50.3
Switch
180.130.54.45
180.130.54.45
DHCP
SERVER
RELAY
AGENT
160.50.50.1
160.50.50.2
160.50.50.3
Switch
180.130.54.45
180.130.54.45
Agent will forward
the message from
black computer to
DHCP server
DHCP
SERVER
RELAY
AGENT
160.50.50.1
160.50.50.2
160.50.50.3
Switch
180.130.54.45
180.130.54.45
The request received from the
black system is processed by
DHCP server or agent. Others
ignore it.
DHCP contains a
pool of IP addresses
that can be leased
to hosts on demand
DHCP server
Ip address pool
Various scopes
DHCP
SERVER
RELAY
AGENT
160.50.50.1
160.50.50.2
160.50.50.3
Switch
180.130.54.45
180.130.54.45
Server sends available IP
address
DHCP
SERVER
RELAY
AGENT
160.50.50.1
160.50.50.2
160.50.50.3
Switch
180.130.54.45
180.130.54.45
Relay agent
pass the msg
from server to
the black
computer
DHCP
SERVER
RELAY
AGENT
160.50.50.1
160.50.50.2
160.50.50.3
Switch
180.130.54.45
180.130.54.45
Now the client has
a new ip adress. It
has to renew it
time to time.
160.50.50.4
INTERNET CONTROL MESSAGE PROTOCOL
VERSION 4 (ICMPV4)
Need of ICMP
 IP provides unreliable and connectionless datagram delivery
 The IP protocol has no error-reporting or error-correcting
mechanism
 What happens if something goes wrong? What happens if a
router must discard a datagram because it cannot find a router
to the final destination, or because the time-to-live field has a
zero value?
 The Internet Control Message Protocol (ICMP) has been designed
to compensate for the above two problems
 ICMP is a companion(friend) to the IP protocol
 ICMP defines a collection of error messages that are sent back to
the source host whenever a router or host is unable to process an IP
datagram successfully
POSITION OF ICMP IN THE NETWORK LAYER
ICMP ENCAPSULATION
General format of ICMP Messages
ICMP always reports error messages to the
original source.
ERROR REPORTING MESSAGES
Destination-unreachable messages
 When a host cannot deliver a datagram or router cannot route a
datagram, the datagram is discarded and they sends a Destination-
unreachable messages
 Destination-unreachable messages can be created by the destination
host and routers
Source-quench message
 It informs the source that a datagram has been discarded due to
congestion(jamming) in a router or the destination host
 The source must slow down the sending of datagrams until the
congestion is relieved
ERROR REPORTING MESSAGES
Time-exceeded Message
 When the final destination does not receive all of the fragments in a
set time, it discards the received fragments and sends a time-
exceeded message to the original source
Parameter-problem Message
 A parameter-problem message can be created by a router or the
destination host
TCP/IP
Protocol
Suite
35
Figure 9.10 Redirection concept
IP packet 1
RM
2
IP packet
3
IP packet
4
Error Reporting Messages
TCP/IP
Protocol
Suite
36
A redirection message is sent from a router
to a host on the same local network.
Note
QUERY MESSAGES
Echo-request and echo-reply Message
 An echo-request message can be sent by a host or router
 An echo-reply message is sent by the host or router that receives
an echo-request message.
 Echo-request and echo-reply messages can test the reach ability of a
host
 Echo-request and echo-reply messages can be used by network
managers to check the operation of the IP protocol.
Time stamp-request and time stamp-reply messages
 Timestamp-request and timestamp-reply messages can be used to
calculate the round-trip time between a source and a destination
machine even if their clocks are not synchronized.

ARP,RARP,DHCP,ICMP NETWORKING PROTOCOLS INTERNET

  • 1.
  • 2.
  • 3.
    INTRODUCTION Need of ARPand RARP  The Internet is made of a combination of physical networks connected by devices such as routers  A packet from source host may pass through several different networks and finally reaching the destination host  At the network level the host and routers are recognized by their IP addresses  At the physical network the host and routers are recognized by their MAC addresses(Physical Addresses)  IP addresses are chosen by the local system administrator to suit the local network  Physical addresses are built into the interface hardware by the manufacturer
  • 4.
    INTRODUCTION  The deliveryof a packet to a host or a router requires two levels of addressing: logical and Physical  We need to be able to map a logical address to its corresponding physical address and vice versa  Mapping Logical to Physical Address  Mapping Physical to Logical Address  This can be done by using concept of Address resolution  Address Resolution Protocol  Reverse Address Resolution Protocol
  • 5.
    ARP(ADDRESS RESOLUTION PROTOCOL)  It is a protocol which is used to mapping the IP address(logical address ) to MAC address(Physical or Ethernet address)  ARP is usually considered to be a part of the data link layer
  • 6.
  • 7.
    ADDRESS TRANSLATION WITHARP  ARP Request: Argon broadcasts an ARP request to all stations on the network: “What is the MAC Address of 128.143.71.1? Argon 128.143.137.144 00:a0:24:71:e4:44 Router137 128.143.137.1 00:e0:f9:23:a8:20 ARP Request: What is the MAC address of 128.143.71.1? ARP Request is Multicast
  • 8.
    ADDRESS TRANSLATION WITHARP  ARP Reply: Router 137 responds with an ARP Reply which contains the hardware address Argon 128.143.137.144 00:a0:24:71:e4:44 Router137 128.143.137.1 00:e0:f9:23:a8:20 ARP Reply: The MAC address of 128.143.71.1 is 00:e0:f9:23:a8:20 ARP Reply is Unicast
  • 9.
    ARP OPERATION  Ahost or router needs to find the MAC Address of the another host or router sends the ARP Request packet  ARP Request packet contains the physical and IP address of the sender and IP address of the receiver  ARP request packet is broadcast to the network  All hosts and router on the local network read the request  The target host recognises the request for its IP address  The target sends an ARP Reply packet containing its own physical address and IP address (the other hosts need do nothing)  The source gets the reply and reads out the target's physical address  The source can now use that physical address to send IP packets
  • 11.
    ARP REQUEST/REPLY FORMATFIELDS  Hardware Type field - Type of physical network (e.g., Ethernet)  Protocol Type field - Higher-layer protocol (e.g., IP)  HLen (“hardware” address length) and PLen (“protocol” address length) fields - length of the link-layer address and higher-layer protocol address, respectively  Operation field - specifies whether this is a request or a response  The source and target hardware (Ethernet) and protocol (IP) addresses
  • 12.
    ARP(ADDRESS RESOLUTION PROTOCOL)  It is a protocol which is used mapping the MAC address (Physical or Ethernet address) to IP address(logical address )  Some hosts, such as mobile workstations(laptops), do not know their own IP address when they are booted  They only knows the MAC(physical) address saved in ROM  They need IP address to communicate with the internet and create the IP datagram  They can use physical address to get the logical address  The client host creates a RARP request and broadcast on the local network  RARP server exist on the network process the request and response with available IP address(RARP Reply)
  • 13.
    DYNAMIC HOST CONFIGURATION PROTOCOL(DHCP)  The RARP is almost out of date. It is replaced by two protocols BOOTP and DHCP  Dynamic Host Configuration Protocol (DHCP) is a protocol that allows a server to dynamically distribute IP addressing and configuration information to clients  DHCP allows IP addresses to be “leased” for some period of time  DHCP assigns IP addresses for clients on demand  DHCP relies on the existence of a DHCP server that is responsible for providing configuration information to hosts
  • 14.
    DYNAMIC HOST CONFIGURATIONPROTOCOL (DHCP) DHCP operation  To contact a DHCP server, a newly booted or attached host sends a DHCP DISCOVER message to a special IP address (255.255.255.255) that is an IP broadcast address  This message will be received by all hosts and routers on that network.(Routers do not forward such packets onto other networks, preventing broadcast to the entire Internet)  The server then reply to the host that generated the discovery message by DHCP OFFER(all the other nodes would ignore it)  Not possible to have one DHCP server on every network  This still creates a potentially large number of servers that need to be correctly and consistently configured.
  • 15.
    DYNAMIC HOST CONFIGURATION PROTOCOL(DHCP)  Thus, DHCP uses the concept of a relay agent  There is at least one relay agent on each network, and it is configured with just one piece of information: the IP address of the DHCP server  When a relay agent receives a DHCPDISCOVER message, it Unicast it to the DHCP server  Then it get the DHCPOFFER response from the DHCP server and send back to the requesting client
  • 16.
  • 17.
    DHCP SERVER RELAY AGENT 160.50.50.1 160.50.50.2 160.50.50.3 Switch 180.130.54.45 180.130.54.45 Here theblack computer wants to register itself on the network. So it sends a request packet to the DHCP server requesting an IP address
  • 18.
  • 19.
  • 20.
  • 21.
    DHCP SERVER RELAY AGENT 160.50.50.1 160.50.50.2 160.50.50.3 Switch 180.130.54.45 180.130.54.45 The request receivedfrom the black system is processed by DHCP server or agent. Others ignore it. DHCP contains a pool of IP addresses that can be leased to hosts on demand
  • 22.
    DHCP server Ip addresspool Various scopes
  • 23.
  • 24.
  • 25.
  • 27.
    INTERNET CONTROL MESSAGEPROTOCOL VERSION 4 (ICMPV4) Need of ICMP  IP provides unreliable and connectionless datagram delivery  The IP protocol has no error-reporting or error-correcting mechanism  What happens if something goes wrong? What happens if a router must discard a datagram because it cannot find a router to the final destination, or because the time-to-live field has a zero value?  The Internet Control Message Protocol (ICMP) has been designed to compensate for the above two problems  ICMP is a companion(friend) to the IP protocol  ICMP defines a collection of error messages that are sent back to the source host whenever a router or host is unable to process an IP datagram successfully
  • 28.
    POSITION OF ICMPIN THE NETWORK LAYER
  • 29.
  • 31.
    General format ofICMP Messages
  • 32.
    ICMP always reportserror messages to the original source.
  • 33.
    ERROR REPORTING MESSAGES Destination-unreachablemessages  When a host cannot deliver a datagram or router cannot route a datagram, the datagram is discarded and they sends a Destination- unreachable messages  Destination-unreachable messages can be created by the destination host and routers Source-quench message  It informs the source that a datagram has been discarded due to congestion(jamming) in a router or the destination host  The source must slow down the sending of datagrams until the congestion is relieved
  • 34.
    ERROR REPORTING MESSAGES Time-exceededMessage  When the final destination does not receive all of the fragments in a set time, it discards the received fragments and sends a time- exceeded message to the original source Parameter-problem Message  A parameter-problem message can be created by a router or the destination host
  • 35.
    TCP/IP Protocol Suite 35 Figure 9.10 Redirectionconcept IP packet 1 RM 2 IP packet 3 IP packet 4 Error Reporting Messages
  • 36.
    TCP/IP Protocol Suite 36 A redirection messageis sent from a router to a host on the same local network. Note
  • 37.
    QUERY MESSAGES Echo-request andecho-reply Message  An echo-request message can be sent by a host or router  An echo-reply message is sent by the host or router that receives an echo-request message.  Echo-request and echo-reply messages can test the reach ability of a host  Echo-request and echo-reply messages can be used by network managers to check the operation of the IP protocol. Time stamp-request and time stamp-reply messages  Timestamp-request and timestamp-reply messages can be used to calculate the round-trip time between a source and a destination machine even if their clocks are not synchronized.