ARES
Architecture des Réseaux
Olivier Fourmaux
(olivier.fourmaux@upmc.fr)
Version 5.2
UNIVERSITE
P IERRE & MARIE CURIE
LA SCIENCE APARIS
Couche transport
• multiplexage
• transfert fiable
• contrôle de flux
• contrôle de congestion
1
Nombreuses adaptations des slides, des schémas et du livre de J. F. Kurose et K. W. Ross, Computer
Networking : A Top Down Approach Featuring the Internet, 3e edition chez Addisson-Wesley, juillet 2004.
UNIVERSITE
P IERRE & MARIE CURIE
LA SCIENCE APARIS
U.E. ARES Cours 4/10 v5.2 olivier.fourmaux@upmc.fr 1
Plan
Multiplexage et démultiplexage
UNIVERSITE
P IERRE & MARIE CURIE
LA SCIENCE APARIS
U.E. ARES Cours 4/10 v5.2 olivier.fourmaux@upmc.fr 2
Couche transport
1
0
0
1
0
1
11
00
00
11
11
00
... ...
11
00
00
11
11
00
11
00
00
11
... 1
0
00
1
...
11
00 1
...
UNIVERSITE
P IERRE & MARIE CURIE
LA SCIENCE APARIS
U.E. ARES Cours 4/10 v5.2 olivier.fourmaux@upmc.fr 3
Couche transport
UNIVERSITE
P IERRE & MARIE CURIE
LA SCIENCE APARIS
U.E. ARES Cours 4/10 v5.2 olivier.fourmaux@upmc.fr 4
Couche transport : OSI
Application protocol
7 Application Application
APDU
Interface Interface
Presentation protocol
6 Presentation Presentation
Session protocol
5 Session Session
Transport protocol
4 Transport Transport
UNIVERSITE
P IERRE & MARIE CURIE
LA SCIENCE APARIS
U.E. ARES Cours 4/10 v5.2 olivier.fourmaux@upmc.fr 5
Couche transport : TCP/IP
TCP UDP
IP
Packet#
ARPANET SATNET radio LAN
UNIVERSITE
P IERRE & MARIE CURIE
LA SCIENCE APARIS
U.E. ARES Cours 4/10 v5.2 olivier.fourmaux@upmc.fr 6
Couche transport : Internet
UNIVERSITE
P IERRE & MARIE CURIE
LA SCIENCE APARIS
U.E. ARES Cours 4/10 v5.2 olivier.fourmaux@upmc.fr 7
Couche transport : 2 approches
Datagram
Sending process Receiving process
UNIVERSITE
P IERRE & MARIE CURIE
LA SCIENCE APARIS
U.E. ARES Cours 4/10 v5.2 olivier.fourmaux@upmc.fr 8
Plan
Multiplexage et démultiplexage
UNIVERSITE
P IERRE & MARIE CURIE
LA SCIENCE APARIS
U.E. ARES Cours 4/10 v5.2 olivier.fourmaux@upmc.fr 9
Multiplexage/Démultiplexage
A B C
P1 P2 P4 P3
UNIVERSITE
P IERRE & MARIE CURIE
LA SCIENCE APARIS
U.E. ARES Cours 4/10 v5.2 olivier.fourmaux@upmc.fr 10
Démultiplexage en mode non connecté
A B C
P1 P3 P2
111
000 1111
0000
000
111
000
111 1111
0000
PD : 4201 PS : 8511
1111
0000
PS : 2034 PD : 4201 0000
1111
0000
1111
0000
1111
0000
1111
PS : 4201 PD : 8511 0000
1111
0000
1111
PD : 2034 PS : 4201
UNIVERSITE
P IERRE & MARIE CURIE
LA SCIENCE APARIS
U.E. ARES Cours 4/10 v5.2 olivier.fourmaux@upmc.fr 11
Multiplexage en mode orienté connection
UNIVERSITE
P IERRE & MARIE CURIE
LA SCIENCE APARIS
U.E. ARES Cours 4/10 v5.2 olivier.fourmaux@upmc.fr 12
Démultiplexage en mode orienté connection (1)
A B C
P1 P4 P5 P6 P2 P3
PS : 2411
PD : 80
0000
1111
@C>@B
PS : 1417 1111
0000
PD : 80
0000
1111
0000
1111
PS : 3012 0000
1111
00000
11111
@A>@B
11111
00000 PD : 80
00000
11111
00000
11111
00000
11111 00000
11111
@C>@B
11111
00000
00000
11111
00000
11111
00000
11111
UNIVERSITE
P IERRE & MARIE CURIE
LA SCIENCE APARIS
U.E. ARES Cours 4/10 v5.2 olivier.fourmaux@upmc.fr 13
Démultiplexage en mode orienté connection (2)
A B C
P1 P4 P2 P3
PS : 3011
PD : 80
PS : 1417 0000
1111
@C>@B
1111
0000
PD : 80
0000
1111
0000
1111
PS : 3012 0000
1111
00000
11111
@A>@B
11111
00000
00000
11111
PD : 80
00000
11111 00000
11111
@C>@B
00000
11111 11111
00000
00000
11111
00000
11111
00000
11111
UNIVERSITE
P IERRE & MARIE CURIE
LA SCIENCE APARIS
U.E. ARES Cours 4/10 v5.2 olivier.fourmaux@upmc.fr 14
Multiplexage : dénominations OSI
Host 1 Host 2
Server 1 Server 2
Application TSAP 1208 Application
process layer
Transport
Transport layer TSAP 1522 TSAP1836
connection
NSAP Network
layer NSAP
Data link
layer
Physical
layer
UNIVERSITE
P IERRE & MARIE CURIE
LA SCIENCE APARIS
U.E. ARES Cours 4/10 v5.2 olivier.fourmaux@upmc.fr 15
Plan
Multiplexage et démultiplexage
UNIVERSITE
P IERRE & MARIE CURIE
LA SCIENCE APARIS
U.E. ARES Cours 4/10 v5.2 olivier.fourmaux@upmc.fr 16
UDP
1
0
0
1
0
1
11
00
00
11
11
00
DATA
... ...
11
00
00
11
11
00
11
00
00
11
... 1
0
00
1
...
11
00 1
...
UNIVERSITE
P IERRE & MARIE CURIE
LA SCIENCE APARIS
U.E. ARES Cours 4/10 v5.2 olivier.fourmaux@upmc.fr 17
UDP
UNIVERSITE
P IERRE & MARIE CURIE
LA SCIENCE APARIS
U.E. ARES Cours 4/10 v5.2 olivier.fourmaux@upmc.fr 18
Plan
Multiplexage et démultiplexage
UNIVERSITE
P IERRE & MARIE CURIE
LA SCIENCE APARIS
U.E. ARES Cours 4/10 v5.2 olivier.fourmaux@upmc.fr 19
Datagramme UDP
32 bits (4 octets)
2 lignes (8 octets)
Source port Destination port
Message
(application data)
UNIVERSITE
P IERRE & MARIE CURIE
LA SCIENCE APARIS
U.E. ARES Cours 4/10 v5.2 olivier.fourmaux@upmc.fr 20
UDP : port source
32 bits (4 octets)
2 lignes (8 octets)
Source port Destination port
UNIVERSITE
P IERRE & MARIE CURIE
LA SCIENCE APARIS
U.E. ARES Cours 4/10 v5.2 olivier.fourmaux@upmc.fr 21
UDP : port destination
32 bits (4 octets)
2 lignes (8 octets)
Source port Destination port
2 lignes (8 octets)
Source port Destination port
Data
UNIVERSITE
P IERRE & MARIE CURIE
LA SCIENCE APARIS
U.E. ARES Cours 4/10 v5.2 olivier.fourmaux@upmc.fr 23
UDP : contrôle d’érreur
32 bits (4 octets)
• 16 bits
2 lignes (8 octets)
Source port Destination port • contrôle d’erreur facultatif
Datagram length Checksum
• émetteur :
✓ ajout pseudo-header
✓ datagram+ = suite mot16bits
2
P
✓ checksum = mot16bits
Data
• récepteur :
✓ ajout pseudo-header
P
00000000 Protocol Datagram Length ✓ recalcul de mot16bits
☞ = 0 : pas d’erreur détectée
IP source address toujours possible...
☞ 6= 0 : erreur (destruction
IP destination address
silencieuse)
2
Somme binaire sur 16 bits avec report de la
retenue débordante ajoutée au bit de poid faible
UNIVERSITE
P IERRE & MARIE CURIE
LA SCIENCE APARIS
U.E. ARES Cours 4/10 v5.2 olivier.fourmaux@upmc.fr 24
Plan
Multiplexage et démultiplexage
UNIVERSITE
P IERRE & MARIE CURIE
LA SCIENCE APARIS
U.E. ARES Cours 4/10 v5.2 olivier.fourmaux@upmc.fr 25
UDP : arguments pour un transport sans connexion
Le choix d’un service transport non connecté peut être motivé par :
• ressources limitées aux extrémités
✓ pile TCP/IP limitée
✓ absence d’état dans les hôtes
✓ capacité de traitement limitée
• besoin d’échange rapide
✓ pas d’établissement de connexion
• besoin d’éfficacité
✓ entête réduit
• contraintes temporelles
✓ retransmission inadapté
✓ pas de contrôle du débit d’émission
• besoin de nouvelles fonctionnalités
✓ remontés dans la couche application...
UNIVERSITE
P IERRE & MARIE CURIE
LA SCIENCE APARIS
U.E. ARES Cours 4/10 v5.2 olivier.fourmaux@upmc.fr 26
UDP : exemples d’applications
UNIVERSITE
P IERRE & MARIE CURIE
LA SCIENCE APARIS
U.E. ARES Cours 4/10 v5.2 olivier.fourmaux@upmc.fr 27
UDP : Interface socket
#include <sys/types.h>
#include <sys/socket.h>
# Create a descriptor
int socket(int domain, int type, int protocol);
# domain : PF_INET for IPv4 Internet Protocols
# type : SOCK_DGRAM Supports datagrams (connectionless, unreliable msg of a fixed max length)
# protocol : UDP (/etc/protocols)
# End : dealocate
int close(int s);
UNIVERSITE
P IERRE & MARIE CURIE
LA SCIENCE APARIS
U.E. ARES Cours 4/10 v5.2 olivier.fourmaux@upmc.fr 28
Plan
Multiplexage et démultiplexage
UNIVERSITE
P IERRE & MARIE CURIE
LA SCIENCE APARIS
U.E. ARES Cours 4/10 v5.2 olivier.fourmaux@upmc.fr 29
Couche transport et fiablité (1)
Processus Processus
d’émission de réception
Data Data Couche application
Couche transport
Canal fiable
Problématique multi-couche :
• couche application
• couche transport
• couche liaison
UNIVERSITE
P IERRE & MARIE CURIE
LA SCIENCE APARIS
U.E. ARES Cours 4/10 v5.2 olivier.fourmaux@upmc.fr 30
Couche transport et fiablité (2)
Processus Processus
d’émission de réception
Data Data Couche application
Couche transport
Canal fiable
? ? ? ? ? ? ?
Canal non fiable
UNIVERSITE
P IERRE & MARIE CURIE
LA SCIENCE APARIS
U.E. ARES Cours 4/10 v5.2 olivier.fourmaux@upmc.fr 31
Couche transport et fiablité (3)
Processus Processus
d’émission de réception
Data Data Couche application
UNIVERSITE
P IERRE & MARIE CURIE
LA SCIENCE APARIS
U.E. ARES Cours 4/10 v5.2 olivier.fourmaux@upmc.fr 32
Protocole de Transfert Fiable (PTF)
état état
1 2
évenement
action
UNIVERSITE
P IERRE & MARIE CURIE
LA SCIENCE APARIS
U.E. ARES Cours 4/10 v5.2 olivier.fourmaux@upmc.fr 34
PTF v1.0
émetteur récepteur
UNIVERSITE
P IERRE & MARIE CURIE
LA SCIENCE APARIS
U.E. ARES Cours 4/10 v5.2 olivier.fourmaux@upmc.fr 35
PTF v2.0
émetteur récepteur
UNIVERSITE
P IERRE & MARIE CURIE
LA SCIENCE APARIS
U.E. ARES Cours 4/10 v5.2 olivier.fourmaux@upmc.fr 37
PTF v2.0 : ACK
UNIVERSITE
P IERRE & MARIE CURIE
LA SCIENCE APARIS
U.E. ARES Cours 4/10 v5.2 olivier.fourmaux@upmc.fr 38
PTF v2.0 : NAK
3
Attente ptf_rcpt(pqtrc) && erreur(pqtrc)
appel couche 1 ptnf_emis(NAK)
supérieure
ptf_rcpt(pqtrc) ptf_emis(data) 4
&& estACK(pqtrc) pqtem=cree_pqt(data, ctrlerr) Attente
ptnf_emis(pqtem) appel couche
inférieure
8
10 Attente
2
ptf_rcpt(pqtrc) && valide(pqtrc)
ACK ou 5
data=extr_pqt(pqtrc)
NAK
ptf_rcpt(pqtrc) && estNAK(pqtrc) app_rcpt(data)
ptnf_emis(pqtem) 7 ptnf_emis(ACK)
9
émetteur récepteur
UNIVERSITE
P IERRE & MARIE CURIE
LA SCIENCE APARIS
U.E. ARES Cours 4/10 v5.2 olivier.fourmaux@upmc.fr 39
PTF v2.0 : discussion
UNIVERSITE
P IERRE & MARIE CURIE
LA SCIENCE APARIS
U.E. ARES Cours 4/10 v5.2 olivier.fourmaux@upmc.fr 40
PTF v2.1 : émetteur
ptf_emis(data)
pqtem=cree_pqt(0, data, ctrlerr)
ptnf_emis(pqtem) ptf_rcpt(pqtrc) &&
(erreur(pqtrc) || estNAK(pqtrc))
Attente Attente
ptn_emis(pqtem)
appel couche ACK 0 ou
supérieure NAK 0
ptf_rcpt(pqtrc) ptf_rcpt(pqtrc)
&& valide (pqtrc) && valide (pqtrc)
&& estACK(pqtrc) && estACK(pqtrc)
Attente Attente
ACK 1 ou appel couche
NAK 1m supérieure
ptf_rcpt(pqtrc) && ptf_emis(data)
(erreur(pqtrc) || estNAK(pqtrc)) pqtem=cree_pqt(1, data, ctrlerr)
ptn_emis(pqtem) ptnf_emis(pqtem) émetteur
UNIVERSITE
P IERRE & MARIE CURIE
LA SCIENCE APARIS
U.E. ARES Cours 4/10 v5.2 olivier.fourmaux@upmc.fr 41
PTF v2.1 : récepteur
UNIVERSITE
P IERRE & MARIE CURIE
LA SCIENCE APARIS
U.E. ARES Cours 4/10 v5.2 olivier.fourmaux@upmc.fr 42
PTF v2.1 : discussion
UNIVERSITE
P IERRE & MARIE CURIE
LA SCIENCE APARIS
U.E. ARES Cours 4/10 v5.2 olivier.fourmaux@upmc.fr 43
PTF v2.2 : émetteur
ptf_emis(data)
pqtem=cree_pqt(0, data, ctrlerr)
ptnf_emis(pqtem) ptf_rcpt(pqtrc) &&
(erreur(pqtrc) || estACK(pqtrc, 1))
Attente Attente ptnf_emis(pqtem)
appel couche ACK 0
supérieure
ptf_rcpt(pqtrc) ptf_rcpt(pqtrc)
&& valide (pqtrc) && valide (pqtrc)
&& estACK(pqtrc, 1) && estACK(pqtrc, 0)
Attente Attente
ACK 1 appel couche
supérieure
ptf_rcpt(pqtrc) && ptf_emis(data)
(erreur(pqtrc) || estACK(pqtrc, 0)) pqtem=cree_pqt(1, data, ctrlerr)
ptnf_emis(pqtem) ptnf_emis(pqtem) émetteur
UNIVERSITE
P IERRE & MARIE CURIE
LA SCIENCE APARIS
U.E. ARES Cours 4/10 v5.2 olivier.fourmaux@upmc.fr 44
PTF v2.2 : récepteur
UNIVERSITE
P IERRE & MARIE CURIE
LA SCIENCE APARIS
U.E. ARES Cours 4/10 v5.2 olivier.fourmaux@upmc.fr 45
PTF v3.0
UNIVERSITE
P IERRE & MARIE CURIE
LA SCIENCE APARIS
U.E. ARES Cours 4/10 v5.2 olivier.fourmaux@upmc.fr 47
PTF v3.0 : sans perte
Emetteur Récepteur
envoi Data 0
Data 0
réception Data 0
envoi ACK 0
ACK 0
réception ACK 0
envoi Data 1
Data 1
réception Data 1
envoi ACK 1
ACK 1
réception ACK 1
envoi Data 0
Data 0
réception Data 0
envoi ACK 0
ACK 0
UNIVERSITE
P IERRE & MARIE CURIE
LA SCIENCE APARIS
U.E. ARES Cours 4/10 v5.2 olivier.fourmaux@upmc.fr 48
PTF v3.0 : perte d’un paquet de données
Emetteur Récepteur
envoi Data 0
Data 0
réception Data 0
envoi ACK 0
ACK 0
réception ACK 0
envoi Data 1 Data 1
tempo_expire
ré−envoi Data 1
Data 1
réception Data 1
envoi ACK 1
ACK 1
réception ACK 1
envoi Data 0
Data 0
UNIVERSITE
P IERRE & MARIE CURIE
LA SCIENCE APARIS
U.E. ARES Cours 4/10 v5.2 olivier.fourmaux@upmc.fr 49
PTF v3.0 : perte d’un ACK
Emetteur Récepteur
envoi Data 0
Data 0
réception Data 0
envoi ACK 0
ACK 0
réception ACK 0
envoi Data 1
Data 1
réception Data 1
envoi ACK 1
ACK 1
tempo_expire
ré−envoi Data 1
Data 1 réception Data 1
détecte le duplicat
ACK 1 envoi ACK 1
réception ACK 1
envoi Data 0
Data 0
réception Data 0
UNIVERSITE
P IERRE & MARIE CURIE
LA SCIENCE APARIS
U.E. ARES Cours 4/10 v5.2 olivier.fourmaux@upmc.fr 50
PTF v3.0 : fin de temporisation prématurée
Emetteur Récepteur
envoi Data 0
Data 0
réception Data 0
envoi ACK 0
ACK 0
réception ACK 0
envoi Data 1 Data 1
tempo_expire réception Data 1
ré−envoi Data 1 Data 1 ACK 1 envoi ACK 1
réception ACK 1 réception Data 1
envoi Data 0 Data 0 ACK 1 détecte le duplicat
envoi ACK 1
réception ACK 1 réception Data 0
ne rien faire ACK 0 envoi ACK 0
réception ACK 0
envoi Data 0
Data 0
réception Data 0
UNIVERSITE
P IERRE & MARIE CURIE
LA SCIENCE APARIS
U.E. ARES Cours 4/10 v5.2 olivier.fourmaux@upmc.fr 51
PTF v3.0 : performance
• exemple de communication :
✓ débit du lien : Dreseau = 1 Gbps,
✓ délais de bout-en-bout : d = 40 ms (dAR = 80 ms)
✓ paquets de longueur 1000 octets (Lpaquet = 8000 b)
UNIVERSITE
P IERRE & MARIE CURIE
LA SCIENCE APARIS
U.E. ARES Cours 4/10 v5.2 olivier.fourmaux@upmc.fr 52
PTF v3.0 : stop and wait
UNIVERSITE
P IERRE & MARIE CURIE
LA SCIENCE APARIS
U.E. ARES Cours 4/10 v5.2 olivier.fourmaux@upmc.fr 53
Protocole pipeline
ACK
Data Data
UNIVERSITE
P IERRE & MARIE CURIE
LA SCIENCE APARIS
U.E. ARES Cours 4/10 v5.2 olivier.fourmaux@upmc.fr 55
Go-Back-N : émetteur
Taille de la fenêtre
UNIVERSITE
P IERRE & MARIE CURIE
LA SCIENCE APARIS
U.E. ARES Cours 4/10 v5.2 olivier.fourmaux@upmc.fr 56
PTF v4.0 : émetteur
ptf_emis(data)
si (proch_numseq < base+N) alors :
pqtem[proch_numseq] = cree_pqt(proch_numseq, data, ctrlerr)
ptn_emis(pqtem[proch_numseq])
si (base == proch_numseq) alors tempo_init
base=1 proch_numseq ++
prochain_numseq=1 sinon refuse_data(data)
tempo_expire
tempo_init
ptf_rcpt(pqtrc) &&
ptn_emis(pqtem[base])
erreur(pqtrc) Attente
ptn_emis(pqtem[base+1])
.....
ptn_emis(pqtem[proch_numseq−1])
UNIVERSITE
P IERRE & MARIE CURIE
LA SCIENCE APARIS
U.E. ARES Cours 4/10 v5.2 olivier.fourmaux@upmc.fr 58
PTF v4.0 : récepteur
seqnum_attendu=1
récepteur
pqtem=cree_pqt(seqnum_attendu, ACK, ctrlerr)
UNIVERSITE
P IERRE & MARIE CURIE
LA SCIENCE APARIS
U.E. ARES Cours 4/10 v5.2 olivier.fourmaux@upmc.fr 59
PTF v4.0 : exemple
Emetteur Récepteur
envoi Data 0 Data 0
envoi Data 1 réception Data 0
Data 1 ACK 0 envoi ACK 0
envoi Data 2 Data 2 réception Data 1
envoi Data 3 Data 3 ACK 1 envoi ACK 1
attente
réception Data 3, éliminé
réception ACK 0 envoi ACK 1
envoi Data 4 Data 4 ACK 1
réception ACK 1 réception Data 4, éliminé
envoi Data 5 envoi ACK 1
Data 5
tempo_2_expire réception Data 5, éliminé
envoi Data 2 Data 2 envoi ACK 1
envoi Data 3 Data 3 réception Data 2
envoi Data 4 Data 4 envoi ACK 2
envoi Data 5 réception Data 3
Data 5 envoi ACK 3
UNIVERSITE
P IERRE & MARIE CURIE
LA SCIENCE APARIS
U.E. ARES Cours 4/10 v5.2 olivier.fourmaux@upmc.fr 60
Retransmissions sélectives (1)
Emetteur Récepteur
• retransmet seulement les pa- • acquitte explicitement chaque
quets non acquittés paquet valide reçu
• fenêtre d’émission limité à N pa- • tampon de réception pour re-
quets consécutifs séquencement
• algo : • algo :
✓ pft emis(data) ✓ ptf rcpt(n)
☞ envoi un paquet si seqnum dans (base rcpt ≤ n ≤ base rcpt+N-1)
la fenêtre ☞ ACK(n)
✓ tempo expire(n) ☞ si déséquensé : tampon
☞ retransmet paquet n ☞ si séquense : app emis(data),
tempo init(n) est le plus petit paquet non
✓ ACK(n) acquitté, décale la fenêtre
☞ marque le paquet n reçu ✓ ptf rcpt(n)
☞ si n est le plus petit paquet non (base rcpt-N ≤ n ≤ base rcpt-1)
acquitté, décale la fenêtre ☞ ACK(n)
✓ autre
☞ ignore
UNIVERSITE
P IERRE & MARIE CURIE
LA SCIENCE APARIS
U.E. ARES Cours 4/10 v5.2 olivier.fourmaux@upmc.fr 61
Retransmissions sélectives (2)
Vue émetteur
base_emis proch_seqnum
Taille de la fenêtre
Vue récepteur
base_rcpt
Taille de la fenêtre
UNIVERSITE
P IERRE & MARIE CURIE
LA SCIENCE APARIS
U.E. ARES Cours 4/10 v5.2 olivier.fourmaux@upmc.fr 62
Retransmissions sélectives (3)
Emetteur Récepteur
0 1 2 3 4 5 6 7 envoi Data 0 Data 0
0 1 2 3 4 5 6 7 envoi Data 1 réception Data 0
Data 1 ACK 0 envoi ACK 0 0 1 2 3 4 5 6 7
0 1 2 3 4 5 6 7 envoi Data 2 Data 2 réception Data 1
envoi Data 3 0 1 2 3 4 5 6 7
0 1 2 3 4 5 6 7 Data 3 ACK 1 envoi ACK 1
attente
réception Data 3 0 1 2 3 4 5 6 7
réception ACK 0 envoi ACK 3
0 1 2 3 4 5 6 7 envoi Data 4 Data 4 ACK 3
réception ACK 1 réception Data 4
0 1 2 3 4 5 6 7 envoi Data 5 envoi ACK 4 0 1 2 3 4 5 6 7
Data 5
tempo_2_expire réception Data 5
envoi Data 2 0 1 2 3 4 5 6 7
0 1 2 3 4 5 6 7
Data 2 envoi ACK 5
réception ACK 3 réception Data 2 0 1 2 3 4 5 6 7
0 1 2 3 4 5 6 7 envoi ACK 2
UNIVERSITE
P IERRE & MARIE CURIE
LA SCIENCE APARIS
U.E. ARES Cours 4/10 v5.2 olivier.fourmaux@upmc.fr 63
Plan
Multiplexage et démultiplexage
UNIVERSITE
P IERRE & MARIE CURIE
LA SCIENCE APARIS
U.E. ARES Cours 4/10 v5.2 olivier.fourmaux@upmc.fr 64
TCP
SYN
SYN+ACK
1
0 ACK
0
1
0
1
11
00
00
11
11
00
DATA
... ...
11
00
00
11
11
00
11
00
00
11
... 1
0
00
1
...
11
00 1
...
UNIVERSITE
P IERRE & MARIE CURIE
LA SCIENCE APARIS
U.E. ARES Cours 4/10 v5.2 olivier.fourmaux@upmc.fr 65
TCP
Caractéristiques de base :
• service fiable
• connexion bidirectionnelle (full duplex)
• point-à-point
• ouverture en trois échanges (three-way handshake)
• fermetures courtoise ou brutale
• orienté octet
• taille maximum de segments (bloc d’octets)
✓ MSS (Maximun Segment Size) = taille des données
✓ MSS typiques : 1460, 1448 et 512
• structure...
UNIVERSITE
P IERRE & MARIE CURIE
LA SCIENCE APARIS
U.E. ARES Cours 4/10 v5.2 olivier.fourmaux@upmc.fr 66
Segment TCP
32 bits (4 octets)
Acknowledgment number
1111111
0000000
0000000
1111111
0000000
1111111
G
K
H
T
N
N
0000000
1111111
Hlen1111111
0000000
R
C
S
S
Y
I
Rcv window size
max 65 Koctets
0000000
1111111
U
A
P
R
S
F
0000000
1111111
0000000
1111111
max 10 l.
Options
Message
(application data)
UNIVERSITE
P IERRE & MARIE CURIE
LA SCIENCE APARIS
U.E. ARES Cours 4/10 v5.2 olivier.fourmaux@upmc.fr 67
TCP : Gestion de la connexion
Création de la connexion (call setup) :
• three-way handshake
Host 1 Host 2 Host 1 Host 2
SYN (SEQ SYN (SE
= Q = x)
x)
)
EQ = y
SYN (S
x + 1)
Time
x + 1) K=
, ACK = y, AC
EQ = y (SEQ
=
SYN (S SYN
SYN
(SE
Q=
x,A
CK
=y
(SEQ = x +1
+ 1, )
ACK = y +
1)
(a) (b)
Déconnexion (release) :
• fermeture unilatérale (shutdown)
• fermeture courtoise (gracefull release)
UNIVERSITE
P IERRE & MARIE CURIE
LA SCIENCE APARIS
U.E. ARES Cours 4/10 v5.2 olivier.fourmaux@upmc.fr 68
Politique d’acquittement
Hôte A Hôte B
Seq=4000 Mécanismes de fiabilisation de TCP :
200
Ack=4200 • numéros de séquence
Seq=4200 ACK
• fenêtre d’anticipation (pipeline)
200
Seq=4400 • acquittements positifs (ACKs)
200 cumulatifs
Ack=4600
ACK • retransmissions sur
✓ ACKs dupliqués
✓ temporisation
UNIVERSITE
P IERRE & MARIE CURIE
LA SCIENCE APARIS
U.E. ARES Cours 4/10 v5.2 olivier.fourmaux@upmc.fr 69
TCP : Temporisations
UNIVERSITE
P IERRE & MARIE CURIE
LA SCIENCE APARIS
U.E. ARES Cours 4/10 v5.2 olivier.fourmaux@upmc.fr 70
Politique de retransmission
Hôte A Hôte B
S=4000 A=11200
S=4200 A=11200 ACK200
ACK 200 S=11200 A=4200
S=11200 A=4400
ACK
S=4400 A=11500
ACK200
RTO
S=4400 A=11500
ACK200
UNIVERSITE
P IERRE & MARIE CURIE
LA SCIENCE APARIS
U.E. ARES Cours 4/10 v5.2 olivier.fourmaux@upmc.fr 71
TCP : Contrôle de congestion
44
Timeout
40
36
Threshold
32
Congestion window (kilobytes)
28
24 Threshold
20
16
12
0
0 2 4 6 8 10 12 14 16 18 20 22 24
Transmission number
UNIVERSITE
P IERRE & MARIE CURIE
LA SCIENCE APARIS
U.E. ARES Cours 4/10 v5.2 olivier.fourmaux@upmc.fr 72
Fin
Document réalisé avec LATEX.
Classe de document foils.
Dessins réalisés avec xfig.
UNIVERSITE
P IERRE & MARIE CURIE
LA SCIENCE APARIS
U.E. ARES Cours 4/10 v5.2 olivier.fourmaux@upmc.fr 73