0% found this document useful (0 votes)
1 views26 pages

DCN Module 3

Uploaded by

nihilaca988
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)
1 views26 pages

DCN Module 3

Uploaded by

nihilaca988
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

Module 3

Framing
●​ In computer networks and telecommunications, frames are the
fundamental units of digital transmission.
●​ A frame consists of a sequence of bits organized into a structured block
that conveys data along with control information such as addressing
and error detection codes.
●​ Framing in dll separate a frame distinguishable from another frame.
●​ In the Data Link Layer (DLL) of the OSI model, framing plays a critical
role by dividing the continuous stream of bits into manageable,
meaningful chunks that can be reliably transmitted and processed by
the receiver.

Framing means breaking the big data from the network layer into small,
manageable pieces called frames, so they can be sent safely over the
physical medium (cables, Wi-Fi, etc.).

Think of it like sending a message in WhatsApp:

●​ You type a long message.​

●​ WhatsApp breaks it into smaller packets.​

●​ Each packet is sent separately.​

Same idea → DLL breaks data into frames.


Why do we need framing?
Because:

1.​ The receiver should know where a frame starts and where it ends.​

2.​ To avoid mixing data from different messages.​

3.​ To perform error detection on each frame.

How framing works (Simple Steps)


Step 1: Take the data

Example:

DATA: 110100111001

Step 2: Add a header

Header contains:

●​ Address of sender​

●​ Address of receiver​

●​ Frame number​

●​ Control information​
Example:

HEADER: 1010

Step 3: Add a trailer

Trailer usually contains:

●​ Error detection bits (CRC or checksum)​

Example:

TRAILER: 0110

Step 4: Combine all to form a frame

FRAME = HEADER + DATA + TRAILER

= 1010 + 110100111001 + 0110

The receiver can now easily detect:

●​ Start of frame​

●​ End of frame​

●​ Errors in the frame​


Why do we need framing?

●​ Receiver must know where a frame starts and ends​

●​ Without framing, all bits will look continuous and confusing

Types of Framing
[Link] size framing
●​ Frames have a predefined, fixed size.

●​ No explicit start or end delimiters are needed; the frame size itself

acts as the boundary.

[Link]-Size Framing
●​ Size of each frame may be different.
●​ Additional mechanisms are kept to mark the end of the frame and
beginning of the next frame.

Framing Approaches
[Link] oriented
[Link] oriented

Bit oriented
Simply views the frame as a collection of bits
Bit oriented protocol -HDLC(High level data link )

Byte oriented
●​ Each frame is viewed as a byte(characters) rather than
bits.
●​ It uses characters/bytes to mark start and end.
●​ Even though the frame goes out as bits, the design of
the frame uses bytes (characters) to mark boundaries.
Protocols
●​ BISYNC-binary synchronous communication protocol
●​ DDCMP-digital data communication message protocol
●​ PPP-point to point protocol

[Link] based Framing


Mainly for optical network
Protocol
SONET-Synchronous Optical Network
Error Detection and Correction
Error detection in computer networks ensures that data is transmitted
accurately without corruption.
It works by adding extra (redundant) bits to data so the receiver can
verify its correctness.
If errors are found, the receiver discards the frame and requests
retransmission.

●​ Detects errors caused by noise or interference.

●​ Uses redundant bits for consistency checking.


Checksum is an error-detection technique used to check whether the data received is
the same as the data sent.
Dividing data into small blocks (called subunits)​

Adding those blocks using binary addition​

Taking the 1’s complement of the sum → this becomes the checksum​

Sending data + checksum​

Receiver adds everything again.


Flow control
Flow control is an important design issue in the Data Link Layer (DLL) of the
OSI model.
It is a technique that ensures proper management of data flow between a
sender and receiver, especially when both operate at different speeds or
processing powers.
●​ It acts as a speed-matching mechanism that regulates the number

of data frames a sender can transmit before waiting for

acknowledgement from the receiver.

Techniques of Flow Control

1. Stop-and-Wait Flow Control

Stop-and-Wait is a simple feedback-based technique where the sender


transmits one frame and waits for an acknowledgment before sending the
next. If the acknowledgment is not received within a timeout period, the
frame is retransmitted to ensure reliability.

How it works

1.​ Sender sends one frame.​

2.​ Sender waits for ACK (acknowledgement) from receiver.​

3.​ Only after receiving ACK, the sender sends the next frame.​

