Direct Link Networks Guevara Noubir CS 4700 & CS - - PowerPoint PPT Presentation

direct link networks
SMART_READER_LITE
LIVE PREVIEW

Direct Link Networks Guevara Noubir CS 4700 & CS - - PowerPoint PPT Presentation

Direct Link Networks Guevara Noubir CS 4700 & CS 5700 Textbook: Computer Networks: A Systems Approach, L. Peterson, B. Davie, Morgan Kaufmann Chapter 2. Fundamentals of Computer Networks Direct


slide-1
SLIDE 1

Direct ¡Link ¡Networks ¡

Guevara ¡Noubir ¡ CS ¡4700 ¡& ¡CS ¡5700 ¡

Fundamentals of Computer Networks Direct Link Networks

Textbook: Computer Networks: A Systems Approach,

  • L. Peterson, B. Davie, Morgan Kaufmann

Chapter 2.

1

slide-2
SLIDE 2

Lecture ¡Outline ¡

  • Physical ¡Layer ¡

– Links, ¡Capacity, ¡Encoding ¡

  • Link ¡Layer ¡

– Framing ¡ – Error ¡DetecGon ¡ – Error ¡recovery ¡-­‑ ¡Sliding ¡Window ¡Algorithm ¡ – Medium ¡Access ¡Control ¡

  • ExisGng ¡protocols: ¡Ethernet, ¡Token ¡Rings, ¡WiFi ¡

Fundamentals of Computer Networks Direct Link Networks 2

slide-3
SLIDE 3

Link ¡Technologies ¡

  • Propagate ¡signals, ¡technology ¡is ¡conGnuously ¡evolving… ¡
  • Cables: ¡ ¡

– Cat ¡5 ¡twisted ¡pair, ¡10-­‑100 ¡Mbps, ¡100m ¡ – Cat ¡6 ¡twisted ¡pair, ¡1-­‑10 ¡Gbps, ¡-­‑ ¡100m ¡ – Thin-­‑net ¡coax, ¡10-­‑100 ¡Mbps, ¡200m ¡ – Thick-­‑net ¡coax, ¡10-­‑100 ¡Mbps, ¡500m ¡ – MulGmode ¡fiber, ¡100 ¡Mbps ¡– ¡10 ¡Gbps, ¡ ¡-­‑ ¡2km ¡ – Single-­‑mode ¡fiber, ¡0.1-­‑10 ¡Gbps, ¡-­‑ ¡40km ¡

  • Leased ¡Lines: ¡

– Copper ¡based: ¡T1 ¡(1.544Mbps), ¡T3 ¡(44.736Mbps) ¡ – OpGcal ¡fiber: ¡STS-­‑1 ¡(51.84Mbps), ¡STS-­‑N ¡(N*51.84Mbps) ¡

  • Last-­‑Mile ¡Links: ¡

– POTS ¡(56Kbps), ¡ISDN ¡(2*64Kbps) ¡ – xDSL: ¡ADSL ¡(16-­‑640Kbps, ¡1.554-­‑8.448Mbps), ¡VDSL ¡(12.96Mbps-­‑55.2Mbps) ¡ – DOCSIS ¡(cable): ¡250 ¡Mbps ¡downstream, ¡20Mbps ¡upstream ¡ – ¡Fiber ¡to ¡the ¡home: ¡50Mbps ¡– ¡10Gbps ¡ – Powerline: ¡homeplug ¡AV2 ¡500Mbps ¡

  • Wireless ¡Links: ¡Cellular, ¡WLAN, ¡Satellite ¡

Fundamentals of Computer Networks Direct Link Networks 3

slide-4
SLIDE 4

Link ¡Capacity ¡

  • Shannon ¡Capacity ¡Theorem ¡

