Cours réseaux informatiques iia2

Preview:

Citation preview

1

Cours réseaux informatiques

Dr. Ouni sofiane

2

3

Chapitre 1 Rappel des

Concepts des réseaux

4

1. Définition des réseaux informatiques

• Un réseau informatique (computer network) est un système de communication (ensemble matériel + logiciel) qui permet à un ensemble d’ordinateurs (au sens large) d’échanger de l’information

• L’échange d’information n’est pas une finalité en soi. Les réseaux servent avant tout à réaliser des services

5

2. Caractéristiques des réseaux• Zone de couverture géographique (des communications):

– LAN (Local Area Network) : Réseaux Locaux, ≈≤ 1Km, comme Ethernet, WiFi

• LAN filaire• WLAN (Wireless LAN) : réseaux locaux sans fil WIFI , Quelques centaines

de mètres• PAN (Personal Area Network) : interconnexion d’équipements , bluetooth,

quelques mètres

– WAN (Wide Area Network) : Réseaux à grande distance, > 1Km, un pays, toute la planète, comme Internet (réseau des réseaux). Les WAN assure la connexion des réseaux LAN.

– MAN (Metropolitan Area Networks): Réseaux métropolitains, Intermédiaires entre LAN et WAN - qq dizaines de km, ville ou région, comme WIMAX (60Km)

• Débit (nombre de bits transmis par seconde)– LAN : 100Mbits/s, 1Gbits/s, 10Gbits/s– WAN : 54Kbits/s, 128Kbits/s, 256Kbits/s,512kbits/s, 1Mbits/s …

7

Caractéristiques des réseaux

• Équipements d’interconnexion :– LAN : Hub (concentrateur), switcher

(commutateur) ,…– WAN : Routeur, Modem,…

9

Type de liaisons entre Équipements réseaux• Liaison directe : sans commutation

– point à point : entre deux équipements (ordinateurs)

– accès multiple : Plusieurs ordinateurs utilisant un même support de transmission

• Liaison commutée : utilisation des équipements de commutation

Caractéristiques des réseaux

11

Caractéristiques des réseaux• Liaison directe : accès multiple

Connecteur en T et jonction coaxiale

• Réseau en Bus utilisant le câble coaxiale

• Réseau avec des HUB (concentrateurs): connecteur multipoints

Hub réseau RJ45 et USB Hub réseau RJ45 et BNC

12

Caractéristiques des réseaux• Liaison commutée

– Le commutateur assure l’ouverture de lien avec d’autre commutateur afin d’assurer l’acheminement des communications

A

B

C

D

Commutateur (switcher)

14

le courrier électronique (email)

• L'e-mail permet non seulement d'envoyer des textes, mais toutes sortes de fichiers (programmes, images, vidéos, sons), sous la forme de pièces jointes (attachements).

16

le courrier électronique (email) : paramétrage

17

le courrier électronique (email) : paramétrage

Informations sur l'utilisateur:Votre nom: votre nom complet.Adresse de messagerie: votre adresse e-mailInformations sur le serveur:Serveur de courrier entrant (POP3):Serveur de courrier sortant (SMTP):Informations de connexion:Nom d'utilisateur: votre nom d'utilisateurMot de passe: votre mot de passe pour l'émail

18

FTP (File Transfer Protocol) : Transfert de

fichiers

FTP (File Transfer Protocol) est le premier outil qui a été mis à la disposition des utilisateurs pour échanger des fichiers sur Internet.

En utilisant FTP, vous serez clients d'un modèle client/serveur et vous vous adresserez à un serveur. En effet, en quelques clics, vous pourrez télécharger la dernière version d'un logiciel ou inversement, vous pouvez mettre à la disposition des utilisateurs des fichiers ou des logiciels que vous avez créés.

19

FTP : interface navigateur

20

FTP : architecture

21

Telnet

• Telnet (TErminal NETwork ou TELecommunication NETwork, ou encore TELetype NETwork) : Désigne un protocole et une application qui permet de travailler sur un ordinateur à distance.

22

Telnet : connexionpouvoir connecter au serveur TELNET il faut :

 • Lancer la commande TELNET à partir d'un client TELNET • Donner le nom ou l'adresse IP de la machine serveur TELNET, le

nom de compte d'utilisateur et le mot de passe • Le serveur va faire la vérification de ces informations • Les droits d'exécuter des commandes dépendent des droits de

compte d'utilisateur • La connexion est faite, si l'authentification de client est bien réussite,

le client peut maintenant saisir une ligne de commande • Le serveur reçoit cette ligne de commande et l'exécute. Le résultat

de l'exécution sera ensuite affiché à l'écran de la machine Client. • EXIT est la commande pour quitter le client TELNET.

23

Telnet : utilisation

• Accès à une machine distante pour lire et écrire des fichier à distance

• Accès à un serveur distante pour exécuter des applications : simulateur de phénomènes physiques …

• Accès distant à un serveur email• Accès distant pour configurer un

équipement réseaux : routeur, …

24

Telnet : utilisation pour configuration routeur ADSL

