0% found this document useful (0 votes)
3 views35 pages

Unit-2

Unit 2 of the Computer Network course at SDJ International College introduces network models, specifically the OSI and TCP/IP models, which standardize communication between devices and simplify troubleshooting. It covers the functions of each layer in the OSI model, including the Physical, Data Link, Network, Transport, Session, Presentation, and Application layers, as well as the key responsibilities of the Physical Layer. Additionally, it explains digital and analog transmission, bandwidth, and the importance of encoding techniques in data communication.

Uploaded by

carfashion881
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)
3 views35 pages

Unit-2

Unit 2 of the Computer Network course at SDJ International College introduces network models, specifically the OSI and TCP/IP models, which standardize communication between devices and simplify troubleshooting. It covers the functions of each layer in the OSI model, including the Physical, Data Link, Network, Transport, Session, Presentation, and Application layers, as well as the key responsibilities of the Physical Layer. Additionally, it explains digital and analog transmission, bandwidth, and the importance of encoding techniques in data communication.

Uploaded by

carfashion881
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

306-Computer Network Unit-2 SDJ International College

Unit – 2 Introduction to Network Model

2.1 Introduction
2.1.1 Introduction to OSI Model
2.1.2 Introduction to TCP Model
2.1.3 The OSI Model Layer functions
2.2 Introduction to Physical Layer
2.2.1 Data and Signals
2.2.2 Digital Transmission
2.2.3 Analog Transmission
2.2.4 Bandwidth
2.2.5 Transmission Media
2.2.6 Switching
2.2.7 IEEE 8.2 Standards
2.3 Data Link Layer
2.3.1 Functions of Data link Layer
2.3.2 Error detection and Correction
2.3.3 Error detection and Correction Codes
2.3.4 Data Link Control and Protocols
2.3.5 Multiple access Protocol: CSMA/CD, LAN: Ethernet
2.3.6 Introduction: Wireless LAN, Connecting devices: Repeaters, Hubs, Bridges,
Switches, Concept of VLAN

Introduction to Network Model


A network model refers to the architecture, design, and framework that defines how devices
(like computers, routers, and switches) communicate with each other over a network. It
provides a structured approach to understand, develop, and troubleshoot network
communication.

Why Network Models Are Important:


 Standardizes communication between devices.
 Helps in designing interoperable systems.
 Simplifies troubleshooting by dividing communication into layers.
 Encourages modular development and scalability.

Two Main Types of Network Models:


1. OSI Model (Open Systems Interconnection Model)
2. TCP/IP Model (Transmission Control Protocol/Internet Protocol Model)

Prof. Varsha Maurya Page 1


306-Computer Network Unit-2 SDJ International College

2.1.1 Introduction to OSI Model

What is the OSI Model?

The OSI Model stands for Open Systems Interconnection Model, which is a conceptual
framework developed by the International Organization for Standardization (ISO) in 1984.
Its main goal is to standardize networking functions to allow communication between
different types of computer systems regardless of their underlying architecture or
technology.
It divides the networking process into seven distinct layers, each with a specific role in data
communication.

Structure of the OSI Model:

1. Physical Layer (Layer 1)


🔹 Function:
The Physical Layer is responsible for the actual transmission of raw data bits (0s and 1s)
over a physical medium like cables or wireless.
🔹 Key Tasks:
 Transmits electrical, optical, or radio signals
 Defines hardware specifications (cables, connectors, etc.)
 Handles data rate, voltages, and timing
 No interpretation of data — only bit transfer
🔹 Devices/Examples:
 Hubs, Repeaters
 Ethernet cables, Fiber optics, Wi-Fi signals

Prof. Varsha Maurya Page 2


306-Computer Network Unit-2 SDJ International College

2. Data Link Layer (Layer 2)


🔹 Function:
Ensures error-free transmission of data frames between two devices on the same
network (local link).
🔹 Key Tasks:
 Framing: Converts raw bits into structured data frames
 MAC Addressing: Adds physical address (MAC) to frames
 Error Detection/Correction using checksums (like CRC)
 Flow Control between sender and receiver
🔹 Devices/Examples:
 Switches, Bridges
 Ethernet, PPP (Point-to-Point Protocol), MAC address

3. Network Layer (Layer 3)


🔹Function:
Handles routing of data from source to destination across multiple networks using
logical addressing (IP).
🔹Key Tasks:
 IP addressing (logical addresses)
 Routing (selecting the best path)
 Packet forwarding
 Fragmentation of large packets
🔹Devices/Examples:
 Routers

Prof. Varsha Maurya Page 3


