etsf15: lecture 3 physical propagation media -network

42
ETSF15: Lecture 3 - Physical propagation media - Network structures & Performance - L2 Flow and Error Control - Framing Jens A Andersson

Upload: others

Post on 10-Jan-2022

1 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: ETSF15: Lecture 3 Physical propagation media -Network

ETSF15: Lecture 3- Physical propagation media- Network structures & Performance- L2 Flow and Error Control

- Framing

Jens A Andersson

Page 2: ETSF15: Lecture 3 Physical propagation media -Network

Example of propagation media

Glass optic fibre FTTH, GPON

Metal coaxial, twisted pair Ethernet, xDSL

Electromagnetic fields mobile/cellular, “ethernet over radio”, light WiFi, Bluetooth, IrDA, WiMAX Free Space Optical (FSO)

2

Page 3: ETSF15: Lecture 3 Physical propagation media -Network

3

Network structures

LANLAN

LANLAN

MAN

WANWAN

LAN LANAccess

Core/Backbone

WAN = WideMAN = MetropolitanLAN = Local

Page 4: ETSF15: Lecture 3 Physical propagation media -Network

Network structures (cont …)

Not very well defined … A local backbone can be seen as core in another

context The ISP’s access network stops at the CPE. This is

were your own access netwwork terminates.(CPE = Customer Premises Equipment)

4

Page 5: ETSF15: Lecture 3 Physical propagation media -Network

Link/Channel User Modes Simplex

Signals possible only in one direction Broadcast Radio/TV

Half DuplexSignals possible in both directions but only one at a time

Ch 16 VHF, Comm radio

Full DuplexSignals possible in both directions simultaniously

VHF traffic channels, Full duplex Ethernet• Two half duplex channels

POTS analog links 5

Page 6: ETSF15: Lecture 3 Physical propagation media -Network

Reach Limitations Dampening Noise Cross talk/Interferance Dispersion

Intermodal: Modes take different pathWavelength: Wavelengths have different propagation

speed

Enter: Repeater!Regenerates signal

6

Page 7: ETSF15: Lecture 3 Physical propagation media -Network

Modal dispersion

7

Page 8: ETSF15: Lecture 3 Physical propagation media -Network

Performance: data rate and reach 10BASE5: 10 Mb/s, max 500 m 1000BASE-T: 1000 Mb/s, max 100 m 1000BASE-LX10: 1000Mb/s, max 10 km (SM) ADSL2+: 24 Mb/s downstream,

reach <5km VDSL2: 50 Mb/s downstream,

reach <500m WiFi 802.11n: >72 Mb/s (MIMO),

reach indoor 70m, outdoor 250m 4G: 100Mb/s (mobile) 1Gb/s (stationary)

8

Page 9: ETSF15: Lecture 3 Physical propagation media -Network

Error controlFind errors in transmitted data?

9

for all t?

Use more than one channel, compare received y1, y2, y3 …

Page 10: ETSF15: Lecture 3 Physical propagation media -Network

L2: Error control

Solution: Frames/Packets!

Finite number of bits per frame Add extra bits to each frame:

Parity bitCRC: Cyclic Redundancy Check

10

Page 11: ETSF15: Lecture 3 Physical propagation media -Network

Error detection process

11

Page 12: ETSF15: Lecture 3 Physical propagation media -Network

Parity bit

Sender adds one bit to vectorEven parity: even number of 1s in new vectorOdd parity: odd number of 1s in new vector

12

10011100 + 0 = 100111000

Page 13: ETSF15: Lecture 3 Physical propagation media -Network

Modula 2 Arithmetic

13

0 10 0 11 1 0

0 10 0 01 0 1

Page 14: ETSF15: Lecture 3 Physical propagation media -Network

Polynom represents vector

14

Page 15: ETSF15: Lecture 3 Physical propagation media -Network

Adding ’parity’ bits

Add bits giving a codeword of length :

Codeword:

15

Page 16: ETSF15: Lecture 3 Physical propagation media -Network

Find r(x)

Use generator polynomial:

Note:

16

Page 17: ETSF15: Lecture 3 Physical propagation media -Network

Theorem

A polynomial with is a codeword if and only if .

= c(x) is a multiple of g(x)

17

Page 18: ETSF15: Lecture 3 Physical propagation media -Network

At the receiver side

Received codeword:

Calculate syndrome of received vector:

=0 (see Theorem) 0 transmission OK!

18

Page 19: ETSF15: Lecture 3 Physical propagation media -Network

CRC block diagram

19

Page 20: ETSF15: Lecture 3 Physical propagation media -Network

