Docsity

Ethernet frame format in computer networks, Lecture notes of Computer Networks

Toggle sidebar
bg1
Ethernet Frame Format
Ethernet (IEEE 802.3) Frame Format:
1. PREAMBLE –Ethernet frame starts with a 7-Bytes
Preamble. This is a pattern of alternative 0’s and 1’s which
indicates starting of the frame and allow sender and
receiver to establish bit synchronization. Initially, PRE
(Preamble) was introduced to allow for the loss of a few
bits due to signal delays. But today’s high-speed Ethernet
doesn’t need Preamble to protect the frame bits. PRE
(Preamble) indicates the receiver that frame is coming and
allow the receiver to lock onto the data stream before the
actual frame begins.
2. Start of frame delimiter (SFD) –-This is a 1-Byte field
that is always set to 10101011. SFD indicates that
upcoming bits are starting the frame, which is the
destination address. Sometimes SFD is considered part of
PRE, this is the reason Preamble is described as 8 Bytes in
many places. The SFD warns station or stations that this is
the last chance for synchronization.
3. Destination Address –-This is a 6-Byte field that contains
the MAC address of the machine for which data is destined.
4. Source Address –-This is a 6-Byte field that contains the
MAC address of the source machine. As Source Address is
always an individual address (Unicast), the least significant
bit of the first byte is always 0.
5. Length –Length is a 2-Byte field, which indicates the
length of the entire Ethernet frame. This 16-bit field can
hold a length value between 0 to 65534, but length cannot
be larger than 1500 Bytes because of some own limitations
of Ethernet.
6. Data –-This is the place where actual data is inserted, also
known as-Payload. Both IP header and data will be
inserted here if Internet Protocol is used over Ethernet. The
maximum data present may be as long as 1500 Bytes. In
pf3
pf4
pf5
pf8
pf9
pfa
pfd

Partial preview of the text

Download Ethernet frame format in computer networks and more Lecture notes Computer Networks in PDF only on Docsity!

Ethernet Frame Format

Ethernet (IEEE 802.3) Frame Format:

  1. PREAMBLE – Ethernet frame starts with a 7-Bytes Preamble. This is a pattern of alternative 0’s and 1’s which indicates starting of the frame and allow sender and receiver to establish bit synchronization. Initially, PRE (Preamble) was introduced to allow for the loss of a few bits due to signal delays. But today’s high-speed Ethernet doesn’t need Preamble to protect the frame bits. PRE (Preamble) indicates the receiver that frame is coming and allow the receiver to lock onto the data stream before the actual frame begins.
  2. Start of frame delimiter (SFD) – This is a 1-Byte field that is always set to 10101011. SFD indicates that upcoming bits are starting the frame, which is the destination address. Sometimes SFD is considered part of PRE, this is the reason Preamble is described as 8 Bytes in many places. The SFD warns station or stations that this is the last chance for synchronization.
  3. Destination Address – This is a 6-Byte field that contains the MAC address of the machine for which data is destined.
  4. Source Address – This is a 6-Byte field that contains the MAC address of the source machine. As Source Address is always an individual address (Unicast), the least significant bit of the first byte is always 0.
  5. Length – Length is a 2-Byte field, which indicates the length of the entire Ethernet frame. This 16-bit field can hold a length value between 0 to 65534, but length cannot be larger than 1500 Bytes because of some own limitations of Ethernet.
  6. Data – This is the place where actual data is inserted, also known as Payload. Both IP header and data will be inserted here if Internet Protocol is used over Ethernet. The maximum data present may be as long as 1500 Bytes. In

case data length is less than minimum length i.e. 46 bytes, then padding 0’s is added to meet the minimum possible length.

  1. Cyclic Redundancy Check (CRC) – CRC is 4 Byte field. This field contains a 32-bits hash code of data, which is generated over the Destination Address, Source Address, Length, and Data field. If the checksum computed by destination is not the same as sent checksum value, data received is corrupted.
  2. VLAN Tagging – The Ethernet frame can also include a VLAN (Virtual Local Area Network) tag, which is a 4-byte field inserted after the source address and before the EtherType field. This tag allows network administrators to logically separate a physical network into multiple virtual networks, each with its own VLAN ID.
  3. Jumbo Frames – In addition to the standard Ethernet frame size of 1518 bytes, some network devices support Jumbo Frames, which are frames with a payload larger than 1500 bytes. Jumbo Frames can increase network throughput by reducing the overhead associated with transmitting a large number of small frames.
  4. Ether Type Field – The EtherType field in the Ethernet frame header identifies the protocol carried in the payload of the frame. For example, a value of 0x0800 indicates that the payload is an IP packet, while a value of 0x indicates that the payload is an ARP (Address Resolution Protocol) packet.
  5. Multicast and Broadcast Frames – In addition to Unicast frames (which are sent to a specific destination MAC address), Ethernet also supports Multicast and Broadcast frames. Multicast frames are sent to a specific group of devices that have joined a multicast group, while Broadcast frames are sent to all devices on the network.
  6. Collision Detection – In half-duplex Ethernet networks, collisions can occur when two devices attempt to transmit data at the same time. To detect collisions, Ethernet uses a Carrier Sense Multiple Access with Collision Detection (CSMA/CD) protocol, which listens for activity on the network before transmitting data and backs off if a collision is detected.