306-Computer Network Unit-2 SDJ International College

 IP (Internet Protocol), ICMP, ARP

4. Transport Layer (Layer 4)


🔹Function:
Provides reliable or unreliable delivery of data and ensures complete and correct
transmission.
🔹Key Tasks:
 Segmentation and Reassembly of data
 Error Recovery and Retransmission
 Flow Control
 Uses Port Numbers to identify services (like HTTP, FTP)
🔹Devices/Examples:
 TCP (Transmission Control Protocol) – reliable
 UDP (User Datagram Protocol) – faster but less reliable

5. Session Layer (Layer 5)


🔹Function:
Manages sessions or connections between devices during communication.

Prof. Varsha Maurya Page 4


306-Computer Network Unit-2 SDJ International College

🔹Key Tasks:
 Establish, maintain, and terminate sessions
 Dialog control (half/full duplex communication)
 Maintains synchronization between devices
🔹Examples:
 NetBIOS, RPC (Remote Procedure Call), SQL sessions

6. Presentation Layer (Layer 6)


🔹Function:
Acts as a translator between the network and the application. It formats data in a way
the receiving application can understand.
🔹Key Tasks:
 Data translation (e.g., ASCII to EBCDIC)
 Data encryption/decryption for security
 Data compression/decompression to reduce size
🔹Examples:
 SSL/TLS (encryption in HTTPS)
 File formats like JPEG, MP4, GIF

7. Application Layer (Layer 7)


🔹Function:
Provides network services directly to the user or applications. It is the closest layer to
the end user.

Prof. Varsha Maurya Page 5


306-Computer Network Unit-2 SDJ International College

🔹Key Tasks:
 File transfers, email, browsing
 Authentication and data handling
 Acts as a bridge between user applications and the network
🔹Examples:
 HTTP (web browsing), SMTP (email), FTP (file transfer), DNS

2.1.2 Introduction to TCP Model

The TCP/IP model (Transmission Control Protocol/Internet Protocol) is a four-layer networking


framework that enables reliable communication between devices over interconnected
networks. It provides a standardized set of protocols for transmitting data across interconnected
networks, ensuring efficient and error-free delivery.
TCP/IP was designed and developed by the Department of Defense (DoD) in the 1970s and is
based on standard protocols. The TCP/IP model is a concise version of the OSI model. It contains
four layers, unlike the seven layers in the OSI model.

Prof. Varsha Maurya Page 6


306-Computer Network Unit-2 SDJ International College

1. Network Access Layer (Layer 1)


Also known as: Link Layer / Host-to-Network Layer
🔹 Function:
 Handles physical transmission of data over the network medium.
 Defines how data is physically sent: through cables, Wi-Fi, etc.
 Includes hardware-level technologies like MAC addresses and framing.
🔹 Examples:
 Ethernet
 Wi-Fi (IEEE 802.11)
 ARP (Address Resolution Protocol)

2. Internet Layer (Layer 2)


🔹Function:
 Manages logical addressing and routing of data packets across multiple networks.
 Uses IP addresses to identify devices.
🔹Key Protocols:
 IP (Internet Protocol) – Assigns addresses and routes packets
 ICMP (Ping, error reporting)
 ARP (Resolves IP to MAC addresses)
 IGMP (Multicasting)

3. Transport Layer (Layer 3)


🔹Function:
 Ensures reliable or unreliable delivery of data between applications.
 Uses port numbers to identify sending/receiving apps.
🔹Key Protocols:
 TCP (Transmission Control Protocol): Reliable, connection-based (used in email, web,
etc.)
 UDP (User Datagram Protocol): Fast, connectionless (used in streaming, DNS, etc.)

4. Application Layer (Layer 4)


🔹Function:
 Provides user-level services and enables applications to communicate over the network.
 Handles data formatting, file transfers, email, etc.
🔹Key Protocols:
 HTTP (Web browsing)

Prof. Varsha Maurya Page 7


306-Computer Network Unit-2 SDJ International College

 FTP (File transfer)


 SMTP (Email sending), POP3/IMAP (Email receiving)
 DNS (Domain name resolution)

2.1.3 The OSI Model Layer functions

1. Physical Layer (Layer 1)


 Transmits raw bits (0s and 1s) over a physical medium
 Defines hardware specifications (cables, connectors)
 Manages voltage levels, data rates, and signal types
 Controls data encoding and modulation

2. Data Link Layer (Layer 2)


 Converts bits into frames for structured data transfer
 Provides MAC (hardware) addressing
 Detects and corrects errors in the physical layer
 Manages access to the shared physical medium