25

Telnet : utilisation pour configuration routeur ADSL

26

Telnet : utilisation pour configuration routeur ADSL

28

World Wide Web

Page web : est un document pouvant contenir du texte, des images, du son, ... et des liens vers d'autres documents.

Exemple : http://crb.ulco.free.fr/c2i/siteSite web :est un ensemble de pages web reliées

entre elles par des liens hypertextes.Serveur web : est un ordinateur hôte qui contient

des pages web et les met à la disposition du net.

29

La barre d'adresse :• C'est dans cette zone que vous taperez l'adresse

URL (Uniform Resource Locator) du site à afficher. • Le préfixe http:// se rajoute automatiquement. Il

désigne la nature du protocole de communication entre le serveur web et le navigateur :  Hyper Text Transfert Protocol.

• Si l'échange de données est crypté, on utilisera le protocole http sécurisé https:// (site sécurisé).

World Wide Web : navigateur

30

World Wide Web : architecture

31

4. Évolution d’Internet

32

Évolution d’Internet

33

• Vidéo surveillance

• Visualisation de place

principale dans les villes

• Communication audio visuel

Augustine au sud de l’Alaska en Eruption : WebCam du Volcan

Applications Multimédia sur Internet : Vidéo avec WebCAM

34

Applications Multimédia sur Internet : Vidéo avec WebCAM

• Communication avec voix et vidéo entre deux utilisant :– WebCam– Une connexion Internet– Logiciel de visualisation temps réel : skype,…

35

Applications Multimédia sur Internet : Vidéo conférence

36

Téléphonie sur Internet

• Voix sur IP (aussi connu sous le nom de VoIP, Téléphonie sur IP, téléphonie Internet) fait référence à la technologie qui permet de router les conversations vocales sur Internet ou un réseau informatique

37

Téléphonie sur Internet

• Il y a deux types de téléphones :– Téléphone IP, fonctionne sur le réseaux informatique– Téléphone classique se connectant au réseau téléphonique

• On peut passer du réseaux Internet au réseau téléphonique et vise versa

38

5. Évolution d’Internet: réseaux mobiles

• Réseaux mobiles : réseaux sans fil, réseaux GSM,GPRS, UMTS…

39

Réseaux sans fil : WiFi

• Connexion à Internet via un routeur ADSL sans fil • Impression sans fil sans câble imprimante• Utilisation des ressources (partage de fichier,

disque, lecteur CD…) d’une machine distante sans câble.

40

GSM, GPRS : BTS

BTS

• La «Base Transceiver Station » (BTS) est l’équipement terminal du réseau vers les téléphones portables

• Une BTS est un groupement d’émetteurs et de récepteurs fixes.

• Elle échange des messages avec les stations mobiles présentes dans la cellule qu’elle contrôle.

41

GSM, GPRS :architecture

• BSC « Base Station Controller » contrôleur des BTS• BSC assure l’acheminement des communications

d’autres zones• MSC « Mobile Switching Centre » assure l’interconnexion

vers le réseaux téléphonique (fixe).

43

Évolution des réseaux mobiles

44

4.5. Convergence des réseaux

45

Évolution des réseaux : débit et technologie

46

6. Concepts de base des réseaux

à partir d’exemple de Requête

WEB

47

Comment fonctionne un réseau ?

48

Comment fonctionne un réseau ?

49

Comment fonctionne un réseau ?

50

Comment fonctionne un réseau ?

51

6. Notions de protocole

52

Notions de protocole

53

54

Les protocoles de l’Internet

55

Les protocoles normalisés de l’ISO (International Standards Organisation)Open Systems Interconnection (OSI)

1

2

3

4

5

6

7

56

57

OSI Reference Model (Condensed Information)

58

59

60

Internet Protocols

PPP HDLC SLIP LAPB

Public telephone networkLAN

X.25

Ethernet/IEEE 802.3

ARP RFC 826

IP RFC 791

TelnetRFC 854

FTP RFC 959

SMTPRFC 821

SNMP

TCP RFC 793 UDP RFC 768

DNSRFC 1035

NFS RPC

RIPRFC 1058

ICMPRFC 792

Routing protocols BGP OSPF IGRP EIGRP

61

62

63

64

65

66

67

68

69

70

71

72

Internet

73

74

NetworkLayer

Data LinkLayer

PhysicalLayer

ApplicationLayer

PresentationLayer

SessionLayer

TransportLayer

NetworkLayer

Data LinkLayer

PhysicalLayer

ApplicationLayer

PresentationLayer

SessionLayer

TransportLayer

The OSI Reference Model

75

NetworkLayer

Data LinkLayer

PhysicalLayer

ApplicationLayer

PresentationLayer

SessionLayer

TransportLayer

NetworkLayer

Data LinkLayer

PhysicalLayer

ApplicationLayer

PresentationLayer

SessionLayer

TransportLayer

The Physical Layer Connection

Specifies Specifies electrical electrical

connectionconnection

76

NetworkLayer

Data LinkLayer

PhysicalLayer

ApplicationLayer