– Input ¡x, ¡output ¡y, ¡and ¡memoryless ¡channel ¡probability ¡transiGon ¡ funcGon ¡p(y|x) ¡ – Capacity ¡is ¡max ¡mutual ¡informaGon ¡between ¡X ¡and ¡Y ¡over ¡all ¡possible ¡ distribuGons ¡of ¡x ¡

  • Case ¡of ¡AddiGve ¡White ¡Gaussian ¡Noise ¡(AWGN) ¡channel: ¡

– C ¡= ¡B*log(1+S/N) ¡ – S: ¡signal ¡power, ¡N: ¡noise ¡power, ¡B: ¡frequency ¡bandwidth, ¡C: ¡capacity ¡

  • Example ¡of ¡telephone ¡line ¡

– B ¡= ¡3,300 ¡– ¡300 ¡Hz ¡= ¡3,000 ¡Hz; ¡ ¡ – S/N ¡= ¡1,000 ¡also ¡wrilen ¡as ¡30dB ¡ – C ¡= ¡30 ¡Kbps ¡

Fundamentals of Computer Networks Direct Link Networks

C = maxI(X;Y)

p(x)

I(X;Y) = H(Y) − H(Y | X) H(X) = − p(x)log2 p(x)

x

4

slide-5
SLIDE 5

Encoding ¡

  • Signals ¡propagate ¡over ¡a ¡physical ¡medium ¡

– Modulate ¡electromagneGc ¡waves ¡ – e.g., ¡vary ¡voltage ¡

  • Encode ¡binary ¡data ¡onto ¡signals ¡

– e.g., ¡0 ¡as ¡low ¡signal ¡and ¡1 ¡as ¡high ¡signal ¡ – known ¡as ¡Non-­‑Return ¡to ¡zero ¡(NRZ) ¡

Fundamentals of Computer Networks Direct Link Networks

Bits NRZ 0 0 1 0 1 1 1 1 0 1 0 0 0 0 1 0

5

slide-6
SLIDE 6

Problem: ¡ConsecuGve ¡1s ¡or ¡0s ¡

  • Low ¡signal ¡(0) ¡may ¡be ¡interpreted ¡as ¡no ¡signal ¡
  • High ¡signal ¡(1) ¡leads ¡to ¡baseline ¡wander ¡

– Receiver ¡compares ¡rx_signal ¡to ¡avg_signal ¡

  • Unable ¡to ¡recover ¡clock ¡

Fundamentals of Computer Networks Direct Link Networks 6

slide-7
SLIDE 7

AlternaGve ¡Encodings ¡

  • Non-­‑return ¡to ¡Zero ¡Inverted ¡(NRZI) ¡

– Make ¡a ¡transiGon ¡from ¡current ¡signal ¡to ¡encode ¡ a ¡one; ¡stay ¡at ¡current ¡signal ¡to ¡encode ¡a ¡zero ¡ – Solves ¡the ¡problem ¡of ¡consecuGve ¡ones ¡

  • Manchester ¡

– Transmit ¡XOR ¡of ¡the ¡NRZ ¡encoded ¡data ¡and ¡the ¡ clock ¡ – Only ¡50% ¡efficient! ¡

Fundamentals of Computer Networks Direct Link Networks 7

slide-8
SLIDE 8

Encodings ¡(cont) ¡

Fundamentals of Computer Networks Direct Link Networks

Bits NRZ Clock Manchester NRZI 0 0 1 0 1 1 1 1 0 1 0 0 0 0 1 0

8

slide-9
SLIDE 9

Encodings ¡(cont) ¡

  • 4B/5B ¡

– Every ¡4 ¡bits ¡of ¡data ¡encoded ¡in ¡a ¡5-­‑bit ¡code ¡ – 5-­‑bit ¡codes ¡selected ¡to ¡have ¡no ¡more ¡than ¡one ¡leading ¡0 ¡ and ¡no ¡more ¡than ¡two ¡trailing ¡0s ¡ ¡ – Thus, ¡ ¡never ¡get ¡more ¡than ¡three ¡consecuGve ¡0s ¡ – ResulGng ¡5-­‑bit ¡codes ¡are ¡transmiled ¡using ¡NRZI ¡ ¡ – Achieves ¡80% ¡efficiency ¡

  • 8B/10B: ¡used ¡in ¡Gigabit ¡Ethernet ¡

