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

Unit 4 - Data Link Layer -LectureOKK

Unit 4 covers the Data Link Layer of the OSI model, detailing its functions such as framing, addressing, error control, flow control, and access control. It explains the sub-layers of the Data Link Layer, namely LLC and MAC, and discusses various protocols and techniques used for error detection and correction. Additionally, it outlines the differences between MAC and IP addresses, as well as flow control protocols like Stop and Wait, Go-Back-N, and Selective Repeat.

Uploaded by

lalitpal091091
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 views67 pages

Unit 4 - Data Link Layer -LectureOKK

Unit 4 covers the Data Link Layer of the OSI model, detailing its functions such as framing, addressing, error control, flow control, and access control. It explains the sub-layers of the Data Link Layer, namely LLC and MAC, and discusses various protocols and techniques used for error detection and correction. Additionally, it outlines the differences between MAC and IP addresses, as well as flow control protocols like Stop and Wait, Go-Back-N, and Selective Repeat.

Uploaded by

lalitpal091091
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/ 67

Unit 4 – Data Link Layer

………………………………………………………………….

• LLC and MAC Sub-layer overview


• Physical (MAC) addressing overview
• Framing
• Flow control (stop and wait, go-back-N, selective-repeat-
request)
• Error Control Mechanisms
• Error Detection: Parity check, CRC
• Error Correction: Hamming code
• Channel Access
• ALOHA Systems
• CSMA, CSMNCD
• 802.3 Ethernet, Fast Ethernet, Gigabit Ethernet
• 802.4 Token Bus, 802.5 Token Ring
• Virtual circuit switching: Frame Relay, ATM & X.25
…………………………………………………………………………..

Er. Chandan Bhagat (MBMAN)


Data-link layer

• Second layer from the bottom in the OSI


• It is responsible for the node-to-node delivery of data.
• The data link layer receives the information in the form of
packets from the Network layer,
• It divides packets into frames and sends those frames bit-by-
bit to the underlying physical layer.

Er. Chandan Bhagat (MBMAN)


Functions of the Data-link Layer:

1. Framing:
• The packet received from the Network layer is known as a
frame in the Data link layer.
• At the sender’s side, DLL receives packets from the
Network layer and divides them into small frames, then,
sends each frame bit-by-bit to the physical layer.
• At the receiver’s end, DLL takes bits from the Physical
layer organizes them into the frame, and sends them to the
Network layer.
2. Addressing:
• The data link layer encapsulates the source and
destination’s MAC address/ physical address in the
header of each frame to ensure node-to-node delivery.
o MAC address is the unique hardware address that is
assigned to the device while manufacturing.
3. Error Control:
• Data can get corrupted due to various reasons like noise,
attenuation, etc.
• So, DLL detect the error in the transmitted data and correct
it using error detection and correction techniques
respectively.

4. Flow Control:
• An overflow data in the receiver’s buffer and some frames
may get lost.
• So, DLL synchronize the sender’s and receiver’s speeds
and establish flow control between them.
5. Access Control:

Er. Chandan Bhagat (MBMAN)


• When multiple devices share the same communication
channel there is a high probability of collision,
• So DLL uses CSMA/CD and CSMA/CA techniques to
avoid collisions and loss of frames in the channel.

Sub-layers of Data Link Layer:

• The data link layer is further divided into two sub-layers, which
are as follows:

Logical Link Control (LLC):

• This sublayer of the data link layer


• Deals with multiplexing, the flow of data among applications and
other services, and
• LLC is responsible for providing error messages and
acknowledgments as well.

Media Access Control (MAC):

• MAC sublayer manages the device’s interaction, responsible for


addressing frames, and
• Also controls physical media access.

Protocols in Data link layer

There are various protocols in the data link layer, which are as follows:

• Synchronous Data Link Protocol (SDLC)


• High-Level Data Link Protocol (HDLC)
• Serial Line Interface Protocol (SLIP)
• Point to Point Protocol (PPP)
• Link Access Procedure (LAP)
• Link Control Protocol (LCP)
Er. Chandan Bhagat (MBMAN)
• Network Control Protocol (NCP)

Physical (MAC) addressing overview

Media Access Control Address is a physical address that works at


the Data Link Layer.

• MAC Addresses are unique 48-bits hardware number of a


computer, which is embedded into a network card (known as a
Network Interface Card) during the time of manufacturing.
• MAC Address is also known as the Physical Address of a network
device.
• In IEEE 802 standard, DLL is divided into two sublayers –