3. Network Layer (Layer 3)


 Handles logical addressing (IP addresses)
 Determines the best path for data (routing)
 Forwards packets from source to destination
 Manages fragmentation and reassembly of packets

4. Transport Layer (Layer 4)


 Provides reliable data transfer (via TCP) or fast delivery (via UDP)
 Performs segmentation and reassembly of data
 Ensures error detection and correction
 Controls data flow between sender and receiver

5. Session Layer (Layer 5)


 Establishes, maintains, and terminates sessions
 Manages dialogue control (who sends/receives and when)
 Synchronizes communication between applications

Prof. Varsha Maurya Page 8


306-Computer Network Unit-2 SDJ International College

6. Presentation Layer (Layer 6)


 Translates data formats (e.g., from encryption to readable text)
 Encrypts and decrypts data for security
 Compresses and decompresses data for efficiency

7. Application Layer (Layer 7)


 Provides network services directly to user applications
 Facilitates email, file transfer, web browsing, etc.
 Handles user authentication and network resource access

2.2 Introduction to Physical Layer


The Physical Layer is the first and lowest layer of the OSI (Open Systems Interconnection) model.
It is responsible for the actual transmission of raw data bits over a physical medium such as
wires, optical fiber, or wireless channels.
It does not deal with the meaning of data or how it is interpreted — its job is to ensure that a
stream of 0s and 1s is successfully sent and received across the network.

Main Responsibilities:
 Bit Transmission: Converts digital data from the Data Link layer into electrical, optical, or
radio signals.
 Media Specification: Defines physical devices like cables, connectors, voltages, and pin
configurations.
 Data Rate: Determines how many bits can be sent per second (bps).
 Signal Encoding: Converts data into signals suitable for the medium.
 Synchronization: Ensures sender and receiver are synchronized in terms of timing.
 Topology and Transmission Mode: Supports network topologies (bus, star, ring) and
data transmission modes (simplex, half-duplex, full-duplex).
Example:
Imagine you're sending a file.
 Your computer breaks the file into bits.
 The Physical Layer changes these bits into electrical signals (for copper wire), light pulses
(for fiber optics), or radio waves (for Wi-Fi).
 At the receiving end, the Physical Layer converts these signals back into bits.

Prof. Varsha Maurya Page 9


306-Computer Network Unit-2 SDJ International College

2.1.1 Data and Signals


What is Data?
Data refers to the raw facts or information that needs to be transmitted from one device to
another in a network.
It can be in the form of:
 Text
 Audio
 Video
 Numbers
 Images
But computers cannot transmit this data as-is — it must be converted into signals.

What are Signals?


Signals are the electrical, optical, or electromagnetic representations of data used for
transmission.
They are used to carry data from one device to another over a transmission medium (like cables
or air).
There are two main types:
• Analog Signals – Continuous signals that vary over time (e.g., sound waves).
• Digital Signals – Discrete signals with specific values (0s and 1s).

2.2.2 Digital Transmission


Digital transmission is the process of sending binary data (0s and 1s) from one device to another
in the form of digital signals.
It is a key concept in modern data communication and is used in computer networks, LANs, and
the Internet.
How it Works:
 Data is represented in binary format (only 0 and 1).
 These binary values are converted into digital electrical pulses (square waves).
 The signals travel over the transmission medium (cables, fiber optics, or wireless).
 The receiver interprets the signals back into binary data.

Why Use Digital Transmission?

Feature Benefit
Digital signals are less affected by noise and can be
Noise Resistance
regenerated.

Prof. Varsha Maurya Page 10


306-Computer Network Unit-2 SDJ International College

Efficient Storage Binary data is easier to store and process.

High Speed Supports high-speed communication.

Multiple signals can be combined and sent over the


Easy Multiplexing
same medium.
Error Detection Errors are easier to detect and correct.

Encoding Techniques in Digital Transmission:


Encoding is the process of converting data bits into signal form.
Some common encoding schemes include:
1. NRZ (Non-Return to Zero):
o 1 is high voltage, 0 is low voltage (or vice versa).
o Simple but not good for synchronization.
2. Manchester Encoding:
o Combines data and clock into one signal.
o Each bit has a transition — easier to synchronize.
3. Differential Manchester:
o Uses a transition at the middle of every bit period; useful for long-distance
transmission.
Where It’s Used:
 Ethernet (LAN)
 USB
 Fiber-optic networks
 Digital telephony
 Internet data transmission

2.2.3 Analog Transmission

Analog transmission is the method of sending continuous signals over a medium. These signals
vary smoothly over time to represent information such as voice, video, or temperature.
In analog transmission, data is encoded into signals that change in amplitude, frequency, or
phase — making them suitable for long-distance and real-time communication, like in
telephone and radio systems.

