8. Frame structure

A frame is the result of the encapsulation process of the packet. This process is carried out at the link layer
data from the OSI model. The generic structure of a frame is composed of some fields, each field is a set of bytes. They are named as follows:

Preamble/SFD: is a sequence of bytes that allows hosts to signal that they are getting ready to transmit a frame.


MAC Addresses fields: this is the identification information (source MAC address and MAC address of destination).

                           Figure 2. 3 - Generic Frame structure

Length or type field: the length field indicates where the frame should end, so we have the exact length of the frame in bytes. The type field allows you to specify the network layer protocol used by the source host.


Data field: represents the application data to be sent by the user. In order to achieve the minimum frame length, bytes can be added to this field.


FCS field (frame check sequence): a transmitted frame may contain several errors. The causes are very varied. This field contains a calculated number called control sequence, this is calculated by the source computer in many ways based on the contents of the current frame. After reception, this sequence is recalculated by the receiver and compared to the sequence found at the received frame, corruption
of a single bit of the frame will cause a difference between the two control sequences. If both numbers match, there is no transmission error. Otherwise, the frame is aborted by the receiver and a new transmission is launched using the connection-oriented protocols of the transport layer. In fact, given that these protocols do not receive the expected ACK they restart the transmission.

 

9. ARP (ADDRESS RESOLUTION PROTOCOL)

When a packet is sent to the data link layer to be encapsulated in a frame, the node
consults a table stored in its memory to find out the MAC address that is mapped
to the destination IP address. This table is called ARP table or ARP cache. The ARP table is stored in the Random Access Memory of the device. Each entry, or row, in the ARP table relates an IP address to a MAC address. The relationship between the two values ​​is called a mapping. In other words, if you choose an IP address in the table you will find the corresponding MAC address. The ARP table temporarily stores local network device mapping. To start the procedure, a sending node attempts to find the MAC address associated with a destination IPv4 address. If this mapping is found in the table, the node uses the founded MAC address as MAC destination address. The frame is then encoded and sended.  

 The ARP table is dynamically updated. A device has two methods to
get MAC addresse associated to an IP address. The first one comes down to hearing traffic on the local area network. When a node receives frames, it saves the source IP and MAC addresses in the ARP table
The second method comes down to sending an ARP request. This request also help us to obtain a pair of addresses, as shown in the following example.
Arp-a command allows you to know the contents of the ARP table on Windows environment.

Example1



ARP request


ARP request op=1

ARP response op=2

RARP request op=3

RARP response op=4

ARP response


Example2 

 

ARP request

ARP response

 

Last modified: Tuesday, 4 June 2024, 11:16 AM