0% found this document useful (0 votes)
9 views6 pages

Tutorial 3 - REFerence

The document outlines the structure and fields of ARP and IPv4 packets, detailing various hardware and protocol types, lengths, and operations involved in ARP requests and replies. It also explains the function of TTL in preventing packet looping in networks and describes ICMP fields related to echo requests and replies. Additionally, it covers types of ARP messages, including Proxy ARP, Gratuitous ARP, Reverse ARP, and Inverse ARP.

Uploaded by

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

Tutorial 3 - REFerence

The document outlines the structure and fields of ARP and IPv4 packets, detailing various hardware and protocol types, lengths, and operations involved in ARP requests and replies. It also explains the function of TTL in preventing packet looping in networks and describes ICMP fields related to echo requests and replies. Additionally, it covers types of ARP messages, including Proxy ARP, Gratuitous ARP, Reverse ARP, and Inverse ARP.

Uploaded by

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

Hardware Type (HTYPE): 16 bits

This field specifies the network link protocol type.


Ethernet has a value of 1
IEEE 802 Networks have a value of 6
ARCNET has a value of 7
Frame Relay has a value of 15
Asynchronous Transfer Mode has a value of 16
HDLC has a value of 17
Fibre Channel has a value of 18
Serial Line has a value of 20

Protocol Type (PTYPE): 16 bits


This field specifies the internetwork protocol for which the ARP request is intended. For IPv4,
this has the value 0x0800, AR 0x0806.
Hardware Length (HLEN): 8 bits
Length (in octets) of a hardware address. For Ethernet, the address length is 6 (MAC address is
6 bytes or 48 bits)
Protocol Length (PLEN): 8 bits
Length (in octets) of internetwork addresses. The internetwork protocol is specified in PTYPE. In
this example: IPv4 address length is 4 (or 32 bits).
Operation (OPER): 16 bits
Specifies the operation that the sender is performing: 1 for request, 2 for reply.
Sender Hardware Address (SHA): 48 bits
The MAC address of the device sending the ARP message.
Sender protocol address (SPA): 32 bits
Internetwork address of the sender (The IP address of the device sending the ARP message)
Target hardware address (THA): 48 bits
The MAC address of the target device (filled in by the target device in the ARP response)
Target protocol address (TPA): 32 bits
Internetwork address of the intended receiver.

Special broadcast MAC address - ff:ff:ff:ff:ff:ff that means "all devices on the local network."

Type of ARP
1. Proxy ARP:
2. Gratuitous ARP:
Gratuitous ARP (Address Resolution Protocol) is a type of ARP message that serves two main
purposes:
Address Conflict Detection: When a device is configured with an IP address, it sends a
gratuitous ARP to ensure that no other device on the network is using the same IP address. If
another device is using the same IP address, it will reply, indicating a conflict.
Updating ARP Tables: Gratuitous ARP can also be used to inform other devices on the network
of the sender's IP-to-MAC address mapping. This is useful when a device's MAC address has
changed (e.g., due to a network interface card replacement) or when there is a need to refresh
the ARP entries in other devices' ARP tables.
3. Reverse ARP (RARP):
4. Inverse ARP (InARP)
IPv4 Fields
Version: Indicates the IP version, which is IPv4 in this case.
Header Length: Specifies the length of the IP header. If the header length is 20
bytes, which is equivalent to 5 * 4 bytes.
Differentiated Services Field: used for quality of service and congestion control.
Here, both fields are set to their default values.
Total Length:
The total length of the IP packet, including both the header and the data payload.
Identification
A unique identifier for the packet, used in fragmentation and reassembly.
Flags
The flags field is used for fragmentation control.
Fragment Offset:
Indicates the position of this fragment in the original packet. Since it is 0, this
packet is not fragmented.
Time to Live:
The TTL (Time to Live) value, initially set by the sender and decremented by each router. When
TTL reaches 0, the packet is discarded to prevent it from looping indefinitely.
TTL stands for Time to Live in IPv4. It is a field in the IP header that specifies the maximum
number of hops (or router passes) a packet can take before being discarded. The TTL field helps
prevent packets from endlessly circulating in the network if there is a routing loop.

How it Works:

• Initial Value: When an IP packet is created, the sender sets the TTL value, which is
usually a default value like 64 or 128.
• Decrementing: Each time the packet passes through a router, the router decrements
the TTL value by 1.
• Expiration: If the TTL value reaches 0 before the packet reaches its destination, the
packet is discarded, and the router that discards the packet typically sends an ICMP
(Internet Control Message Protocol) "Time Exceeded" message back to the sender.

Protocol:
Indicates the protocol used in the data portion of the IP packet. If it is ICMP
(Internet Control Message Protocol), protocol number 1.

Header Checksum:
A checksum for the IP header to ensure data integrity.
Source Address:
The IP address of the sending device.
Destination Address:
The IP address of the receiving device.
ICMP Fields
Type:
The ICMP type field. Type 0 indicates an Echo Reply, which is a response to an
Echo Request (ping).
Code: 0
The ICMP code field. For Echo Reply, the code is always 0.

Checksum:
A checksum for the ICMP message to ensure data integrity.
Identifier (BE):
A unique identifier used to match requests with replies. BE (Big Endian) and LE
(Little Endian) refer to different byte orders.
Sequence Number (BE):)
A sequence number used to track the order of packets. BE and LE refer to
different byte orders.
Request frame:
Indicates that this is a response to the first request frame, and the response time
is 1.006 milliseconds.
Data
The payload data of the ICMP message. In this case, it consists of 32 bytes of data:

You might also like