How Analog Transmission Works:


 Original data (like sound) is converted to an analog signal (e.g., varying voltage).

Prof. Varsha Maurya Page 11


306-Computer Network Unit-2 SDJ International College

 This signal is transmitted over a medium (cable, air).


 The receiver interprets the signal and reconstructs the original data.
Types of Analog Modulation Techniques:
1. Amplitude Modulation (AM):
o Amplitude (height) of the carrier wave is varied.
o Used in AM radio broadcasting.
2. Frequency Modulation (FM):
o Frequency (number of waves per second) is varied.
o Used in FM radio, music broadcasting.
3. Phase Modulation (PM):
o Phase (position of the wave) is changed based on the data.
o Used in some wireless systems.
Real-World Examples:
 Analog Phones: Your voice is converted into analog electrical signals.
 FM Radio: The sound is transmitted using frequency-modulated radio waves.
 CCTV Cameras (Old Systems): Send video as analog signals to monitors or recorders.
Limitations of Analog Transmission:
 Noise Sensitive: Easily affected by electromagnetic interference.
 Difficult Error Detection: No clear distinction between signal levels.
 Poor Signal Regeneration: Cannot be easily refreshed like digital signals.
Advantages:
 Simpler to implement in basic electronics.
 More natural for real-world data like sound or light.
 Suitable for long, continuous signals.

Prof. Varsha Maurya Page 12


306-Computer Network Unit-2 SDJ International College

2.2.4 Bandwidth
Bandwidth is the maximum amount of data that can be transmitted over a communication
channel in a given amount of time.
It is a measurement of the data-carrying capacity of a network, just like how a water pipe's
diameter determines how much water can flow through it.
It is measured as:
Type Measured In Definition

Analog Hertz (Hz) The range of frequencies a


signal occupies or a channel
can carry.
Digital Bits per second (bps), Mbps, The amount of digital data
Gbps transmitted per second.

Higher bandwidth means faster communication. Bandwidth is crucial for performance in


networks, streaming, and downloads.
Examples:
Connection Type Typical Bandwidth
Dial-up Internet ~56 Kbps
4G Mobile Network ~10–100 Mbps
Fiber Optic Internet ~100 Mbps to several Gbps
Bluetooth ~1–3 Mbps

2.2.5 Transmission Media


Transmission media refers to the physical pathway through which data (signals) travel from one
device to another in a network. It is the carrier of the information — just like a road is for
vehicles.
Transmission media can be wired (guided) or wireless (unguided).
Types of Transmission Media:

Prof. Varsha Maurya Page 13


306-Computer Network Unit-2 SDJ International College

A. Guided Media (Wired Media)


These media use physical cables to transmit signals.
1. Twisted Pair Cable
 Consists of two insulated copper wires twisted together.
 Used in LANs, telephone lines.

 Types:
o UTP (Unshielded Twisted Pair) – Common in home networks.
o STP (Shielded Twisted Pair) – Has shielding to reduce noise.

 Speed: Up to 1 Gbps
 Distance: Limited (usually <100 meters)
2. Coaxial Cable
 Single copper core surrounded by insulation and shielding.
 Used in cable TV, broadband Internet.
 Better noise resistance than twisted pair.
 Speed: Up to 10 Mbps–100 Mbps
 Distance: Medium (up to a few km)

Prof. Varsha Maurya Page 14


306-Computer Network Unit-2 SDJ International College

3. Fiber Optic Cable


 Uses light pulses instead of electrical signals.
 Made of glass or plastic fibers.
 Extremely high speed, long distance, and immune to interference.
 Speed: Up to several Tbps
 Distance: 10s of kilometers

B. Unguided Media (Wireless Media)


Signals are transmitted through the air without any cables.
1. Radio Waves
 Used for AM/FM radios, cordless phones, Wi-Fi.
 Can travel long distances.
 Affected by interference and obstacles.

Prof. Varsha Maurya Page 15


306-Computer Network Unit-2 SDJ International College

2. Microwaves
 Used in satellite communication, mobile phones.
 Line-of-sight transmission (needs no obstacles).
 High frequency, high speed.

3. Infrared
 Used in TV remotes, short-range communication.
 Cannot penetrate walls.
 Suitable for device-to-device communication.

2.2.6 Switching
Switching is a technique used in networks to transfer data from one device (source) to another
device (destination) using the most efficient path. It determines how data moves across a
network.
Switching is essential for managing traffic, avoiding congestion, and enabling multiple
communications to happen simultaneously in a network.

