Vous êtes sur la page 1sur 43

Network Fundamentals

http://c2.touta.in/?page id=513 for discussion and exercises

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

Introduction Basic architecture Protocols OSI Architectural Reference Model

Concepts Datagram

Slide 2 Page 2

Laurent Toutain

RES 1

Introduction

Basic architecture

How to get this?


Introduction Basic architecture

Enter the name of the site http://cours.touta.in

Slide 4 Page 4

Laurent Toutain

RES 1

In more details
Introduction Basic architecture

Client

Server

want this page

mation r o f in e g a P

Slide 5 Page 5

Laurent Toutain

RES 1

In more, more details


Introduction Basic architecture

Client Resolver Router


Want IP add ress of cours .tout a.in
192.108. 119.138

Router

Router

Server

Find next hop

Not always the same return path

want this pa ge to 192.108. 11 9.138

want this pa ge to 192.108. 119.

want. . . 138 to 192. ...

want this pa ge to 192.108. 119.138

cut in several messages

Slide 6 Page 6

Laurent Toutain

RES 1

Main principles
Introduction Basic architecture

Client Resolver Router


Want IP add ress of cours .tout a.in

Router

Router

Server

Communication with other devices

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

Divide and Conquer, Find similarity Consider Blackboxes

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

???????

... ml > < ht

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

See RFC 2616

Want page /

???????

Want page /

... ml > < ht

???????

... ml > < ht

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

OSI Architectural Reference Model

Open System Interconnection Reference Model


Introduction OSI Architectural Reference Model

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.

This is not an implementation model


Slide 14 Page 14

Laurent Toutain

RES 1

ISO Reference Model


Introduction OSI Architectural Reference Model

radio 3 111010101011111 5

Application
100 111 00 copp

radio 1010 co 1110 01 1111 pp 0011 00 e r 01 00 01 01 1

Presentation Session Transport


1

110

6
o 10 di 00 ra 11 10 10 01 11 01

10

Network Data Link Physical

radio

op
2

al tic 10

optica
11

l0010

1111 01010

1 11100 10111

Slide 15 Page 15

Laurent Toutain

RES 1

ISO Reference Model


Introduction OSI Architectural Reference Model

ARQ 3 110010101010101

Application
1 ARQ 000

Hybr id 10 1010101 0111 10 10 1001 10 10 1 10 10 10 10 10 0 10 0

Presentation Session Transport


1

110

ARQ

10

10

Network Data Link Physical

ARQ 0010 FEC 11001 01011 10101

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

o 001 010 101 010

- Transform Binary sig0001 0111 0101 01 nal into Physical signal - Clock Synchronization
1011
110 opt l ica 110 0 101

copp

er

er

er copp 001 0101 0101 0001

001

radi

010 100 010 100

opt l ica 0 Q AR 0 101 101

1 10

0001 0101 FEC 001 0101

01 01

C FE 10 10 10

10

ISO Reference Model


Introduction OSI Architectural Reference Model

Application Presentation Session Transport


1

- copy PDU from link to link until destination - Addresses are needed to identify equipments
6

Network
4 7

Data Link Physical


2

Slide 15 Page 17

Laurent Toutain

RES 1

ISO Reference Model


Introduction OSI Architectural Reference Model

Application Presentation Session Transport


1

5 errors introCorrect duced by Network: - Reordering - Packet losses recovery - Congestions 6 control

Network
4 7

Data Link Physical


2

Slide 15 Page 18

Laurent Toutain

RES 1

ISO Reference Model


Introduction OSI Architectural Reference Model

Applications protocol (database, le 5 transfert, remote login, web...)

Application Presentation Session Transport


1 Negociate common format representation between both ends 8

6 In connection oriented network, may be used to re-establish connections and restart transfer from synchronization points

Network
4 7

Data Link Physical


2

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:

UN with ISO, France with AFNOR IEEE, IETF, For, . . .


Laurent Toutain RES 1

Vendors

Slide 17 Page 21

Telecommunication
Standardization bodies

Cross road of dierent sectors. Transmission- International Telecommunication Union:


-- --- - -- --- - 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

Local Computer Communications - IEEE

Regular standardization: International Standard Organization


Internet - IETF

Telephony - ETSI / 3GPP


Slide 18 Page 22

How to access standards ?


Standardization bodies

ITU: Letter . Number

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: P series (see LAN/MAN


) and P802 for

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

How to access standards ?


Standardization bodies

IETF: RFC number


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.

ETSI: ETSI Technical Specication (TS) or Technical Report (TR) wg.number

Slide 20 Page 24

Laurent Toutain

RES 1

OSI Reference Model

Open System Interconnection Reference Model


OSI Reference Model

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.

This is not an implementation model


Slide 22 Page 26

Laurent Toutain

RES 1

OSI Reference Model