1. Logical Link Control (LLC) Sublayer


2. Media Access Control (MAC) Sublayer

Er. Chandan Bhagat (MBMAN)


Format of MAC Address –

Er. Chandan Bhagat (MBMAN)


How to find MAC address –

Command for UNIX/Linux - ifconfig -a


ip link list
ip address show

Command for Windows OS - ipconfig /all

MacOS - TCP/IP Control Panel

Types of MAC Address:

1. Unicast:
a. To a specific NIC.
b. If the LSB (least significant bit) of the first octet of an
address is set to zero, the frame is meant to reach only one
receiving NIC.
c. MAC Address of source machine is always Unicast.

Er. Chandan Bhagat (MBMAN)


2. Multicast:
a. Allows the source to send a frame to a group of devices.
b. In Layer-2 (Ethernet) Multicast address, LSB (least
significant bit) of the first octet of an address is set to one.

Er. Chandan Bhagat (MBMAN)


3. Broadcast:
a. Ethernet frames with ones in all bits of the destination
address (FF-FF-FF-FF-FF-FF) are referred to as the
broadcast addresses.
b. Frames that are destined with MAC address FF-FF-FF-FF-
FF-FF will reach every computer belonging to that LAN
segment.

Er. Chandan Bhagat (MBMAN)


What is MAC Cloning?

Difference between MAC Address and IP Address:

The main difference:

• MAC Address is used to ensure the physical address of the


computer.
o It uniquely identifies the devices on a network.
• IP addresses are used to uniquely identifies the connection of the
network with that device takes part in a network.

S.NO MAC Address IP Address


MAC Address stands for
IP Address stands for Internet
1. Media Access Control
Protocol Address.
Address.
2. MAC Address is a six byte IP Address is either a four-byte

Er. Chandan Bhagat (MBMAN)


S.NO MAC Address IP Address
hexadecimal address. (IPv4) or a sixteen-byte (IPv6)
address.
A device attached with MAC
A device attached with IP Address
3. Address can retrieve by ARP
can retrieve by RARP protocol.
protocol.
NIC Card’s Manufacturer Internet Service Provider provides
4.
provides the MAC Address. IP Address.
MAC Address is used to
IP Address is the logical address of
5. ensure the physical address
the computer.
of a computer.
MAC Address operates in the IP Address operates in the network
6.
data link layer. layer.
IP Address identifies the
MAC Address helps in
7. connection of the device on the
simply identifying the device.
network.
MAC Address of computer
IP Address modifies with the time
8. cannot be changed with time
and environment.
and environment.
MAC Addresses can’t be IP Addresses can be found by a
9.
found easily by a third party. third party.
It is a 48-bit address that
contains 6 groups of 2 Pv4 uses 32-bit addresses in dotted
hexadecimal digits, separated notations, whereas IPv6 uses 128-
by either hyphens (-) or bit addresses in hexadecimal
colons(.). notations.
10.
Example: Example:

00:FF:FF:AB:BB:AA IPv4 192.168.1.1

or IPv6 FFFF:F200:3204:0B00

Er. Chandan Bhagat (MBMAN)


S.NO MAC Address IP Address
00-FF-FF-AB-BB-AA
No classes are used for MAC IPv4 uses A, B, C, D, and E classes
11.
addressing. for IP addressing.
MAC Address sharing is not In IP address multiple client
12.
allowed. devices can share the IP address.
MAC address help to solve IP addresses never able to solve
13.
IP address issue. MAC address issues.
MAC addresses can be used The IP address can be used for
14.
for broadcasting. broadcasting or multicasting.
MAC address is hardware
15. IP address is software oriented.
oriented.

Framing

Parts of a Frame

A frame has the following parts −

• Frame Header − It contains the source and the destination


addresses of the frame.
• Payload field − It contains the message to be delivered.
• Trailer − It contains the error detection and error correction bits.
Er. Chandan Bhagat (MBMAN)
• Flag − It marks the beginning and end of the frame.

Explain different approaches or techniques of framing – Assignment


Flow control Protocols:
(Stop and wait, go-back-N, selective-repeat-request)

“A set of procedures which are used for restricting the amount


of data that a sender can send to the receiver”.

Flow Control Protocols-

Flow Control Protocols (Techniques)-

Er. Chandan Bhagat (MBMAN)


Stop and Wait Protocol-

The simplest flow control protocol.

It works under the following assumptions-