PresentationLayer

SessionLayer

TransportLayer

NetworkLayer

Data LinkLayer

PhysicalLayer

ApplicationLayer

PresentationLayer

SessionLayer

TransportLayer

The Physical Layer Connection

Hub

AmplificationAmplificationRegenerationRegeneration

77

NetworkLayer

Data LinkLayer

PhysicalLayer

ApplicationLayer

PresentationLayer

SessionLayer

TransportLayer

NetworkLayer

Data LinkLayer

PhysicalLayer

ApplicationLayer

PresentationLayer

SessionLayer

TransportLayer

The Data Link Connection

DelineationDelineationofof

DataData

ErrorErrorDetectionDetectionAddressAddress

FormattingFormatting

78

NetworkLayer

Data LinkLayer

PhysicalLayer

ApplicationLayer

PresentationLayer

SessionLayer

TransportLayer

NetworkLayer

Data LinkLayer

PhysicalLayer

ApplicationLayer

PresentationLayer

SessionLayer

TransportLayer

Bridge& Switch

The Data Link Connection

79

NetworkLayer

Data LinkLayer

PhysicalLayer

ApplicationLayer

PresentationLayer

SessionLayer

TransportLayer

NetworkLayer

Data LinkLayer

PhysicalLayer

ApplicationLayer

PresentationLayer

SessionLayer

TransportLayer

The Network Layer Connection

End to end End to end routingrouting

80

NetworkLayer

Data LinkLayer

PhysicalLayer

ApplicationLayer

PresentationLayer

SessionLayer

TransportLayer

NetworkLayer

Data LinkLayer

PhysicalLayer

ApplicationLayer

PresentationLayer

SessionLayer

TransportLayer

The Network Layer Connection

Router

81

82

messagesegment

Datagram (packet)Frame (trame)

sourceapplicatio

ntransportnetwork

linkphysical

HtHnHl M

HtHn M

Ht M

M

destination

application

transportnetwork

linkphysical

HtHnHl M

HtHn M

Ht M

M

networklink

physical

linkphysical

HtHnHl M

HtHn M

HtHnHl M

HtHn M

HtHnHl M HtHnHl M

router

switch

Encapsulation

83

84

Chapitre 2: Architecture physique des réseaux

et transmission

85

86

87

(DCE)

(DTE)

88

89

90

91

92

93

94

95

96

97

Ethernet Encoding

Manchester Encoding

98

Media de transmission• Spécifications des câbles : il est important de tenir

compte des considérations suivantes liées aux performances:– À quelles vitesses la transmission de données. Le type de

conduit utilisé influence la vitesse de transmission.

– Les transmissions doivent-elles être numériques ou analogiques ? La transmission numérique ou à bande de base nécessite des types de câble différents de ceux utilisés pour la transmission analogique ou à large bande.

– Quelle distance un signal peut-il parcourir avant que l'atténuation n'affecte la transmission ? Si le signal est dégradé, les équipements réseau ne peuvent ni le recevoir ni l'interpréter. La dégradation est directement liée à la distance parcourue par le signal et au type de câble utilisé

99

spécifications pour Ethernet : IEEE, ITU, EIA

Les spécifications Ethernet suivantes se rapportent au type de câble: 10BaseT , 10Base5 , 10Base2

10BaseT indique une vitesse de transmission de 10 Mbits/s. La transmission est du type à bande de base ou interprétée numériquement. La lettre T indique une paire torsadée.

100

Câble Coaxiale

Un câble coaxial présente plusieurs avantages pour les réseaux locaux. Il peut couvrir des distances plus longues que les câbles à paires torsadées blindées (STP), à paires torsadées non blindées (UTP) ou ScTP (screened twisted pair).

La taille du câble est un paramètre important. L'installation d'un câble coaxial est plus onéreuse que celle d'un câble à paires torsadées. Les câbles Ethernet épais ne sont presque plus utilisés ; ils sont désormais réservés à des installations spécifiques.

101

Le câble à paires torsadées blindées allie les techniques de blindage, d'annulation et de torsion des fils.   Chaque paire de fils est enveloppée dans une feuille métallique et les deux paires sont enveloppées ensemble dans un revêtement tressé ou un film métallique. L'isolation et le blindage augmentent considérablement la taille, le poids et le coût du câble

Câble à paires torsadées blindées (STP)

102

Câble à paires torsadées non blindées (UTP)

Le câble à paires torsadées non blindées (UTP)  est un média constitué de quatre paires de fils. Chacun des huit fils de cuivre du câble est protégé par un matériau isolant. De plus, les paires de fils sont tressées entre elles. Ce type de câble repose uniquement sur l'effet d'annulation produit par les paires torsadées pour limiter la dégradation du signal due aux interférences électromagnétiques et radio. La norme TIA/EIA-568-B.2 comprend des spécifications liées aux performances des câbles .

103

Médias optiques

104

105

• Les connecteurs les plus fréquemment utilisés sont les connecteurs SC (Subscriber Connector) pour la fibre multimode, et les connecteurs ST (Straight Tip) pour la fibre monomode