Note: Size of frame of Ethernet IEEE 802.3 varies 64 bytes to 1518

bytes including data length (46 to 1500 bytes).

Error Detection & Correction

The sender while creating a frame counts the number of 1s in it.

For example, if even parity is used and number of 1s is even then

one bit with value 0 is added. This way number of 1s remains

even.If the number of 1s is odd, to make it even a bit with value 1

is added.

The receiver simply counts the number of 1s in a frame. If the

count of 1s is even and even parity is used, the frame is

considered to be not-corrupted and is accepted. If the count of 1s

is odd and odd parity is used, the frame is still not corrupted.

If a single bit flips in transit, the receiver can detect it by counting

the number of 1s. But when more than one bits are erro neous,

then it is very hard for the receiver to detect the error.

Cyclic Redundancy Check (CRC)

CRC is a different approach to detect if the received frame

contains valid data. This technique involves binary division of the

data bits being sent. The divisor is generated using polynomials.

The sender performs a division operation on the bits being sent

and calculates the remainder. Before sending the actual bits, the

sender adds the remainder at the end of the actual bits. Actual

data bits plus the remainder is called a codeword. The sender

transmits data bits as codewords.

At the other end, the receiver performs division operation on

codewords using the same CRC divisor. If the remainder contains

all zeros the data bits are accepted, otherwise it is considered as

there some data corruption occurred in transit.

Multiple-Bit Error

A multiple-bit error is an error type that arises when more than one bit in a data transmission is affected. Although multiple-bit errors are relatively rare when compared to single-bit errors, they can still occur, particularly in high-noise or high-interference digital environments. Multiple-Bit Error

Burst Error

When several consecutive bits are flipped mistakenly in digital transmission, it creates a burst error. This error causes a sequence of consecutive incorrect values. Burst Error

To detect errors, a common technique is to introduce redundancy bits that provide additional information. Various techniques for error detection include::

  1. Simple Parity Check
  2. Two-dimensional Parity Check
  3. Checksum
  4. Cyclic Redundancy Check (CRC) Error Detection Methods

Simple Parity Check

Simple-bit parity is a simple error detection method that involves adding an extra bit to a data transmission. It works as:  1 is added to the block if it contains an odd number of 1’s, and  0 is added if it contains an even number of 1’s This scheme makes the total number of 1’s even, that is why it is called even parity checking. Disadvantages  Single Parity check is not able to detect even no. of bit error.  For example, the Data to be transmitted is 101010. Codeword transmitted to the receiver is 1010101 (we have used even parity). Let’s assume that during transmission, two of the bits of code word flipped to 1111101. On receiving the code word, the receiver finds the no. of

 On the sender’s end, the segments are added using 1’s complement arithmetic to get the sum. The sum is complemented to get the checksum.  The checksum segment is sent along with the data segments. Checksum – Operation at Receiver’s Side  At the receiver’s end, all received segments are added using 1’s complement arithmetic to get the sum. The sum is complemented.  If the result is zero, the received data is accepted; otherwise discarded. Disadvantages  If one or more bits of a segment are damaged and the corresponding bit or bits of opposite value in a second segment are also damaged.

Cyclic Redundancy Check (CRC)

 Unlike the checksum scheme, which is based on addition, CRC is based on binary division.

 In CRC, a sequence of redundant bits, called cyclic redundancy check bits, are appended to the end of the data unit so that the resulting data unit becomes exactly divisible by a second, predetermined binary number.  At the destination, the incoming data unit is divided by the same number. If at this step there is no remainder, the data unit is assumed to be correct and is therefore accepted.  A remainder indicates that the data unit has been damaged in transit and therefore must be rejected.

Disadvantages: Overhead : Error detection requires additional resources and processing power, which can lead to increased overhead on the network. This can result in slower network performance and increased latency. False Positives : Error detection mechanisms can sometimes generate false positives, which can result in unnecessary retransmission of data. This can further increase the overhead on the network. Limited Error Correction : Error detection can only identify errors but cannot correct them. This means that the recipient must rely on the sender to retransmit the data, which can lead to further delays and increased network overhead. Last Updated : 15 May, 2023 Error Detection Code - Checksum