CRC division in the digital domain

20

Page 21: ETSF15: Lecture 3 Physical propagation media -Network

L2: Flow control Idea: Assume error free

transmission Allow frames to be

sent until ACK for first frame is expected = RTT

Check RTT duringtransmission

Intro: Sliding window

RTT

RTT = Round Trip Time

Page 22: ETSF15: Lecture 3 Physical propagation media -Network

Sliding window

22

Buffer Pointers

Page 23: ETSF15: Lecture 3 Physical propagation media -Network

L2: Error correction

Forward Error Correction: Add extra bits so a limited number of errors can be fixedCostlyWhat to do with errors that can be detected but not

fixed?

RetransmitAutomatic Repeat reQuest ARQ

23

Page 24: ETSF15: Lecture 3 Physical propagation media -Network

ARQ All sent frame has to be acknowledged (ACK)

before sending next frame(s) Three versions:

Stop-And-WaitGo-Back-NSelective-Repeate

Use the Sliding WindowSender keeps track of sent and ACKed framesReceiver keeps track of received frames

24

Page 25: ETSF15: Lecture 3 Physical propagation media -Network

Stop-and-Wait Normal operation

Note! Sequence numbers Sliding Window size

= 1 frame

Page 26: ETSF15: Lecture 3 Physical propagation media -Network

Stop-and-Wait ARQ, frame lost

Page 27: ETSF15: Lecture 3 Physical propagation media -Network

Stop-and-Wait ARQ, lost ACK frame

Explainingthe need for SEQ num

Page 28: ETSF15: Lecture 3 Physical propagation media -Network

Sender Sliding Window

28

0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1… …

0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1… …

Before sliding

After sliding on frame

ACKs movethis pointer Sent frames move this pointer if

actual win size max win size

Page 29: ETSF15: Lecture 3 Physical propagation media -Network

Go-Back-N

Increase sliding window sizeSender can send as long as the sliding window includes

frames not sentRetransmitt requested frames and all following framesMake use of the Round Trip Time (RTT)

Time it takes for one frame to reach receiver and for ACK toreache sender

29

Page 30: ETSF15: Lecture 3 Physical propagation media -Network

Go-Back-N: Sender sliding window

ACKs movethis pointer

Sent frames move this pointer ifactual win size max win size

Page 31: ETSF15: Lecture 3 Physical propagation media -Network

Go-Back-N ARQ, normal operation

Page 32: ETSF15: Lecture 3 Physical propagation media -Network

Go-Back-N ARQ, frames lost

Page 33: ETSF15: Lecture 3 Physical propagation media -Network

Selective-Repeate

Same as Go-Back-N but Retransmitt only requested frames More efficienent regarding network utilisation Higher demands on receiver and sender

Receiver must have bigger buffer

33

Page 34: ETSF15: Lecture 3 Physical propagation media -Network

Selective Repeat ARQ, lost frame

Note receiverslidingwindow size

Page 35: ETSF15: Lecture 3 Physical propagation media -Network

Some notes

Piggy backingData and ACKs can share frame

The number of bits for the sequenze number is a function of the max window sizeSeq numbers wrap!

35

Page 36: ETSF15: Lecture 3 Physical propagation media -Network

Window size for Go-Back-N ARQ

Page 37: ETSF15: Lecture 3 Physical propagation media -Network

Selective Repeat ARQ, window size

Page 38: ETSF15: Lecture 3 Physical propagation media -Network

Framing

Header:Sequence and ACK numbersMore to come …

TailCRC

38

TailData (payload)Header

Page 39: ETSF15: Lecture 3 Physical propagation media -Network

Synchronisation

Receiver has to synch to signal of a frame

39

FramePreamble and start flag End flag

RS.232/V.24

Ethernet

Page 40: ETSF15: Lecture 3 Physical propagation media -Network

Finding the start flag

Corrolate incoming bit pattern with know flag If end flag we have a problem

What if the end flag bit patterns = data bit pattern?

40

Page 41: ETSF15: Lecture 3 Physical propagation media -Network

Bit stuffing Given: Flag = 01111110 Task: Avoid 6 consecutive bits = 1 in payload Solution:

Sender: In payload add a 0 after 5 consecutive bits = 1Receiver: Remove bit following 5 consecutive bits = 1

41

011111101111100111000111111

011111010111110001110001111101

Page 42: ETSF15: Lecture 3 Physical propagation media -Network

42

One link layer protocol: HDLC

HDLC = High-level Data Link Control

flag address controll payload CRC flag

16 or 32 bits CRCGo-back-N or Selective-repeat ARQ

Flag = 01111110