Framing in Data Link Layer

Frames are comparable to the packets of energy called photons in the case of light energy. Frames are the units of digital transmission, particularly in computer networks and telecommunications.  Time Division Multiplexing process is used for this techniques.

Ethernet Frame in Datalink layer

redeemnetworks.com

Framing is a point-to-point connection between two computers or devices consisting of a wire in which data is transmitted as a stream of bits. Its provide to sender to transmit a set of bits that are meaningful to the receiver. Ethernet, token ring, frame relay, and other data link layer technologies have their own frame structures. Frames have headers that contain information such as error-checking codes.However, these bits must be framed into discernible blocks of information.Function of Framing in the data link layer.

Advantages

The process of dividing the data into frames and reassembling it is transparent to the user and is handled by the data link layer.

Framing is an important aspect of data link layer protocol design because it allows the transmission of data to be organized and controlled, ensuring that the data is delivered accurately and efficiently

Ethernet Header:

The Ethernet header is a fundamental component of the Ethernet frame, containing essential information for data transmission within a local area network (LAN). It typically consists of the following fields:

  1. Preamble: A 7-byte pattern (10101010) followed by a one-byte start frame delimiter (10101011). This sequence helps synchronize the receiver’s clock with the incoming data and indicates the start of the frame.
  2. Destination MAC Address: A 6-byte field that specifies the MAC address of the intended recipient of the frame.
  3. Source MAC Address: Another 6-byte field indicating the MAC address of the sender of the frame.
  4. Ethertype or Length: For Ethernet II frames, this field is a two-byte field indicating the protocol type of the payload. In IEEE 802.3 frames, this field indicates the length of the data payload.
  5. Optional VLAN Tag: In IEEE 802.1Q, an additional 4-byte field is inserted if VLAN tagging is used, providing VLAN identification and priority information.
  6. Frame Check Sequence (FCS): A 4-byte field that contains error-checking information to ensure the integrity of the frame during transmission. It’s used to detect errors that might have occurred in the transmission process.

Types of Framing

There are two types of framing:

1. Fixed-size: Drawback: It suffers from internal fragmentation if the data size is less than the frame size

  • Solution: Padding

2. Variable size: This can be done in two ways:

  1. Length field – We can introduce a length field in the frame to indicate the length of the frame. Used in Ethernet(802.3). The problem with this is that sometimes the length field might get corrupted.
  2. End Delimiter (ED) – This is used in Token Ring. This to indicate the end of the frame. The problem with this is that ED can occur in the data.
    This can be solved by:1. Character/Byte Stuffing: Used when frames consist of characters. If data contains ED then, a byte is stuffed into data to differentiate it from ED.Let ED = “$” –> if data contains ‘$’ anywhere, it can be escaped using ‘\O’ character.
    –> if data contains ‘\O$’ then, use ‘\O\O\O$'($ is escaped using \O and \O is escaped using \O).
  3. Disadvantage – It is very costly and obsolete method and expensive.

3. Bit Stuffing: Let ED = 01111 and if data = 01111
–> Sender stuffs a bit to break the pattern i.e. here appends a 0 in data = 011101.
–> Receiver receives the frame.
–> If data contains 011101, receiver removes the 0 and reads the data.

framing in the Data Link Layer also presents some challenges, which include:

Variable frame length: The length of frames can vary depending on the data being transmitted, which can lead to inefficiencies in transmission. To address this issue, protocols such as HDLC and PPP use a flag sequence to mark the start and end of each frame.

Bit stuffing: Bit stuffing is a technique used to prevent data from being interpreted as control characters by inserting extra bits into the data stream. However, bit stuffing can lead to issues with synchronization and increase the overhead of the transmission.

Synchronization: Synchronization is critical for ensuring that data frames are transmitted and received correctly. However, synchronization can be challenging, particularly in high-speed networks where frames are transmitted rapidly.

Error detection: Data Link Layer protocols use various techniques to detect errors in the transmitted data, such as checksums and CRCs. However, these techniques are not foolproof and can miss some types of errors.

Efficiency: Efficient use of available bandwidth is critical for ensuring that data is transmitted quickly and reliably. However, the overhead associated with framing and error detection can reduce the overall efficiency of the transmission.


Problems in Framing

Ethernet framing, while widely used and generally robust, can encounter a few issues:

  1. Collision Domains:Here ethernet  uses CSMA/CD (Carrier Sense Multiple Access with Collision Detection). In heavily loaded networks or due to issues like cable length limitations, collisions can occur, leading to performance degradation.
  2. Ethernet Frame Size: when Finding the right balance is crucial for optimal performance.Larger frames can lead to increased latency and potential fragmentation, while smaller frames might be inefficient due to increased overhead.
  3. Duplex Mismatch: If devices on an Ethernet network have different duplex settings it can cause collisions and communication issues.
  4. Physical Layer Issues: Problems at the physical layer, such as damaged cables, interference, or improper terminations, can lead to errors in Ethernet frames, causing packet loss or corruption.
  5. Jumbo Frames Compatibility: Compatibility issues can arise if there’s a mix of devices that can or cannot handle these larger frame sizes.Not all devices or switches support jumbo frames
  6. Frame Check Sequence (FCS) Errors: This could be due to interference, poor cabling, or hardware issues, resulting in corrupted data. Frame’s error detection code fails when FCS error .
  7. VLAN Hopping: VLANs can allow an attacker to gain unauthorized access to data on different VLANs. This security issue can compromise network integrity when improper Vlan configured.

 

 

Leave a Reply