DCN UNIT 5 Ethernet frame structure, CRC (Cyclic Redundancy Check), Checksum, PPP data frame format, Parity Check, Taking-Turns protocol, Data Link Layer services, Byte stuffing in PPP



Data Communication and Networking - Unit 5

1. Draw and explain the Ethernet frame structure

The Ethernet frame structure consists of the following fields:

  • Preamble: 7 bytes of alternating 1s and 0s used to synchronize the signal timing.
  • Start Frame Delimiter (SFD): 1 byte indicating the start of the frame.
  • Destination MAC Address: 6 bytes specifying the recipient's MAC address.
  • Source MAC Address: 6 bytes specifying the sender's MAC address.
  • Type/Length: 2 bytes indicating either the type of payload or the length of the frame.
  • Payload: Data carried by the frame, ranging from 46 to 1500 bytes.
  • Frame Check Sequence (FCS): 4 bytes used for error-checking using CRC.

2. Explain with example: i. CRC ii. Checksum

i. CRC (Cyclic Redundancy Check):

CRC is an error-detecting code used to detect changes to raw data. It works by treating the data as a polynomial and dividing it by a predetermined polynomial, resulting in a remainder (CRC value) appended to the data.

Example: For data 1101 and a divisor 101, the CRC value would be calculated as:

Data: 1101
Divisor: 101
----------------
Result: 1001 (CRC value)

ii. Checksum:

Checksum is a simple error-detecting mechanism that sums up all bytes in the data and appends the result as the checksum. The receiver can sum the received data and compare it to the checksum to detect errors.

Example: For data bytes [25, 50, 75], the checksum would be calculated as:

Data: [25, 50, 75]
Sum: 150
Checksum: 150

3. Draw the PPP data frame format

The PPP (Point-to-Point Protocol) data frame format includes:

  • Flag: 1 byte indicating the beginning and end of the frame (0x7E).
  • Address: 1 byte (0xFF, standard broadcast address).
  • Control: 1 byte (0x03, for unnumbered frame).
  • Protocol: 2 bytes identifying the encapsulated protocol (e.g., 0x0021 for IPv4).
  • Payload: Variable length data.
  • FCS (Frame Check Sequence): 2 or 4 bytes for error-checking.

4. Explain with example: i. CRC ii. Parity Check

i. CRC (Cyclic Redundancy Check):

As explained earlier, CRC detects errors by treating data as a polynomial. It provides a higher level of error detection compared to simple checksums.

Example: For data 1101 and a divisor 101, the remainder is the CRC value, ensuring data integrity.

ii. Parity Check:

Parity check is a simple error detection method that adds a parity bit to ensure the total number of 1-bits is even (even parity) or odd (odd parity).

Example: For data 1010110, adding an even parity bit results in 10101101 (total 1-bits is 4, even).

5. Explain Taking-Turns protocol

The Taking-Turns protocol, also known as polling or token passing, is used to manage access to a shared communication medium.

In a polling system, a master node invites each node in turn to transmit data. In token passing, a token circulates in the network, granting the node holding the token the right to transmit data.

These protocols prevent collisions and ensure fair access to the network.

6. What are the possible services offered by Data Link Layer?

The Data Link Layer provides several services, including:

  • Framing: Dividing data into manageable frames with headers and trailers.
  • Physical Addressing: Adding MAC addresses to frames for source and destination identification.
  • Flow Control: Ensuring the sender does not overwhelm the receiver with too much data at once.</
  • Error Control: Detecting and correcting errors using mechanisms like CRC and checksums.
  • Access Control: Determining which device has control over the communication channel at a given time.

7. What is byte stuffing in case of PPP?

Byte stuffing in PPP involves adding extra bytes to the data to ensure that control byte sequences (such as frame delimiters) do not appear in the payload.

For example, if the payload contains the flag sequence 0x7E, byte stuffing will insert an escape character (0x7D) before it, followed by the XOR of the flag byte and 0x20, ensuring data integrity.