Fundamentals of Computer Networks Direct Link Networks

4b data 5b code 4b data 5b code 0000 11110 1000 10010 0001 01001 1001 10011 0010 10100 1010 10110 0011 01010 1011 10111 0100 01011 1100 11010 0101 01110 1101 11011 0110 10010 1110 11100 0111 10011 1111 11101

9

slide-10
SLIDE 10

Framing ¡

  • The ¡physical ¡layer ¡provide ¡a ¡mean ¡to ¡transmit ¡a ¡sequence ¡
  • f ¡bits ¡ ¡
  • How ¡can ¡one ¡determine ¡the ¡beginning/end ¡of ¡a ¡frame? ¡
  • SoluGons: ¡

– Character-­‑based ¡framing ¡(use ¡special ¡control ¡characters) ¡ – Bit-­‑oriented ¡framing ¡with ¡flags ¡ – Length ¡counts ¡ – Clock ¡based ¡

Fundamentals of Computer Networks Direct Link Networks 10

slide-11
SLIDE 11

Character ¡Based ¡Framing ¡

  • BISYNC: ¡BInary ¡SYNchronous ¡CommunicaGon ¡

– SYN: ¡Synchronous ¡idle, ¡SOH: ¡Start ¡of ¡Header, ¡STX: ¡Start ¡of ¡text, ¡ETX: ¡End ¡of ¡text ¡

  • Problem: ¡ ¡

– If ¡control ¡characters ¡appear ¡within ¡the ¡header, ¡or ¡CRC: ¡

  • these ¡are ¡known ¡locaGon, ¡one ¡can ¡skip ¡control ¡characters ¡in ¡these ¡fields ¡

– If ¡control ¡characters ¡appear ¡in ¡the ¡packet ¡

  • use ¡a ¡Data ¡Link ¡Escape ¡(DLE) ¡character ¡before ¡ETX ¡when ¡it ¡appears ¡within ¡the ¡

packet ¡

  • if ¡DLE ¡appears ¡within ¡the ¡packet ¡replace ¡it ¡with ¡DLE ¡DLE ¡
  • This ¡mechanism ¡is ¡called ¡character ¡stuffing ¡
  • Same ¡mechanism ¡in ¡Point-­‑to-­‑Point ¡Protocol ¡(PPP) ¡

– widely ¡used ¡over ¡modems, ¡DSL, ¡PPPoE, ¡PPPoA, ¡cellular, ¡etc. ¡

Fundamentals of Computer Networks Direct Link Networks

SYN SYN SOH Header Packet ETX CRC SYN STX

11

slide-12
SLIDE 12

Bit ¡Based ¡Framing ¡

  • SenGnel-­‑based ¡(bit ¡oriented) ¡

– Delineate ¡frame ¡with ¡ ¡special ¡palern: ¡01111110 ¡ – e.g., ¡HDLC, ¡SDLC ¡ – Problem: ¡special ¡palern ¡appears ¡in ¡the ¡payload ¡ – SoluGon: ¡bit ¡stuffing ¡

  • sender: ¡insert ¡0 ¡ater ¡five ¡consecuGve ¡1s ¡
  • receiver: ¡delete ¡0 ¡that ¡follows ¡five ¡consecuGve ¡1s ¡
  • Disadvantage: ¡potenGally ¡increases ¡the ¡length ¡by ¡20% ¡

Fundamentals of Computer Networks Direct Link Networks

Header Body 8 16 16 8 CRC Beginning sequence Ending sequence

12

slide-13
SLIDE 13

Counter ¡Based ¡Framing ¡

