Unit 3 of 4 · BCA Sem 4

Unit 3: Data link layer and Ethernet

Computer Networks-I notes · PTU syllabus (UGCC2517)

3 min read4 topics10 exam questions
On this page
  1. Unit summary
  2. Functions of the data link layer
  3. Error detection and correction
  4. Flow control
  5. Ethernet, MAC addressing and ARP
  6. Key terms
  7. Quick revision
  8. Important questions

Unit summary

The data link layer moves frames between devices on the same network and handles errors. Ethernet is the most common LAN technology. This unit covers framing, error detection and correction, flow control, Ethernet standards and frames, MAC addresses, ARP and switching.

After this unit you can

  • Explain the functions of the data link layer and framing
  • Detect and correct errors using parity, checksum, CRC and Hamming code
  • Explain stop-and-wait and sliding-window flow control
  • Describe Ethernet frames, MAC addressing, ARP and switching

PTU syllabus topics

  • Functions of the data link layer
  • framing
  • error detection and correction
  • flow control
  • Ethernet standards and frame structure
  • MAC addressing and ARP
  • Ethernet switching
Key termsData link essentials
Framing
Splitting data into frames
MAC address
48-bit hardware address of a network card
ARP
Finds the MAC address for an IP address
CRC
Detects transmission errors
Flow control
Stops a fast sender overwhelming a slow receiver
1

Topic 1

Functions of the data link layer

The data link layer provides framing, physical (MAC) addressing, error control, flow control and access control (who may use the shared medium). It has two sublayers: LLC (logical link control) and MAC (media access control). Framing methods: character count, byte stuffing (flag bytes with escape characters), bit stuffing (insert a 0 after five 1s) and physical-layer coding violations.

2

Topic 2

Error detection and correction

ComparisonError detection methods
How it works
Detects

Parity check

Adds one bit to make the number of 1s even (or odd)

Single-bit errors

Checksum

Adds data segments; sends the complement of the sum

Most errors; used in IP, TCP

CRC

Divides data by a generator polynomial; sends the remainder

Burst errors; used in Ethernet

Hamming code both detects and corrects single-bit errors by placing parity bits at positions 1, 2, 4, 8 … The Hamming distance between two codewords is the number of bit positions in which they differ.

Example

Hamming distance between 10110 and 11100 is 2 (positions 2 and 4 differ). A code with minimum distance d detects d − 1 errors and corrects (d − 1)/2.

3

Topic 3

Flow control

  • Stop-and-wait: the sender sends one frame and waits for an acknowledgement (ACK). Simple but slow.
  • Sliding window: the sender may send several frames (the window size) before needing ACKs. Error recovery uses Go-Back-N (resend from the lost frame) or Selective Repeat (resend only the lost frame).
4

Topic 4

Ethernet, MAC addressing and ARP

Ethernet (IEEE 802.3) is the standard LAN technology: 10BASE-T (10 Mbps), Fast Ethernet (100 Mbps), Gigabit Ethernet (1 Gbps) and 10 Gigabit Ethernet. Classic Ethernet uses CSMA/CD (carrier sense multiple access with collision detection).

Ethernet frame fieldSize
Preamble + SFD8 bytes
Destination MAC6 bytes
Source MAC6 bytes
Type/Length2 bytes
Data46–1500 bytes
FCS (CRC)4 bytes

A MAC address is a 48-bit hardware address burnt into a NIC, written in hex (00:1A:2B:3C:4D:5E). ARP (Address Resolution Protocol) finds the MAC address for a known IP address on the local network by broadcasting a request. Ethernet switching: a switch learns which MAC address is on which port, builds a MAC address table, and forwards frames only to the right port (flooding unknown destinations).

Key terms

Frame
A unit of data at the data link layer
CRC
Cyclic redundancy check, an error-detection method
Hamming distance
Number of differing bit positions between codewords
MAC address
A 48-bit hardware address of a network interface
ARP
Protocol mapping IP addresses to MAC addresses

Quick revision

  • DLL: framing, MAC addressing, error and flow control.
  • Parity (single bit), checksum, CRC (burst errors); Hamming corrects.
  • Stop-and-wait vs sliding window (Go-Back-N, Selective Repeat).
  • MAC = 48 bits; ARP: IP → MAC; Ethernet uses CSMA/CD.

Important exam questions

Practice questions written to the PTU exam pattern for this unit's syllabus: short answers (Section A style) and long answers (Sections B and C style).

Short-answer questions

  1. Q1.List the functions of the data link layer.
  2. Q2.What is bit stuffing?
  3. Q3.Differentiate between error detection and error correction.
  4. Q4.Find the Hamming distance between 1101 and 1000.
  5. Q5.What is a MAC address?
  6. Q6.What is the role of ARP?

Long-answer questions

  1. Q1.Explain error detection methods: parity, checksum and CRC, with examples.
  2. Q2.Explain Hamming code for error correction.
  3. Q3.Explain stop-and-wait and sliding window protocols.
  4. Q4.Explain the Ethernet frame format and how a switch forwards frames.

Stuck on this unit?

Message SBS on WhatsApp for help with Computer Networks-I, or to ask about studying BCA at Synetic.

WhatsApp us