Prof. Varsha Maurya Page 16


306-Computer Network Unit-2 SDJ International College

Why is Switching Needed?


 To connect multiple devices in a network.
 To efficiently use bandwidth and reduce delay.
 To make routing decisions dynamically.
 To allow simultaneous data transfers between multiple nodes.

Types of Switching Techniques

1. Circuit Switching
Definition:
A dedicated communication path is established between the sender and receiver for the
entire duration of the session.
Steps:
1. Path is set up before communication.
2. Path stays reserved (even if idle).
3. Disconnected after session ends.
Example: Traditional telephone systems.

Prof. Varsha Maurya Page 17


306-Computer Network Unit-2 SDJ International College

Advantages:
 Fixed and reliable path.
 Constant transmission rate.
Disadvantages:
 Wastes bandwidth when idle.
 Setup delay before communication starts.

2. Packet Switching
Definition:
Data is divided into packets, and each packet may take a different route to the
destination. All packets are reassembled at the receiver.
Types:
 Datagram Packet Switching (no fixed path)
 Virtual Circuit Packet Switching (path reserved but shared)
Example: The Internet.
Advantages:
 Efficient use of bandwidth.
 No need to reserve entire line.
 Supports multiple communications at once.
Disadvantages:
 Packets may arrive out of order.
 Need extra logic to reassemble data.

3. Message Switching
Definition:
The entire message is sent to a switching node, stored temporarily, and then forwarded
to the next node (store and forward).
Advantages:
 No need to establish a path in advance.
 Useful for long, delay-tolerant messages.
Disadvantages:
 High storage requirement.
 High delay for large messages.

Prof. Varsha Maurya Page 18


306-Computer Network Unit-2 SDJ International College

2.2.7 IEEE 8.2 Standards


What is IEEE?
The IEEE (Institute of Electrical and Electronics Engineers) is a global organization that develops
standards for technology and engineering, especially in computing and networking.
The IEEE 802 standards specifically focus on Local Area Networks (LANs) and Metropolitan Area
Networks (MANs).

What are IEEE 802 Standards?


IEEE 802 is a set of standards that define how network communication occurs in LANs and
MANs. These standards cover how data is formatted, transmitted, and managed on wired and
wireless networks.
The IEEE 802 family was established in February 1980 (hence the name 802).

Commonly Used Standards in Daily Life


1. IEEE 802.3 – Ethernet:
o Used in LAN (Local Area Networks) with cables like twisted-pair or fiber optic.
o Speed ranges from 10 Mbps to 10 Gbps or more.
2. IEEE 802.11 – Wi-Fi:
o Wireless communication standard.
o Versions include:
 802.11a/b/g/n/ac/ax (Wi-Fi 6, Wi-Fi 6E, Wi-Fi 7)
o Widely used in homes, schools, and offices.
3. IEEE 802.15 – Bluetooth:
o Personal Area Network (PAN) standard.
o Used in mobile phones, smartwatches, and IoT devices.

2.3 Data Link Layer


The Data Link Layer is the second layer of the OSI (Open Systems Interconnection) model. It is
responsible for node-to-node delivery of data over a physical link in a network. This means it
ensures that data transferred between two directly connected devices is error-free, properly
formatted, and synchronized.
It acts as a bridge between the Physical Layer (Layer 1), which deals with raw bits and signals,
and the Network Layer (Layer 3), which handles logical addressing and routing.

Prof. Varsha Maurya Page 19


306-Computer Network Unit-2 SDJ International College

2.3.1 Functions of Data link Layer


1. Framing
 Converts raw bits from the Physical Layer into organized frames.
 Adds headers and trailers to create manageable data blocks.
 Helps in identifying start and end of each data unit.
Example: Like putting a letter in an envelope with the sender and receiver's names.

2. Physical Addressing (MAC Addressing)


 Adds MAC (Media Access Control) addresses to the frame.
 These are hardware addresses that uniquely identify devices on a local network.
Example: Like using home addresses to send a courier to the correct house.

3. Error Detection and Correction


 Adds special bits (e.g., CRC or parity bits) to detect transmission errors.
 In some cases, it can also correct small errors without retransmission.
Example: Like a spell-check tool that checks for mistakes in a document.

4. Flow Control
 Manages the pace of data transmission between sender and receiver.
 Prevents a fast sender from overwhelming a slow receiver.
Example: Like controlling the speed at which water flows into a glass to avoid overflow.

5. Access Control (Medium Access Control)


 Controls who get to use the shared communication channel.
 Especially important in broadcast networks like Ethernet or Wi-Fi.
