Download Network layer

Survey
yes no Was this document useful for you?
   Thank you for your participation!

* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project

Document related concepts

Serial digital interface wikipedia , lookup

Immunity-aware programming wikipedia , lookup

Giant magnetoresistance wikipedia , lookup

Telecommunication wikipedia , lookup

Carbon nanotubes in photovoltaics wikipedia , lookup

E-carrier wikipedia , lookup

UniPro protocol stack wikipedia , lookup

Transcript
☻Error control☻
☻ Network architecture ☻
☻ Protocols ☻
☻ Transmission Efficiency and Throughput ☻
SYST5030/4030
Causes of errors
• Errors are caused by:
– various kinds of surrounding noise which
disturbs the signal going through a medium like
copper, coaxial cable, etc.
– properties of the medium
• attenuation distortion (high frequencies lose
power more rapidly than low frequencies)
• delay distortion (different frequencies travel
through the medium at different speeds)
SYST5030/4030
Error Prevention
• Shielding
• Relocating cables
• Conditioning (carriers guarantee the
maximum number of errors that can occur)
– C-type conditioning compensates for attenuation and
delay distortions.
– D-type conditioning improves signal to noise ratio.
SYST5030/4030
ERROR DETECTION AND CONTROL
PARITY CHECKING
Single Parity bit: Total number of 1 bits must always be even.
V = 0110101 (7-bit ASCII code).
Since, the number of 1’s is even, add a 0 as the eighth bit.
Therefore, 8-bit representation of V is 01101010.
Similarly, W = 0001101 (7-bit ASCII code)
Since, the number of 1’s is odd, add a 1 as the eighth bit.
Therefore, 8-bit representation of W is 00011011.
(In odd parity system, total number of 1 bits is always odd.)
What is the drawback with the single parity method?
SYST5030/4030
CYCLICAL PARITY CHECKING
This method requires two parity bits per character.
Assuming six bits of code (bits 1 through 6) add two
parity bits (bits 7 and 8) such that bit 7 is the parity for
bits 1, 3 and 5, while bit 8 is the parity for bits 2, 4, and 6.
Again, total number of ones is even in both cases.
0
1
1
0
0
1
1
0
Parity 2
Parity 1
How is this method better than having a single parity bit?
SYST5030/4030
M-of-N Codes
The code is designed in such a way that there will always
be M 1’s and N-M 0’s in each valid character of the code.
Example
4-of-8 Code (from IBM)
In this 8-bit code there must be exactly 4 ones and 4 zeros.
Valid characters:
Invalid characters:
00001111
00000111
01011010
11100000
00011110
SYST5030/4030
Hamming codes
Parity Bit Yes Yes No Yes No No No Yes No No No
Bit place
1
2
Data
3
4
1
Parity
1
0
Transmit
1
0
5
6
7
1
0
0
1
1
1
8
9
10 11
1
1
0
1
1
0
0
1
0
0
0
The table above shows how the character 1100110 is converted into its
hamming code equivalent. Even parity is used in this case.
Bit 1 checks: 1, 3, 5, 7, 9, 11
Bit 2 checks: 2, 3, 6, 7, 10, 11
Bit 4 checks: 4, 5, 6, 7
Bit 8 checks: 8, 9, 10, 11
Hamming codes are Forward error correcting codes
SYST5030/4030
Cyclical Redundancy Check (CRC)
• This is applied to an entire block of data in synchronous
communication.
• A 16-bit (or more commonly 32-bit) number is calculated
from the entire block, and
attached to the end of the block by the sender.
• The receiver performs a similar calculation and compares the
16-bit value to see if it is the same. If they are not the same,
it indicates an error in the transmission.
• This is a highly reliable scheme with almost 100%
error detection capability.
SYST5030/4030
Transmission Efficiency and
throughput
Transmission efficiency is defined as:
Total number of information bits sent
Total number of bits sent
In asynchronous transmission, efficiency = 70%
In synchronous transmission, efficiency is much
higher
SYST5030/4030
Throughput
Throughput: number of information bits received per second after also accounting
for retransmissions due to errors.
Efficiency = 80%
Error rate = 1%
Modem speed = 9600 bits per second
Throughput = 9600 x 0.80 x (1 – 0.01)
= 7603.2 bits per second
This is also called transmission rate of information bits.
Note: Throughput is less than efficiency.
SYST5030/4030
Defines:
Network
Architecture
1) The way communications functions are divided into
layers.
2) Protocols, standards and messages at each layer.
Objective of the layered approach:
1) Each layer performs one set of functions.
2) Each layer isolates the layers above it from the
complexities below
Protocols in each layer are the set of rules agreed to and
followed by both parties for successful communication.
SYST5030/4030
Layered Network Architecture
• Several layers are involved in data communications (7 in
OSI, 4 in TCP/IP)
• The most important layers (and the ones in TCP/IP) are:
– Application layer: handles the details of particular
applications (e.g., Telnet, Ftp, SMTP, SNMP).
– Transport layer:provides reliable flow of data between
end system hosts for the application layer.
– Network layer: performs addressing and routing.
– Link Layer: responsible for error control, flow control,
message delineation, link management (media access
control). Also called network interface layer.
General principle: division of work across layers.
SYST5030/4030
OSI Layered Protocol
Host Computer
Host Computer
Application layer
Application layer
Presentation layer
Presentation layer
Session layer
Session layer
Transport layer
Transport layer
Network layer
Network
Network layer
layer
Network layer
Data Link layer
Data
Data Link
Link layer
layer
Data Link layer
Physical layer
Physical
Physical layer
layer
(Intermediate node)
Physical layer
SYST5030/4030
What if your Web-browser used an
Implementation of the OSI model?
Application layer
CLIENT *openserver
(char 180.232.23.10,char 80)
Presentation layer
Get (http:180.232.23.10:80)
Session layer
Transport layer
Begin Flag Address
Data Link layer
Information
Get (http:180.232.23.10:80)
8 bits
01111110
8 or 16 bits
Get
Ending Flag
01111110
Get (http:180.232.23.10:80)
TO
01111110
Network layer
Control
TO
Application
Programming
Interface
7. Application
1.
2.
3.
4.
5.
6.
Transport
Presentation
Session
Network
Data
Physical
Link
layer
layer
layer
layer
sends
layer
transforms
encodes
notifies
splits
encapsulates
breaks
bits
message
into
data
up
endmessage
physical
down
message
into to into
commonly
system
packets
message
into
representation
Network
DLhost
and
size
with
API
used
of
packets
and
(voltages,
a data
storage
pending
controls
sender
sign-waves,
application
and
format
data
flow
layer
pulses
(for of light,
example
transmission.
destination
etc.)
communicates
and Ascii)
sends
address
with
it onto the
“wire”
application
between two
network devices.
01111110
8 bits
8 or 16 bits
(http:180.232
01111110
.23.10:80)
01111110
Get (http:180.232.23.10:80)
8 bits
8 or 16 bits
Physical layer
SYST5030/4030
5.
layer
transforms
1.3Physical
2.
4.
Physical
Data
Network
Link
layer
layer
layer
receives
rebits
intoup
physical
physical
assembles
breaks
receives
representation
packet
message
NL packet
and of
representation
(voltages,
bits
into
calculates
turns
DL size
them
best
packets
back
port DL
sign-waves,
pulses of light,
packets
to get to endetc.)
and –sends
onto the
system
then itsends
“wire”
two
packetbetween
back down
network
to DLL devices.
Data
Data Link
Link layer
layer
Information
Ending Flag
01111110
8 bits
8 or 16 bits
01111110
8 bits
8 or 16 bits
(http:180.232
01111110
.23.10:80)
01111110
TO
Network
Network layer
layer
Control
TO
Begin Flag Address
01111110
Get
01111110
Get (http:180.232.23.10:80)
8 bits
8 or 16 bits
Physical
Physical layer
layer
(Intermediate node)
SYST5030/4030
1. Application
2.
3.
4.
5.
6.
7.
Transport
Presentation
Session
Network
Data
Physical
Link
layer
layer
layer
layer
layer
layer
receives
reencodes
notifies
re-assembles
removes
assembles
physical
sends message
sending
message
representation
packet
through
back
and of
into
system
message
packet/addressing
sends
bits
Network
from
format
itthat
up
(if
API
the
to
used
wire,
NL
up to
byand
the
application
message
needed)
information
sends
serverbit-patterns
application
haslayer
and
been up to
received,
sends
DLL
information
and
terminates
up
to TL
connection
SERVER
Application layer
CLIENT *openserver
(char 180.232.23.10,char 80)
Presentation layer
Get (http:180.232.23.10:80)
Session layer
Transport layer
Begin Flag Address
Data Link layer
Information
Get (http:180.232.23.10:80)
8 bits
01111110
8 or 16 bits
Get
Ending Flag
01111110
Get (http:180.232.23.10:80)
TO
01111110
Network layer
Control
TO
Application
Programming
Interface
01111110
8 bits
8 or 16 bits
(http:180.232
01111110
.23.10:80)
01111110
Get (http:180.232.23.10:80)
8 bits
8 or 16 bits
Physical layer
SYST5030/4030
OSI Layered Protocol
Host Computer
Host Computer
Application layer
Application layer
Presentation layer
Presentation layer
Session layer
Session layer
Transport layer
Transport layer
Network layer
Network
Network layer
layer
Network layer
Data Link layer
Data
Data Link
Link layer
layer
Data Link layer
Physical layer
Physical
Physical layer
layer
(Intermediate node)
Physical layer
SYST5030/4030
The Level 3 Approach
Network Layer
Primary Attribute
3
Addressing
QoS
2
1
Multiplexing
Low Error Rate
Fault Tolerance
High Capacity
Physical Medium
SYST5030/4030
Layers in protocols
Source: Kurose and Ross (2001), “Computer Networking: A Top-Down Approach Featuring the Internet”
SYST5030/4030
Implementing an Architecture
• Each layer appends its own header to the application data.
• At the receiving end, each layer strips off the corresponding
header.
SYST5030/4030
Data Link protocols
Need a reliable way of exchanging information at data link layer
BSC (Binary Synchronous Communications)
SDLC (Synchronous Data Link Control)
HDLC (High Level Data Link Control)
Protocol Features and Issues
•Communications line control (polling/selecting)
•Framing
•Addressing
•Synchronization
•Data transparency
•Error control
•Flow control
•Fragmentation and reassembly
SYST5030/4030
Multipoint SDLC network
SYST5030/4030
SDLC Frame
Begin Flag Address
01111110
8 bits
Control
8 or 16 bits
Information
Variable length
Frame
Check
Sequence Ending Flag
16 bits 01111110
SYST5030/4030
How Data Link Protocol Works
(Automatic Repeat Request - ARQ - method)
• Stop and wait ARQ:
– Sender stops and waits for response from
receiver after each packet
– Receiver sends ACK if no errors in message
– Receiver sends NACK if errors in message.
This is a half-duplex method used in BSC protocol.
SYST5030/4030
Stop and wait ARQ
A
B
frame 0
Ack1
frame 1
Ack0
In this case, there are only two frames numbered 0 and 1
SYST5030/4030
Protocol for error correction
(Automatic Repeat Request)
• Continuous ARQ:
– sender does not wait for response from receiver
after each packet
– receiver asks for retransmission of erroneous
packets.
This is a full-duplex method.
It is also called sliding window protocol.
It is used in SDLC protocol.
SYST5030/4030
B
A
Continuous ARQ
1
Frame 0 received okay
2
3
4
Frame 1 received okay
Frame 2 received okay
Frame 3 received okay
5
Frame 4 received okay
6
Frame 5 not received
7
5
6
7
Frame 6 received okay
Frame 7 received okay
Frame 5 received okay
Frame 6 received okay
Frame 7 received okay
Note: Received Receipts will go back from B to A (not animated)
SYST5030/4030