– Include ¡payload ¡length ¡in ¡header ¡ – e.g., ¡Digital ¡Data ¡CommunicaGons ¡Message ¡Protocol ¡ ¡(DDCMP) ¡ ¡ – Problem: ¡count ¡field ¡corrupted ¡ – SoluGon: ¡catch ¡when ¡CRC ¡fails ¡

Fundamentals of Computer Networks Direct Link Networks 13

slide-14
SLIDE 14

Clock ¡Based ¡Framing ¡

– e.g., ¡SONET: ¡Synchronous ¡OpGcal ¡Network, ¡ dominant ¡standard ¡for ¡long-­‑distance ¡data ¡ transmission ¡over ¡opGcal ¡networks ¡ – STS-­‑n ¡(STS-­‑1 ¡= ¡51.84 ¡Mbps) ¡

Fundamentals of Computer Networks Direct Link Networks 14

slide-15
SLIDE 15

Error ¡DetecGon ¡

  • Assume ¡that ¡we ¡know ¡the ¡beginning/end ¡of ¡

the ¡frames ¡

  • How ¡can ¡we ¡detect ¡if ¡one/several ¡bits ¡changed

¡ during ¡their ¡transmission? ¡

  • Since ¡all ¡the ¡frames ¡can ¡potenGally ¡be ¡

received ¡then ¡we ¡have ¡to ¡add ¡some ¡ redundancy ¡bits ¡to ¡detect ¡errors ¡(checksum) ¡

Fundamentals of Computer Networks Direct Link Networks 15

slide-16
SLIDE 16

Basic ¡Error ¡DetecGon ¡ Parity ¡Checks ¡

  • Single ¡parity ¡checks: ¡

– For ¡every ¡string ¡of ¡data ¡bits ¡append ¡a ¡single ¡bit: ¡parity ¡bit ¡ – If ¡the ¡number ¡of ¡1’s ¡in ¡the ¡string ¡is ¡even ¡then ¡the ¡parity ¡= ¡ 0; ¡otherwise ¡1. ¡ – E.g., ¡ASCII ¡characters ¡of ¡7 ¡bits ¡+ ¡1 ¡parity ¡bit. ¡ – Number ¡of ¡1’s ¡in ¡an ¡encoded ¡string ¡is ¡always ¡even. ¡ – This ¡encoding ¡allows ¡to ¡detect ¡all ¡single ¡errors ¡and ¡no-­‑two ¡ errors, ¡etc. ¡ – Not ¡sufficiently ¡reliable ¡specially ¡when ¡errors ¡occur ¡in ¡ bursts ¡

Fundamentals of Computer Networks Direct Link Networks 16

slide-17
SLIDE 17

Hamming ¡Distance ¡for ¡Block ¡Codes ¡

  • The ¡Hamming ¡distance ¡between ¡two ¡codewords ¡is ¡

the ¡number ¡of ¡places ¡where ¡they ¡differ ¡

  • The ¡Hamming ¡distance ¡of ¡a ¡Block ¡code ¡is ¡the ¡

minimum ¡distance ¡between ¡two ¡codewords ¡

  • Allows ¡both ¡error ¡detecGon ¡and ¡error ¡correcGon ¡

Fundamentals of Computer Networks Direct Link Networks 17

slide-18
SLIDE 18

Example ¡of ¡Binary ¡Block ¡Code ¡(7, ¡4) ¡

  • Any ¡two ¡different ¡code ¡words ¡are ¡different ¡on ¡at ¡least ¡three ¡different ¡
  • coordinates. ¡This ¡code ¡has ¡Hamming ¡distance ¡3. ¡
  • Notice that the last 4 bits of the code word are the same as the message

– This is a systematic coding – The other 3 bits are redundancy bits – Detects any two errors, corrects any single error

Fundamentals of Computer Networks Direct Link Networks 18

slide-19
SLIDE 19