2. Sliding Window Flow Control

Sliding Window is a more efficient feedback-based technique that allows


multiple frames to be sent before receiving acknowledgments. The sender
keeps track of a “window” of unacknowledged frames, sliding it forward as
acknowledgments arrive to send new frames continuously.
How it works

●​ Sender can send multiple frames continuously without waiting for


ACK after each frame.​

●​ Sender has a window size (W) → number of frames that can be


sent at once.​

●​ Receiver also has a window size → controls how many


frames it can accept

Example (Window size = 4)

Sender can send frames: 0,1,2,3 → without waiting.

After receiving ACKs, window slides forward.

Diagram
Sender Window: [0 1 2 3]
Send all → Wait for ACKs
After ACK0, window becomes:
[1 2 3 4]
Noisy &Noiseless Channel Protocols
A protocol is a set of rules that two devices (computers, mobile phones,
routers, etc.) follow to communicate with each other.

When devices send data, the data is not sent alone.

A header is added at the beginning of the data.

This header contains important information that helps the receiver


understand:

●​ Where the data is going (Destination address)​

●​ Where the data came from (Source address)​

●​ Whether the data is correct or has errors (Checksum)​

These rules (what the header contains and how to process it) are defined
by the [Link] protocols have different fixed header
structures.
Categorization of Protocol
Protocols are divided into two main categories based on the type of
communication channel they are designed for:

1. Protocols for Noiseless (Error-Free) Channels

A noiseless channel means no errors, no data gets lost or corrupted.

a) Simplest Protocol

●​ Just sends data.​

●​ No acknowledgement (ACK).​

●​ Because channel has no errors.​

●​ Sender → Receiver (direct, no need to check)​

b) Stop and Wait (Noiseless version)

●​ Send one frame → wait for ACK → send next frame.​

●​ Since channel is noiseless, ACK always arrives safely.

2. Protocols for Noisy (Error-Causing) Channels

noisy channel means errors can occur:​


✔ data may be lost​
✔ data may get corrupted​
✔ ACK may get lost

So protocols must handle errors.


a) Stop and Wait (Noisy version)

●​ Sender sends one frame.​

●​ If ACK not received, sender resends frame.​

●​ Uses timeouts and sequence numbers to avoid duplicates.​

●​ b) Piggybacking
●​ Used in two-way communication.​

●​ Instead of sending separate ACK packets…​

●​ ACK is attached (piggybacked) to the next outgoing data frame.​

●​ Saves bandwidth.

There is two-way data flow happening at the same time.

Both A and B are sending data to each other.

So:

●​ A sends data + ACK for B’s previous frame​

●​ B sends data + ACK for A’s previous frame​


✔ Here, both sides send ACK, but along with data (piggybacked).​
✔ ACK is not sent separately.

Multiple Access Protocols in Computer


Network
In computer networks, when multiple devices share the same communication

channel, there must be a mechanism to avoid collisions and ensure efficient

data transmission. Multiple Access Protocols are methods designed to

regulate how devices access and transmit data over a shared medium.

1. Random Access Protocols


In this approach, all stations have equal priority. Transmission decisions are

based on the state of the channel (idle or busy). Below are its Features:

●​ No fixed order of transmission.

●​ No fixed time slot assignment.

1.1 ALOHA

●​ Designed for wireless LANs and shared media.

●​ Multiple stations can transmit simultaneously, leading to collisions.


Pure ALOHA

ALOHA is the simplest random access protocol.

How it works:

●​ Device sends data whenever it has data.​

●​ If two devices send at the same time → collision occurs.​

●​ After collision, devices wait a random time and retransmit.​

Main idea:

“Send whenever you want, and if it fails, try again after a random delay.”

Slotted ALOHA

Improvement over pure ALOHA.

How it works:

●​ Time is divided into slots.​

●​ A device can only send at the beginning of a slot.​


●​ This reduces collisions.​

Efficiency:

Slotted ALOHA performs better than pure ALOHA.

1.2 CSMA (Carrier Sense Multiple Access)

Before transmitting, stations sense the medium:

●​ If idle -> transmit.

●​ If busy -> wait.

CSMA improves ALOHA by listening to the channel first.

How CSMA works:

1.​ Device senses (listens) to the channel.​

2.​ If the channel is free, it sends data.​

3.​ If the channel is busy, it waits.​

This reduces the chance of collision compared to ALOHA.

