Lecture ¡2: ¡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
Lecture 2: Direct Link Networks Guevara Noubir CS 4700 - - PowerPoint PPT Presentation
Lecture 2: 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
Fundamentals of Computer Networks Direct Link Networks
– Links, ¡Capacity, ¡Encoding ¡
– Framing ¡ – Error ¡DetecIon ¡ – Error ¡recovery ¡-‑ ¡Sliding ¡Window ¡Algorithm ¡ – Medium ¡Access ¡Control ¡
Fundamentals of Computer Networks Direct Link Networks
– 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 ¡ – MulImode ¡fiber, ¡100 ¡Mbps ¡– ¡10 ¡Gbps, ¡ ¡-‑ ¡2km ¡ – Single-‑mode ¡fiber, ¡0.1-‑10 ¡Gbps, ¡-‑ ¡40km ¡
– Copper ¡based: ¡T1 ¡(1.544Mbps), ¡T3 ¡(44.736Mbps) ¡ – OpIcal ¡fiber: ¡STS-‑1 ¡(51.84Mbps), ¡STS-‑N ¡(N*51.84Mbps) ¡
– POTS ¡(56Kbps), ¡ISDN ¡(2*64Kbps) ¡ – xDSL: ¡ADSL ¡(16-‑640Kbps, ¡1.554-‑8.448Mbps), ¡VDSL ¡(12.96Mbps-‑55.2Mbps) ¡ – CATV: ¡40Mbps ¡downstream, ¡20Mbps ¡upstream ¡ – ¡Fiber ¡to ¡the ¡home: ¡50Mbps ¡– ¡1Gbps ¡
Fundamentals of Computer Networks Direct Link Networks
– Input ¡x, ¡output ¡y, ¡and ¡memoryless ¡channel ¡probability ¡transiIon ¡ funcIon ¡p(y|x) ¡ – Capacity ¡is ¡max ¡mutual ¡informaIon ¡between ¡X ¡and ¡Y ¡over ¡all ¡possible ¡ distribuIons ¡of ¡x ¡
– C ¡= ¡B*log(1+S/N) ¡ – S: ¡signal ¡power, ¡N: ¡noise ¡power ¡
– B ¡= ¡3,300 ¡– ¡300 ¡Hz ¡= ¡3,000 ¡Hz; ¡ ¡ – S/N ¡= ¡1,000 ¡also ¡wriken ¡as ¡30dB ¡ – C ¡= ¡30 ¡Kbps ¡
Fundamentals of Computer Networks Direct Link Networks
p(x)
I(X;Y) = H(Y) − H(Y | X) H(X) = − p(x)log2 p(x)
x
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
Fundamentals of Computer Networks Direct Link Networks
Fundamentals of Computer Networks Direct Link Networks
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
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
– Character-‑based ¡framing ¡(use ¡special ¡control ¡characters) ¡ – Bit-‑oriented ¡framing ¡with ¡flags ¡ – Length ¡counts ¡ – Clock ¡based ¡
Fundamentals of Computer Networks Direct Link Networks
– SYN: ¡Synchronous ¡idle, ¡SOH: ¡Start ¡of ¡Header, ¡STX: ¡Start ¡of ¡text, ¡ETX: ¡End ¡of ¡text ¡
packet ¡
Fundamentals of Computer Networks Direct Link Networks
– Delineate ¡frame ¡with ¡ ¡special ¡pakern: ¡01111110 ¡ – e.g., ¡HDLC, ¡SDLC ¡ – Problem: ¡special ¡pakern ¡appears ¡in ¡the ¡payload ¡ – SoluIon: ¡bit ¡stuffing ¡
Fundamentals of Computer Networks Direct Link Networks
Header Body 8 16 16 8 CRC Beginning sequence Ending sequence
Fundamentals of Computer Networks Direct Link Networks
Fundamentals of Computer Networks Direct Link Networks
Fundamentals of Computer Networks Direct Link Networks
Fundamentals of Computer Networks Direct Link Networks
Fundamentals of Computer Networks Direct Link Networks
– 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
Fundamentals of Computer Networks Direct Link Networks
Fundamentals of Computer Networks Direct Link Networks
coefficients ¡
length ¡of ¡the ¡burst ¡is ¡less ¡than ¡k ¡bits ¡
length ¡is ¡less ¡than ¡2k-‑1 ¡
– CRC-‑16: ¡D16 ¡+ ¡D15 ¡+ ¡D2 ¡+ ¡1 ¡ – CRC ¡CCITT: ¡D16 ¡+ ¡D12 ¡+ ¡D5 ¡+ ¡1 ¡
– 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
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); }
Fundamentals of Computer Networks Direct Link Networks
Fundamentals of Computer Networks Direct Link Networks
Sender Receiver
Fundamentals of Computer Networks Direct Link Networks
Sender Receiver T ime
– send ¡window ¡size ¡(SWS) ¡ – last ¡acknowledgment ¡received ¡(LAR) ¡ – last ¡frame ¡sent ¡(LFS) ¡
Fundamentals of Computer Networks Direct Link Networks
≤
SWS LAR LFS
– receive ¡window ¡size ¡(RWS) ¡ – largest ¡frame ¡acceptable ¡(LFA) ¡ – last ¡frame ¡received ¡in ¡order ¡(LFR) ¡
– if ¡LFR ¡< ¡SeqNum ¡< ¡= ¡LFA ¡ ¡ ¡ ¡ ¡ ¡ ¡accept ¡ – if ¡SeqNum ¡< ¡= ¡LFR ¡or ¡SeqNum ¡> ¡LFA ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡discarded ¡
Fundamentals of Computer Networks Direct Link Networks LFR LFA ≤ RWS
– 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 ¡expecIng ¡7, ¡0..5, ¡but ¡receives ¡second ¡incarnaIon ¡of ¡0..5 ¡
Fundamentals of Computer Networks Direct Link Networks
– LFR ¡– ¡j ¡where ¡0 ¡≤ ¡j ¡< ¡SWS ¡
– LFR ¡+ ¡i ¡where ¡0 ¡≤ ¡i ¡≤ ¡RWS ¡
– LFR ¡– ¡j ¡≠ ¡LFR ¡+ ¡i ¡mod ¡MaxSeqNum ¡i.e., ¡ ¡i ¡+ ¡j ¡≠ ¡0 ¡mod ¡MaxSeqNum ¡ ¡
– Because ¡i ¡+ ¡j ¡< ¡SWS ¡+ ¡RWS ¡≤ ¡MaxSeqNum ¡
Fundamentals of Computer Networks Direct Link Networks
– channel ¡busy ¡ – current ¡sequence ¡number ¡out ¡ – next ¡sequence ¡number ¡in ¡
– 4-‑bits ¡total ¡ – same ¡as ¡sliding ¡window ¡protocol ¡for ¡a ¡window ¡of ¡8 ¡
Fundamentals of Computer Networks Direct Link Networks