Error ¡DetecGon ¡ Cyclic ¡Redundancy ¡Check ¡

  • Add ¡k ¡bits ¡of ¡redundant ¡data ¡to ¡an ¡n-­‑bit ¡message ¡

– want ¡k ¡<< ¡n ¡ – e.g., ¡k ¡= ¡32 ¡and ¡n ¡= ¡12,000 ¡(1500 ¡bytes) ¡

  • Represent ¡n-­‑bit ¡message ¡as ¡n-­‑1 ¡degree ¡polynomial ¡

in ¡GF(2) ¡

– e.g., ¡MSG=10011010 ¡as ¡M(x) ¡= ¡x7 ¡+ ¡x4 ¡+ ¡x3 ¡+ ¡x1 ¡

  • MulGplicaGon ¡by ¡x ¡(shiting) ¡and ¡polynomial ¡

division ¡are ¡easy ¡in ¡HW ¡

  • Let ¡k ¡be ¡the ¡degree ¡of ¡some ¡divisor ¡polynomial ¡

– e.g., ¡C(x) ¡= ¡x3 ¡+ ¡x2 ¡+ ¡1 ¡

Fundamentals of Computer Networks Direct Link Networks 19

slide-20
SLIDE 20

CRC ¡(cont) ¡

  • Transmit ¡polynomial ¡P(x) ¡that ¡is ¡evenly ¡

divisible ¡by ¡C(x) ¡ ¡

– shit ¡let ¡k ¡bits, ¡i.e., ¡M(x)xk ¡ – subtract ¡remainder ¡of ¡M(x)xk ¡/ ¡C(x) ¡from ¡M(x)xk ¡

  • Receiver ¡polynomial ¡P(x) ¡+ ¡E(x) ¡

– E(x) ¡= ¡0 ¡implies ¡no ¡errors ¡

  • Divide ¡(P(x) ¡+ ¡E(x)) ¡by ¡C(x); ¡remainder ¡zero ¡if: ¡

– E(x) ¡was ¡zero ¡(no ¡error), ¡or ¡ – E(x) ¡is ¡exactly ¡divisible ¡by ¡C(x) ¡

Fundamentals of Computer Networks Direct Link Networks 20

slide-21
SLIDE 21

SelecGng ¡C(x) ¡

  • All ¡single-­‑bit ¡errors, ¡as ¡long ¡as ¡the ¡xk ¡and ¡x0 ¡terms ¡have ¡non-­‑zero ¡

coefficients ¡

  • Any ¡odd ¡number ¡of ¡errors, ¡as ¡long ¡as ¡C(x) ¡contains ¡the ¡factor ¡(x ¡+ ¡1) ¡
  • Any ¡‘burst’ ¡error ¡(i.e., ¡sequence ¡of ¡consecuGve ¡error ¡bits) ¡for ¡which ¡the ¡

length ¡of ¡the ¡burst ¡is ¡less ¡than ¡k ¡bits ¡

  • PrimiGve ¡polynomials ¡allow ¡to ¡detect ¡all ¡double-­‑errors ¡when ¡the ¡frame ¡

length ¡is ¡less ¡than ¡2k-­‑1 ¡

  • Most ¡burst ¡errors ¡of ¡larger ¡than ¡k ¡bits ¡can ¡also ¡be ¡detected ¡
  • hlp://en.wikipedia.org/wiki/MathemaGcs_of_CRC ¡
  • See ¡Table ¡2.6 ¡on ¡page ¡101 ¡for ¡common ¡C(x) ¡

– CRC-­‑16: ¡D16 ¡+ ¡D15 ¡+ ¡D2 ¡+ ¡1 ¡ – CRC ¡CCITT: ¡D16 ¡+ ¡D12 ¡+ ¡D5 ¡+ ¡1 ¡

  • Example: ¡

– Link ¡with ¡Bit ¡Error ¡Rate ¡10-­‑7 ¡ – Probability ¡of ¡a ¡single ¡bit ¡in ¡error, ¡two ¡bits ¡in ¡error, ¡and ¡more ¡in ¡a ¡10,000 ¡bits ¡ packet ¡