• When communication channel is perfect.


• When No error occurs during transmission.

Working- Steps are illustrated below-

The working of a stop and wait protocol may be explained as-

• Sender sends a data packet to the receiver.


• Sender stops and waits for the acknowledgement for the sent
packet from the receiver.
• Receiver receives and processes the data packet.
• Receiver sends an acknowledgement to the sender (For received
packet)
• After receiving the acknowledgement, sender sends the next
data packet to the receiver.
Er. Chandan Bhagat (MBMAN)
Analysis-

• Sender puts the data packet on the transmission link.


• Data packet propagates towards the receiver’s end.
• Data packet reaches the receiver and waits in its buffer.
• Receiver processes the data packet.
• Receiver puts the acknowledgement on the transmission link.
• Acknowledgement propagates towards the sender’s end.
• Acknowledgement reaches the sender and waits in its buffer.
• Sender processes the acknowledgement.

Er. Chandan Bhagat (MBMAN)


Total Time-

Total time taken in sending one data packet

= (Transmission delay + Propagation delay + Queuing delay +


Processing delay)packet

(Transmission delay + Propagation delay + Queuing delay +


Processing delay)ACK

Assume-

• Queuing delay and processing delay to be zero at both sender


and receiver side.
• Transmission time for the acknowledgement to be zero since it’s
size is very small.

Under the above assumptions.

Total time taken in sending one data packet

= (Transmission delay + Propagation delay)packet + (Propagation


delay)ACK

We know,

• Propagation delay depends on the distance and speed.


• So, it would be same for both data packet and acknowledgement.

So, we have-

Total time taken in sending one data packet

= (Transmission delay)packet + 2 x Propagation delay

Er. Chandan Bhagat (MBMAN)


Er. Chandan Bhagat (MBMAN)
Er. Chandan Bhagat (MBMAN)
Er. Chandan Bhagat (MBMAN)
Er. Chandan Bhagat (MBMAN)
Er. Chandan Bhagat (MBMAN)
Er. Chandan Bhagat (MBMAN)
Er. Chandan Bhagat (MBMAN)
Er. Chandan Bhagat (MBMAN)
Er. Chandan Bhagat (MBMAN)
Er. Chandan Bhagat (MBMAN)
Er. Chandan Bhagat (MBMAN)
Er. Chandan Bhagat (MBMAN)
Er. Chandan Bhagat (MBMAN)
Er. Chandan Bhagat (MBMAN)
Er. Chandan Bhagat (MBMAN)
Er. Chandan Bhagat (MBMAN)
In SR protocol (Selective Repeat Protocol)

• Receiver does not reject the out of order frames.


• Receiver accepts the out of order frames and sort them later.
• Thus, only the missing frame has to be sent by the sender.
• Sender performs searching and finds the missing frame.
• Then, sender selectively repeats that frame.
• Thus, only the selected frame is repeated and not the entire
window.
• That is why, the protocol has been named as “Selective Repeat
Protocol “.

Er. Chandan Bhagat (MBMAN)


Difference between them:

S.NO Go-Back-N Protocol Selective Repeat Protocol


In Go-Back-N Protocol, if the
sent frame are find suspected In selective Repeat protocol, only
1. then all the frames are re- those frames are re-transmitted
transmitted from the lost packet which are found suspected.
to the last packet transmitted.
Sender window size of Go- Sender window size of selective
2.
Back-N Protocol is N. Repeat protocol is also N.
Receiver window size of Go- Receiver window size of
3.
Back-N Protocol is 1. selective Repeat protocol is N.
Go-Back-N Protocol is less Selective Repeat protocol is more
4.
complex. complex.
In Go-Back-N Protocol, neither In selective Repeat protocol,
5. sender nor at receiver need receiver side needs sorting to sort
sorting. the frames.
In Go-Back-N Protocol, type of In selective Repeat protocol, type
6. Acknowledgement is of Acknowledgement is
cumulative. individual.
In Go-Back-N Protocol, Out-of-
In selective Repeat protocol,
Order packets are NOT
7. Out-of-Order packets are
Accepted (discarded) and the
Accepted.
entire window is re-transmitted.
In selective Repeat protocol, if
In Go-Back-N Protocol, if Receives a corrupt packet, it
Receives a corrupt packet, then immediately sends a negative
8.
also, the entire window is re- acknowledgement and hence
transmitted. only the selective packet is
retransmitted.
Efficiency of Go-Back-N Efficiency of selective Repeat
9. Protocol is protocol is also

