Direct Link Networks UIUC CSECE 438 Fall 2006

  • Slides: 56
Download presentation
Direct Link Networks UIUC - CS/ECE 438, Fall 2006

Direct Link Networks UIUC - CS/ECE 438, Fall 2006

Direct Link Networks n Two hosts connected directly ¡ n No issues of contention,

Direct Link Networks n Two hosts connected directly ¡ n No issues of contention, routing, … Key points: ¡ ¡ 6/6/2021 Physical Connections Encoding and Modulation Framing Error Detection UIUC - CS/ECE 438, Fall 2006 2

Internet Protocols Application User-level software Presentation Session Transport Kernel software Network Data Link Physical

Internet Protocols Application User-level software Presentation Session Transport Kernel software Network Data Link Physical 6/6/2021 Framing, error detection, medium access control Encoding UIUC - CS/ECE 438, Fall 2006 Hardware (network adapter) 3

Outline n n n Hardware building blocks Encoding Framing 6/6/2021 UIUC - CS/ECE 438,

Outline n n n Hardware building blocks Encoding Framing 6/6/2021 UIUC - CS/ECE 438, Fall 2006 4

Hardware Building Blocks n Nodes ¡ ¡ ¡ n Hosts: general purpose computers Switches:

Hardware Building Blocks n Nodes ¡ ¡ ¡ n Hosts: general purpose computers Switches: typically special purpose hardware Routers: varied Links ¡ ¡ ¡ 6/6/2021 Copper wire with electronic signaling Glass fiber with optical signaling Wireless with electromagnetic (radio, infrared, microwave, signaling) UIUC - CS/ECE 438, Fall 2006 5

Links - Copper n Copper-based Media ¡ ¡ ¡ Category 5 Twisted Pair Thin.

Links - Copper n Copper-based Media ¡ ¡ ¡ Category 5 Twisted Pair Thin. Net Coaxial Cable Thick. Net Coaxial Cable 10 -100 Mbps 100 m 200 m 500 m twisted pair coaxial cable (coax) 6/6/2021 copper core insulation braided outer conductor outer insulation UIUC - CS/ECE 438, Fall 2006 6

Links - Optical n Optical Media ¡ ¡ Multimode Fiber 100 Mbps Single Mode

Links - Optical n Optical Media ¡ ¡ Multimode Fiber 100 Mbps Single Mode Fiber 100 -2400 Mbps optical fiber 6/6/2021 2 km 40 km glass core (the fiber) glass cladding plastic jacket UIUC - CS/ECE 438, Fall 2006 7

Links - Optical n Single mode ¡ ¡ n Lower attenuation (longer distances) Lower

Links - Optical n Single mode ¡ ¡ n Lower attenuation (longer distances) Lower dispersion (higher data rates) Multimode fiber ¡ ¡ Cheap to drive (LED’s) vs. lasers for single mode Easier to terminate core of single mode fiber ~1 wavelength thick = ~1 micron core of multimode fiber (same frequency; colors for clarity) O(100 microns) thick 6/6/2021 UIUC - CS/ECE 438, Fall 2006 8

Links - Optical n Advantages of optical communication ¡ ¡ ¡ 6/6/2021 Higher bandwidths

Links - Optical n Advantages of optical communication ¡ ¡ ¡ 6/6/2021 Higher bandwidths Superior attenuation properties Immune from electromagnetic interference No crosstalk between fibers Thin, lightweight, and cheap (the fiber, not the optical-electrical interfaces) UIUC - CS/ECE 438, Fall 2006 9

Leased Lines n n n n n POTS 64 Kbps ISDN 128 Kbps ADSL

Leased Lines n n n n n POTS 64 Kbps ISDN 128 Kbps ADSL 1. 5 -8 Mbps/16 -640 Kbps Cable Modem 0. 5 -2 Mbps DS 1/T 1 1. 544 Mbps DS 3/T 3 44. 736 Mbps STS-1 51. 840 Mbps STS-3 155. 250 Mbps (ATM) STS-12 622. 080 Mbps (ATM) 6/6/2021 UIUC - CS/ECE 438, Fall 2006 10

