0% found this document useful (0 votes)
21 views17 pages

Link Layer Exam Notes: Key Concepts & Protocols

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
21 views17 pages

Link Layer Exam Notes: Key Concepts & Protocols

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

ACN Exam Notes : Module 4

1. Introduction to Link Layer

The Link Layer, also known as Layer 2 of the OSI model, is responsible for node-to-node data transfer. It is the layer
that connects directly to the physical network medium and controls how data is placed and received from the
medium.

Key Concepts:

• Link: A physical or logical connection between two devices (like host-to-router, router-to-router).

• Node: Devices that run link-layer protocols—such as hosts, routers, switches, and Wi-Fi access points.

• Frame: The unit of data at the link layer (similar to how a packet is the unit at the network layer).

Services Provided by Link Layer

1. Framing

o Breaks data into frames before transmission.

o Each frame has a header (with addresses, control info) and a trailer (with error check info like CRC).

2. Link Access (MAC - Medium Access Control)

o Determines how devices share the medium, especially important in shared channels (like Wi-Fi,
Ethernet).

o Defines when and how a device can access the medium to send data.

3. Reliable Delivery

o Some link-layer protocols (like point-to-point protocols) ensure that data arrives without errors,
using ACKs and retransmissions.

o Not all links guarantee this (e.g., Ethernet is unreliable).

4. Error Detection and Correction

o Adds Error Detection Codes (EDC) like parity bits or CRC at sender side.

o Receiver checks these codes to detect or correct bit errors.

o Typically done in hardware for speed.

Summary:

Feature Description

Layer 2 (Data Link Layer)

Unit Frame

Devices Routers, switches, hosts, APs

Key Roles Framing, MAC, Error Detection, Reliable Delivery

Output Frames ready for physical transmission

@Aby
ACN Exam Notes : Module 4
2. Error Detection Mechanisms at the Link Layer

During transmission, bit errors can occur due to noise, interference, or faulty hardware. The Link Layer provides
mechanisms to detect and sometimes correct these errors to ensure reliable communication.

Basic Process:

• Sender: Takes data (D) and adds Error Detection and Correction bits (EDC) to form the frame.

• Receiver: Receives D + EDC and checks whether the received data is error-free using the EDC.

• If error is detected, the frame is discarded or requested again (based on protocol).

Common Error Detection Techniques

1. Parity Checks

• Single-bit parity:

o Adds 1 parity bit to ensure total number of 1s is even (even parity) or odd (odd parity).

o Example: Data = 1010001 (3 ones), Parity (Even) = 1 → Total = 4 (Even).

• Limitation:

o Cannot detect even number of bit errors (e.g., two flipped bits).

Two-Dimensional Parity

• Organizes data into a table (rows × columns).

• Adds row and column parity bits.

• Can:

o Detect and correct single-bit errors.

o Detect (not correct) two-bit errors.

• Used in Forward Error Correction (FEC).

2. Checksumming

• Treats data as k-bit integers, sums them, and appends the sum (checksum).

• Receiver: Recalculates checksum from received data and compares it.

Used in:

• TCP/UDP headers.