Er. Chandan Bhagat (MBMAN)


N/(1+2*a) N/(1+2*a)

Error Detection: Parity check, CRC


What is Error?

• A condition when the receiver’s information does not match


with the sender’s information
• During transmission, digital signals suffer from noise that can
introduce errors in the binary bits travelling from sender to
receiver.
• That means a 0 bit may change to 1 or a 1 bit may change to 0.

Error detection is a technique that is used to check if any error


occurred in the data during the transmission.

Er. Chandan Bhagat (MBMAN)


Checksum-

• Checksum is an error detection method.

Checksum Example-

• Consider the data unit to be transmitted is-

10011001 11100010 00100100 10000100

• Consider 8 - bit checksum is used.


• Check if error occurred or not and data bit will be accepted by
the receiver or not

Solution:

Step-01:

At sender side,

The given data unit is divided into segments of 8 bits as-

Now, all the segments are added and the result is obtained as-

• 10011001 + 11100010 + 00100100 + 10000100 = 1000100011


• Since the result consists of 10 bits, so extra 2 bits are wrapped
around.
• 00100011 + 10 = 00100101 (8 bits)
• Now, 1’s complement (00100101)is taken which is 11011010
(Called checksum)
• Thus, checksum value = 11011010

Er. Chandan Bhagat (MBMAN)


Step-02:

• The data along with the checksum value is transmitted to the


receiver.

Step-03:

At receiver side,

• Sum of all segments (with wrapped around.) + Checksum


value =
o 00100101 + 11011010 = 11111111
• Complemented value = 00000000

Now,

Then, following two cases are possible-

Case-01: Complemented value (Result) = 0

If the complemented value (result) is zero,

• Receiver assumes that no error occurred in the data during the


transmission.
• Receiver accepts the data.

Case-02: Complemented value (Result) ≠ 0

If the result is non-zero,

• Receiver assumes that error occurred in the data during the


transmission.
• Receiver discards the data and asks the sender for
retransmission.

Er. Chandan Bhagat (MBMAN)


In our example,

• Since the result is 0, receiver assumes no error occurred in the


data and therefore accepts it.

Assignment Problem:

Checksum value of 1001001110010011 and 1001100001001101 of 16


bit segment is-

A. 1010101000011111
B. 1011111000100101
C. 1101010000011110
D. 1101010000111111

Solution-

We apply the above discussed algorithm to calculate the checksum.

• 1001001110010011 + 1001100001001101 = 10010101111100000


• Since, the result consists of 17 bits, so 1 bit is wrapped around and
added to the result.
• 0010101111100000 + 1 = 0010101111100001
• Now, result consists of 16 bits.
• Now, 1’s complement is taken which is 1101010000011110
• Thus, checksum value = 1101010000011110

Thus, Option (C) is correct.

Checksum Method have the following steps: Yourself

Step-01:

At sender side,

• If m bit checksum is used, the data unit to be transmitted is


divided into segments of m bits.
• All the m bit segments are added.
Er. Chandan Bhagat (MBMAN)
• The result of the sum is then complemented using 1’s
complement arithmetic.
• The value so obtained is called as checksum.

Step-02:

• The data along with the checksum value is transmitted to the


receiver.

Step-03:

At receiver side,

• If m bit checksum is being used, the received data unit is divided


into segments of m bits.
• All the m bit segments are added along with the checksum
value.
• The value so obtained is complemented and the result is checked.

Then, following two cases are possible-

Case-01: Result = 0

If the result is zero,

• Receiver assumes that no error occurred in the data during the


transmission.
• Receiver accepts the data.

Case-02: Result ≠ 0

If the result is non-zero,

• Receiver assumes that error occurred in the data during the


transmission.
• Receiver discards the data and asks the sender for
retransmission.

Er. Chandan Bhagat (MBMAN)


Important Notes- (Study yourself)

Note-01:

• Consider while adding the m bit segments, the result obtained


consists of more than m bits.
• Then, wrap around the extra bits and add to the result so that
checksum value consists of m bits.

Note-02:

• While calculating the checksum, if checksum value is needed, then


assume it to be zero.
• After calculating the checksum value, substitute the checksum
value in the checksum field.
• This will be required during checksum calculation of IP Header,
TCP Header and UDP Header.

Note-03:

• The checksum is used in the internet by several protocols although


not at the data link layer.

Single Parity Check Method-