Fundamentals of Computer Networks Direct Link Networks 21

slide-22
SLIDE 22

Internet ¡Checksum ¡Algorithm ¡

  • View ¡message ¡as ¡a ¡sequence ¡of ¡16-­‑bit ¡integers; ¡sum ¡using ¡

16-­‑bit ¡ones-­‑complement ¡arithmeGc; ¡take ¡ones-­‑ complement ¡of ¡the ¡result. ¡

Fundamentals of Computer Networks Direct Link Networks

u_short cksum(u_short *buf, int count) { register u_long sum = 0; while (count--) { sum += *buf++; if (sum & 0xFFFF0000) { /* carry occurred, so wrap around */ sum &= 0xFFFF; sum++; } } return ~(sum & 0xFFFF); }

22

slide-23
SLIDE 23

Reliable ¡Transmission ¡ AutomaGc ¡Repeat ¡reQuest ¡

Fundamentals of Computer Networks Direct Link Networks

Acknowledgements & Timeouts

23

slide-24
SLIDE 24

Stop-­‑and-­‑Wait ¡

  • Example: ¡
  • Bluetooth ¡
  • Problem: ¡keeping ¡the ¡pipe ¡full ¡
  • Example ¡

– 1.5Mbps ¡link ¡x ¡45ms ¡RTT ¡= ¡67.5Kb ¡(8KB) ¡ – 1KB ¡frames ¡implies ¡1/8th ¡link ¡uGlizaGon ¡ ¡

Fundamentals of Computer Networks Direct Link Networks

Sender Receiver

24

slide-25
SLIDE 25

Sliding ¡Window ¡

  • Allow ¡mulGple ¡outstanding ¡(un-­‑ACKed) ¡frames ¡
  • Upper ¡bound ¡on ¡un-­‑ACKed ¡frames, ¡called ¡window ¡

Fundamentals of Computer Networks Direct Link Networks

Sender Receiver T ime

… …

25

slide-26
SLIDE 26

SW: ¡Sender ¡

  • Assign ¡sequence ¡number ¡to ¡each ¡frame ¡(SeqNum) ¡
  • Maintain ¡three ¡state ¡variables: ¡

– send ¡window ¡size ¡(SWS) ¡ – last ¡acknowledgment ¡received ¡(LAR) ¡ – last ¡frame ¡sent ¡(LFS) ¡

  • Maintain ¡invariant: ¡LFS ¡-­‑ ¡LAR ¡<= ¡SWS ¡
  • Advance ¡LAR ¡when ¡ACK ¡arrives ¡ ¡
  • Buffer ¡up ¡to ¡SWS ¡frames ¡

Fundamentals of Computer Networks Direct Link Networks

SWS LAR LFS

… …

26

slide-27
SLIDE 27

SW: ¡Receiver ¡

  • Maintain ¡three ¡state ¡variables ¡

– receive ¡window ¡size ¡(RWS) ¡ – largest ¡frame ¡acceptable ¡(LFA) ¡ – last ¡frame ¡received ¡in ¡order ¡(LFR) ¡

  • Maintain ¡invariant: ¡LFA ¡-­‑ ¡LFR ¡<= ¡RWS
  • Frame ¡SeqNum ¡arrives: ¡

– if ¡LFR ¡< ¡SeqNum ¡< ¡= ¡LFA ¡ ¡ ¡ ¡ ¡ ¡ ¡accept ¡ – if ¡SeqNum ¡< ¡= ¡LFR ¡or ¡SeqNum ¡> ¡LFA ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡discarded ¡

  • Send ¡cumulaGve ¡ACKs ¡ ¡

Fundamentals of Computer Networks Direct Link Networks LFR LFA ≤ RWS 27

slide-28
SLIDE 28

