Ipv4 Arp Rarp DHCP
Ipv4 Arp Rarp DHCP
Protocols:
ARP, IPv4, ICMPv4,
IPv6, and ICMPv6
Figure 20.1 Protocols at network layer
1. IGMP
2. IP (main protocol)
3. ARP
4. RARP
5. ICMP
IP criteria:
► Responsible for host to host delivery of datagrams
from a source to destination.
► Needs a protocol called ARP to find the
MAC(Physical) address of the next hop.
► IP is designed for unicast delivery.
► For multicasting, IP uses the services of IGMP.
► During the datagram delivery, IP needs the services
of ICMP to handle unusual situation (Error).
► The current version is IPV4.
Figure 8-1
20.1 ARP
Mapping
Packet Format
Encapsulation
Operation
ARP (Address Resolution Protocol):
► The hosts and routers are recognized at the network level
by their IP addresses, which is universally unique.
► Limitation:
1. A machine can change its network card, results in a new
MAC address.
2. In some LANs (Local talk (Apple)), the MAC address
changes every time the computer is turned on.
3. A mobile computer can move from one computer to
another computer, results in a new MAC address.
►Dynamic mapping (ARP, RARP)
Each time a machine knows one of the
two addresses, it can use a protocol to
find the other.
2 protocols (ARP and RARP) have been
designed for dynamic mapping.
ARP maps an IP address to a MAC
address.
RARP/DHCP maps a MAC address to
an IP address.
Figure 20.2 ARP operation
Figure 8-6
ARP packet
Figure 20.4 Encapsulation of ARP packet
Four cases using ARP
Note:
Solution
Datagram
Fragmentation
Characteristics:
► Host to host delivery protocol for the internet.
► Unreliable and connectionless datagram
protocol (best effort delivery service) and also
applicable for packet switching network.
► IP provides no error and flow control mechanism.
► IP provides only error detection mechanism and
discards the packet if it is corrupted.
► For reliability, IP is paired with TCP.
Continue……
Datagram:
A datagram variable length packet has two parts. Header and Data.
Header Data
20 -60 bytes (65536-20) ((65536-60)
bytes
Figure 20.7 IP datagram
Demultiplexing
Protocols
Checksum:
The checksum in the IP packet covers only the header, but not the
data. The reasons are:
•The checksum for the IP datagram doesn’t have to check the
encapsulated data.
•The header of the IP packet changes with each visited router,
but the data do not.
Figure 20.9 Example of checksum calculation
Figure 20.10 MTU
Types of Messages
Necessity of ICMP:
► IP has no error-reporting or error-correcting
mechanism.
► IP has no mechanism for host and management
queries. A host sometimes needs to know if a
router or another host is alive.
ICMPs messages are not passed directly to the data
link layer. Instead the messages are first
encapsulated inside IP datagram before going to the
lower level.
If the value of the protocol field = 1, in the IP
datagram, IP data implies ICMP message.
Figure 20.12 ICMP encapsulation
Note:
► Error reporting:
1. IP is an unreliable protocol, it cannot perform error
checking and error control.
2. ICMP was designed for this shortcoming.
3. ICMP always reports error messages to the original
source (originator of the datagram).
4. ICMP doesn’t correct errors; the correction belongs to
the higher level protocols.
5. Five types of errors are reported.
Figure 20.13 Error-reporting messages
Error Reporting
► Destination unreachable:
If a router cannot route a datagram or a host cannot deliver a datagram, the
datagram is discarded, the router or host sends a destination unreachable
message to the source host.
IPv6 Addresses
Categories of Addresses
IPv6 Packet Format
Fragmentation
ICMPv6
Transition
Demerit of IPV4:
► IPV4 has a two-level address structure (net ID and host ID)
categorized into five classes. The address space is insufficient.
► Unicast address
Defines a single computer
► Anycast address
1. Anycast address is a new type of address incorporated in IPv6.
2. It defines a group of computers with addresses that have the same
prefix.
3. In contrast to conducting transmission to all nodes in a group as in
multicast, anycast sends the packet only to the nearest node in the
group.
► Multicast address:
A packet sent to a multicast address must be delivered to each member
of the set.
Figure 20.19 Format of an IPv6 datagram
Fragmentation in IPv6:
► The policy is same as that of IPV4.
► In IPV4, a source or router is responsible to
fragment the datagram if necessary.
► In IPV6, only the source is responsible to fragment
the datagram.
►A source uses a path MTU discovery technique to
find the smallest MTU supported by any network
on the path.
► Ifpath MTU discovery technique is not used, the
source must fragment the datagram to a size of 576
bytes or smaller.
Figure 20.20 Comparison of network layers in version 4 and version 6
Figure 20.21 Three transition strategies from IPv4 to IPv6
Figure 20.22 Three transition strategies
Dual stack:
A station should run IPV4 and IPV6 simultaneously until all the systems in the
internet use IPV6.
When it is necessary to send a packet to a destination, the source host queries
the DNS (Domain name system). If the DNS returns and IPV4 address, the source
sends an IPV4 packet, else if IPV6 address then it sends IPV6 packet.
Figure 20.23 Tunneling
When two IPV6 host computers want to communicate with each other, and must
pass through a network that uses IPV4 protocol, it is used.
To pass through the IPV4 protocol region, the packet must have an IPV4 address.
So IPV6 packet must be encapsulated into IPV4 packet, when the packet enters
into the region and the protocol value is set to 41, and leaves IPV4 header when
it exits the region.
Figure 20.24 Header translation
It is necessary when majority of the internet has moved to IPV6, but some systems
still use IPV4.
Here source may want to use IPV6, but the receiver does not understand IPV6.
Tunneling is not a solution here.
Here header format must be changed totally through header translation.