Académique Documents
Professionnel Documents
Culture Documents
Laurent Toutain
August 26, 2011
Table of Contents
2 3
Standardization bodies OSI Reference Model Layer 1: Physical Layer 2: Link Layer CRC Send and Wait Protocol HDLC Layer 3: Network Connection oriented vs Datagram
Concepts Datagram
Slide 2 Page 2
Laurent Toutain
RES 1
Introduction
Basic architecture
Slide 4 Page 4
Laurent Toutain
RES 1
In more details
Introduction Basic architecture
Client
Server
mation r o f in e g a P
Slide 5 Page 5
Laurent Toutain
RES 1
Router
Router
Server
Slide 6 Page 6
Laurent Toutain
RES 1
Main principles
Introduction Basic architecture
Router
Router
Server
119.138 192.108. Im interacting with the network Im waiting for request and send I send a request, after a while I answers receive an answer wan t this page want this pa ge to 192.108. want. . . 119.138 want this pa to 192.108. ge 119.138 to 192.. . . to 192.108.11 9.138
Slide 7 Page 7
Laurent Toutain
RES 1
Interactions
Introduction Basic architecture Both devices must understand the same language Protocol
Want page /
???????
Want page /
<
>... html
???????
Slide 8 Page 8
Laurent Toutain
RES 1
Introduction
Protocols
Protocols
Introduction Protocols
Denition
Protocol: common rules between two or several piece of equipment. common data format common data representation well dened behavior when receiving a message Protocols are generally dened in Standards
Slide 10 Page 10
Laurent Toutain
RES 1
Example
Introduction Protocols
Want page /
???????
Want page /
???????
Slide 11 Page 11
Laurent Toutain
RES 1
Protocol Stack
Introduction Protocols
Each protocol is used for a single purpose, When stacked they can create a communication system.
GET / GET /
Application protocol
. < html >.. . < html >..
Secure transmission
Transport protocol
Reassembly end-to-end
Fragmentation
R R
R R
R R
Slide 12 Page 12
Laurent Toutain
RES 1
Introduction
Goal: Divide and conquer, system is divided into layers Each layer interact locally with the upper and lower layer. Remote interaction is possible only with the same layer Each layer regroups one or several entities implementing a protocol. Reference model denes 7 layers
may be less or more Layer 2: limited scope, simple addresses Layer 3: no limitation, scalable, uselly hierarchical addresses.
Slide 14 Page 14
Laurent Toutain
RES 1
radio 3 111010101011111 5
Application
100 111 00 copp
110
6
o 10 di 00 ra 11 10 10 01 11 01
10
radio
op
2
al tic 10
optica
11
l0010
1111 01010
1 11100 10111
Slide 15 Page 15
Laurent Toutain
RES 1
ARQ 3 110010101010101
Application
1 ARQ 000
110
ARQ
10
10
F
2
EC 10
11
01010
Slide 15 Page 16
Laurent Toutain
RES 1
101
10 1
10
011
001
010
101
5 - Build PDU Hybr id 1101 - Correct Error 010101010 1010 1 - No need for addresses since point-to-point 6 links
110 C FE 110 101 0
01 01
101
8
111 0
111 010
001
- Transform Binary sig0001 0111 0101 01 nal into Physical signal - Clock Synchronization
1011
110 opt l ica 110 0 101
copp
er
er
001
radi
1 10
01 01
C FE 10 10 10
10
- copy PDU from link to link until destination - Addresses are needed to identify equipments
6
Network
4 7
Slide 15 Page 17
Laurent Toutain
RES 1
5 errors introCorrect duced by Network: - Reordering - Packet losses recovery - Congestions 6 control
Network
4 7
Slide 15 Page 18
Laurent Toutain
RES 1
6 In connection oriented network, may be used to re-establish connections and restart transfer from synchronization points
Network
4 7
Slide 15 Page 19
Laurent Toutain
RES 1
Standardization bodies
Why standards ?
Standardization bodies
Allow computers/application from dierent vendors/manufacturers to work together Guaranty that a system will continue to work even if one vendor disappears Lower the cost of devices by mass production Be sure to get connectivity Put patents into standards to earn money from competitors Who publishes standards: Inter/national Organizations:
Vendors
Slide 17 Page 21
Telecommunication
Standardization bodies
-- --- - -- --- - http://www.itu.int/rec/R-REC-M.1677/e POTS (Plain Old Telephony Service), More and more concerned by Internet and VoIP Local Area Network to Metropolitan Area Network Input from ITU, IEEE Well known for 7 layer Reference Model Develop Internet protocols Independent from ITU, ISO Managed by vendors and industrials DECT, GSM, 3G, LTE
Laurent Toutain RES 1
Internet - IETF
Letter: group
H: Audiovisual and multimedia systems Q: Switching and signalling X: Data networks, open system communications and security ...
Example X.25 (see http://www.itu.int/rec/T-REC-X.25/en) Standards are regularly revised (see publication date).
http://grouper.ieee.org/groups/
IEEE 802.3 (see http://standards.ieee.org/about/get/802/802.3.html) P1095 Convergent Digital Home Network Working Group (see http://grouper.ieee.org/groups/1905/1/ ) Standards are regularly revised (see publication date).
Slide 19 Page 23
Laurent Toutain
RES 1
For instance RFC 2460 See http://www.ietf.org Freely available as well as working drafts When published, RFCs never change, look at http://www.rfc-editor.org/rfc-index2.html for updates.
Slide 20 Page 24
Laurent Toutain
RES 1
Goal: Divide and conquer, system is divided into layers Each layer interact locally with the upper and lower layer. Remote interaction is possible only with the same layer Each layer regroups one or several entities implementing a protocol. Reference model denes 7 layers
may be less or more Layer 2: limited scope, simple addresses Layer 3: no limitation, scalable, uselly hierarchical addresses.
Slide 22 Page 26
Laurent Toutain
RES 1
Layer 1: Physical
Application
111 00 1 copp 000 1
001
110
o radi
ra di 1 00 1 o 10 10 00 11 10 10 1
10
radio
op
2
al tic 10
optica
11
l0010
01 011 11 01010
Slide 24 Page 28
Laurent Toutain
RES 1
101
011 1
001
010
101
6
01 01 1
010
- Transform Binary 00 1010 sig11 0101 0101 nal into Physical signal - Clock Synchronization
10 11 01
110 opt ica 110 l 101 0
copp
er
er
0001 0101
copp er
001 0101
01
010 100
Layer 1 goals
OSI Reference Model Layer 1: Physical
ocially: Allow the interconnection between the device producing/consuming the data (DTE: Data Terminal Equipment) and the device that provide the signal modulation (DCE: Data Communications Equipment)
X.21 interface AT commands Limits error rate Avoid interferences Allow clock synchronisation Enhance channel usage Can be Broadband (some frequencies) or Baseband (all available frequencies)
Slide 25 Page 29
Laurent Toutain
RES 1
Baseband Coding
OSI Reference Model 1 0 0 Layer 1: Physical 1 1 1 1 0 0 0 1 0 1 1 1 1 1 0 0 0 0 0 1 0 1
Slide 26 Page 30
Laurent Toutain
RES 1
Modulations
OSI Reference Model Layer 1: Physical BPSK: Binary Phase Shift Keying (20 MHz) Coding rate = 1/2 6 Mbit/s Coding rate = 3/4 9 Mbit/s QPSK: Quadrature Phase Shift Keying (20 MHz) Coding rate = 1/2 12 Mbit/s Coding rate = 3/4 18 Mbit/s
16-QAM: Quadrature Amplitude Modulation (20 MHz) Coding rate = 1/2 24 Mbit/s Coding rate = 3/4 36 Mbit/s
64-QAM: Quadrature Amplitude Modulation Coding rate = 2/3 48 Mbit/s Coding rate = 3/4 54 Mbit/s
Slide 27 Page 31
Laurent Toutain
RES 1
1 2 3 4 5 6 7 8 9 10 11 12 13 2412 2417 2422 2427 2432 2437 2442 2447 2452 2457 2462 2467 2472
14 (Japan) 2484
IEEE 802.11b
36 5.18
40 5.20
44 5.22
48 5.24
52 5.26
56 5.28
60 5.30
64 5.32
5 GHz
IEEE 802.11a
Pilot tone
Application
0 1 ARQ 100 0
110
ARQ
10
10
F
2
EC 10
11
01010
Slide 30 Page 34
Laurent Toutain
RES 1
101
10 1
10
111 0
001
010
101
5 - Build PDU Hybr id 11 00 1 101 - Correct Error 0010 10 1101 0101 - No need for addresses since point-to-point 6 links
110 C FE 110 101 0
01 11 0
111 0
001
010
01 0 11 0
C FE 00 11 10 10
10
010 100
Q AR 0
101
Send acknowledgment (positive or negative) to ask for retransmission of lost frames Stupid example: Omelet recipe1
1. Buy eggs 2. Crack the eggs into a glass mixing bowl and beat them until they turn a pale yellow color. 3. With a heat-resistant rubber spatula, gently push one edge of the egg into the center of the pan, while tilting the pan to allow the still liquid egg to ow in underneath. Repeat with the other edges, until theres no liquid left.
Source: http://culinaryarts.about.com/od/eggsdairy/r/omelet.htm
Laurent Toutain RES 1
Slide 31 Page 35
Protocol denition
OSI Reference Model Layer 2: Link Layer
Dene a protocol to allow the cook to ask the student to cook an omelet
Slide 32 Page 36
Laurent Toutain
RES 1
CRC
Parity bits
OSI Reference Model CRC
Use redundancy information to correct or to detect inconsistencies Simplest solution is parity bit
1 0 1 1 1 1 1 1 1 1 1 0 1 0 1 0 1 0 1 0 0 0 1 0 0 1 0 0 0 1 1 1 1 1 0 1 0 0 0 1 0 1 0 0 0 0 1 0 0 1 0 1 0 0 1 1 0 0 0 0 0 1 0 1 0 1 0 1 1 1 0 0 0 0 0 1 0 0 0 0 0 0 0 1 0 1 1 1 1 1 0 1 1 0 0 1 0 1 0 1 0 1 0 0 1 1 0 1 0 1 0 1 1 1 0 0 1 1 0 1
Slide 34 Page 38
Laurent Toutain
RES 1
Parity bits
OSI Reference Model CRC
Use redundancy information to correct or to detect inconsistencies Simplest solution is parity bit
1 0 1 1 1 1 1 1 1 1 1 0 1 0 1 0 1 0 1 0 0 0 1 0 0 1 0 0 0 1 1 1 1 1 0 1 0 0 0 1 0 1 0 0 0 0 1 0 0 1 0 1 0 0 1 1 0 0 0 0 0 1 0 1 0 1 0 1 1 1 0 0 0 0 0 1 0 0 0 0 1 1 0 1 1 0 0 1 0 1 0 1 0 1 0 0 1 1 0 1 0 1 0 1 1 1 0 0 1 1 0 1
0
0 1 0 0 1 0 1 1 1
Slide 34 Page 39
Laurent Toutain
RES 1
01110100100111001 0.x 16 + 1.x 15 + 1.x 14 + 1.x 13 + 0.x 12 + 1.x 11 + 0.x 10 + 0.x 9 + 1.x 8 + 0.x 7 + 0.x 6 + 1.x 5 + 1.x 4 + 1.x 3 + 0.x 2 + 0.x 1 + 1.x 0 x 15 + x 14 + x 13 + x 11 + x 8 + x 5 + x 4 + x 3 + 1
Slide 35 Page 40
Laurent Toutain
RES 1
CRC: Algorithm
OSI Reference Model CRC
Equivalent to a shift of r bits I (x ) = N (x ).G (x ) + R (x ) note that highest degree of R (x ) is less than r I (x ) + R (x ) = N (x ).G (x ) + R (x ) + R (x ) = N (x ).G (x ) I (x ) is intact R (x ) is the CRC
3. divide I (x ) by G (x )
4. add R (x )
Slide 36 Page 41
Laurent Toutain
RES 1
CRC: Example
OSI Reference Model CRC x2 + 1 x 17 + x 16 + x 15 + x 13 + x 10 + x 7 + x 6 + x 5 + x 2 x 17 + x 15 x 16 + x 13 + x 10 + x 7 + x 6 + x 5 + x 2 x 16 + x 14 x 14 + x 13 + x 10 + x 7 + x 6 + x 5 + x 2 x 14 + x 12 x 13 + x 12 + x 10 + x 7 + x 6 + x 5 + x 2 x 13 + x 11 x 12 + x 11 + x 10 + x 7 + x 6 + x 5 + x 2 x 12 + x 10 x 11 + x 7 + x 6 + x 5 + x 2 x 11 + x 9 x9 + x7 + x6 + x5 + x2 x9 + x7 x6 + x5 + x2 x6 + x4 x5 + x4 + x2 x5 + x3 x4 + x3 + x2 x4 + x2 x3 x3 + x x Slide 37 Page 42 Laurent Toutain RES 1 send: x 17 + x 16 + x 15 + x 13 + x 10 + x 7 + x 6 + x 5 + x 2 +x 0111010010011100110
x 15 + x 14 + x 12 + x 11 + x 10 + x 9 + x 7 + x 4 + x 3 + x 2 + x
step 1: align to the left generating polynom step 2 : send bits on the left of GP step 3 : Do an XOR
Slide 39 Page 44
Laurent Toutain
RES 1
Sender:
1. 2. 3. 4. 5. 6. 1. 2. 3. 4. Wait for data from upper layers Take the sequence to transmit Compute CRC Send data and trigger timer if received Ack remove data from memory, goto to step 1 if timer expires, go to step 4 Wait frames from physical layer Validate CRC if CRC is correct send data to upper layer and go to step 1 if CRC is wrong, discard information and go to step 1
Receiver:
No frame losses, frames are discarded if CRC is wrong: Do not react on wrong information Use positive Ack when something correct is received
Slide 41 Page 46 Laurent Toutain RES 1
Data
reque st
data fra me me Ack fra
Data
Indic a
tion
Dat a re que
Timer
error
st
data fra me
Wrong CRC rejected Timer
data fra me
Data
Indic a
tion
Slide 42 Page 47
Laurent Toutain
RES 1
Dat
a re ques t
Data
Indic a
tion
Dat a re ques t
Timer
Data
Indic a
tion
Slide 43 Page 48
Laurent Toutain
RES 1
Dat
a re ques t
Dat
data
a re ques t
fram e e
0
Data Indic a tion
Dat a re que
fram Ack
st
fram e rame
2
Data Indic a tion
f Ack
Slide 44 Page 49
Laurent Toutain
RES 1
Formalization
OSI Reference Model Send and Wait Protocol
What will be the size of the data counter ? Give a detailed description of the enhanced version of the protocol to allow implementers to write interoperating applications
Slide 45 Page 50
Laurent Toutain
RES 1
Formalization
OSI Reference Model Send and Wait Protocol
State 0
Timer Send Data PDU 1 trigger Timer Timer Send Data PDU 0 trigger Timer Ack1 stop Timer delete PDU
Wait Ack 0
Wait Ack 1
Data Request Send Data PDU 1 trigger Timer
State 1
RES 1
Slide 46 Page 51
Laurent Toutain
Formalization
OSI Reference Model Send and Wait Protocol
State 0
Send Data PDU 0 and trigger Timer. Goto Wait Ack 0
Wait Ack0
Memorize Goto Wait Ack 0
State 1
Send Data PDU 0 and trigger Timer. Goto Wait Ack 1
Wait Ack1
Memorize Goto Wait Ack 1
Ack 0
Discard State 0 Goto stop Timer and delete PDU. Goto State 1 Discard State 1 Goto Discard Goto Wait Ack 1
Ack 1
Discard State 0 Goto Discard Goto Wait Ack 0 Discard State 1 Goto stop Timer and delete PDU. Goto State 0
Timer
Ignore Goto State 0 Send Data PDU 0 and trigger Timer Goto Wait Ack 0 Ignore Goto State 1 Send Data PDU 1 and trigger Timer Goto Wait Ack 1
Slide 47 Page 52
Laurent Toutain
RES 1
Protocol performances
OSI Reference Model Send and Wait Protocol
How long does it takes to send a 2 Kbit le using Send and Wait protocol? Propagation delay = 0.3s , Throughput T = 2MBit /s , SDU size S = 128Bytes . There is NO transmission error.
Slide 48 Page 53
Laurent Toutain
RES 1
Protocol performances
OSI Reference Model Send and Wait Protocol
Let p the probability to have a error on a Data PDU, pr the probability of an error on a Ack PDU, Tframe the time needed to send a Data PDU and TAck , the time needed to send an Ack PDU, T1 is the timer delay used to retransmit lost PDU and Tprop is the propagation delay between the two entities using Send and Wait protocol to exchange data. 1) What is the Tmin time to send correctly a PDU 2) Dene Psucc the probability to send correctly a PDU 3) Give the total time Tt it will take to send correctly a PDU
i =0 (1
1 x )i = x
i =0
i .(1 x )i =
x (1x )2
Slide 49 Page 54
Laurent Toutain
RES 1
HDLC
Anticipation Protocol:HDLC
OSI Reference Model HDLC
Allow do send several frames anticipating acknowledgments HDLC: High Level Data Link Control Historic protocol, adapted in lots of networks (LAP-DM, PPP,. . . ) Two behaviors: Connection oriented and Datagram Historically X.25 is using a subset of HDLC, called LAB-B. LAP-B is connection oriented
Slide 51 Page 56
Laurent Toutain
RES 1
Anticipation Protocol:HDLC
OSI Reference Model HDLC
Physical layer gives a bit-stream. rst step: signal PDUs in the bit stream HDLC use a ag (0111 1110) that separate PDUs ags must not appears inside PDUs
if sent sequence contains sequence 011111 insert a 0 if received sequence contains 0111110 remove last 0
Slide 52 Page 57
Laurent Toutain
RES 1
Flag in frame
OSI Reference Model HDLC
Find frames in : 011111100111001001001101110110110111110010 101010010011011011011100010101010111111001 001001001110011001100111100111000001000101 00101111110 What will be sent to physical layer, if we have the following sequence: 01001011101111100001111111111101111110001010111111 What will be sent to upper layers, if we receive the following sequence : 011111100111110101001111011101111101111011000111110011101111110 What could be sent, if we have nothing to send?
Slide 53 Page 58
Laurent Toutain
RES 1
Flag
Addr.
Control
Data
CRC
Flag
8 P N(R) 0 N(S) F
11 00 F 11 11 F
LAP-B Frames What eld is missing in the HDLC frame ? Upper Layer Protocol
Slide 54 Page 59 Laurent Toutain RES 1
Unnumbered Frames
OSI Reference Model HDLC
SABM UA
Set Asynchronous Balanced Mode: No control by a central entity Each node can send data when it needs Unnumbered Acknowledgement: used to acknowledge Unnumbered Frames
DISC UA
Slide 55 Page 60
Laurent Toutain
RES 1
Unnumbered Frames
OSI Reference Model HDLC I, 0, 0 Information (with data): - N(s) frame number between 0 and 7 incremented each time a new I frame is send - N(r) acknowledges received frame by telling next expected frame number from the other side Expecting 1 so 0 is well received I, I, I, I, 1, 2, 3, 4, 1 1 1 1
I,0,1
I,1,5
Slide 56 Page 61
Laurent Toutain
RES 1
RR,1
I, I, I, I,
1, 2, 3, 4,
1 1 1 1 RR,5
Slide 57 Page 62
Laurent Toutain
RES 1
Slide 58 Page 63
Laurent Toutain
RES 1
REJ = NAK
OSI Reference Model HDLC I, 0, 0
RR, 1
Slide 59 Page 64
Laurent Toutain
RES 1
error I
10 00 FB 07 00 10 00 FB 00 00
... 10 08 0B 04 29 09 00 01 00 00 00
Which elds are added/missing by the analyzer ? Verify output given by Analyzer Which frames contain data ?
Slide 61 Page 66 Laurent Toutain RES 1
Layer 3: Network
Packet Justication
OSI Reference Model Layer 3: Network
lille
le havre
brest
rennes
strasbourg
poitier lyon
toulouse pau
marseille nice
Slide 63 Page 68
Laurent Toutain
RES 1
Packet Justication
OSI Reference Model Layer 3: Network
lille
le havre
brest
rennes
strasbourg
poitier lyon pro: direct communication between agencies, no waiting time, no need for addresses or routing
toulouse pau
marseille nice
Slide 63 Page 69
Laurent Toutain
RES 1
Packet Justication
OSI Reference Model Layer 3: Network
lille
le havre
brest
rennes
strasbourg
poitier cons: need to designate agencies, infrastructure need to route messages toward destination, link failure may stop several communications toulouse pau lyon pro: less expensive resources, easy to add an agency
marseille nice
Slide 63 Page 70
Laurent Toutain
RES 1
preset some period of time for communication, for instance for 0200 to 0300 communication from Lille to Nice
dene a communication with the network and tell it to establish a path between Lille and Nice
dene a way to identify agencies dene a signalization protocol congure intermediary nodes for this path More complex to implement, but allow a better use of resources may not allow other communication when one is established (for instance Brest - Pau) Store message on intermediary node before transmit it on the next link All simultaneous communications and better multiplexing Introduce some memorization delays
Laurent Toutain RES 1
Slide 64 Page 71
Packet Justication
OSI Reference Model Layer 3: Network
lille
le havre
brest
rennes
strasbourg
poitier lyon
toulouse pau
marseille nice
Slide 65 Page 72
Laurent Toutain
RES 1
paris
rennes
poitier
toulouse
marseille
nice
Slide 66 Page 73
Laurent Toutain
RES 1
paris
rennes
poitier
toulouse
marseille
nice
Slide 67 Page 74
Laurent Toutain
RES 1
size introduces delays intermediary node memory cannot be dened long messages create unfairness between ows Packet: PDU with a maximum length well known by all the nodes larger messages are fragmented into several packets
Slide 68 Page 75
Laurent Toutain
RES 1
paris
rennes
poitier
toulouse
marseille
nice
Slide 69 Page 76
Laurent Toutain
RES 1
lille Other communications are not delayed by the message size, just the packet size.
paris
rennes More realistic inter-arrival in anon empty network due to queueing in intermediary nodes
poitier
toulouse
marseille
nice
Slide 70 Page 77
Laurent Toutain
RES 1
Packet Pairs
OSI Reference Model Layer 3: Network
A method called packet pair is used to measure bottleneck bandwidth. Two packets are send consecutively and the inter-arrival time is measured after the bottleneck. Give the formula to get bandwidth.
Slide 71 Page 78
Laurent Toutain
RES 1
C.O. vs Datagram
OSI Reference Model Connection oriented vs Datagram Network is aware of dierent ows, can reserve resources to guaranty QoS or reject new ows if no resources are available. Message to send Ask the network Id. Tell the network where to send the message.
Connection Oriented
Destination address Networks sees only packets processed individualy
datagram
Slide 73 Page 80
Laurent Toutain
RES 1
Connection Oriented
OSI Reference Model Connection oriented vs Datagram
The node send a well-known message to the network requesting to open a connection to the destination
The message can contain some Quality of Service parameters such as the needed bandwidth, the propagation time, the reliability, . . . The network can reject call if not enough resources are available.
Destination receives an indication from network (with source address) and an id. id view by source and destination can be dierent
id is just unique on a link and changed from link to link a switch matrix is on each intermediary node telling based on each couple (entry interface and id) the exiting interface and new id. the matrix is built during the opening phase.
Example: MPLS
OSI Reference Model Connection oriented vs Datagram
R5
a c a/10 d d/10 c d R8 b a b/20 c/20 c R11 b a a a R9 a b a
R6 R4
a d/10 b c R10 a d b/15
R7
b/10
R3
R1
R2
Slide 75 Page 82
Laurent Toutain
RES 1
Concepts
Datagram
IP Layer
Concepts Datagram
IP is kept simple
Forwards packet towards destination Adapt IP protocol on every layer 2 Write applications to use IP layer (through L4: TCP, UDP)
IP on everything
Everything on IP
http://www.ietf.org/proceedings/01aug/slides/plenary-1/index.html Steve deering, Watching the Waist of the Protocol Hourglass, IETF 51, London
Slide 77 Page 84
Laurent Toutain
RES 1
IPv4 Header
The destination address must be easily accessible: Fixed location Fixed size Aligment in memory
Data
Slide 78 Page 85
Laurent Toutain
RES 1