Вы находитесь на странице: 1из 17

Chapter 1 and 2

Physical Layer and data link layer brief overview:


Network model
The two main benefits of networking computers are

1. Communications
Information can be distributed very quickly, such as email and video conferencing.

2. Saving Money
Resources such as information, software, and hardware can be shared.
OSI model
The Open Systems Interconnection (OSI) model began as a reference model, but has since
been implemented.
It was created by the International Organization for Standardization (ISO) to provide a logical
framework for how data communication processes should interact across networks
There are 7 layers in the OSI model. Each layer is responsible for a particular aspect of data
communication.
It is therefore often referred to as the OSI Seven Layer Model.

ECE 1
I. APPLICATION

The Application layer provides network services directly to the user's application such as
a web browser, email software and Windows Explorer. This layer is said to be "closest to
the user".

Provides protocols that are commonly needed

II. PRESENTATION

This layer 'represents' the data in a particular format to the Application layer. It defines
encryption, compression, conversion and other coding functions.

Data compression and encryption.


III. SESSION

The session layer is responsible for dialog control and synchronization

Any necessary log-on or password validation is also handled by this layer.

IV. TRANSPORT

Provides for the connection management.

Multiplex multiple connection over a single channel.

Heart of the OSI model

V. NETWORK

Deliver of indivusial packet from source host to destination host

Main topics:
Internet Protocol (IP) addressing and routing

VI. DATA LINK


Error control and flow control

Bridges

Switches (multi-port bridges)

VII. PHYSICAL

Convert the logical 1s and 0s coming from layer 2 into electrical signals.
Transmission of the electrical signals over a communication channel.
ECE 2
Error
Topics:
Types of Errors
Detection
Correction
Flow control
Error control
Definition of Error
Networks must be able to transform data from once device to another with complete
accuracy. While the transmission data can be corrupted, for reliable communication
errors must be detected and corrected.
Environmental interference and physical defects in the communication medium can cause
random bit errors during data transmission.
Error detection and correction are implemented either at data link layer or the transport
layer of the OSI model.

Types of Errors

ECE 3
Single-bit errors
Only one bit in the data unit has changed

Burst errors
It means that two or more bits in the data unit has changed.

Redundancy

Error detection uses the concept of redundancy, which means adding extra bits for detecting
error at the destination

Instead of repeating the entire data stream, a shorter group of bits may be appended to the
end of each unit. This technique is called Redundancy because the extra bit are redundant
to the information. They are discarded as soon as the accuracy of the transmission has been
determined.

To detect or correct errors, redundant bits of data must be added

ECE 4
Detection/Correction Techniques
Parity Checks
Check summing methods
Cyclic redundancy checks

ECE 5
Parity Checks

In parity check, a parity bit is added to every data unit so that the total number of 1s is even

Parity Bit (PB)


One additional bit per character
Even parity
Odd Parity
How many bit errors can PB detect?
10001110 --- 10101110 => error!
10001110 --- 10100110 => No error detected!!!
Conclusion 1 PB can only detect an odd number of errors!
Example:

1110110 1101111 1110010


- After adding the parity bit
11101101 11011110 11100100
Single Bit Error Correction

ECE 6
Parity for each character (byte=line) + parity for each column (set of data bytes sent)

Example - Single Bit Error Correction

2. Check summing method

The sender follows these steps:


The unit is divided into k sections, each of n bits.
All sections are added get the sum.
The sum is complemented and becomes the checksum.
The checksum is sent with the data.
The receiver follows the following steps:
The unit is divided into k sections, each of n bits.
All sections are added to get the sum.
The sum is complemented.
If the result is zero, the data are accepted: otherwise, rejected
Example:
Suppose the following block of 16 bits is to be sent using a checksum of 8 bits.
10101001 00111001
The numbers are added as:
10101001
00111001
------------
Sum 11100010
ECE 7
Checksum 00011101
The pattern sent is 10101001 00111001 00011101
Now suppose the receiver receives the pattern sent and there is no error.
10101001 00111001 00011101
When the receiver adds the three sections, it will get all 1s, which, after complementing, is all 0s
and shows that there is no error.
10101001
00111001
00011101
Sum 11111111
Complement 00000000 means that the pattern is OK
3. Cyclic Redundancy Checksum (CRC)
CRC error detection method treats packet of data to be transmitted as a large polynomial
In this method, a sequence of redundant bits, called the CRC or the CRC remainder, is
appended to the end of the unit so that the resulting data unit become exactly divisible by a
second, predetermined binary number. At its destination, the incoming data unit is divided
by the same number. If at this step there is no remainder, the data unit assume to be correct
and is accepted, otherwise it indicate that data unit has been damaged in transmission and
therefore must be rejected