Types of CSMA:

●​ CSMA/CD (Collision Detection)


●​ CSMA/CA (Collision Avoidance)

CSMA/CD – Carrier Sense Multiple


Access with Collision Detection
Used in: Wired LAN (Ethernet)

(because wired connections allow listening while sending)

Listen → Send → Detect collision → Stop → Retry

How it works:

1.​ Station listens to see if channel is free​

2.​ If free → it transmits​

3.​ If two devices transmit at the same time → collision occurs​

4.​ Ethernet detects the collision

5.​ Both stop → wait for a random backoff time → try again

CSMA/CA – Carrier Sense Multiple


Access with Collision Avoidance
Used in: Wireless LAN (Wi-Fi)

(because wireless devices cannot listen while transmitting)

Try to avoid collision before sending


How it works:

1.​ Node listens if channel is free​

2.​ If free → it waits for a short time (IFS)​

3.​ Then uses random backoff timer​

4.​ Then transmits

Wired LANs – IEEE Standards


Wired LANs use cables (like Ethernet) to connect computers within a
building or campus.​
IEEE (Institute of Electrical and Electronics Engineers) defines
standards for these network

IEEE is an organization that sets rules and standards for how


electronic devices and networks should work.

These standards ensure:

●​ devices from different companies work together​

●​ networks operate efficiently​

●​ technology remains reliable and secure


What is IEEE 802?

IEEE created a big project called 802 to standardize Local Area


Networks (LAN) and Metropolitan Area Networks (MAN).

Think of 802 as a big family, and each member focuses on a


different type of network.

802.x are sub-standards for specific networking technologies (Ethernet,


Wi-Fi, Bluetooth, etc.)**

Important IEEE LAN Standards

• IEEE 802.3 – Ethernet

Ethernet is a wired LAN technology used to connect computers using cables


and switches for fast and reliable communication.
●​ Most widely used wired LAN technology​

●​ Uses CSMA/CD (Collision Detection)​

●​ Uses twisted-pair, coaxial, or fiber optic cables​

All devices are connected to a switch.​

Ethernet rules decide when and how devices send data.​

Data moves in the form of frames.​

Switch sends the frame only to the correct device (using MAC address).
IEEE 802.5 – Token Ring

●​ Developed by IBM​

●​ Uses a token-passing method(Token Ring is a LAN network


technology in which computers are connected in a ring shape and
use a small special message called a token to control who can send
data.)
●​ A token is s small frame (message) that gives permission to send
data.

1.​ A token keeps rotating around the ring.​

2.​ A computer wanting to send data waits for the token.​

3.​ When the token arrives, it captures the token and sends the data.​

4.​ The data travels around the ring and reaches the destination.​

5.​ After sending, the sender releases a new token, allowing others to
send.​

●​ Rarely used today​

• IEEE 802.1 – Bridging & Management

●​ Defines LAN switching, VLANs, network management

A VLAN divides one physical network into multiple logical networks.

LAN switching means using network switches to forward data inside a


LAN.
2. Wireless LANs – IEEE Standards
Wireless LANs allow communication without cables, using radio waves.

Common IEEE Wireless LAN Standards

• IEEE 802.11 – Wi-Fi


Wi-Fi is the main standard for wireless LANs.

Versions:

●​ 802.11a – 54 Mbps​

●​ 802.11b – 11 Mbps​

●​ 802.11g – 54 Mbps

Features

●​ Uses CSMA/CA (Collision Avoidance)​

●​ Supports mobility​

●​ No physical cables​

●​ Easy installation​
Bluetooth
Bluetooth is a short-range wireless communication technology.

Key Features

●​ Range: 10 to 100 meters​

●​ Frequency: 2.4 GHz​

●​ Low power consumption​

●​ Used for small personal-area networks (PAN)​

Uses of Bluetooth

●​ Connecting headphones, mouse, keyboard​

●​ Transferring files between mobiles​

●​ IoT devices​

●​ Car audio systems​

4. Cellular Telephony
Cellular telephony refers to mobile phone networks.
Generations of Cellular Network

1G

●​ Analog voice calls only​

2G

●​ Digital voice​

●​ SMS​

3G

●​ Internet access​

●​ Video calling​

4G (LTE)

●​ High-speed mobile Internet​

●​ HD video streaming​

5G

●​ Very high speed​

●​ Low latency​

●​ Supports IoT, smart cities

You might also like