In this technique,

• One extra bit called as parity bit is sent along with the original
data bits.
• Parity bit helps to check if any error occurred in the data
during the transmission.

Steps Involved-

Error detection using single parity check involves the following steps-
Er. Chandan Bhagat (MBMAN)
Step-01:

At sender side,

• Total number of 1’s in the data unit to be transmitted is counted.


• The total number of 1’s in the data unit is made even in case of
even parity.
• The total number of 1’s in the data unit is made odd in case of
odd parity.
• This is done by adding an extra bit called as parity bit.

Step-02:

• The newly formed code word (Original data + parity bit) is


transmitted to the receiver.

Step-03:

At receiver side,

• Receiver receives the transmitted code word.


• The total number of 1’s in the received code word is counted.

Then, following cases are possible-

• If total number of 1’s is even and even parity is used, then


receiver assumes that no error occurred.
• If total number of 1’s is even and odd parity is used, then
receiver assumes that error occurred.
• If total number of 1’s is odd and odd parity is used, then receiver
assumes that no error occurred.
• If total number of 1’s is odd and even parity is used, then
receiver assumes that error occurred.

Er. Chandan Bhagat (MBMAN)


Parity Check Example-

Consider the data unit to be transmitted is 1001001 and even parity is


used.

Then,

At Sender Side-

• Total number of 1’s in the data unit is counted.


• Total number of 1’s in the data unit = 3.
o Clearly, even parity is used and total number of 1’s is odd.

• So, parity bit = 1 is added to the data unit to make total


number of 1’s even.
• Then, the code word 10010011 is transmitted to the receiver.

At Receiver Side-

• After receiving the code word, total number of 1’s in the code
word is counted.
• Consider receiver receives the correct code word = 10010011.
• Even parity is used and total number of 1’s is even.

Er. Chandan Bhagat (MBMAN)


• So, receiver assumes that no error occurred in the data during the
transmission.

Advantage-

• This technique is guaranteed to detect an odd number of bit


errors (one, three, five and so on).
• If odd number of bits flip during transmission, then receiver can
detect by counting the number of 1’s.

Limitation-

• This technique cannot detect an even number of bit errors (two,


four, six and so on).
• If even number of bits flip during transmission, then receiver
cannot catch the error.

EXAMPLE

Assignment

• Consider the data unit to be transmitted is 10010001 and even


parity is used.
• Then, code word transmitted to the receiver = 100100011
• Consider during transmission, code word modifies as
101100111. (2 bits flip)
• On receiving the modified code word, receiver finds the
number of 1’s is even and even parity is used.
• So, receiver assumes that no error occurred in the data during
transmission though the data is corrupted.

Er. Chandan Bhagat (MBMAN)


Cyclic Redundancy Check-

• Cyclic Redundancy Check (CRC) is an error detection method.


• It is based on binary division.

CRC Generator-

• CRC generator is an algebraic polynomial represented as a bit


pattern.
• Bit pattern is obtained from the CRC generator using the following
rule-

The power of each term gives the position of the bit and the
coefficient gives the value of the bit.

Example-

Consider the CRC generator is x7 + x6 + x4 + x3 + x + 1.

The corresponding binary pattern is obtained as-

Thus, for the given CRC generator, the corresponding binary pattern
is 11011011.

Er. Chandan Bhagat (MBMAN)


Properties Of CRC Generator (Study Yourself)-

The algebraic polynomial chosen as a CRC generator should have at


least the following properties-

Rule-01:

• It should not be divisible by x.


• This condition guarantees that all the burst errors of length equal to
the length of polynomial are detected.

Rule-02:

• It should be divisible by x+1.


• This condition guarantees that all the burst errors affecting an odd
number of bits are detected.

PRACTICE PROBLEMS BASED ON CYCLIC REDUNDANCY


CHECK (CRC)-

Problem-01:

A bit stream 1101011011 is transmitted using the standard CRC


method. The generator polynomial is x4+x+1. What is the actual bit
string transmitted?

Solution-

• The generator polynomial G(x) = x4 + x + 1 is encoded as 10011.


• Clearly, the generator polynomial consists of 5 bits.
• So, a string of 4 zeroes is appended to the bit stream to be
transmitted (one less than the number of bits in CRC
generator.)
• The resulting bit stream is 11010110110000.

Now, the binary division is performed as-


Er. Chandan Bhagat (MBMAN)
Er. Chandan Bhagat (MBMAN)
From here, CRC = 1110.