Wireless n Cellular ¡ ¡ ¡ n 13 Kbps 300 Kbps 2 -3 Mbps

Wireless n Cellular ¡ ¡ ¡ n 13 Kbps 300 Kbps 2 -3 Mbps 3 km 3 km Wireless Local Area Networks (WLAN) ¡ ¡ ¡ n AMPS PCS, GSM 3 G Infrared 900 Mhz 2. 4 GHz Bluetooth 4 Mbps 2 Mbps 11 Mbps 700 Kbps 10 m 150 m 80 m 10 m Satellites ¡ ¡ 6/6/2021 Geosynchronous satellite 600 -1000 Mbps Low Earth orbit (LEO) ~400 Mbps UIUC - CS/ECE 438, Fall 2006 continent world 11

Encoding digital data (a string of symbols) n modulator demodulator a string of signals

Encoding digital data (a string of symbols) n modulator demodulator a string of signals digital data (a string of symbols) Problems with signal transmission ¡ ¡ ¡ 6/6/2021 Attenuation: Signal power absorbed by medium Dispersion: A discrete signal spreads in space Noise: Random background “signals” UIUC - CS/ECE 438, Fall 2006 12

Encoding n Goal: ¡ n Understand how to connect nodes in such a way

Encoding n Goal: ¡ n Understand how to connect nodes in such a way that bits can be transmitted from one node to another Idea: ¡ The physical medium is used to propagate signals n n ¡ 6/6/2021 Modulate electromagnetic waves Vary voltage, frequency, wavelength Data is encoded in the signal UIUC - CS/ECE 438, Fall 2006 13

Analog vs. Digital Transmission n Advantages of digital transmission over analog ¡ Reasonably low-error

Analog vs. Digital Transmission n Advantages of digital transmission over analog ¡ Reasonably low-error rates over arbitrary distances n n ¡ n Calculate/measure effects of transmission problems Periodically interpret and regenerate signal Simpler for multiplexing distinct data types (audio, video, e -mail, etc. ) Two examples based on modulator-demodulators (modems) ¡ ¡ 6/6/2021 Electronic Industries Association (EIA) standard: RS-232(C) International Telecommunications Union (ITU) V. 32 9600 bps modem standard UIUC - CS/ECE 438, Fall 2006 14