• Internet Checksum (1's complement of 16-bit word sum).

Limitation:

• Less robust than CRC.


@Aby
ACN Exam Notes : Module 4
• Cannot handle burst errors effectively.

3. Cyclic Redundancy Check (CRC)

• Most robust and widely used in link-layer protocols.

• Data (D) is treated as a binary polynomial.

• A generator polynomial G (r+1 bits) is agreed upon.

• Sender:

o Appends r bits (R) to D such that D+R is divisible by G (mod-2 arithmetic).

• Receiver:

o Divides received data by G.

o If remainder ≠ 0 → Error Detected.

Strength:

• Detects burst errors (up to r+1 bits).

• Detects odd number of bit flips.

Examples of CRC:

• CRC-16, CRC-32 (used in Ethernet frames).

Comparison Table

Technique Error Detection Error Correction Complexity Use Case

Parity Weak Limited (2D only) Low Simple hardware checks

Checksum Moderate No Medium TCP/UDP

CRC Strong No High Ethernet, USB

3. Multiple Access Protocols (Collision-Based and Token-Based)

In broadcast communication networks (like Ethernet, Wi-Fi), multiple devices share a common communication
channel. This creates a need for rules (protocols) to control who can transmit data and when, to avoid collisions and
channel wastage.

The Multiple Access Problem

• When two or more devices transmit at the same time, their signals collide.

• A collision corrupts the data, wasting bandwidth.

• Multiple Access Protocols are designed to coordinate access to the shared medium.

@Aby
ACN Exam Notes : Module 4
Goals of Multiple Access Protocols

1. Efficiency – Minimize collisions, use bandwidth effectively.

2. Fairness – Give equal chances to all nodes.

3. Decentralization – No single point of failure.

4. Simplicity – Easy to implement and manage.

Types of Multiple Access Protocols

1. Channel Partitioning Protocols

Divides the channel among users.

a. Time Division Multiplexing (TDM)

• Time is divided into slots.

• Each node gets a fixed time slot.

• No collisions, but wastes bandwidth if a node has no data.

b. Frequency Division Multiplexing (FDM)

• Channel is split into frequency bands.

• Each node gets a specific frequency.

• Like radio stations.

• Collision-free, but inefficient if some nodes are idle.

c. Code Division Multiple Access (CDMA)

• Each user gets a unique code to send data.

• Multiple users can transmit simultaneously on the same frequency.

• Used in cellular networks.

2. Random Access Protocols

Devices transmit anytime, handle collisions.

a. ALOHA

• Pure ALOHA: Send data anytime; retransmit on collision.

o Efficiency: ≈ 18% (1/2e).

• Slotted ALOHA: Send data only in time slots.

o Efficiency: ≈ 37% (1/e).

b. CSMA (Carrier Sense Multiple Access)

@Aby
ACN Exam Notes : Module 4
• Listen before sending.

• If channel is busy → wait.

• If idle → transmit.

• Still, collisions may happen due to propagation delay.

c. CSMA/CD (with Collision Detection)

• Used in Ethernet.

• Stop transmission if collision is detected.

• Wait a random time (binary exponential backoff) before retrying.

• Efficiency: 1 / (1 + 5 × dprop/dtrans)
(Where dprop = propagation delay, dtrans = transmission time)

3. Taking Turns Protocols

Nodes take turns in an organized way.

a. Polling

• One master polls each node in turn.

• Centralized control.

• Efficient but single point of failure.

b. Token Passing

• A token (control frame) is passed around.

• Node with token sends data.

• Fair and collision-free.

• Used in Token Ring (IEEE 802.5).

• Token loss or node failure can disrupt the network.

Summary Table

Protocol Type Example Collisions Efficiency Control Type

TDM/FDM/CDMA TDM, FDM, CDMA No High Centralized

ALOHA/CSMA/CD Ethernet Yes Medium Decentralized

Polling/Token Token Ring No High Centralized/Dec.

4. IEEE 802.3 Ethernet

Ethernet (IEEE 802.3) is the most widely used wired LAN technology. It defines both the link-layer protocol and the
physical layer standards for local area networks (LANs). It uses CSMA/CD for medium access and supports high-
speed communication.
@Aby
ACN Exam Notes : Module 4

Why Ethernet Became Popular

• Early deployment – First widely adopted LAN tech.

• Simplicity – Easy to understand and implement.

• Cost-effective – Cheaper than alternatives (like token ring, FDDI).

• Evolvability – Scaled from 10 Mbps to 1 Gbps, 10 Gbps, and beyond.

• Switched Ethernet – Eliminated collisions and improved performance.

Ethernet Frame Structure

Field Size Purpose

Preamble 8 bytes Synchronization (101010... + 10101011)

Destination MAC 6 bytes Receiver’s MAC address

Source MAC 6 bytes Sender’s MAC address

Type 2 bytes Identifies network-layer protocol (e.g., IP, ARP)

Data 46 – 1500 bytes Payload (may include padding if < 46 bytes)

CRC 4 bytes Error detection using Cyclic Redundancy Check (CRC)

• MTU (Maximum Transmission Unit): 1500 bytes (excluding preamble and CRC).

Operational Characteristics

• Connectionless: No handshake before sending.

• Unreliable: No acknowledgments; frames can be lost silently.

o UDP-based apps may suffer from losses.

o TCP-based apps recover lost data using retransmissions.

Access Method: CSMA/CD

• Carrier Sense Multiple Access with Collision Detection.

• Steps:

1. Listen to channel (Carrier Sense).

2. Transmit if idle.

3. If collision detected → stop and wait random time before retrying.

@Aby
ACN Exam Notes : Module 4
Evolution of Ethernet Topologies

1. Bus topology – Original design using coaxial cables.

2. Hub-based star – Devices connected to a hub (shared medium).

3. Switch-based star – Devices connected via Ethernet switches.

Switched Ethernet (Modern)

• Each device gets a dedicated link to a switch.

• No collisions, supports full duplex.

• Allows simultaneous transmission and reception.

Summary:

Feature Value/Description

Protocol Standard IEEE 802.3

Access Method CSMA/CD

Frame Size 64 – 1518 bytes (including header + CRC)

Reliability Unreliable

Common Speeds 10 Mbps, 100 Mbps, 1 Gbps, 10 Gbps

Modern Use Switched Ethernet

5. Switching and Bridging (Link Layer Switching)

Switches are essential devices in local area networks (LANs) that operate at the data link layer (Layer 2). Unlike hubs
(which broadcast data), switches intelligently forward frames based on MAC addresses.

Basic Functions of a Switch

1. Forwarding – Send the frame only to the intended destination port (not to all).

2. Filtering – Block frames that should not be forwarded (e.g., destination on same port as sender).

3. Learning – Dynamically build a table of MAC addresses and corresponding ports.

Switch Table (Forwarding Table)

A switch maintains a MAC address table:

MAC Address Interface (Port) Timestamp

[Link] Port 1 [Link]

@Aby
ACN Exam Notes : Module 4
MAC Address Interface (Port) Timestamp

[Link] Port 2 [Link]

• When a frame arrives:

o Switch learns sender’s MAC and interface.

o Then looks up destination MAC:

▪ If found: Forward to that port.

▪ If not: Broadcast frame on all ports except incoming one.

Switch Operation Example

1. Host A sends a frame to Host B.

2. Switch learns Host A's MAC is on Port 1.

3. If Host B’s MAC is already known → forward to that port.

4. If unknown → broadcast.

5. When Host B replies, switch learns B’s MAC → updates the table.

Bridging

• Bridge: A device that connects two LAN segments.

• Like a 2-port switch, it filters traffic between LANs.

• Operates similar to switches:

o Learns MACs.

o Forwards based on addresses.

o Avoids unnecessary traffic between segments.

Features of Link-Layer Switches

• Plug-and-play – No configuration needed.

• Self-learning – Automatically updates MAC table.

• Collision-free – Full-duplex links with each device.

• Supports mixed links – Different speeds and media types.

• Efficient – High-speed frame forwarding.

Switch vs Router

Feature Switch Router

@Aby
ACN Exam Notes : Module 4
Operates at Link Layer (L2) Network Layer (L3)

Uses MAC Address IP Address

Setup Plug-and-play Manual configuration needed

Speed Very fast Slower (more processing)

Security & Routing Limited Advanced (Firewall, NAT, etc.)

Limitations of Switches

• Broadcast Storms: Excessive broadcasts can overload the network.

• Looping: Multiple paths can create loops → solved by Spanning Tree Protocol (STP).

• Not scalable for wide networks: Lacks hierarchical IP-based routing.

Summary

Term Description

Switch Forwards frames based on MAC address

Bridge Connects LAN segments, operates like a switch

Learning Automatically maps MAC addresses to ports

Filtering Stops unnecessary frame forwarding

Forwarding Sends frame only to correct port

6. Wireless (IEEE 802.11 - Wi-Fi)

IEEE 802.11 is the standard for Wireless Local Area Networks (WLANs), commonly known as Wi-Fi. It enables
devices to communicate wirelessly using radio waves, replacing wired Ethernet in many environments like homes,
schools, and offices.

Standards and Versions

• 802.11b – 11 Mbps, 2.4 GHz band (prone to interference).

• 802.11a – 54 Mbps, 5 GHz (shorter range, less interference).

• 802.11g – 54 Mbps, 2.4 GHz (backward compatible with 802.11b).

• 802.11n – Uses MIMO (Multiple Input, Multiple Output) antennas.

o Speeds up to several hundred Mbps.

• All versions use the same MAC protocol and frame structure.

802.11 Architecture

@Aby
ACN Exam Notes : Module 4
• Basic Service Set (BSS):

o A group of wireless stations + an Access Point (AP).

• Infrastructure Mode:

o Stations connect through the AP → AP connects to Ethernet.

• Ad Hoc Mode:

o Devices communicate peer-to-peer without AP.

Medium Access Control: CSMA/CA

• Carrier Sense Multiple Access with Collision Avoidance.

• Why not CSMA/CD?

o Collision detection is hard in wireless due to hidden node problems.

• Instead:

1. Sense the channel.

2. If idle → wait random backoff.

3. Transmit.

4. Wait for ACK from receiver.

• Optional: Use RTS/CTS handshake to reserve the channel and avoid hidden node collisions.

802.11 Frame Structure

Field Description

Frame Control Type, subtype, control flags (e.g., To/From DS)

Duration Time needed for transmission + ACK

Address 1 Destination MAC

Address 2 Source MAC (station or AP)

Address 3 MAC of router (used for internetworking)

Sequence Number Helps identify duplicate frames

Data Encapsulated IP packet or ARP message

CRC 32-bit error checking field

Association and Mobility

• Devices must associate with an AP before communication.

• Process:

@Aby
ACN Exam Notes : Module 4
1. Scan channels and receive beacon frames.

2. Choose AP → Send association request.

3. AP responds with association response.

• Supports roaming between APs in the same subnet without changing IP.

Advanced Features

802.11 Rate Adaptation

• Transmission rate is adjusted dynamically based on signal quality.

• Similar to TCP congestion control.

Power Management

• Devices can enter sleep mode.

• AP buffers data and notifies devices in beacon frames.

• Device wakes up, retrieves data, then sleeps again.

Summary

Feature Description

Standard IEEE 802.11 (Wi-Fi)

MAC Protocol CSMA/CA (not CSMA/CD)

Frame 3 MAC address fields, duration, control, CRC

Modes Infrastructure (with AP), Ad-hoc

Rate Control Dynamic (based on SNR and success rate)

Power Saving Sleep/Wake cycles coordinated via AP beacons

7. Bluetooth (IEEE 802.15.1)

Bluetooth is a short-range wireless communication technology primarily designed for low-power, low-cost, and
cable replacement applications—such as connecting headphones, keyboards, smartphones, and other personal
devices.

Key Characteristics

Feature Description

Range Typically up to 10 meters (Class 2 devices)

Frequency Operates in the 2.4 GHz unlicensed ISM band

@Aby
ACN Exam Notes : Module 4
Speed Up to 4 Mbps (Basic Rate + Enhanced Data Rate)

Cost & Power Low power consumption and inexpensive hardware

Application Personal Area Networks (PAN), file sharing, IoT

Communication Mechanism

Frequency-Hopping Spread Spectrum (FHSS)

• Bluetooth hops across 79 channels, each 1 MHz wide.

• Changes frequency 1,600 times per second to:

o Reduce interference

o Improve security

o Support coexistence with Wi-Fi

Time-Division Multiplexing (TDM)

•Time is divided into slots (each 625 microseconds).


•Devices take turns transmitting.
Bluetooth Network Topology: Piconets

• A Piconet is a basic Bluetooth network.

• Consists of:

o 1 Master

o Up to 7 active slaves

o Up to 255 parked (inactive) devices

Master Role:

• Controls timing and frequency hopping.


• Initiates connections and schedules communication.
Slave Role:

• Listens to the master's timing and only transmits when instructed.

Scatternet


Multiple interconnected piconets.

A device can act as a slave in one piconet and master in another.

Allows larger Bluetooth networks to form.
Power Management in Bluetooth

• Three low-power states:

o Sniff: Device periodically checks for activity.


o Hold: Temporarily suspends data transfer.
o Park: Device stays connected but inactive (parked).

@Aby
ACN Exam Notes : Module 4
Summary

Feature Details

Standard IEEE 802.15.1

Range ~10 meters

Topology Piconet (1 Master + up to 7 Slaves)

Data Rate Up to 4 Mbps

Access Techniques TDM + Frequency Hopping

Power Efficiency Very efficient; designed for portable devices

Example Use Cases Headsets, wireless keyboard/mouse, file transfer

8. Cellular Networks

Cellular networks provide wireless communication over large geographic areas, supporting voice, SMS, and data
services. They are essential for mobile Internet access, especially where Wi-Fi isn't available or for users on the
move.

Basic Structure of a Cellular Network

• The coverage area is divided into cells.

• Each cell has a Base Transceiver Station (BTS) to handle communication.

• Cells are grouped and managed by a Base Station Controller (BSC).

• A central Mobile Switching Center (MSC) connects to other networks (e.g., Internet or PSTN).

Generations of Cellular Technology

1G (First Generation)

• Analog voice communication.

• Used FDMA (Frequency Division Multiple Access).

• No support for data.

• Obsolete today.

2G (Second Generation)

• Digital voice communication.

• Introduced GSM (Global System for Mobile).

• Used TDMA or CDMA.

@Aby
ACN Exam Notes : Module 4
• Added support for SMS and limited mobile data (2.5G = GPRS/EDGE).

3G (Third Generation)

• Support for both voice and high-speed data.

• Enabled video calling, web browsing, mobile apps.

• Used CDMA (WCDMA/UMTS) techniques.

• Key entities:

o SGSN: Handles mobility and user authentication.

o GGSN: Connects mobile users to the Internet.

4G – LTE (Long Term Evolution)

• All-IP architecture: voice and data both use packet switching.

• High-speed Internet: Up to 100 Mbps (downlink), 50 Mbps (uplink).

• Uses:

o OFDM (Orthogonal Frequency Division Multiplexing): Efficient spectrum usage.

o MIMO (Multiple Input, Multiple Output) antennas: Higher throughput.

o Dynamic Slot Allocation: Adapts to channel conditions.

LTE Core: Evolved Packet Core (EPC)

• Simplifies control and data planes.

• Provides seamless mobility, even across heterogeneous networks.

Key Technologies Used

Generation Access Technology Max Speed Key Feature

1G FDMA 2.4 Kbps Analog voice only

2G TDMA/CDMA ~100 Kbps Digital voice, SMS, GPRS

3G WCDMA ~2 Mbps Video calls, mobile Internet

4G OFDM + MIMO Up to 100 Mbps HD streaming, VoIP, all-IP design

Mobility Management in Cellular Networks

• Handoff (Handover): When a mobile device moves from one cell to another.

o Managed by BSC and MSC.

o Maintains ongoing calls/data sessions.

• Mobile IP: Helps maintain the same IP while moving between networks.
@Aby
ACN Exam Notes : Module 4
o Uses Home Agent (HA) and Foreign Agent (FA).

o Can use indirect routing (through HA) or direct routing (via correspondent).

Summary

Feature Description

Main Use Voice, SMS, mobile Internet

Key Components BTS, BSC, MSC, SGSN, GGSN, EPC

Access Methods FDMA, TDMA, CDMA, OFDM, MIMO

Mobility Support Handoff, roaming, Mobile IP

Evolution 1G → 2G → 3G → 4G (→ 5G in future)

9. Mobility and Handoff in Cellular Networks

Mobility is a defining feature of cellular networks. It allows users to move across geographic areas while maintaining
uninterrupted services such as calls, SMS, and Internet connectivity.

What is Handoff (or Handover)?

A handoff occurs when a mobile device moves from one cell to another, and the network must transfer the
connection to a new base station without disconnecting the user.

Types of Handoffs

Type Description

Intra-BTS Movement within the same cell/base station (no real handoff).

Intra-BSC Between two cells controlled by the same BSC.

Inter-BSC Between cells managed by different BSCs under the same MSC.

Inter-MSC Between different MSCs, typically in inter-network roaming.

GSM Handoff Procedure (Simplified Steps)

1. Old BTS Requests Handoff

o Detects signal strength falling.

o Informs Visited MSC (Mobile Switching Center).

2. New BTS Allocated

o MSC chooses a suitable BTS and BSC.

o Allocates radio channels for new connection.

@Aby
ACN Exam Notes : Module 4
3. New BTS Activates Channel

o Prepares resources.

o Sends info (like new frequency) to MSC.

4. Mobile is Informed

o Mobile device receives handoff command.

o Tunes to the new frequency/channel.

5. Mobile Connects to New BTS

o Exchanges handshaking messages.

o Sends handoff complete to BTS → BSC → MSC.

6. Old Path is Released

o After confirmation, the old connection is terminated.

Seamless IP Mobility: Mobile IP (RFC 5944)

When IP-based data needs to continue during handoff:

Key Components:

Component Role

Home Agent (HA) In the user’s home network; stores permanent IP and forwards packets.

Foreign Agent (FA) In the visited network; gives the user a Care-of Address (CoA).

Mobile Node (MN) The mobile device that moves between networks.

Steps in Indirect Routing (Basic Mobile IP):

1. Correspondent host sends data to mobile’s home IP.

2. Home Agent intercepts, encapsulates, and forwards it to the CoA (via Foreign Agent).

3. Mobile node decapsulates and receives data.

4. Response packets are sent directly to correspondent host.

Challenges in Mobility Handling

• Latency during handoff: Delay while switching base stations.

• Packet loss: If handoff takes too long.

• Changing IPs: Especially when moving across subnets.

• Table update delay: Switches/routers need time to update MAC/IP mappings.

@Aby
ACN Exam Notes : Module 4
Summary

Feature Description

Handoff Maintains ongoing communication while moving

Key GSM Elements BTS, BSC, MSC

Mobile IP Keeps the same IP while roaming across networks

Home Agent Maintains permanent IP mapping

Foreign Agent Provides temporary IP in visited network

END OF MODULE 4

@Aby

You might also like