Now,

• The code word to be transmitted is obtained by replacing the last


4 zeroes of 11010110110000 with the CRC.
• Thus, the code word transmitted to the receiver =
11010110111110.

Problem-02:

A bit stream 10011101 is transmitted using the standard CRC method.


The generator polynomial is x3+1.

1. What is the actual bit string transmitted?


2. Suppose the third bit from the left is inverted during
transmission. How will receiver detect this error?

Solution-

Part-01:

• The generator polynomial G(x) = x3 + 1 is encoded as 1001.


• Clearly, the generator polynomial consists of 4 bits.
• So, a string of 3 zeroes is appended to the bit stream to be
transmitted.
• The resulting bit stream is 10011101000.

Now, the binary division is performed as-

Er. Chandan Bhagat (MBMAN)


Er. Chandan Bhagat (MBMAN)
From here, CRC = 100.

Now,

• The code word to be transmitted is obtained by replacing the last


3 zeroes of 10011101000 with the CRC.
• Thus, the code word transmitted to the receiver = 10011101100.

Part-02:

According to the question,

• Third bit from the left gets inverted during transmission.


• So, the bit stream received by the receiver = 10111101100.

Now,

• Receiver receives the bit stream = 10111101100.


• Receiver performs the binary division with the same generator
polynomial as-

Er. Chandan Bhagat (MBMAN)


From here,

• The remainder obtained on division is a non-zero value.


• This indicates to the receiver that an error occurred in the data
during the transmission.
• Therefore, receiver rejects the data and asks the sender for
retransmission.

Er. Chandan Bhagat (MBMAN)


Steps Involved (CRC)- Study Yourself

Error detection using CRC technique involves the following steps-

Step-01: Calculation Of CRC At Sender Side-

At sender side,

• A string of n 0’s is appended to the data unit to be transmitted.


• Here, n is one less than the number of bits in CRC generator.
• Binary division is performed of the resultant string with the CRC
generator.
• After division, the remainder so obtained is called as CRC.
• It may be noted that CRC also consists of n bits.

Step-02: Appending CRC To Data Unit-

At sender side,

• The CRC is obtained after the binary division.


• The string of n 0’s appended to the data unit earlier is replaced
by the CRC remainder.

Step-03: Transmission To Receiver-

• The newly formed code word (Original data + CRC) is


transmitted to the receiver.

Step-04: Checking at Receiver Side-

At receiver side,

• The transmitted code word is received.


• The received code word is divided with the same CRC generator.
• On division, the remainder so obtained is checked.

The following two cases are possible-

Er. Chandan Bhagat (MBMAN)


Case-01: Remainder = 0

If the remainder is zero,

• Receiver assumes that no error occurred in the data during the


transmission.
• Receiver accepts the data.

Case-02: Remainder ≠ 0

If the remainder is non-zero,

• Receiver assumes that some error occurred in the data during the
transmission.
• Receiver rejects the data and asks the sender for retransmission.

Er. Chandan Bhagat (MBMAN)


Error Correction:
Hamming code

The hamming code technique, which is an error-detection and error-


correction technique, was proposed by R.W. Hamming.

Basic concepts:

Redundant bits.

• Are some extra binary bits that are not part of the original
data, but they are generated & added to the original data bit.
• To ensure that the data bits don't get damaged and if they do,
we can recover them.

How to find the number of redundant bits to be added when


polynomial form is given?

We use the formula,

Total bits = m + r

Where m = message (or data bit)

r = redundant bit

Let, Divisor (Polynomial form Hamming code) = x4 + x3 + 1 = 1 1 0 0


1 (Binary)

(Formula: 1. x4 + 1. x3 + 0.x2 + 0.x1 + 1.x0)

Original Data bit (Msg) = 10 10 10 10 10 (Dividend)

Er. Chandan Bhagat (MBMAN)


Then, here we have to append four redundant zeros bit (0000) to the
Original Data bit (Msg)

So now the msg = 10 10 10 10 10 0000 (Dividend)

Note

How to find the number of redundant bits to be added when binary


form is given?

If the divisor is given in Binary form

Let, Divisor (in binary form) = 1 1 0 0 1

Then,

No. of redundant bits appended to the original msg = total no. of bits
–1=5–1=4

What is Parity Bit?

Parity bit, which is a bit appended to the data bits which ensures that
the total number of 1's are even (even parity) or odd (odd parity).

While checking the parity,