106

107

108

109

Médias sans fil

110

Connexion d’un ordinateur au sans fils

111

• Pour résoudre le problème d'incompatibilité, un point d'accès est généralement installé pour servir de concentrateur central dans le mode infrastructure des LAN sans fil. Le point d'accès est relié par câble au réseau local câblé pour fournir un accès Internet et la connectivité au réseau câblé. Les points d'accès sont équipés d'antennes et fournissent la connectivité sans fil sur une zone donnée appelée cellule. La dimension d'une cellule dépend de la structure de l'emplacement dans lequel le point d'accès est installé, outre la taille et la puissance des antennes. Elle est généralement comprise entre 91,44 et 152,4 mètres

112

Infrastructure sans fils à plusieurs points d’accès

• Pour desservir des zones plus vastes, il est possible d'installer plusieurs points d'accès avec un degré de chevauchement permettant le «roaming» entre les cellules. Dans de nombreux réseaux de points d'accès, le chevauchement est important pour permettre le déplacement des équipements au sein du LAN sans fil. Un chevauchement de 20 à 30 % est souhaitable. Comme ce pourcentage favorise le «roaming» entre les cellules, l'activité de déconnexion et de reconnexion peut se produire en toute transparence sans interruption de service.

113

114

Le câble reliant le port du commutateur au port de la carte réseau de l'ordinateur est un câble droit.

115

Le câble reliant un port de commutateur à l'autre est un câble croisé.

116

117

118

certification TIA/EIA-568-B

• Le bruit est toute énergie électrique dans un câble de transmission qui rend difficile, pour le récepteur, l’interprétation des données venant de l’émetteur. La certification TIA/EIA-568-B exige désormais que les câbles soient testés pour différents types de bruits.

119

120

Normes IEEE sur les caractéristiques de câblage

122

RJ45

Fibre optique

124

Valise de raccordement à froid pour connecteur ST ou SC Outillage

Pince à dénuder 3 diamètres, 250, 900µm et 3mmPince à kevlarPince a sertirColle Ensemble de tubes de colle EpoxyOpticure Anaerobic Adhesiveaccessoire de mélange pour Epoxy Seringue et aiguillePolissage plaque de travail en verreplateau de caoutchoucDisques de polissage : SC/FC & STbr> Silicon Carbide St

125

Normes IEEE sur les caractéristiques de câblage

126

Conception LAN

127

Conception LAN