Layer 1: Physical

ISO Reference Model


OSI Reference Model Layer 1: Physical

radio 3 110010101010101 111010101011111 5

Application
111 00 1 copp 000 1

radio 1010 co 11 0101 11 0 1110 pp 00 011 10 e r 11 0 00 10 11 0 00 11 01 0

Presentation Session Transport


1

001

110

o radi
ra di 1 00 1 o 10 10 00 11 10 10 1

10

Network Data Link Physical

radio

op
2

al tic 10

optica
11

l0010

01 011 11 01010

001 01111 011

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

opt ica l 0 101

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)

more generally: includes the way the information is coded.


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

Need to transform binary sequence

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

Baseband: Example Wi-Fi


OSI Reference Model Layer 1: Physical

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

2.4 GHz 22 MHz

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

20 MHz 52 sub carriers Slide 28 Page 32 Laurent Toutain RES 1

OSI Reference Model

Layer 2: Link Layer

ISO Reference Model


OSI Reference Model Layer 2: Link Layer

ARQ 3 111010101011111 110010101010101

Application
0 1 ARQ 100 0

Hybr id 10 101010 1 1 0111 00 1 10 11 1001 00 10 1 00 1 1 11 0 00 10 00 1 0 11 00 10 1

Presentation Session Transport


1

110

ARQ

10

10

Network Data Link Physical

ARQ 0010 FEC 001 11111 11010 110 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

0001 0101 FEC 001 0101

01 0 11 0

C FE 00 11 10 10

10

010 100

Q AR 0

101

ARQ: Automatic Repeat-reQuest


OSI Reference Model Layer 2: Link Layer

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.

A cook send the recipe through the postal network to a student.

What are the properties of Postal Network ?

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

OSI Reference Model

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

Cyclic Redondancy Check


OSI Reference Model CRC

use modulo 2 arithmetic:


+ 0 1 0 0 1 1 1 0 0 1 0 0 1 1 1 0

Based on polynomial division A binary value can be represented as a polynom


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

All devices uses a well-known generating polynom usually call G (x )

Slide 35 Page 40

Laurent Toutain

RES 1

CRC: Algorithm
OSI Reference Model CRC

1. Initial sequence I (x ) 2. Multiply by x r where r is the highest degree in G (x )

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

CRC: Example (reception)


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 x 17 + x 15 x 16 + x 13 + x 10 + x 7 + x 6 + x 5 + x 2 +x x 16 + x 14 x 14 + x 13 + x 10 + x 7 + x 6 + x 5 + x 2 +x x 14 + x 12

x 15 + x 14 + x 12 + x 11 + x 10 + x 9 + x 7 + x 4 + x 3 + x 2 + x

x 13 + x 12 + x 10 + x 7 + x 6 + x 5 + x 2 +x x 13 + x 11 x 12 + x 11 + x 10 + x 7 + x 6 + x 5 + x 2 +x x 12 + x 10 x 11 + x 7 + x 6 + x 5 + x 2 +x x 11 + x 9 x 9 + x 7 + x 6 + x 5 + x 2 +x x9 + x7 x 6 + x 5 + x 2 +x x6 + x4 x 5 + x 4 + x 2 +x x5 + x3 x 4 + x 3 + x 2 +x x4 + x2 x 3 +x x3 + x 0 Slide 38 Page 43 Laurent Toutain RES 1

CRC: Example (reception)


OSI Reference Model CRC 0 1 1 1 0 1 1 0 1 1 0 0 1 1 0 1 1 1 1 0 1 1 0 0 1 0 0 1 1 1 0 0 1 0 0 0 0 1 0 0 1 1 1 0 0 1 0 0 0 1 1 0 1 1 0 1 0 0 1 1 1 0 0 1 0 0 0 1 1 0 1 1 1 0 0 1 1 1 0 0 1 0 0 1 0 0 1 0 0 0 0 1 1 0 1 0 1 1 1 0 0 1 0 0 1 1 1 0 0 1 0 0 1 1 1 0 1 1 1 0 1 0 1 1 1 1 0 1 1 0 1 0 0 0 1 0 0 0 1 1 0 1 1 1 0 0 1 0 0 1 0 0 0 0 1 1 0 Room for CRC

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

OSI Reference Model

Send and Wait Protocol

Send & Wait


OSI Reference Model Send and Wait Protocol

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

Send & Wait


OSI Reference Model Send and Wait Protocol

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

Send & Wait


OSI Reference Model Send and Wait Protocol

Dat

a re ques t

data fra me 0 error me Ack fra


Wrong CRC rejected

Data

Indic a

tion

data fra me 0 me Ack fra

Dat a re ques t

Timer

data fra me 1 me Ack fra

Data

Indic a

tion

Slide 43 Page 48

Laurent Toutain

RES 1