ECE 8
Example: detect error happened or not

Error correction

Two methods

Retransmission after detecting error

When an error is discovered, the receiver can have the sender retransmit the entire data unit.

Forward error correction (FEC)

Receiver can use an error correcting code, which automatically corrects certain errors

There are two types of Error Correcting techniques

1. Single bit error correction.


2. Burst error correction
Error Correction can be done with the help of HAMMING CODE.

ECE 9
Hamming Code

Hamming code can be applied to data units of any length and uses the relationship between
data and redundancy bits. For e.g.

A 7 bit ASCII code requires 4 Redundancy bits that can be added to the end of the data unit
or interspersed with the original data bits

These bits are placed in positions 1, 2, 4 and 8. We refer to these bits as r1, r2, r4 and r8.

In the Hamming code, each r bit is the CRC bit for one combination of data bits :

- r1 is the one combination of data bits.

- r2 is another combination of data bits. And so on.

Redundant Bit Calculation

The combination used to calculate each of the four values for a 7 bit data sequence are as
follows :

- r1 : bits 1,3,5,7,9,11.

- r2 : bits 2,3,6,7,10,11.

- r4 : bits 4,5,6,7.

- r8 : bits 8,9,10,11.

ECE 10
Data and redundancy bits

2r m r 1

Example: Hamming Code

ECE 11
Flow and Error Control

Flow Control

Flow control coordinates the amount of data that can be sent before receiving
acknowledgement
It is one of the most important functions of data link layer.
Flow control is a set of procedures that tells the sender how much data it can transmit
before it must wait for an acknowledgement from the receiver.
Receiver has a limited speed at which it can process incoming data and a limited amount
of memory in which to store incoming data.
Receiver must inform the sender before the limits are reached and request that the
transmitter to send fewer frames or stop temporarily.
Since the rate of processing is often slower than the rate of transmission, receiver has a
block of memory (buffer) for storing incoming data until they are processed.
Error Control

Error control includes both error detection and error correction.


It allows the receiver to inform the sender if a frame is lost or damaged during
transmission and coordinates the retransmission of those frames by the sender.
Error control in the data link layer is based on automatic repeat request (ARQ).
Whenever an error is detected, specified frames are retransmitted.

Error and Flow Control Mechanisms

1. Stop-and-Wait

2. Go-Back-N ARQ

3. Selective-Repeat ARQ

ECE 12
Flow and Error control

1. Stop-and-Wait

Sender keeps a copy of the last frame until it receives an acknowledgement.

For identification, both data frames and acknowledgements (ACK) frames are numbered
alternatively 0 and 1.

Sender has a control variable (S) that holds the number of the recently sent frame. (0 or 1)

Receiver has a control variable R that holds the number of the next frame expected (0 or 1).

Sender starts a timer when it sends a frame. If an ACK is not received within a allocated
time period, the sender assumes that the frame was lost or damaged and resends it

Receiver send only positive ACK if the frame is intact.

ACK number always defines the number of the next expected frame

ECE 13
EOT: End of Transmission

Disadvantage of Stop-and-Wait

In stop-and-wait, at any point in time, there is only one frame that is sent and waiting to be
acknowledged.

This is not a good use of transmission medium.

To improve efficiency, multiple frames should be in transition while waiting for ACK.

2. Go-Back-N ARQ

We can send up to W frames before worrying about ACKs.

We keep a copy of these frames until the ACKs arrive.

This procedure requires additional features to be added to Stop-and-Wait ARQ.

ECE 14
In a GBN protocol, the sender is allowed to transmit multiple packets (when available)
without waiting for an acknowledgement, but is constrained to have no more than some
maximum allowable number, N, of unacknowledged packets in the pipeline.

When data damage at 3 and 4

ECE 15
3. Selective Repeat ARQ

Go-Back-N ARQ simplifies the process at the receiver site. Receiver only keeps track of
only one variable, and there is no need to buffer out-of-order frames, they are simply
discarded.

However, Go-Back-N ARQ protocol is inefficient for noisy link. It bandwidth inefficient
and slows down the transmission.

In Selective Repeat ARQ, only the damaged frame is resent. More bandwidth efficient
but more complex processing at receiver.

It defines a negative ACK (NAK) to report the sequence number of a damaged frame
before the timer expires.

ECE 16
Chapter 1 and 2 End

ECE 17

Вам также может понравиться