Sequence ¡Number ¡Space ¡

  • SeqNum ¡field ¡is ¡finite; ¡sequence ¡numbers ¡wrap ¡around ¡
  • Sequence ¡number ¡space ¡must ¡be ¡larger ¡then ¡number ¡of ¡
  • utstanding ¡frames ¡
  • Let ¡MaxSeqNum ¡be ¡the ¡maximum ¡number ¡of ¡sequence ¡

numbers ¡

  • SWS ¡<= ¡MaxSeqNum-1 ¡is ¡not ¡sufficient ¡

– suppose ¡3-­‑bit ¡SeqNum ¡field ¡(0..7) ¡=> ¡MaxSeqNum=8 ¡ – SWS=RWS=7 – sender ¡transmit ¡frames ¡0..6 ¡ – arrive ¡successfully, ¡but ¡ACKs ¡lost ¡ – sender ¡retransmits ¡0..6 ¡ – receiver ¡expecGng ¡7, ¡0..5, ¡but ¡receives ¡second ¡incarnaGon ¡of ¡0..5 ¡

  • 2*SWS ¡≤ ¡MaxSeqNum is ¡correct ¡rule ¡if ¡SWS ¡= ¡RWS ¡
  • IntuiGvely, ¡SeqNum ¡“slides” ¡between ¡two ¡halves ¡of ¡sequence ¡

number ¡space ¡

Fundamentals of Computer Networks Direct Link Networks 28

slide-29
SLIDE 29

Sequence ¡Number ¡Space ¡

  • Correct ¡operaGon ¡necessitates ¡that ¡a ¡retransmission ¡is ¡never ¡

confused ¡with ¡a ¡new ¡transmission ¡(i.e., ¡ambiguity) ¡

  • Retransmissions ¡corresponds ¡to: ¡ ¡

– LFR ¡– ¡j ¡where ¡0 ¡≤ ¡j ¡< ¡SWS ¡

  • New ¡transmissions ¡corresponds ¡to: ¡ ¡

– LFR ¡+ ¡i ¡where ¡0 ¡≤ ¡i ¡≤ ¡RWS ¡

  • To ¡avoid ¡ambiguity ¡we ¡should ¡have ¡

– LFR ¡– ¡j ¡≠ ¡LFR ¡+ ¡i ¡mod ¡MaxSeqNum ¡i.e., ¡ ¡i ¡+ ¡j ¡≠ ¡0 ¡mod ¡MaxSeqNum ¡ ¡

  • This ¡can ¡be ¡guaranteed ¡if ¡RWS ¡+ ¡SWS ¡≤ ¡MaxSeqNum ¡

– Because ¡i ¡+ ¡j ¡< ¡SWS ¡+ ¡RWS ¡≤ ¡MaxSeqNum ¡

  • One ¡can ¡show ¡that ¡violaGng ¡this ¡condiGon ¡can ¡result ¡in ¡

ambiguity ¡as ¡described ¡in ¡the ¡previous ¡slide ¡

Fundamentals of Computer Networks Direct Link Networks 29

slide-30
SLIDE 30

Concurrent ¡Logical ¡Channels ¡

  • MulGplex ¡8 ¡logical ¡channels ¡over ¡a ¡single ¡link ¡
  • Run ¡stop-­‑and-­‑wait ¡on ¡each ¡logical ¡channel ¡
  • Maintain ¡three ¡state ¡bits ¡per ¡channel ¡

– channel ¡busy ¡ – current ¡sequence ¡number ¡out ¡ – next ¡sequence ¡number ¡in ¡

  • Header: ¡3-­‑bit ¡channel ¡num, ¡1-­‑bit ¡sequence ¡num ¡

– 4-­‑bits ¡total ¡ – same ¡as ¡sliding ¡window ¡protocol ¡for ¡a ¡window ¡of ¡8 ¡

  • Separates ¡reliability ¡from ¡order ¡

Fundamentals of Computer Networks Direct Link Networks 30