Data Communication Final
Data Communication Final
:
Data Communication
:
.
.
:
1. Data and Computer Communications,Williams Stallings, (6th edition),
Prentice Hall 1999
2. Data Communications and Networking,Behrouz Forouzan,(2nd edition),2001
:
Data Communication
:
DCEs and DTEs
Dial-up Connection
DSL
:
Data Communication
:
) ( Data Link
Line Discipline
Flow Control
Error Control
HDLC
:
Data Communication
:
.
ISO
.
Interface .
:
1. Physical .
2. Data Link
3. Network
4. Transport Transport .
5. Session
6. Presentation
7. Application
: Physical .
: Data
Link .
.
.
Data Link .
ROM
Network MAC Address .
MAC .
) ( MAC ) ( IP.
.
:
Data Communication
:
:
Data Communication
:
) ( Concepts
: ) . ( Source
: ) . ( Transmitter
: Transmission System ) . (
: ) . ( Receiver
: ) . ( Destination
Example
:
Data Communication
:
Receiver
Transmitter ) r(t .
= ) r(t ) s(t m m .
Interface
) (
Flow Control
) (
:
Data Communication
:
Transmitter
.
Receiver
.
Medium
:
: . Guided Medium (a
: . Unguided Medium (b
Point to Point
:
Direct Link (a
.
Only two Devices Share Link (b
.
Multi Point
.
Simplex
.
Half Duplex
.
Full Duplex
Half Duplex
.
!
Full Duplex Half Duplex .
:
Data Communication
:
.
.
.
Periodic . Periodic
.
: .
.
: .
Range ) (
.
:
Data Communication
:
Periodic Signals :
Aperiodic Signals :
:
Data Communication
:
:
.
.
. AM
..
.
. ) Hz( f
.
T = 1/f T
. FM
. .
. )(
:
:
Data Communication
:
.
.
) ( Band Width
-
.
.
:
.
:
Data Communication
:
) ( Digital Signal
.
.
:
Data Communication
:
: Bit Rate
Digital Signal
Analog Signal
Bit Rate .
.
:
: Thermal Noise . .
) ( .
White . :
N0 = K.T.W
: N0
-23 j/K
1.3803 * 10 : K
: T
: W
: Inter Modulation .
.
.
: Cross Talk .
Cross Talk .
:
Data Communication
:
: Impulse .
.
.
.
:
) ( :
)C = 2 * w * Log2(m
: m
: w
: C
:
) C = w * Log2( 1+S/N
: . S/N
( S/N )db = 10Log10(S/N) :
: S/N .
( 30db
Transfer ) ( W = 4KHz
:
Data Communication
:
:
Pin Pout . Pout Pin .
:
)L(db) = 10Log(Pin/Pout
Gain :
G = 1/L
.
. Transmitter .
.
) ( .
.
L1 L2 L3
S G2 G2 D
N N+N
= ]] [[GL11 . ] [G 2
] [L 2 = ... = 1 :
S ST 1 S
( = )D = ( )1
N M L N o W M N
: M
: L
: NoW
Destinatio
.
:
Data Communication
:
:
Data Communication
:
:
Data Communication
:
) ( Transmission Media
..
:
) ( Interference
) (Receiver
.
) ( Guided ) ( Unguided .
.
.
.
.
:
Data Communication
:
)
(
.
:
A B
.
TP :
Unshielded Twisted-Pair . UTP .
.
CAT1,CAT2 .I Voice
CAT3 .II Voice
) LAN ( 10Mbps . ,
.
CAT4 .III ) Token Ring ( 16Mbps
.
:
Data Communication
:
TP
o TP
) ( Amplifier.
o Repeater
o ..
o .
o ) (
o ) (
o .
o
TP
o .
o .
o ) (PBX .
o 10Mbps 100Mbps .
o Giga Ethernet .
Near End Crosstalk
:
Data Communication
:
Cross Talk
. 10Mbps
.
Coaxial Cable
100KHz 500MHx .
.
Repeater.
Coax
o .
o Voice
.
o LAN 10Mbps .
LAN.
Optical Fiber
.
.
Reflection
.
:
Data Communication
:
) ( Core
) ( Cladding .
Reflection
o .
o .
o .
o
.
o Repeater .
o
o
o LAN LAN
.
:
Data Communication
:
o .
o .
o .
o
) . (
(
) Detector .
Cladding :
Single Mode
Single Mode :
Core Cladding
) Multiple Mode
( .
Multiple Mode
Multiple Mode
Single Mode Core Cladding
) (
.
Single Index
:
Data Communication
:
:
Data Communication
:
) ( .
:
Directional
.
.
Omni-Directional
.
ELF EHF
.
Propagation Types
:
Data Communication
:
: Surface . ) ( .
. .
.
: Tropospheric .
.
: Ionospheric
.
: Line of Sight .
: Space .
.
a) VLF ) ( Very Low Frequency
3K 30K .
Surface
.
b) LF ) ( Low Frequency
30K 300K.
VLF .
.
c) MF ) ( Middle Frequency
300K 3M.
Tropospheric 530K 1700K
AM . .
Line of Sight .
d) HF ) ( High Frequency
3M 30M.
Ionospheric .
. .
:
( CB Radio ) .
: International Broad Casting .
:
Data Communication
:
FM Unispher
FM
) ( AM FM AM .
Geosynchronous
. Geosynchronous
:
Data Communication
:
SHF
) (
UHF VHF
.
Geosynchronous Orbit
. 270*2
.
:
Up Stream Down Stream Frequency Band
5.925 6.925 3.7 4.2 4/6 C
14 14.5 11.7 13.2 11 / 14 Kv
27 30.5 17.7 21.7 17 / 30 Ka
Giga.
:
Data Communication
:
:
K 4
= 2
= ,K
d 3
.
:
PT
=P
4 d 2
.
.
PT
Aeff
Transmitter Receiver
GT Aeff Receiver :
PT
GT Aeff
4 d 2
PR
]) = (GT ) db + (G R ) db [32.5 + 20 Log (d ) + 20 Log ( F
PT
F MHz d
Km PR. ) ( PT ) ( .
: =
:
Data Communication
:
(
15db 45db ( FSL
( .
. :
d m = 7.14 * kh
4
h dm . Km. k
3
( .
: .
AM : FM . AM
AM )
AM .
:
Data Communication
:
:
Data Communication
:
) ( Encoding
.fc
:
.I
.II
.III
.IV
:
) LPT (
) (
) (
) (
:
.I : .
.II .
.III : .
:
Data Communication
:
) (
PC
.
:
R = bps
.
1
=t R.
R
) Signal Rate ( M ) : (
R
= Lbands
Log 2M
.
:
Uni-Polar .I
) (
.
:
Data Communication
:
Polar .II
:
NRZ
NRZ-L
NRZ-I
RZ
Biphase
Manchester
Differential Manchester
NRZ-L , NRZ-I :
NRZ-L
.
NRZ-I
.
.
Sync
Sync
.
RZ Sync
.
-1 .
.
:
Data Communication
:
Sync .
Manchester RZ -1
) -1 RZ (
. RZ :
Manchester -
. Clock
Self Clock .
-
.
. -
. LAN
10 Mbps .
:
Data Communication
:
Bi-Polar .III
:
AMI
B8ZS
HDB3
AMI
. NRZL
NRLZ NRZI .
B8ZS AMI .
I II .
I : 000 + - 0 - +
II : 000 - + 0 + -
Polarity of Polarity of
previous bit previous bit
Violations Violations
:
Data Communication
:
B8ZS :
HDB3 B8ZS
.
B8ZS HDB3 Bipolar AMI.
Encoding 0 1 0 0 1 1 0 0 0 1 1
NRZL
NRZI
Bipolar AMI
Manchester
:
Data Communication
:
:
.
) ( Multiplexing .
.
.
:
* = ,
:
)Amplitude (AM
)Frequency (FM
)Phase (PM
)(AM
) Carrier ( )
(
. Carrier .
:
: BWm
: BWt
: ) ( Carrier Fc
:
Data Communication
:
AM
. AM
.
)(FM
. .
. :
BWt = 10 * BWm
: FM 200KHz . 50KHz
) ( .
)(PM
.
:
Data Communication
:
.
300 Hz 3400 Hz.
:
)Frequency Shift Keying (FSK
)Amplitude Shift Keying (ASK
)Phase Shift Keying (PSK
) (QAM PSK FSK.
ASK
ASK x
y ..
. .
n=1
m=2
Bit Rate=Number of bits per Sec.
)Baud Rate = Bit Rate / Log2(m
: Bit Rate
Bit Rate .
: Baud Rate n m
Baud Rate ) Bit Rate / Log(m .
Baud Rate
( m = 1 , n = 1 ) .
:
Baud Rate.
:
.
:
Data Communication
:
FSK
. f
2f.
:
BW = Fc1 Fc2 + Nbaud
)Frequency (Hz
:
Data Communication
:
PSK
PSK ) (
. .
Bit Phase
4-PSK
.
:
Data Communication
:
8-PSK 4-PSK .
.
N
N/2 ASK.
QAM
QAM .
. :
4 QAM .I
8 QAM .II
16 - QAM .III
4-QAM 4-PSK.
8-QAM
. :
:
Data Communication
:
8-QAM )
( :
16-QAM
.
:
Data Communication
:
.
:
.
:
.
PAM
Quantization .
.
Quantized PAM Signal
PCM DM .
:
Data Communication
:
PCM
Quantization Sampling Coding .
: Sampling o .
: Quantization o
: Coding o .
PCM
DM .
Switching .
Coding .
.
Switching .
:
Data Communication
:
DM
DM Delta Modulation
:
Analog
Input
Staircase
Function
Slope
overload
Noise
Step
Size Quantizing
noise
Sampling Time
Ts
DM
: Slope Overload o .
: Quantization Noise o Ts
.
Ts .
:
Data Communication
:
ASK :
BT = (1 + r )R
0<r<1 R Rmax = 1200 bps
FSK :
BT = 2F + (1 + r )R
F = f 2 f c = f c f 1
PSK :
1+ r
BT = R
L
Log 2
1+ r
. L .
Log 2L
( ASK
ASK Bit rate = Baud rate :
BT = ( 1 + 0 ) * 2000 = 2000 Hz
(
Bit Rate
11 KHz * 2 = 22 KHz
22 KHz * 8 = 176 Kbps
:
Data Communication
:
:
Data Communication
:
.
:
Synchronous .I
A-Synchronous .II
.
) ( Idle ) ( Stop Bit ).
Start Bit -
( ..
Stop Bit Start Bit Parity
.
: Timing Manchester
.
: Clock
. Clock
.
:
Data Communication
:
Interface.
Interface DCE,DTE EIA ITU-T
Electronic Industries Association :
)EIA 232 (RS232
EIA 422
EIA 449
EIA 485, ...
International Telecommunication Union Telecomunication Standards Committee
X.21
V.22bis
V.32
V.34,
RS-232
o RS232 COM .
o " " -3 -15
" " +3 +15 .
o -3 +3
.
o 15 .
o Point-To-Point .
:
Data Communication
:
RS-422
o NRZ-L .
o .
o 10Mbps 1Kbps.
o " " -4 -6
" " +4 +6 .
o -4 +4
.
o .
.
.
.
Original
Signal Noise
Original and Signals and
Complement Noise
. .
.
Original
After Negation of After Signal
Second Signal Adding
.
.
:
Data Communication
:
Dial-up Connection
Dial-up .
) (
. .
. .
Modulator DeModulator .
ITU :
: V.21 300bps FSK .
: V.22 bis 600 4-DPSK
1200bps 16-QAM 2400bps.
: V.32 32-QAM . 2400 .
9600 bps . 32-QAM
Redundant.
: V.32 bis 14400 bps 2400 . 64-QAM
. 14400 .
: V.32 terbo 19200 bps 2400 . 256-QAM
.
: V.33 14400 bps 2400 . 128-QAM
128-QAM .
Redundant.
: V.34 28800 bps 2400 . 4096-QAM
.
.
: V.42 LAPM . Error Correction
. 33600 bps.
: V.42 bis .
: V.90 56K .
: 33600 bps . Upload 36k
download 56k.
:
Data Communication
:
:
Data Communication
:
) ( Multiplexing
Multiplexing . .
Multiplexing :
No Multiplexing Multiplexing
Multiplexing :
) Frequency Division Multiplexing ( FDM
) Wave Division Multiplexing ( WDM
) Time Division Multiplexing ( TDM
.
) Frequency Division Multiplexing ( FDM
.
Carrier .
) . (
.
:
Data Communication
:
.
.
) ( Carrier . .
FDM :
o
o Cross Talk
) ( Gap .
FDM
FDM
.
.
.
.
.
:
Data Communication
:
FDM
.
:
.I ) (
.II
.
.III .
.
TDM
Synchronous TDM .
.
.
: TDM FDM .
:
Data Communication
:
) ( Sync Sync
.
:
( TDM .
) (
R = 4 * 2000 bps + 250 ( Synchronous pattern ) => R = 8250 bps
or
R = 250 ( frames per second ) * 33 bpf
TDM
) (
ATDM :
A-Synchronous TDM
.
) ( Overhead .
ATDM :
Statistical TDM
Flag Address Control FCS Flag
Sub-Frame
(b :
Address Length Data ...... Address Length Data
:
Data Communication
:
Multiplexing
. :
.I
: Switch Base o .
: Leased Service o
.
.
.II
Switched/56 o
DDS o
DS o
Switch Based.
.
Leased .
.
FDM :
48 KHz 12 channel
:
Data Communication
:
.
Switched/56
) ( Switched
Base.
DDS Leased ) .
Leased (
DS :
64 Kbps
: T
Service Line )Rate (Mbps Voice Channel
DS-1 T-1 1.544 24
DS-2 T-2 6.312 96
DS-3 T-3 44.736 672
DS-4 T-4 274.176 4032
( T1 :
24 * 64 Kbps + 8 K (bit per channel overload for sync reasons) = 1.544 Mbps
: E
Line )Rate (Mbps Voice Channel
E-1 2.048 30
E-2 8.448 120
E-3 34.368 480
E-4 139.264 1920
:
Data Communication
:
DSL ) (
.
:
I. Asymmetric DSL ) ( ADSL
II. High Bit-rate DSL ) ( HDSL
III. Symmetric DSL ) ( SDSL
IV. ) Very High Bit-rate DSL ( VDSL
: 512K TP Leased
DSL .
: DSL 18000 ft.
: DSL Leased.
ADSL
:
25 200 KHz 250 1000 KHz
)0 25 KHz (Tel
)(UpStream )(DownStream
ADSL . ADSL
DMT .
upstream :
25 ~ 200 K = 4 KHz
ANSI 60 Kbps :
25 * 60 K = 1.5 Mbps Upload :
Download 200 * 60 K = 12 Mbps :
:
Data Communication
:
:
Data Communication
:
) ( Data Link
Physical Physical
Data Link .
: ) ( Frame.
.
) . (.
:
: Line Discipline .
: Flow Control .
: Error Control .
Link Management Data Link
.
Line Discipline
END/ACK A B
ENQ ACK .
A ACK
A
A EOT .
:
Data Communication
:
: :
. -
. -
. -
Flow Control .
Flow Control
:
Stop & Wait .
Sliding Window .
.
.
.
Sender Receiver
WT = Wait Time
WT
WT
WT
Time Time
: Propagation Delay .
: Stop & Wait Delay ACK ( WT ) .
: Acknowledge .
:
Data Communication
:
) (TFrame ) (TPD .
Propagation Delay .
frame .
ACK 2TPD.
nTFrame
) TD = n ( 2TPD + TFrame ) ( I =U ) ( II
) n(2TPD + TFrame
) (
a :
TPD
=a
TFrame
) ( II :
1
=U
1 + 2a
d
= TPD TFrame TPD .
V
L
) . TFrame = . ( 3*108 m/s
R
:
Data Communication
:
5000km U / .
high Speed TFrame TPD . a
.
o In LAN
R = 0.1 - 10 Mbps L = 500 bit d = 0.1 10 km
V = 200000 Km/s
0.0001 < a < 1 0.83 < U < 0.98
o In Modem
R = 9600 bps L = 500 bit d = 100 m
V = 200000 Km/s
a = 0.0000096 U=1
o In Modem
R = 9600 bps L = 500 bit d=50000 km
V = 200000 Km/s
U = 0.48
LAN %
.
:
.I (Lost) .
ACK .
.II Noise .
:
Data Communication
:
Sliding Window
.
.
ACK n
..
Window
A B .
ACK A B
.
) (A
) (B
ACK
:
Sender Receiver
:
Data Communication
:
Error Control
.
.
:
.I
.II
. Acknowledge
Error Control .
ARQ .
:
Data Communication
:
Sliding Window
Sliding Window :
Go Back n o
F0 F10 F3 NACK3
.. F4
.
2n 1 n ) . Sequence Number
Sender
( .
Receiver
Go Back N
Selective Reject o
.
F3 .
. .
Sequence Number n ) . 2n / 2 = 2n-1
Sequence Number ( .
Sender
Selective Reject Receiver
Sequence Number :
.
NACK
.
:
Data Communication
:
NACK
NACK . ACK
Sliding Window ACK Timeout
.
Selective Reject
.I Sort.
.II Search.
.III .
GO BACK N
Sort .I Search .
.II .
.III N-1 window N .
Sequence N .
Sequence .
: N
ACK 0 ACK !
p U N Seguence
window.
Stop and Wait :
1 p
= U
1 + 2a
N .
Selective Reject :
U = 1 p N >= 2a + 1
) N (1 p
= U N < 2a + 1
1 + 2a
:
Data Communication
:
Go Back n :
1 p
U = 1 + 2ap N >= 2a + 1
) N (1 p
= U N < 2a + 1
) (1 + 2a )(1 p + NP
: .
: :
* BER = p
BER .
:
Data Communication
:
:
Data Communication
:
) ( Error Detection
.
:
Single Bit
.
Multiple Bit
.
Burst
.
) Redundancy ( .
.
:
Data Communication
:
:
Parity Check
) Parity Check ( row column
) CRC ( Cyclic Redundancy Check
Checksum
.
Parity Check
Parity Bit .
Single Bit %
. :
: " " .
: " " .
Parity Check Parity
" " " " " "
.
) Parity Check ( Row Column
. .
. .
VCRs
:
Data Communication
:
Parity VCR
. .
) Cyclic Redundancy Check ( CRC
Divisor
n
) Divisor n+1 ( Divisor
CRC .
Divisor
.
.
Sender Receiver
CRC ) . ( Polynomial
Divisor " "
. ) P(x.
10100111 x 7 + x 5 + x 2 + x1 + 1
Divisor Polynomial
.
) ( CRC .
Divisor x + 1.
FCS x12 + x11 + x 3 + x + 1 .
FCS ( Frame Check Sequence ) : CRC
.
Message FCS
CRC Receiver
:
Data Communication
:
.
) M(x :
)X n M ( x )R( x
= Q( x) +
)P ( x )P( x
) M(x Xn n ) n
Xn ( .
:
)T ( x) = X n M ( x) + R( x
) ( Divisor :
)T ( x) X n M ( x) + R( x
=
)P( x )P( x
.
) Q(x ) R(x.
)T ( x )R( x) R( x
= Q( x) + + )= Q ( x
)P( x )P( x) P( x
( . 101010111
Divisor 101 .
Message : 101010111 M(x) = x 8 + x 6 + x 4 + x 2 + x + 1
Divisor : 101 P(x) = x 2 + 1
x+1 ""
. FCS :
To Receiver : 10101011111
:
Data Communication
:
Check Sum
Packet IP k n
n ) n
Carry ( .
Complement .
k
Checksum " "
.
: Complement " ".
( 101101011101011111 :
)
.
101101 011101 011111
S1 S2 S3
101101 +
011101 +
011111
----------- Complement
111001 000110
:
Data Communication
:
:
101101 +
011101 +
011111 +
000110
-----------
111111
.
: n " "
" " n " " " " .
:
Data Communication
:
:
Data Communication
:
DataLink .
HDLC High Level Data Link .
) (
:
SDLC o
HDLC o
LAPs o
LANs o
HDLC ISO
DataLink Bit Oriented. Bit Oriented
) DataLink ( LAPB,LAPD,PPP .
Half-Duplex , Full-Duplex , Point-to-Point , Multipoint .
: :
) Routing Information Protocol ( RIP DVR . -
DSPF LSR . -
: Primary . ) ( Command
.
: Primary
Respond Command .
:
Respond .
:
Data Communication
:
:
: Balanced ) Combined ( .
Hal-Duplex Full-Duplex .
Point-to-Point.
: Unbalanced Primary Secondary .
Multipoint.
) NRM ( Normal Response Mode
Unbalanced . Primary
Command Secondary
. Secondary Poll Primary
.
) ABM ( Asynchronous Balance Mode
Balanced .
. Poll Select .
) ARM ( Asynchronous Response Mode
Unbalanced . Secondary
Primary Primary .
HDLC
HDLC
) I Frame ( Information
Data . :
) S Frame ( Supervisor
ARQ .
:
Data Communication
:
) U Frame ( Un-Numbered
.
ABM ARM . I-Frame
Information .
Flag )
( Secondary Unbalanced
. FCS CRC .
Flag
.
:
Flag Pattern :
.
.
Bit Stuffing
.
Bit Stuffing
" "
" " 0111110
:
01111110 01111110
" " ) ( " "
:
01111110 01111110
" " " " Flag .
" " ) ( Idle " " ""
.
.
:
Data Communication
:
Start
0 1
?7th Bit
0 1
Un-stuff ?8th Bit
Zero
Total of 1s before
next zero
Data
Flag
Abort Idle
Stop
Idle : High .
.
Point-to-Point " "
Multi-address " "
" " .
1
One Byte Address
0 0 1
Multi Byte Adress
:
Data Communication
:
.
. .
o I Frame
Information :
)N(S PF )N(R
o S Frame
Supervisor :
1 0 Code PF )N(R
Code S-Frame :
: Receiver Ready -
) N(R.
: Reject Ready Go Back N. -
: RNR Receive not Ready ) N(R. -
: Selective Reject Request )N(R -
.
:
Data Communication
:
Poll Selecting .
Poll :
Sequence
Number
Poll A PF Code RR
Primary A . A Primary
PF " ". PF " "
Final Primary . S-Frame RNR . ACK
Sequence Number
. P " " )
Primary ( .
:
Data Communication
:
Select :
:
Data Communication
:
( Host .
1200 bps 9600 bps HDLC :
( ) ( U
( : Throughput
( 10 cps
( Host
.
(
U = (16/16) * 100 = 100%
%
HDLC Flag
FCS
U = 16 / ( 16+7) = 0.696 = 70 % 30 % Overhead
(
Tmax = 9600 * 0.696 = 6678 bps
.
( MUX Terminal :
10 * 16 = 160 cps 160 * 8 = 1280 bps
1280 < 6678 .
( .
1200 bps / 10 = 120 cps
Connection .
:
1200 / 120 = 10 s
: MUX
6678 / 10 ( bits) = 667.8 cps
:
667.8 * 10 = 6678
:
1200 * 16 = 19200
19200 6678 = 12800 :
12800 / 667.8 = 19 :
:
Data Communication
:
:
Data Communication
:
) ( Switching
A , B , C , D .
.
Mesh -
A B
.
.
.
C D
.
Point-to-Point
.
) A B C
( D
(100*99)/2
.
Bus Star -
Bus
A B C
) Bus Star (
.
.
.
:
Data Communication
:
) ( Collision Detection
Random
.
.
Repeater
.
.
.
:
Data Communication
:
.
.
:
Circuit Switching
Packet Switching
Message Switching
Circuit Switching
.
.
.
A D B E
.
) ( End Office .
. ) ( Long Distance Office ...
) ( .
. End Office
Multiplexing . Trunk
FDM .
non-Blocking
.
Blocking .
Blocking .
:
Data Communication
:
) ( Space Division
) ( Time Division . .
:
Crossbar Switch .
Cross-Point
:
.I Cross-Point .
* = Cross-Point
.II Cross-Point
Cross-Point .
.III Cross-Point .
To Control
Station
Multistage Switch .
. Cross-Point
Cross-Point Cross-Point
.
Switch
) . Trunk
( .