Example: Like a teacher calling on one student to speak at a time so everyone gets a turn.

2.3.2 Error detection and Correction


In a communication system, data can get corrupted due to noise, interference, or signal
distortion during transmission. The Data Link Layer is responsible for detecting these errors and,
in some cases, correcting them.

1. Error Detection
Error detection involves identifying whether the transmitted data has been altered during
transmission.
Common Causes of Errors:
 Electrical noise

Prof. Varsha Maurya Page 20


306-Computer Network Unit-2 SDJ International College

 Weak signal strength


 Crosstalk or interference
 Hardware malfunction
Detection Techniques:
 Parity Bits
 Checksums
 Cyclic Redundancy Check (CRC)
These techniques add extra bits to the data to help the receiver determine if an error occurred.
Example: Adding a check digit at the end of a number to detect typos.

2. Error Correction
Error correction goes one step further: it identifies the error and corrects it automatically, often
without needing retransmission.
Correction Techniques:
 Hamming Code
 Reed-Solomon Code
 Forward Error Correction (FEC)
These techniques are useful in real-time systems (like satellite communication) where
retransmitting data is not possible.
Example: If “HELXO” is received instead of “HELLO,” the correction system may automatically fix
the error.

2.3.3 Error detection and Correction Codes


1. Parity Bit
A parity bit is a simple method used for error detection.
Senders End While creating a frame, the sender counts the number of 1s in it and adds the
parity bit the value of which is determined as follows -
 In the case of even parity: If a number of 1s is even, the parity bit value is 0. If a number
of 1s is odd, the parity bit value is 1.
 In case of odd parity: If a number of 1s is odd, the parity bit value is 0. If a number of 1s
is even, the parity bit value is 1.

Prof. Varsha Maurya Page 21


306-Computer Network Unit-2 SDJ International College

Limitation: Can detect only single-bit errors, not correct them.

2. Checksum
Checksum is the error detection method used by upper-layer protocols and is considered to
be more reliable than Longitudinal Redundancy Check (LRC), Vertical Redundancy Check
(VRC), and Cyclic Redundancy Check (CRC). This method uses a Checksum Generator on the
sender side and a Checksum Checker on the receiver side.

Example - If the data unit to be transmitted is 10101001 00111001, the following procedure is
used at Sender site and Receiver site.

Sender Site:

10101001 subunit 1
00111001 subunit 2
11100010 sum (using 1s complement)
00011101 checksum (complement of sum)

Data transmitted to Receiver is:

Receiver Site:

10101001 subunit 1
00111001 subunit 2
00011101 checksum
11111111 sum
00000000 sum's complement

Prof. Varsha Maurya Page 22


306-Computer Network Unit-2 SDJ International College

Result is zero, it means no error.

Example - If the data transmitted along with checksum is 10101001 00111001 00011101. But
the data received at destination is 00101001 10111001 00011101.

Receiver Site:
00101001 1st bit of subunit 1 is damaged
10111001 1st bit of subunit 2 is damaged
00011101 checksum
11111111 sum
00000000 Ok 1's complement
Although data is corrupted, the error is undetected.

Advantages of Checksum
 Error Detection: It helps detect data corruption during transmission or storage, ensuring
the data received is correct.
 Simple and Fast: Easy to implement with quick calculations, making it ideal for real-time
applications like network transfers.
 Less Resources: Requires minimal computing resources, so it doesn’t slow down the
system.

Disadvantages of Checksum
 Limited Detection: It may miss certain types of errors, such as bit rearrangements or
specific patterns of corruption.
 No Error Correction: It can only detect errors but cannot fix or recover corrupted data.
 Not Secure: Checksum algorithms are not designed for security and can be easily
manipulated by attackers.
3. Cyclic Redundancy Check (CRC)
Cyclic Redundancy Check or CRC is a method of detecting accidental changes/errors in
the communication channel. CRC uses Generator Polynomial which is available on
both sender and receiver side.
An example generator polynomial is of the form like x3 + x + 1. This generator
polynomial represents key 1011. Another example is x2 + 1 that represents key 101.

Encoded Data Generation from Generator Polynomial (Sender Side)


 The binary data is first augmented by adding k-1 zeros in the end of the data.
 Then, modulo - 2 binary division is used to divide binary data by the key and
remainder of division is stored.

Prof. Varsha Maurya Page 23


306-Computer Network Unit-2 SDJ International College

 At last the remainder is appended at the end of the data to form the encoded data
which is later sent.

Checking Error in Transmission (Receiver Side)


 After receiving the data, to check if the data is error free, perform the modulo-2
division again.
 If the remainder is 0, then there are not errors, otherwise, the data is faulty and
contain transmission errors.
Examples:
Case 1: No error in transmission
Data = 100100, Generator Polynomial (Key) = x3 + x2 + 1 (1101)
Sender Side

The remainder is 001. Thus the data sent is 100100001.


Receiver Side
Code word received at the receiver side 100100001

Prof. Varsha Maurya Page 24


306-Computer Network Unit-2 SDJ International College

The remainder is 0, hence the data received has no errors.


CRC Implementation - O(n) Time and O(n) Space

Case 2: Error in Transmission


Data = 100100, Generator Polynomial (Key) = x3 + x2 + 1 (1101)
Sender Side

The remainder is 001. Thus the data sent is 100100001.


Receiver Side
Let there be an error and code word received at the receiver side 100000001.

Prof. Varsha Maurya Page 25


306-Computer Network Unit-2 SDJ International College

As the remainder is not 0, hence there is some error detected in the receiver side.

4. Hamming Code
Hamming code is an error-correcting code used to ensure data accuracy during transmission
or storage. Hamming code detects and corrects the errors that can occur when the data is
moved or stored from the sender to the receiver. This simple and effective method helps
improve the reliability of communication systems and digital storage. It adds extra bits to the
original data, allowing the system to detect and correct single-bit errors. It is a technique
developed by Richard Hamming in the 1950s.

What is Redundant Bits?


Redundant bits are extra binary bits that are generated and added to the information-
carrying bits of data transfer to ensure that no bits were lost during the data transfer.

Algorithm of Hamming Code


Hamming Code is simply the use of extra parity bits to allow the identification of an error.
Step 1: Write the bit positions starting from 1 in binary form (1, 10, 11, 100, etc).
Step 2: All the bit positions that are a power of 2 are marked as parity bits (1, 2, 4, 8, etc).
Step 3: All the other bit positions are marked as data bits.
Step 4: Each data bit is included in a unique set of parity bits, as determined its bit position in
binary form:
 Parity bit 1 covers all the bits positions whose binary representation includes a 1 in the
least significant position (1, 3, 5, 7, 9, 11, etc).
 Parity bit 2 covers all the bits positions whose binary representation includes a 1 in the
second position from the least significant bit (2, 3, 6, 7, 10, 11, etc).

Prof. Varsha Maurya Page 26


306-Computer Network Unit-2 SDJ International College

 Parity bit 4 covers all the bits positions whose binary representation includes a 1 in the
third position from the least significant bit (4–7, 12–15, 20–23, etc).
 Parity bit 8 covers all the bits positions whose binary representation includes a 1 in the
fourth position from the least significant bit bits (8–15, 24–31, 40–47, etc).
 In general, each parity bit covers all bits where the bitwise AND of the parity position and
the bit position is non-zero.

2.3.4 Data Link Control and Protocols


Data Link Control refers to the set of procedures and protocols used at the Data Link Layer
(Layer 2) of the OSI model to ensure reliable, orderly, and error-free communication between
two directly connected nodes.

Main Goals of Data Link Control:


1. Framing – Dividing the stream of bits into manageable units called frames.
2. Flow Control – Prevents the receiver from being overwhelmed by too much data.
3. Error Control – Detects and corrects errors in transmitted frames.
4. Acknowledgment – Ensures the sender knows whether data was received successfully.
Here are the most commonly used protocols:
1. HDLC (High-Level Data Link Control)
 Bit-oriented protocol developed by ISO.
 Uses flags to indicate the beginning and end of a frame.
 Provides error detection, flow control, and reliable transmission.

Prof. Varsha Maurya Page 27


306-Computer Network Unit-2 SDJ International College

 Works in point-to-point and multipoint networks.


Example: Used in WAN (Wide Area Network) links.

2. PPP (Point-to-Point Protocol)


 A byte-oriented protocol used to establish a direct connection between two nodes.
 Supports authentication, encryption, and compression.
 Used commonly in dial-up connections, DSL links, and VPNs.
Example: Internet connections over telephone lines.

3. SLIP (Serial Line Internet Protocol)


 An older protocol, replaced by PPP.
 Very simple – only for IP packet transmission.
 No error detection, no compression, no authentication.
Use case: Legacy systems only.

Prof. Varsha Maurya Page 28


306-Computer Network Unit-2 SDJ International College

4. Stop-and-Wait ARQ
 Sender sends one frame and waits for acknowledgment.
 If ACK is not received → resend the frame.
 Simple, but inefficient on long-delay networks.