RS-232 n n Communication between computer and modem Uses two voltage levels (+15 V,

RS-232 n n Communication between computer and modem Uses two voltage levels (+15 V, -15 V), a binary voltage encoding Data rate limited to 19. 2 kbps (RS-232 -C); raised in later standards Characteristics ¡ ¡ ¡ 6/6/2021 Serial: one signaling wire, one bit at a time Asynchronous: line can be idle, clock generated from data Character-based: send data in 7 - or 8 -bit characters UIUC - CS/ECE 438, Fall 2006 15

RS-232 Timing Diagram Voltage +15 + -15 idle start 1 0 0 1 1

RS-232 Timing Diagram Voltage +15 + -15 idle start 1 0 0 1 1 0 0 stop idle Time 6/6/2021 UIUC - CS/ECE 438, Fall 2006 16

RS-232 n n One bit per clock Voltage never returns to 0 V ¡

RS-232 n n One bit per clock Voltage never returns to 0 V ¡ n -15 V is both idle and “ 1” ¡ n n n initiates send by pushing to 15 V for one clock (start bit) Minimum delay between character transmissions ¡ n 0 V is a dead/disconnected line Idle for one clock at -15 V (stop bit) One character leads to 2+ voltage transitions Total of 9 bits for 7 bits of data (78% efficient) Start and stop bits also provide framing 6/6/2021 UIUC - CS/ECE 438, Fall 2006 17

Voltage Encoding n Common binary voltage encodings ¡ ¡ 6/6/2021 Non-return to zero (NRZ)

Voltage Encoding n Common binary voltage encodings ¡ ¡ 6/6/2021 Non-return to zero (NRZ) NRZ inverted (NRZI) Manchester (used by IEEE 802. 3— 10 Mbps Ethernet) 4 B/5 B UIUC - CS/ECE 438, Fall 2006 18

Non-Return to Zero (NRZ) n Signal to Data ¡ ¡ n High Low 1

Non-Return to Zero (NRZ) n Signal to Data ¡ ¡ n High Low 1 0 Comments ¡ ¡ Bits Transitions maintain clock synchronization Long strings of 0 s confused with no signal Long strings of 1 s causes baseline wander Both inhibit clock recovery 0 0 1 1 1 1 0 0 0 0 1 0 NRZ 6/6/2021 UIUC - CS/ECE 438, Fall 2006 19

Non-Return to Zero Inverted (NRZI) Signal to Data n ¡ ¡ Bits Transition Maintain

Non-Return to Zero Inverted (NRZI) Signal to Data n ¡ ¡ Bits Transition Maintain 1 0 0 0 1 1 1 1 0 0 0 0 1 0 NRZI n Comments ¡ 6/6/2021 Strings of 0’s still a problem UIUC - CS/ECE 438, Fall 2006 20

Manchester Encoding n Signal to Data ¡ ¡ ¡ n XOR NRZ data with

Manchester Encoding n Signal to Data ¡ ¡ ¡ n XOR NRZ data with clock High to low transition Low to high transition 1 0 Comments ¡ ¡ Solves clock recovery problem Only 50% efficient ( 1/2 bit per transition) Bits 0 0 1 1 1 1 0 0 0 0 1 0 NRZ Clock Manchester 6/6/2021 UIUC - CS/ECE 438, Fall 2006 21

4 B/5 B n Signal to Data ¡ n Symbols ¡ ¡ n Encode

4 B/5 B n Signal to Data ¡ n Symbols ¡ ¡ n Encode every 4 consecutive bits as a 5 bit symbol At most 1 leading 0 At most 2 trailing 0 s Never more than 3 consecutive 0 s Transmit with NRZI Comments ¡ 6/6/2021 80% efficient UIUC - CS/ECE 438, Fall 2006 22

Binary Voltage Encodings n Problem with binary voltage (square wave) encodings: ¡ Wide frequency

Binary Voltage Encodings n Problem with binary voltage (square wave) encodings: ¡ Wide frequency range required, implying n n Significant dispersion Uneven attenuation Prefer to use narrow frequency band (carrier frequency) Types of modulation ¡ ¡ 6/6/2021 Amplitude (AM) Frequency (FM) Phase/phase shift Combinations of these UIUC - CS/ECE 438, Fall 2006 23

Amplitude Modulation idle 6/6/2021 1 UIUC - CS/ECE 438, Fall 2006 0 24

Amplitude Modulation idle 6/6/2021 1 UIUC - CS/ECE 438, Fall 2006 0 24

Frequency Modulation idle 6/6/2021 1 UIUC - CS/ECE 438, Fall 2006 0 25

Frequency Modulation idle 6/6/2021 1 UIUC - CS/ECE 438, Fall 2006 0 25

Phase Modulation idle 6/6/2021 1 0 UIUC - CS/ECE 438, Fall 2006 26

Phase Modulation idle 6/6/2021 1 0 UIUC - CS/ECE 438, Fall 2006 26

Phase Modulation phase shift in carrier frequency 6/6/2021 108º difference in phase collapse for

Phase Modulation phase shift in carrier frequency 6/6/2021 108º difference in phase collapse for 108º shift UIUC - CS/ECE 438, Fall 2006 27

Phase Modulation Algorithm n Send carrier frequency for one period ¡ ¡ 8 -symbol

Phase Modulation Algorithm n Send carrier frequency for one period ¡ ¡ 8 -symbol example Perform phase shift Shift value encodes symbol n n n Value in range [0, 360º) Multiple values for multiple symbols Represent as circle 90º 135º 45º 180º 0º 225º 315º 270º 6/6/2021 UIUC - CS/ECE 438, Fall 2006 28

V. 32 9600 bps n n n Communication between modems Analog phone line Uses

V. 32 9600 bps n n n Communication between modems Analog phone line Uses a combination of amplitude and phase modulation Known as Quadrature Amplitude Modulation (QAM) Sends one of 16 signals each clock cycle 6/6/2021 UIUC - CS/ECE 438, Fall 2006 29

Constellation Pattern for V. 32 QAM 45º 15º For a given symbol: Perform phase

Constellation Pattern for V. 32 QAM 45º 15º For a given symbol: Perform phase shift and change to new amplitude 6/6/2021 UIUC - CS/ECE 438, Fall 2006 30

Quadrature Amplitude Modulation (QAM) n n n Same algorithm as phase modulation Can also

Quadrature Amplitude Modulation (QAM) n n n Same algorithm as phase modulation Can also change signal amplitude 2 -dimensional representation ¡ ¡ 6/6/2021 16 -symbol example (V. 32) 45º 15º Angle is phase shift Radial distance is new amplitude UIUC - CS/ECE 438, Fall 2006 31

Comments on V. 32 transmits at 2400 baud ¡ n Each symbol contains log

Comments on V. 32 transmits at 2400 baud ¡ n Each symbol contains log 2 16 = 4 bits ¡ n i. e. , 2, 400 symbols per second Data rate is thus 4 x 2400 = 9600 bps Points in constellation diagram ¡ ¡ 6/6/2021 Chosen to maximize error detection Process called trellis coding UIUC - CS/ECE 438, Fall 2006 32

Generalizing the Examples n n n What limits baud rate? What data rate can

Generalizing the Examples n n n What limits baud rate? What data rate can a channel sustain? How is data rate related to bandwidth? How does noise affect these bounds? What else can limit maximum data rate? 6/6/2021 UIUC - CS/ECE 438, Fall 2006 33

What Limits Baud Rate? n n Baud rates are typically limited by electrical signaling

What Limits Baud Rate? n n Baud rates are typically limited by electrical signaling properties. No matter how small the voltage or how short the wire, changing voltages takes time. Electronics are slow compared to optics. Note that baud rate can be as high as twice the frequency (bandwidth) of communication; one cycle can contain two symbols. 6/6/2021 UIUC - CS/ECE 438, Fall 2006 34

What Data Rate can a Channel Sustain? How is Data Rate Related to Bandwidth?

What Data Rate can a Channel Sustain? How is Data Rate Related to Bandwidth? n Transmitting N distinct signals over a noiseless channel with bandwidth B, we can achieve at most a data rate of 2 B log 2 N n This observation is a form of Nyquist’s Sampling Theorem (H. Nyquist, 1920’s) ¡ 6/6/2021 We can reconstruct any waveform with no frequency component above some frequency F using only samples taken at frequency 2 F. UIUC - CS/ECE 438, Fall 2006 35

What else (Besides Noise) can Limit Maximum Data Rate? n Transitions between symbols ¡

What else (Besides Noise) can Limit Maximum Data Rate? n Transitions between symbols ¡ ¡ n Introduce high-frequency components into the transmitted signal Such components cannot be recovered (by Nyquist’s Theorem), and some information is lost Examples ¡ Phase modulation n n 6/6/2021 Single frequency (with different phases) for each symbol Transitions can require very high frequencies UIUC - CS/ECE 438, Fall 2006 36

How does Noise affect these Bounds? n n In-band (not high-frequency) noise blurs the

How does Noise affect these Bounds? n n In-band (not high-frequency) noise blurs the symbols, reducing the number of symbols that can be reliably distinguished. In 1948, Claude Shannon extended Nyquist’s work to channels with additive white Gaussian noise (a good model for thermal noise): channel capacity C = B log 2 (1 + S/N) where: B is the channel bandwidth S/N is the ratio between signal power and in-band noise power 6/6/2021 UIUC - CS/ECE 438, Fall 2006 37

Summary of Encoding n n n Problems: attenuation, dispersion, noise Digital transmission allows periodic

Summary of Encoding n n n Problems: attenuation, dispersion, noise Digital transmission allows periodic regeneration Variety of binary voltage encodings ¡ ¡ n Carrier frequency and modulation ¡ ¡ n High frequency components limit to short range More voltage levels provide higher data rate Amplitude, frequency, phase, and combinations Quadrature amplitude modulation: amplitude and phase, many signals Nyquist (noiseless) and Shannon (noisy) limits on data rates 6/6/2021 UIUC - CS/ECE 438, Fall 2006 38

Framing digital data (a string of symbols) n n modulator demodulator a string of

Framing digital data (a string of symbols) n n modulator demodulator a string of signals digital data (a string of symbols) Encoding translates symbols to signals Framing demarcates units of transfer ¡ ¡ 6/6/2021 Separates continuous stream of bits into frames Marks start and end of each frame UIUC - CS/ECE 438, Fall 2006 39

Framing n n Demarcates units of transfer Goal ¡ n Enable nodes to exchange

Framing n n Demarcates units of transfer Goal ¡ n Enable nodes to exchange blocks of data Challenge ¡ ¡ 6/6/2021 How can we determine exactly what set of bits constitute a frame? How do we determine the beginning and end of a frame? UIUC - CS/ECE 438, Fall 2006 40

Framing n Synchronization recovery ¡ ¡ n Link multiplexing ¡ ¡ n Breaks up

Framing n Synchronization recovery ¡ ¡ n Link multiplexing ¡ ¡ n Breaks up continuous streams of unframed bytes Recall RS-232 start and stop bits Multiple hosts on shared medium Simplifies multiplexing of logical channels Efficient error detection ¡ 6/6/2021 Per-frame error checking and recovery UIUC - CS/ECE 438, Fall 2006 41

Framing n Approaches ¡ ¡ ¡ n Sentinel Length-based Clock based (like C strings)

Framing n Approaches ¡ ¡ ¡ n Sentinel Length-based Clock based (like C strings) (like Pascal strings) Characteristics ¡ ¡ ¡ 6/6/2021 Bit- or byte-oriented Fixed or variable length Data-dependent or data-independent length UIUC - CS/ECE 438, Fall 2006 42

Sentinel-Based Framing n End of Frame ¡ Marked with a special byte or bit

Sentinel-Based Framing n End of Frame ¡ Marked with a special byte or bit pattern n n ¡ Challenge n n Requires stuffing Frame length is data-dependent Frame marker may exist in data Examples: ¡ 6/6/2021 ARPANET IMP-IMP, HDLC, PPP, IEEE 802. 4 (token bus) UIUC - CS/ECE 438, Fall 2006 43

ARPANET IMP-IMP n Interface Message processors (IMPs) ¡ ¡ ¡ Packet switching nodes in

ARPANET IMP-IMP n Interface Message processors (IMPs) ¡ ¡ ¡ Packet switching nodes in the original ARPANET Byte oriented, Variable length, Data dependent Frame marker bytes: n n ¡ 0 x 48 6/6/2021 start of text/end of text data link escape Byte Stuffing n DLE STX/ETX DLE byte in data sent as two DLE bytes back-to-back STX DLE HEADER 0 x 69 BODY DLE 0 x 48 UIUC - CS/ECE 438, Fall 2006 DLE ETX DLE 0 x 69 44

BISYNC n BInary SYNchronous Communication ¡ ¡ ¡ Developed by IBM in late 1960’s

BISYNC n BInary SYNchronous Communication ¡ ¡ ¡ Developed by IBM in late 1960’s Byte oriented, Variable length, Data dependent Frame marker bytes: n n ¡ STX/ETX DLE Byte Stuffing n ETX/DLE bytes in data prefixed with DLE’s STX 0 x 48 6/6/2021 start of text/end of text data link escape ETX HEADER 0 x 69 BODY ETX 0 x 48 UIUC - CS/ECE 438, Fall 2006 DLE ETX 0 x 69 45

High-Level Data Link Control Protocol (HDLC) n n Bit oriented, Variable length, Datadependent Frame

High-Level Data Link Control Protocol (HDLC) n n Bit oriented, Variable length, Datadependent Frame Marker ¡ n 01111110 Bit Stuffing ¡ ¡ Insert 0 after pattern 011111 in data Example n n 6/6/2021 01111110 01111111 end of frame error! lose one or two frames UIUC - CS/ECE 438, Fall 2006 46

IEEE 802. 4 (token bus) n n Alternative to Ethernet (802. 3) with fairer

IEEE 802. 4 (token bus) n n Alternative to Ethernet (802. 3) with fairer arbitration End of frame marked by encoding violation, ¡ n Recall Manchester encoding ¡ ¡ ¡ n byte-oriented, variable-length, data-independent Another example: ¡ n low-high means “ 0” high-low means “ 1” low-low and high-high are invalid 802. 4: ¡ n i. e. , physical signal not used by valid data symbol Fiber Distributed Data Interface (FDDI) uses 4 B/5 B Technique also applicable to bit-oriented framing 6/6/2021 UIUC - CS/ECE 438, Fall 2006 47

Length-Based Framing n End of frame ¡ ¡ n Calculated from length sent at

Length-Based Framing n End of frame ¡ ¡ n Calculated from length sent at start of frame Challenge: Corrupt length markers Examples ¡ DECNET’s DDCMP: n ¡ Byte-oriented, variable-length RS-232 framing: n Bit-oriented, implicit fixed-length LENGTH 6/6/2021 HEADER BODY UIUC - CS/ECE 438, Fall 2006 48

Clock-Based Framing n n n Continuous stream of fixed-length frames Clocks must remain synchronized

Clock-Based Framing n n n Continuous stream of fixed-length frames Clocks must remain synchronized STS-1 frames - 125 s long ¡ n Example: ¡ n No bit or byte stuffing Synchronous Optical Network (SONET) Problems: ¡ ¡ 6/6/2021 Frame synchronization Clock synchronization UIUC - CS/ECE 438, Fall 2006 49

SONET n Frame Synchronization ¡ ¡ n 2 -byte synchronization pattern at start of

SONET n Frame Synchronization ¡ ¡ n 2 -byte synchronization pattern at start of each frame Wait for repeated pattern in same place Clock Synchronization ¡ ¡ ¡ Data scrambled and transmitted with NRZ Creates transitions Reduces probability of false synch pattern 9 rows Overhead Payload … … … … … 90 columns 6/6/2021 UIUC - CS/ECE 438, Fall 2006 50

SONET n n Frames (all STS formats) are 125 µsec long Problem: how to

SONET n n Frames (all STS formats) are 125 µsec long Problem: how to recover frame synchronization ¡ ¡ n 2 -byte synchronization pattern starts each frame (unlikely to occur in data) Wait until pattern appears in same place repeatedly Problem: how to maintain clock synchronization ¡ ¡ ¡ 6/6/2021 NRZ encoding, data scrambled (XOR’d) with 127 -bit pattern Creates transitions Also reduces chance of finding false sync. pattern UIUC - CS/ECE 438, Fall 2006 51

SONET n n A single SONET frame may contain multiple smaller SONET frames Bytes

SONET n n A single SONET frame may contain multiple smaller SONET frames Bytes from multiple SONET frames are interleaved to ensure pacing HDR STS-1 HDR 6/6/2021 HDR STS-1 STS-3 UIUC - CS/ECE 438, Fall 2006 52

SONET n n n STS-1 merged bytewise round-robin into STS-3 Unmerged (single-source) format called

SONET n n n STS-1 merged bytewise round-robin into STS-3 Unmerged (single-source) format called STS-3 c Problem: simultaneous synchronization of many distributed clocks 67 B 249 B 151 B 6/6/2021 UIUC - CS/ECE 438, Fall 2006 not too difficult to synchronize clocks such that first byte of all incoming flows arrives just before sending first 3 bytes of outgoing flow 53

SONET. . . but now try to synchronize this network’s clocks 6/6/2021 UIUC -

SONET. . . but now try to synchronize this network’s clocks 6/6/2021 UIUC - CS/ECE 438, Fall 2006 54

SONET Or, worse, a network with cycles. One alternative to synchronization is to delay

SONET Or, worse, a network with cycles. One alternative to synchronization is to delay each frame by some fraction of a 125 microsecond period at each switch (i. e. , until the next outgoing frame starts). Delays add up quickly. . . 6/6/2021 UIUC - CS/ECE 438, Fall 2006 55

SONET n Problem: ¡ n Clock synchronization across multiple machines Solution ¡ ¡ Allow

SONET n Problem: ¡ n Clock synchronization across multiple machines Solution ¡ ¡ Allow payload to float across frame boundaries Part of overhead specifies first byte of payload … … … … … 6/6/2021 UIUC - CS/ECE 438, Fall 2006 56