0% found this document useful (0 votes)
8 views99 pages

unit2

Uploaded by

raiiina197
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)
8 views99 pages

unit2

Uploaded by

raiiina197
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
You are on page 1/ 99

Unit-2

• The physical layer and data link layer are two layers in the
TCP/IP model that are responsible for different aspects of
data transmission:
• Physical layer
• Responsible for converting data into signals and
transmitting them over local media, such as cables,
connectors, or air. The physical layer also ensures that data
packets are transmitted correctly and in the correct order.
• Data link layer
• Responsible for adding sender and receiver MAC addresses
to data packets to form frames, which are then transported
over local media. The data link layer is embedded in a
computer's Network Interface Card (NIC) as software.
Error Detection Code – 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.

It is a unique number generated from data to verify its


integrity. When data is created, a checksum is calculated
and sent or saved with it. Later, when accessing the data,
the checksum is recalculated. If the two checksums match,
the data is likely error free. In this article we will see
checksum error detection method in detail.
How Checksum Works?

• On the Sender side, the data is divided into equal subunits


of n bit length by the checksum generator.
• This bit is generally of 16-bit length. These subunits are
then added together using one’s complement method. This
sum is of n bits. The resultant bit is then complemented.
• This complemented sum which is called checksum is
appended to the end of the original data unit and is then
transmitted to the receiver.
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

Result is zero, it means no error.


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.
Half-duplex and full-duplex are two modes of communication that
allow for bidirectional data transmission, but differ in the ability to
transmit data simultaneously.
Half-duplex
• Allows for two-way communication, but not simultaneously
• Requires switching between sending and receiving modes
• Uses a single communication channel that is shared between the
two directions
• Examples include walkie-talkies 4G or 5G phones
• Commonly used for devices that require occasional
non-concurrent communication
Full-duplex
• Allows for simultaneous two-way communication
• Uses two separate communication channels, one for sending and
another for receiving
• Examples include telephones and mobile phones
• Ideal for devices that require real-time communication

You might also like