• If the total number of 1's are odd then write the value of parity
bit P1(or P2 etc.) as 1 (which means the error is there) and
• If it is even then the value of parity bit is 0 (which means no
error).

Er. Chandan Bhagat (MBMAN)


Hamming Code for Error Detection

The first step is to identify the bit position of the data & all the bit
positions which are powers of 2 are marked as parity bits (e.g. 1, 2,
4, 8, etc.).

Let,

The received hamming code of 7 bits: 1011011.

Detecting whether there are any errors in this received hamming


code or not

Step 1:

• For checking parity bit P1, use check one and skip one method,
which means, starting from P1 and then skip P2, take D3 then
skip P4 then take D5, and then skip D6 and take D7, this way we
will have the following bits,

As we can observe the total number of bits are odd so we will write
the value of parity bit as

P1 = 1. This means error is there.


Er. Chandan Bhagat (MBMAN)
Step 2:

• Check for P2 but while checking for P2, we will use check two
and skip two method, which will give us the following data bits.
• But remember since we are checking for P2, so we have to start
our count from P2 (P1 should not be considered).

As we can observe that the number of 1's are even, then we will write
the value of P2 = 0.

This means there is no error.

Step 3:

• Check for P4 but while checking for P4, we will use check four
and skip four method, which will give us the following data bits.

But remember since we are checking for P4, so we have started our
count from P4(P1 & P2 should not be considered).

As we can observe that the number of 1's are odd, then we will write
the value of P4 = 1. This means the error is there.

Er. Chandan Bhagat (MBMAN)


So, from the above parity analysis, P1 & P4 are not equal to 0, so we
can clearly say that the received hamming code has errors.

Hamming Code in for Error Correction

• Since we found that received code has an error, so now we


must correct them.

To correct the errors, use the following steps:

Now the error word E will be:

Now we have to determine the decimal value of this error word 101
which is 5

We get E = 5, which states that the error is in the fifth data bit.

To correct it, just invert the fifth data bit.

So the correct data will be:

Decimal to Binary

Er. Chandan Bhagat (MBMAN)


Er. Chandan Bhagat (MBMAN)
Channel Access (physical layer) - Based on multiplexing
Here multiplexing allows several data streams (or signals) to share
the same communication channel or transmission medium.

• Access Control is a mechanism that controls the access of


stations to the transmission link.
• There are various access control methods-

1. Time Division Multiplexing


2. Polling
3. CSMA / CD
4. Token Passing
5. Aloha

Er. Chandan Bhagat (MBMAN)


ALOHA Systems - (Advocates of Linux Open-source Hawaii
Association)

What is ALOHA in Computer Network?


• It was created in the 1970s at the University of Hawaii by
Norman Abramson and his associates.
• The system was originally designed for ground-based radio
broadcasting, but satellite communication systems now use it.
When two or more systems seek to transmit on the same channel at
the same time, a shared communication system such as ALOHA
needs a way to handle collisions.

ALOHA Means “Hello”


ALOHA is basically a multiple access protocol which describes how
all the terminals can access a medium without interfering at all with
one another or even colliding. It operates at the data-link layer.

Versions of ALOHA

Pure ALOHA
• The total time of transmission is continuous in pure ALOHA. A
station sends a frame whenever one is available. The sender waits
for an arbitrary period of time before retransmitting the frame
if there is a collision and it is destroyed.

Slotted ALOHA
• Slotted ALOHA increases the capacity of pure ALOHA while
reducing collisions. Slots are discrete time periods that are used to
divide up the shared channel. Only at the start of each time slot is

Er. Chandan Bhagat (MBMAN)


the station able to transmit data. If multiple stations attempt to
transmit at the start of the same time slot, there may still be
collisions.

Example: ALOHA

To understand this, consider the figure below where a central computer


forms a connection with 3 individual remote stations:

Here all 3 users operate in an uncoordinated manner

• At the time of transmission, no station is aware of the transmission


of data from other stations within the network.
• So, various uncoordinated users try to share the available resources
in order to send the data to the central unit.
• Thus, is called a contention scheme because a form of
disagreement occurs between the stations whose data will be
transmitted through the channel among all of them.

Er. Chandan Bhagat (MBMAN)


ALOHA is one of the protocols or methods associated with the
utilization of the medium for the transmission of data frames from earth
stations to satellite or from satellite to earth stations.

It is a contention scheme where no centralized control exists and all the