Send & Wait (Timer underestimated)


OSI Reference Model Send and Wait Protocol

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

data fra error data me 0 fram e1 Ack data fram e

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

Data Request Send Data PDU 0 trigger Timer

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

Ack0 stop Timer delete PDU

State 1
RES 1

Slide 46 Page 51

Laurent Toutain

Formalization
OSI Reference Model Send and Wait Protocol

Event/State Data Request

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

Dene a PDU format for 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

OSI Reference Model

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

HDLC Frame Format


OSI Reference Model HDLC 1 Byte 1 Byte 1 Byte x Byte 2 Byte 1 Byte

Flag

Addr.

Control

Data

CRC

Flag

8 P N(R) 0 N(S) F

8 11 11 P 11 00 P 100 010 110 000 SABM DISC UA DISC

P N(R) RR F P N(R) 10 01 REJ F P N(R) 10 10 RNR F 10 00

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

Connection lasts as long as devices are up

DISC UA

DISConnect: close connection

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

Acknowledgements are cumulative (here one for 4 frames)

Slide 56 Page 61

Laurent Toutain

RES 1

Supervision Frame : RR (Receiver Ready)


OSI Reference Model HDLC I, 0, 0

RR,1

If receiver has no information to send, it can use RR frames instead.

I, I, I, I,

1, 2, 3, 4,

1 1 1 1 RR,5

Slide 57 Page 62

Laurent Toutain

RES 1

Supervision Frame : REJ (Reject)


OSI Reference Model HDLC I, 0, 0 I, 1, 0 REJ, 0 I, 0, 0,P RR, 1, F I, 1,0 Bit P is specied in the frame to indicate to the other side that no optimization should be done and the Ack must be sent immediately. With REJ receiver does not memorize out of sequence frames, sender must resend them. Receiver expected frame I,0,x and received I,1,0, so the sequence number is not correct Rightarrow Send immediately a REJ frame giving the expected frame number.

Slide 58 Page 63

Laurent Toutain

RES 1

REJ = NAK
OSI Reference Model HDLC I, 0, 0

RR, 1

I, 0, 0, P REJ, 1, F Positive acknowledgement.

Slide 59 Page 64

Laurent Toutain

RES 1

Complete the exchange


OSI Reference Model HDLC I, I 0, 0 I I I I I I I I I

error I

R I I I I I I I I RR, 5 Slide 60 Page 65 Laurent Toutain RES 1

Complete the exchange


OSI Reference Model HDLC Host Network Analyzer Dir T R R T R R T ... T T Len. 2 2 7 7 2 2 2 ... 2 13 add 01 01 03 01 03 01 03 ... 03 01 ctrl 3F 73 00 00 31 21 21 ... 31 22 data desa SABM UA I00 I00 RR 1pf RR 1 RR 1 ... RR 1pf I11 Network

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

OSI Reference Model

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

cons: too much links, dicult to add a new agency

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

How to establish communication


OSI Reference Model Layer 3: Network

preset some period of time for communication, for instance for 0200 to 0300 communication from Lille to Nice

not very exible, loose bandwidth if no data to send.

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

Store and Forward

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

Store and Forward: other view


OSI Reference Model Layer 3: Network
Transmission delay: proportional to message size lille

paris

delayed by other messages

rennes

poitier

toulouse

marseille

nice

Slide 66 Page 73

Laurent Toutain

RES 1

Store and Forward: other view


OSI Reference Model Layer 3: Network

What happens if infrastructure speed is doubled ?


Transmission delay: proportional to message size lille

paris

Reduce delays, increase fairness

rennes

poitier

toulouse

Tx speed multiplied by a 10 factor

marseille

nice

Slide 67 Page 74

Laurent Toutain

RES 1

Store and Forward: other view


OSI Reference Model Layer 3: Network

messages are not bounded


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

Solution: limit the message size

Slide 68 Page 75

Laurent Toutain

RES 1

Store and Forward: Increase propagation speed


OSI Reference Model Layer 3: Network
Transmission delay: proportional to message size lille

paris

rennes

poitier

toulouse

marseille

nice

Slide 69 Page 76

Laurent Toutain

RES 1

Store and Forward: Increase fairness


OSI Reference Model Layer 3: Network

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

OSI Reference Model

Connection oriented vs Datagram

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.

this is called a Virtual Circuit


Slide 74 Page 81 Laurent Toutain RES 1

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

IP must facilitate network interconnection

Avoid ambiguities on addresses

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

Destination Address Processing


Concepts Datagram

IPv4 Header

The destination address must be easily accessible: Fixed location Fixed size Aligment in memory

Source Address Destination Address

Data

RFC 791 (Sept 1981)


Addresses are fixed length of four octets (32 bits)

Slide 78 Page 85

Laurent Toutain

RES 1

Vous aimerez peut-être aussi