5. Sliding Window Protocol (Go-Back-N and Selective Repeat)


 Allows multiple frames to be sent before acknowledgment.
 Go-Back-N: If error occurs, resend the whole window of frames.
 Selective Repeat: Only the incorrect frames are retransmitted.
Efficient for high-speed networks with low error rates.

Prof. Varsha Maurya Page 29


306-Computer Network Unit-2 SDJ International College

2.3.5 Multiple access Protocol: CSMA/CD, LAN: Ethernet


A Multiple Access Protocol is a set of rules or algorithms used in computer networks to allow
multiple devices (nodes) to share and access a common communication channel without
interfering with each other.
These protocols are mainly used in broadcast networks such as LANs, wireless networks, and
satellite communications, where more than one device may want to send data simultaneously.

If two or more devices transmit at the same time over a shared medium, collisions can occur,
leading to data loss. Multiple access protocols help prevent or manage these collisions.

Multiple access protocols can be subdivided further as

Prof. Varsha Maurya Page 30


306-Computer Network Unit-2 SDJ International College

CSMA/CD (Carrier Sense Multiple Access with Collision Detection)


 A protocol used in wired Ethernet networks (IEEE 802.3).
 Before sending data, a device listens (Carrier Sense) to the channel.
 If the channel is idle, the device sends data (Multiple Access).
 If two devices send data simultaneously, a collision occurs.
 Both devices detect the collision and wait for a random backoff time before
retrying.

Steps in CSMA/CD:
1. Sense the channel.
2. If idle, send data.
3. If collision detected, stop sending.
4. Wait a random time and try again.

Ethernet (LAN Technology)


 Ethernet is the most widely used Local Area Network (LAN) technology.
 It is based on the IEEE 802.3 standard.
 Ethernet originally used CSMA/CD but now mostly uses switches to avoid
collisions.
 Ethernet frames carry data along with source and destination MAC addresses.
 Speeds include 10 Mbps, 100 Mbps (Fast Ethernet), 1 Gbps (Gigabit Ethernet),
and 10 Gbps (10-Gigabit Ethernet).

Prof. Varsha Maurya Page 31


306-Computer Network Unit-2 SDJ International College

Types of Ethernet:
 10Base-T: 10 Mbps using twisted pair cables.
 100Base-TX: 100 Mbps (Fast Ethernet).
 1000Base-T: 1 Gbps (Gigabit Ethernet).
 10GBase-T: 10 Gbps (10-Gigabit Ethernet).

2.3.6 Introduction: Wireless LAN, Connecting devices: Repeaters, Hubs, Bridges,


Switches, Concept of VLAN

Wireless LAN (WLAN)


A Wireless LAN is a local area network that uses radio waves to connect devices instead of
cables. It allows laptops, smartphones, and other devices to communicate and access the
network wirelessly.

Features
 Based on IEEE 802.11 standards (Wi-Fi)
 Uses Access Points (APs) to manage wireless communication
 Offers mobility, flexibility, and ease of installation
 Typically used in homes, offices, schools, and public areas

Connecting Devices:

Prof. Varsha Maurya Page 32


306-Computer Network Unit-2 SDJ International College

1. Repeaters
 Amplify and retransmit signals to extend the range of a network.
 Used in both wired and wireless networks.
 Do not filter or manage data traffic.

2. Hubs
 Basic networking device that connects multiple computers in a LAN.
 Operates at Physical Layer (Layer 1).
 Broadcasts incoming data to all connected ports.
 No filtering or traffic management.

3. Bridges
 Connect two LAN segments and filter traffic based on MAC addresses.
 Operates at Data Link Layer (Layer 2).
 Reduces traffic and collisions by dividing the network into segments.

Prof. Varsha Maurya Page 33


306-Computer Network Unit-2 SDJ International College

4. Switches
 More advanced than hubs and bridges.
 Operate at Data Link Layer (Layer 2), and sometimes Layer 3 (with routing features).
 Forward data only to the intended recipient using MAC address tables.
 Improve network performance and reduce collisions.

Concept of VLAN (Virtual LAN)


 VLAN is a logical grouping of devices in the same broadcast domain, regardless of their
physical location.
 Created using switches that support VLAN tagging (IEEE 802.1Q).
 Allows segmentation of networks for security, performance, and management.
 Each VLAN acts as a separate subnet, isolating traffic and reducing broadcast storms.

Prof. Varsha Maurya Page 34


306-Computer Network Unit-2 SDJ International College

Example:
 A company can create separate VLANs for HR, Finance, and IT departments.
 Devices in each VLAN cannot communicate with others unless explicitly allowed via
routing.

Prof. Varsha Maurya Page 35

You might also like