stations (nodes) are equally prioritized. This scheme shows suitability
towards bursty traffic.

CSMA, CSMA/CD

CSMA/CD, a MAC process protocol, first senses for any


transmissions from the other stations in the channel and starts
transmitting only when the channel is clear to transmit.

As soon as a station detects a collision, it stops transmission and


sends a jam signal. It then waits for some time period before
retransmitting.

Component of CSMA/CD.

1. CS – It stands for Carrier Sensing. It implies that before sending


data, a station first senses the carrier. If the carrier is found free,
then the station transmits data else it refrains.
2. MA – Stands for Multiple Access i.e. if there’s a channel, then
there are many stations that are trying to access it.
3. CD – Stands for Collision Detection. It also guides to proceed in
case of packet data collision.

Er. Chandan Bhagat (MBMAN)


Concepts of CSMA/CD

• In CSMA/CD technique, data packet transmission is only done


when the data transmission medium is free.
• When various network devices try to share a data channel
simultaneously, then it will encounter a data collision.
• The medium is continuously monitored to detect any data
collision. When the medium is detected as free, the station should
wait for a certain time period before sending the data packet to
avoid any chances of data collision.
• When no other station tries to send the data and there is no
data collision detected, then the transmission of data is said to
be successful.

802.3 Ethernet, Fast Ethernet, Gigabit Ethernet


802.3 Ethernet:
It was first standardized in 1980s by IEEE 802.3 standard. IEEE
802.3 defines the physical layer and the medium access control
(MAC) sub-layer of the data link layer for wired Ethernet networks.
It offers a simple user interface that helps to connect various devices
easily, such as switches, routers, and computers. A local area network
(LAN) can be created with the help of a single router and a few Ethernet
cables, which enable communication between all linked devices.

Er. Chandan Bhagat (MBMAN)


Different Types of Ethernet Networks

There are some kinds of Ethernet networks, which are discussed


below:

• Fast Ethernet:
o This type of Ethernet is usually supported by a twisted pair

or CAT5 cable, which has the potential to transfer or receive


data at around100 Mbps.
o The 100BASE-TX, 100BASE-FX, and 100BASE-T4 are

the three categories of Fast Ethernet.


• Gigabit Ethernet:
o Upgrade from Fast Ethernet, which uses fiber optic cable

and twisted pair cable to create communication.


o It can transfer data at a rate of 1000 Mbps or 1Gbps.

o Also uses CAT5e or other advanced cables, which can

transfer data at a rate of 10 Gbps.

Virtual circuit switching: Frame Relay, ATM & X.25

Frame relay is a type of telecommunications technology that can be


used to connect local area networks (LANs) and to transmit data
between endpoints in wide area networks (WANs).

How Does Frame Relay Work?

Frame relay uses packet switching technology. This means that it


breaks data, such as call data, into smaller packets, also known as
frames, to transmit it through a shared frame relay network.

These data packets are then reassembled at the data’s destination. Frame
relay has long been used as part of many companies’ Integrated
Services Digital Network (ISDN) systems.
Er. Chandan Bhagat (MBMAN)
It provides the information speed from sixty four Kbps to forty five
Mbps.

Er. Chandan Bhagat (MBMAN)


Asynchronous Transmission Mode (ATM):

Difference between Frame Relay and ATM:

S.NO Frame Relay ATM


Frame relay has variable While ATM has fixed
1.
packet size. packet size.
While it is costlier than
2. The cost of frame relay is low.
frame relay.
In frame relay the packet While in this, the packet
3.
delay is more. delay is low or less.
The reliability of frame relay
4. While it is a good reliable.
is less.
The packet transfer speed of While the packet transfer
5.
frame relay is low. speed of ATM is high.
The throughput of frame relay While it’s throughput is
6.
is moderate. high.
7. Frame relay does not provide While ATM provides error

Er. Chandan Bhagat (MBMAN)


error control and flow control. control and flow control.

An X.25 network

• An X.25 network is an interface between data terminal


equipment (DTE) and data circuit-terminating equipment
(DCE) that operates in the packet mode.
• Presently, it is used for networks for ATMs and credit card
verification.
• It allows multiple logical channels to use the same physical line.

X.25 has three protocol layers

• Physical Layer:
o Commonly used for the linking.

• Data Link Layer:


o For exchanging data over the link.

• Packet Layer:
o This layer defines the format of data packets and the

procedures for control and transmission of the data


packets.

Er. Chandan Bhagat (MBMAN)

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy