Unit 3: Data link layer and multiplexing
Computer Networks notes · PTU syllabus (BSIT404/BSBC603)
On this page
Unit summary
The data link layer turns a raw bit pipe into a reliable link between neighbours, and multiplexing shares links. This unit covers services to the network layer, framing, error control with detection and correction codes, flow control, SLIP and PPP, and FDM, TDM and CDMA.
After this unit you can
- Explain the services of the data link layer
- Explain framing methods
- Detect and correct errors and control flow
- Explain SLIP, PPP and multiplexing techniques
PTU syllabus topics
- Services to the network layer
- framing
- error control (detection and correction codes)
- flow control
- SLIP and PPP
- FDM/TDM/CDMA multiplexing
FDM
Different frequency bands
Radio, cable TV
TDM
Different time slots
Digital telephony
CDMA
Different codes on the same band
Mobile networks
Topic 1
Data link layer: design issues and framing
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.
Topic 2
Services provided to the network layer
Unacknowledged connectionless
Frames sent without acknowledgement or connection
Low-error links such as Ethernet
Acknowledged connectionless
Each frame acknowledged; lost frames resent
Unreliable links such as wireless
Acknowledged connection-oriented
Connection set up; frames numbered, delivered once and in order
Long, unreliable links such as satellite
Topic 3
Error control: detection and correction codes
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.
Example
CRC: data 1101, generator 1011 (x³ + x + 1). Append three 0s → 1101000; divide by 1011 using XOR → remainder 001; transmit 1101001. The receiver divides by 1011 and gets remainder 0 if no error.
Topic 4
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).
Topic 5
SLIP and PPP
Full form
Serial Line Internet Protocol
Point-to-Point Protocol
Protocols carried
IP only
IP and others (multiprotocol)
Error detection
None
FCS (CRC) on every frame
Authentication
None
PAP and CHAP
Addressing
Static, set manually
Dynamic IP assignment via IPCP
Status
Obsolete
Used in dial-up, DSL (PPPoE) and links
- 1
Dead
No link
- 2
Establish
LCP negotiates options
- 3
Authenticate
PAP or CHAP
- 4
Network
NCP (IPCP) configures IP
- 5
Open
Data transfer
- 6
Terminate
Link closed
- PPP frame: flag (01111110), address (11111111), control, protocol, data, FCS, flag; byte stuffing avoids confusion with the flag.
Topic 6
Multiplexing: FDM, TDM and CDMA
FDM (frequency division)
Each signal gets its own frequency band with guard bands
Radio, cable TV, FM stations
TDM (time division)
Each signal gets time slots in turn; synchronous or statistical
Digital telephony (T1, E1), GSM
CDMA (code division)
All transmit together on the whole band; each uses a unique orthogonal code
3G mobile, GPS
- WDM (wavelength division): FDM for optical fibre — different colours of light.
- Statistical TDM gives slots only to active sources, wasting less capacity than synchronous TDM.
Example
CDMA with codes A = (+1, +1) and B = (+1, −1): A sends 1, B sends 0 (−1). Channel = (+1, +1) + (−1, +1) = (0, 2). Receiver for A: (0 × 1 + 2 × 1) ÷ 2 = +1 → bit 1.
Key terms
- Framing
- Dividing a bit stream into frames
- CRC
- Error detection using polynomial division
- Sliding window
- Flow control allowing several unacknowledged frames
- PPP
- Point-to-point data link protocol with authentication
- CDMA
- Multiplexing by unique codes over the whole bandwidth
Quick revision
- Services: unacknowledged connectionless, acknowledged connectionless, connection-oriented.
- Framing: character count, byte stuffing, bit stuffing.
- Parity, checksum, CRC; Hamming code corrects single-bit errors.
- Stop-and-wait, sliding window, Go-back-N, selective repeat.
- SLIP vs PPP; FDM, TDM, CDMA, WDM.
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
- Q1.Name the services of the data link layer.
- Q2.What is bit stuffing?
- Q3.Find the even parity bit for 1011001.
- Q4.Distinguish SLIP and PPP.
- Q5.What is a guard band in FDM?
- Q6.What is statistical TDM?
Long-answer questions
- Q1.Explain framing methods with examples.
- Q2.Explain error detection and correction codes.
- Q3.Explain flow control protocols.
- Q4.Explain SLIP, PPP and the multiplexing techniques.
Stuck on this unit?
Message SBS on WhatsApp for help with Computer Networks, or to ask about studying B.Sc IT at Synetic.