MDF : ((Main distribution facility) le répartiteur principal IDF: (Intermediate distribution facility) Les locaux techniques secondaires (appelés des répartiteurs intermédiaires)HCC : horizontal cross-connectVCC : interconnexion verticale (vertical cross-connect) permet d'interconnecter les divers répartiteurs intermédiaires IDF au répartiteur principal MDF

128

Conception LAN

129

Conception LAN

130

Conception LAN

131

Conception LAN

Table de brassage

132

Conception LAN

133

HCC & VCC : Câblage horizontale et verticale

135

HCC

Dans une topologie en étoile simple comportant un seul local technique, le répartiteur principal MDF comprend un ou plusieurs tableaux d’interconnexions horizontales (horizontal cross-connect ou HCC).

136

VCC

Une interconnexion verticale (vertical cross-connect ou VCC) permet d'interconnecter les divers répartiteurs intermédiaires IDF au répartiteur principal MDF. Un câblage en fibre optique est généralement utilisé car les câbles verticaux dépassent souvent la limite des 100 mètres

137

138

Chapitre 3 : Réseaux Locaux

139

Chapitre 3 :

Local Area Networks

(LANs)

140

141

Key Features of a LAN

• High throughput (débit élevé)

• Relatively low cost

• Limited to short distance

• Often rely on shared media (méduim partagé)

• (fiabilité)

142

Star Topology

• Central component of network known as hub

• Each computer has separate connection to hub

143

Ring Topology

• No central facility

• Connections go directly from one computer to another

144

Bus Topology

• Shared medium forms main interconnect• Each computer has a connection to the

medium

145

Example LAN : Ethernet

• Most popular LAN

• Widely used

• IEEE standard 802.3

• Several generations– Same frame format– Different data rates– Different wiring schemes

146

IEEE 802.2 LAN/MAN Standards

147

IEEE 802 Protocol Layers

148

LAN Protocol Data Units

149

Medium Access Control - Where

• Centralized

• Decentralized

150

Medium Access Control - How• How

• Round Robin– each station in turn is given opportunity to transmit

• Reservation– time slots reserved for stream traffic

• Contention– all stations compete for time as required - no control

151

MAC

152

Ethernet

153

802.3 Ethernet and Fast Ethernet

• CSMA/CD– If medium idle, transmit– Else, wait until idle, then transmit– If collision, transmit jamming signal– Wait random time, transmit

154

MAC Rules and Collision Detection/Backoff

155

CSMA/CD Operation

156

Types of Collisions

157

CSMA/CD - Protocol

1. If the medium is idle, transmit; otherwise go to step 2

2. If the medium is busy, wait until it is free and transmit immediately

3. If a collision is detected, transmit a jamming signal and stop

4. Wait a random length of time and try again

158

MAC Frame

64 <= length <= 1500 octets

159

Ethernet Frame Structure

Data: Sending adapter encapsulates network packet

(≤1500B)

• Preamble: • 7 bytes with pattern 10101010 followed by

one byte with pattern 10101011• used to synchronize receiver, sender clock

rates

160

Ethernet Frame Structure (more)

• Addresses: 6 bytes MAC– if adapter receives frame with matching destination

address, or with broadcast address then pass to network-layer

– otherwise, discard frame

• CRC: if CRC check fails then frame is dropped

161

Ethernet (Mac) Addressing

The MAC address consists of 12 hex digits (48 bits)

The first six digits (assigned by the IEEE) represent the Organizational Unique Identifier (OUI) which identifies the manufacturer

The last six are assigned by the manufacturer and represent a unique hardware ID number for the NIC

162

Ethernet Technologies 10BaseT and

100BaseT

• 10/100 Mbps rate; latter called “fast ethernet”• T stands for Twisted Pair• Nodes connect to a hub: “star topology”; 100

m max distance between nodes and hub

twisted pair

hub

163

802.3 10 Mbps Physical Layer

164

802.3 100BASE-T Physical Layer Medium Alternatives

165

Interconnecting with hubs• Multi-tier topology extends max distance between nodes• But individual segment collision domains become one large

collision domain (causes transmission rate reduction)

• Can’t interconnect 10BaseT & 100BaseT

hub

hubhub

Backbone hub

≤100m≤100m ≤100m

≤100m≤100m

≤100m

166

Switch• Link layer device

– Operate on Ethernet frames rather than bits– examines frame header and selectively

forwards frame based on MAC dest address– when frame is to be forwarded on segment,

uses CSMA/CD to access segment• transparent

– hosts are unaware of presence of switches• plug-and-play, self-learning

– switches do not need to be configured

167

Forwarding

• How do determine onto which LAN segment to forward frame?• Looks like a routing problem...

hub

hubhub

switch1

2 3

168

Switch: traffic isolation• switch installation breaks subnet into LAN segments

• switch filters packets: – same-LAN-segment frames not usually

forwarded onto other LAN segments– segments become separate collision domains

hub hub hub

switch

collision domain collision domain

collision domain

169

Institutional network

hub

hubhub

switch

to externalnetwork

router

IP subnet

mail server

web server1Gbps1Gbps

100Mbps 100Mbps100Mbps

100Mbps100Mbps100Mbps

170

Token Ring

171

Frame Transmission on a Ring

172

Token Ring FundamentalsIEEE 802.5

• Stations take turns sending data:– May transmit only during its turn and only one

frame during each turn

• Access method: “token-passing”– A token is a placeholder frame

• Small “token” packet circulates on ring

• As token passes, transmitting station changes token from “free” to “busy” and follows token with data to be transmitted

173

Token Ring Operation

174

IEEE Standard 802.5• • A standard for Token Ring

• • Ring consists of point-to-point links

• • Can be connected by twisted pair, coax, and fibre optics

• • Typical data rate: 4 Mbps à 16Mbp

175

Token Ring LAN Implementation

176

MAU MAU

MAUMAU

IBM Compatible

IBM Compatible

IBM AS/400

177

IEEE 802.4 Token Bus

• Same technique as Token Ring but implement in bus topology

• Because of complexity of implementation, token bus is not a popular.

178

FDDI

• Fiber Distributed Data Interface• 100 Mbps• LAN and MAN application• Use Token Ring technique• Dual rings• Mainly used for large span distance up to 200

km or for very high data rates• Can connect up to 1000 stations• 1 error in 2.5 x 1010 bits

179

FDDI Characteristics

Dual-attachedConcentrator

Dual-attachedConcentrator

Single-attachedConcentrator

Single-attachedStations

• Max Size - 100 Km• Max Nbr Stations - 500

Dual Counter-rotating Rings

180

Counter-rotating Ring (Self-healing)

181

Wireless networks (Réseaux sans Fils)

182

183

184

185

186

Les Réseaux WAN

187

Chap 5 : WAN

188

Internetworking devices

Descending in increasing power and complexity

• Hubs

• Bridges

• Switches

• Routers

189

Hubs

As seen earlier, a hub interconnects two or more workstations into a local area network. A simple interconnecting device that requires no overhead to operate.

When a workstation transmits to a hub, the hub immediately resends the data frame out all connecting links.

A hub can be managed or unmanaged. A managed hub possesses enough processing power that it can be managed from a remote location.

Hubs continue to become smarter.

Some call any interconnection device in a LAN a hub!

190

Hubs connecting segments

191

Bridges

A bridge can be used to connect two similar LANs, such as two CSMA/CD LANs.

A bridge can also be used to connect two closely similar LANs, such as a CSMA/CD LAN and a token ring LAN.

The bridge examines the destination address in a frame and either forwards this frame onto the next LAN or does not.

The bridge examines the source address in a frame and places this address in a routing table, to be used for future routing decisions.

192

Bridge interconnecting two identical LANs

193

A bridge interconnecting two CSMA/CD networks hastwo internal port tables

194

SwitchesA switch is a combination of a hub and a bridge.

It can interconnect two or more workstations, but like a bridge, it observes traffic flow and learns.

When a frame arrives at a switch, the switch examines the destination address and forwards the frame out the one necessary connection.

•Workstations that connect to a hub are on a shared segment.•Workstations that connect to a switch are on a switched segment.

195

Workstations connected to a shared segment of a LAN

196

Workstations connected to a dedicated segment of a LAN

197

A Switch with Two Servers Allowing Simultaneous Access to Each Server

198

A server with two NICs and two connections to a switch

199

Switch providing multiple access to an e-mail server

200

Routers (really specialized computers)

The device that connects a LAN to a WAN or a WAN to a WAN (the INTERNET! – uses IP addresses).

A router accepts an outgoing packet, removes any LAN headers (MAC addr) and trailers, and encapsulates the necessary WAN headers (IP addr) and trailers.

Because a router has to make wide area network routing decisions, the router has to dig down into the network layer of the packet to retrieve the network destination address.

201

Routers

Thus, routers are often called “layer 3 devices”. They operate at the third layer (IP), or OSI network layer, of the packet.

Routers often incorporate firewall functions.

202

Connections (in general)

Bridges for LANs and hubs.

Switches for LANs and workstations.

Routers for LANs and WANs (the Internet).

203

Linksys Router for Home Network

204

messagesegment

datagram

frame

sourceapplicatio

ntransportnetwork

linkphysical

HtHnHl M

HtHn M

Ht M

M

destination

application

transportnetwork

linkphysical

HtHnHl M

HtHn M

Ht M

M

networklink

physical

linkphysical

HtHnHl M

HtHn M

HtHnHl M

HtHn M

HtHnHl M HtHnHl M

router

switch

Encapsulation

205

Internet

206

An Internet According to TCP/IP

207

208

IP Packet Format

209

•   Version—Indicates the version of IP currently used. •   IP Header Length (IHL)—Indicates the datagram header length in 32-bit words. •   Type-of-Service—Specifies how an upper-layer protocol would like a current datagram to be handled, and assigns datagrams various levels of importance. •   Total Length—Specifies the length, in bytes, of the entire IP packet, including the data and header. •   Identification—Contains an integer that identifies the current datagram. This field is used to help piece together datagram fragments. • Flags—Consists of a 3-bit field of which the two low-order (least-significant) bits control fragmentation. The low-order bit specifies whether the packet can be fragmented. The middle bit specifies whether the packet is the last fragment in a series of fragmented packets. The third or high-order bit is not used. • Fragment Offset—Indicates the position of the fragment's data relative to the beginning of the data in the original datagram, which allows the destination IP process to properly reconstruct the original datagram. • Time-to-Live—Maintains a counter that gradually decrements down to zero, at which point the datagram is discarded. This keeps packets from looping endlessly. • Protocol—Indicates which upper-layer protocol receives incoming packets after IP processing is complete. • Header Checksum—Helps ensure IP header integrity

210

•   Source Address—Specifies the sending node. •   Destination Address—Specifies the receiving node. •   Options—Allows IP to support various options, such as security. •   Data—Contains upper-layer information.

211

IP Addressing

212

Global Addressing Scheme• Specified by Internet Protocol• In addition to physical address (contained in NIC),

each host is assigned a 32-bit IP address.

213

Internet Addresses• Each interface on the internet must have a

unique Internet Address, or IP address.• An IP address is a 32 bit number.• Usually written using Dotted Decimal Notation• Example:

– 1000 1100 1111 1100 0000 1101 0010 0001 in binary

– 8C FC 0D 21 in hex– 140.252.13.33 in dotted decimal

214

Dotted Decimal Notation

• Syntactic form used by IP software to make the 32-bit form shorter and easier to read– Written in decimal form with decimal points

separating the bytes

215

Details of IP Addresses• Assigned per interface, not per host, hence...

– Routers always have multiple IP addresses.• Three kinds of IP Addresses

– unicast: destined for a single host– broadcast: destined for all hosts on a local net

(not all hosts on the “internet”)– multicast:

destined for all hosts in a specific multicast group.• (We will concentrate for now on unicast addresses)

216

IP Address Hierarchy• 2-part IP address

– Prefix: identifies the physical network to which the computer is attached – Network number or id

– Suffix: identifies an individual computer on a given physical network – Host id

• Unique address– Netid assigned globally – Internet Assigned

Number Authority, IANA– Hostid assigned locally

• How many bits for Netid and for Hostid?

217

Classful IP addressing

• 5 different classes to cover the needs of different types of organizations– 3 primary classes: A, B, C

• Class type is determined by the first four bits– Netid and hostid have varying lengths, depending

on the class type and use byte boundaries

• Classful IP addresses are self-identifying• Maximum number of networks and maximum

number of hosts for each class?

218

0

Classes of IP AddressesClass

A

E 1 1 1 1 0

D 1 1 1 0

B 1 0

01C 1

netid hostid7 bits 24 bits

14 bits 16 bits

21 bits 8 bits

28 bits

27 bits

netid hostid

netid hostid

multicast group id

(reserved for future use)

A: 0.0.0.0 to 127.255.255.255B: 128.0.0.0 to 191.255.255.255C: 192.0.0.0 to 239.255.255.255

D: 224.0.0.0 to 239.255.255.255E: 224.0.0.0 to 247.255.255.255

219

Decimal representation and class ranges of Internet addresses

220

Details of IP Addresses (continued)• Assigned by a central authority

– the Network Information Center, or InterNIC (rs.internic.net) assigns network id’s for the entire internet.

– Local system administrator gets a network id from the InterNIC, then assigned Id’s to individual interfaces on each host.

• The hostid portion may be broken down by a local system administrator into “subnet” and “host”.

• Special case addresses:

221

222

223

224

Network and Host Addresses

225

Summary of special IP addressesPrefix Suffix Type of Address Purpose______

All 0s All 0s This computer Used during bootstrap

Network All 0s Network Identifies a network

Network All 1s Directed broadcast broadcast on specified net

All 1s All 1s limited broadcast broadcast on local net

127 Any loopback testing

226

Routers and IP addresses

• An internet is composed of arbitrarily many physical networks interconnected by routers – Each IP address specifies only one physical

network. What is the router’s address?– Routers can have more than two interfaces,

therefore must be assigned one IP address for each connection.

• An IP address identifies a connection between a computer and a network, not a specific computer.

227

routers

228

Subnetting• IP addressing has only two levels of hierarchy• Subnetting - Add another level to address/routing

hierarchy: subnetworks

229

Subnetting• 3 levels of hierarchy: Netid, subnetid, hostid• Subnets are visible only within the local site• Masking: process that extracts address of physical

network from an IP address.• Subnet masks define variable partition of host part of

Class A and B addresses

Network Number SubnetID HostID

Subnetted Address

Class B Address

Subnet Mask (255.255.255.0)00000000111111111111111111111111

230

Masking

To find network or subnetwork address, apply (perform AND) the mask to the IP address

231

L'adresse 193.112.2.166 avec le masque 255.255.255.128 désigne la machine numéro 38 du réseau 193.112.2.128 qui s'étend de 193.112.2.129 à

193.112.2.254 (plage de 126 adresses). Les adresses ont été converties en base 2 :

232

233

CIDR notation• CIDR: Classless Inter-Domain Routing

• CIDR notation uses slash notation followed by the size of the mask in decimal

example: 128.10.0.0/16

• CIDR maskThe mask tells you which bits count– Suppose 10.10.9.3 wants to send to 10.10.10.9

• Are we on the same network?• That depends on the mask

– If we are 10.10.10.10/24, then no– If we are 10.10.10.10/22, then yes

234

Subnet Mask Conversions

/1 128.0.0.0/2 192.0.0.0/3 224.0.0.0/4 240.0.0.0/5 248.0.0.0/6 252.0.0.0/7 254.0.0.0/8 255.0.0.0/9 255.128.0.0/10 255.192.0.0/11 255.224.0.0/12 255.240.0.0/13 255.248.0.0/14 255.252.0.0/15 255.254.0.0/16 255.255.0.0

/17 255.255.128.0/18 255.255.192.0/19 255.255.224.0/20 255.255.240.0 /21 255.255.248.0/22 255.255.252.0/23 255.255.254.0/24 255.255.255.0/25 255.255.255.128/26 255.255.255.192/27 255.255.255.224/28 255.255.255.240/29 255.255.255.248/30 255.255.255.252/31 255.255.255.254/32 255.255.255.255

PrefixLength

Subnet Mask PrefixLength

Subnet Mask

128 1000 0000 192 1100 0000 224 1110 0000 240 1111 0000 248 1111 1000 252 1111 1100 254 1111 1110 255 1111 1111

Decimal Octet Binary Number

235

Summary on IP addressing

• Virtual network needs uniform addressing scheme, independent of hardware

• IP address:– 32-bit number– 5 classes: A, B, C, D, E– specifies a connection between a computer

and a network– Dotted decimal notation and CIDR notation– Some special IP addresses

236

Network Layer

237

Network Layer

• Handles the movement of packet around the network

• Routing of packets

• Internet Protocol

238

ARP

• Address resolution protocol

• Convert IP address to MAC address.

• Before sending IP datagram, host boardcast ARP request into network

• Other host that receive ARP request will check whether its address.

• If yes, sending ARP reply

239

ICMP

• Internet Control Message Protocol

• Communicate error message and other conditions

• Packed in IP frame, sent as general IP frame

• If ICMP packet errors, host must not generate other ICMP packet

240

Ping Program

• Packet InterNet Groper

• Test whether another host is reachable

• Use ICMP

• Implemented by raw socket

241

IP Routing

• IP routing protocols are dynamic. Dynamic routing calls for routes to be calculated automatically at regular intervals by software in routing devices. This contrasts with static routing, where routers are established by the network administrator and do not change until the network administrator changes them.

• An IP routing table, which consists of destination address/next hop pairs, is used to enable dynamic routing. An entry in this table, for example, would be interpreted as follows: to get to network 172.31.0.0, send the packet out Ethernet interface 0 (E0).

242

243

244

245

246

247

248

249

250

251

252Sofiane.ouni@insat.rnu.tnSofiane_ouni@yahoo.fr

253

254

255

256

257

258

259

260

261

Transport layer

262

Transport layer

• Provides a flow of data between two hosts.

• Two vastly different transport protocol– UDP– TCP

263

UDP

• User Datagram Protocol

• Simple, datagram-oriented, transport layer protocol.

• No reliability

264

UDP

265

TCP

• Transmission Control Protocol

• Use same network layer as UDP

• Connection-oriented, reliable, byte stream service– Sliding Window

266

TCP : Transmission Control Protocol

• Connection based communication

• Uses the IP layer service

• Provides reliable service

• Enables distinguishing among multiple destinations within a host computer

267

TCP - Transmission Control Protocol• TCP is the protocol layer responsible for making sure that the commands and messages are

transmitted reliably from one application program running on a machine to another one on the other machine

• A message is transmitted and then a positive acknowledgement is being waited for If the positive acknowledgement does not arrive in a certain period of time, the message is retransmitted

• Messages are numbered in sequence so that no one is being lost or duplicated;

Messages are delivered at the destination in the same order they were sent by the source• If the text of a mail is too large, the TCP protocol will split it into several fragments called

“datagrams” and it makes sure that all the datagrams arrive correctly at the other end where they are reassembled into the original message

• TCP can be viewed as forming a library of routines that many applications can use when they need reliable network communication with an application on another computer

• TCP provides also flow control and congestion control

268

TCP Protocol Format

269

TCP

270

TCP Protocol Format

Source Port Destination Port

Sequence Number

Acknowledgment Number

Checksum (16) Urgent Pointer

Options(If any) Padding

Data (variable length) 0 4 10 16 24 31

Offset Reserv Flags(6) Window (16 bits)

271

• Source/Dest port: TCP port numbers to ID applications at both ends of connection

• Sequence number: ID position in sender’s byte stream

• Acknowledgement: identifies the number of the byte the sender of this segment expects to receive next

• Hlen: specifies the length of the segment header in 32 bit multiples. If there are no options, the Hlen = 5 (20 bytes)

• Reserved for future use, set to 0

• Code: used to determine segment purpose, e.g. SYN, ACK, FIN, URG

272

• Window: Advertises how much data this station is willing to accept. Can depend on buffer space remaining.

• Checksum: Verifies the integrity of the TCP header and data. It is mandatory.

• Urgent pointer: used with the URG flag to indicate where the urgent data starts in the data stream. Typically used with a file transfer abort during FTP or when pressing an interrupt key in telnet.

• Options: used for window scaling, SACK, timestamps, maximum segment size etc.

273

274

Establishing and closing TCP Connections

Close

timeSYN

ACK

SYN+ACK

Open

FIN

ACK

ACK

FIN

275

276

277

Send pkt 1Start timer

ACK normallyarrives

Rcv ACK 1

Network messages

Pkt should arrive

Rcv pkt 1Send ACK 1

ACK should be sent

Sender site Receiver siteLoss

Timer expiresRetransmit pkt 1 start timer

TCP – simple lost packet recovery

278

279

280

Sliding Windows

Positiveacknowledgmentwith retransmission

Sliding windowtransmission

time

segment 1

segment 2ack1

ack2

segments

acks 1 2 3 4

1 2 3 4

281

282

TCP flow control• Windows vary over time

– Receiver advertises (in ACKs) how many it can receive

• Based on buffers etc. available

– Sender adjusts its window to match advertisement– If receiver buffers fill, it sends smaller adverts

• Used to match buffer requirements of receiver

• Also used to address congestion control (e.g. in intermediate routers)

283

Well-known TCP ports

21 - FTP server

23 - telnet server

25 - SMTP mail server

53 - domain nameserver

109 - POP2 server

110 - POP3 server

284

285

Flow using Streams (TCP)

Server

socket()

bind()

listen()

accept()

send()/recv()

closesocket()

Client

connect()

send()/recv()

closesocket()

socket()

286

287

Internet application Layer

288

DNS

• Domain Name System

• Distributed database

• Map between hostnames and IP addresses

• Electronic mail routing information

289

Others Protocol

• TFTP

• Telnet

• FTP

• SMTP

• SNMP

• HTTP

SSHDHCPPOPNFSNIS

290

Something required to connect

• IP address• Netmask• Network ID• Boardcast• Default gateway• DNS• DHCP• WINS

291

www.storrconsulting.com

Network - Intranet / Internet

LAN Server

Internet

Web Server

Software:- Proxy Server- Cache Server- Gateway Server- Firewall Server- Router- Switch

Recommended