Académique Documents
Professionnel Documents
Culture Documents
Intro Reseau
Intro Reseau
Plan
Introduction gnrale. Protocoles de communication. Organisation en couches. Cas pratique d et .
"! " %& #$
quipements et composants dun rseau. Programmation systme rseau: - Interface de programmation . - Modles client-serveur. - Ralisation dune messagerie temps-rel.
( '
Couches ISO/OSI
International Standard Organizations Open System Interconnect
7 Application 6 Presentation 5 Session 4 Transport 3 Network 2 Data Link 1 Physical
Application protocols: ftp, telnet, ssh, htt, smtp, etc... Data translation: Bit order, Byte order, Character set, etc... Provide control of session between hosts : establishment, transfer, release (session identifier, socket) Provide transmission control service, error recovery and segmentation: TCP, SX, NetBEUI, etc... (Data unit: segment) Send data through multiple systems between two hosts: IP, IPX, DDP, etc... (Data unit: Packet) Lowlevel communication protocol: Ethernet, TokenRing, FDDI, Kermit, ZModem, etc... (Data unit: Frame) Twisted Pair Cables, Fiber Optic, Radio Frequency Links, etc... (Data unit: Signals, modulations, etc...)
Cas pratique d
et
45
est un protocole couche lien (2), ), de couche rseau (3), ), de couche (4).
8 " & & & '& 8 " & & & ! &' %@ & 8
IP (
TCP (
9
application header
user data
TCP header
application data
IP datagram Ethernet header IP header TCP header application data Ethernet trailer
B
Ethernet frame
Transport layer
ICMP
IP
IGMP
Network layer
ARP
RARP
Link layer
Physical layer
En-tte
0
45
3
15 16
31
16 bits type
data
En-tte IP
0 4 bits version 4 bits hdr len 8 bits type of service (TOS) 3 bits flags 15 16 16 bits total length (bytes)
standard IP header = 20 bytes
31
data
En-tte UDP
0 16 bits source port 16 bits length 15 16 16 bits destination port 16 bits checksum 31
data
F
En-tte TCP
0 16 bits source port 32 bits sequence number 32 bits acknowledgement number 4 bits hdr len URG ACK SYN 6 bits reserved 16 bits window size 16 bits urgent pointer options (if any) PSH RST FIN 15 16 16 bits destination port
standard TCP header = 20 bytes
31
16 bits checksum
data
(connect returns)
ACK k+1
(accept returns)
)
Cas pratique d
et
45
1
Host A B C
Principaux quipements
2
A
Internet
13 11 7 5 9
14
10
6 2
host2
1 3
host1
DNS
B
Transfert de chiers.
Programmation systme et
( %& '
v st u 4 s 3
Une (en: prise, embout) reprsente un point dattache vers un canal de communication rseaux. permet de faire abstraction des Linterface des protocoles de communication bas-niveau qui seront grs automatiquement par le systme dexploitation.
( %& ' %
D
wi GR `
Y G b `
st u 4 s 3 v
yo i m ` `I a Y S RQ S VUS c V a Y S Y I Q ` US Y c H V aQ Rb c GR Rb ` d c H Y US g X ` V aQ b ` Rb ` c H US Y GR c G V Ug H ee GR e dg Y Q Qg G H Y b ` Rb ` c H ` Y US c H GR GR c G ee Y I VI ` Qg G H Y a Y S V a Y S g X gH Y ` Y Y GR ` e ` ` Y I RQ Y Y ` Y I V` eI ` V Q Ug dg e ` GR GR GR GR VI ` Y RQ Y Y ` VI ` ` Y I RQ ` Qg G a Y S ` Q Y I Q Rb ` c Rb Q ` d c Y ` I GR m x xl Y I RQ ` Qg G a Y S Y ` GR ny d o
` lw lw d d `
GR ny `w ny GR
` `w GR
GR ` `w GR y gH Y b kbI W b Y VI ` e ` Y ` R Y ` gH b ` V bg UH g Y gH Y b j V ` Y US c H US GR ` c H Y GR aG b eQ ` ` Y ` G b gH Y G b ` c Rb Y G b ` c Rb ` aG b U c ` ` gH GR `w i GR
GR GR
ag
pour
st u
les
)F
4 s
Modles de serveurs
Communication simple:
Les deux programmes communiquent et terminent.
Serveur itratif:
Le serveur attend, traite la requte dun client lorsquil se connecte, puis recommence.
Serveur concurrentiel:
Le serveur attend, cre un nouveau processus pour traiter les requtes des clients sparment et en parallle.
Serveur multiplex:
Le serveur attend, et traite les clients les uns aprs les autres.
)
...utilisation de la connexion...
))
GR
)1
Association de la
( '
)2
GR
)A
Bibliographie
RFC790 (UDP) User Datagram Protocol RFC791 (IP) Internet Protocol RFC792 (ICMP) Internet Control Message Protocol RFC793 (TCP) Transport Control Protocol W.R. Stevens, W.R. Stevens, A. Tanenbaum, G. Pujolle,
% "! $ 88 ( & 8 " #$ % 9 8 " & % % 9 % 9 & & 9
)B
)C