1 cs716 advanced computer networks by a. wahid shaikh

49
1 CS716 Advanced Computer Networks By A. Wahid Shaikh

Upload: bertram-rice

Post on 12-Jan-2016

218 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: 1 CS716 Advanced Computer Networks By A. Wahid Shaikh

1

CS716

Advanced Computer Networks

By A. Wahid Shaikh

Page 2: 1 CS716 Advanced Computer Networks By A. Wahid Shaikh

Lecture No. 5

Page 3: 1 CS716 Advanced Computer Networks By A. Wahid Shaikh

3

The Big Picture

You are

here

Midterm exam

(estimated)

Page 4: 1 CS716 Advanced Computer Networks By A. Wahid Shaikh

4

What We Know

• Networks are– Experiencing explosive growth

– Providing wide range of services

• It is attributed to:– General purpose nature of computer networks

– Ability to add new functionality with software

– High performance computers are now affordable

Page 5: 1 CS716 Advanced Computer Networks By A. Wahid Shaikh

5

and We Know …

• Connecting mainframes over long-distance telephone lines has turned into a big business!

• Lots of competing players– Computing industry

– Telephone carriers

– Service providers, operators, …

• Global, ubiquitous, heterogeneous networking ?– Issues of connectivity, service levels, performance, …

Page 6: 1 CS716 Advanced Computer Networks By A. Wahid Shaikh

6

What We Have Learned

• Carefully identify what we expect from a network

• Cost-effective connectivity– Accomplished through nested interconnection of

nodes and links

– Provides process-to-process communication services

– Should offer high performance using the metrics like latency and throughput

• This results in a packet-switched network

Page 7: 1 CS716 Advanced Computer Networks By A. Wahid Shaikh

7

What is Our Approach

• A layered architecture as a guideline for design

• Protocols are central objects– Provides services to higher-level protocols– Make a message exchange meaningful with peers

• Implement protocols in software– Define interfaces to invoke services– Socket interface between applications and protocols– “Similar” interface within the network subsystem

Page 8: 1 CS716 Advanced Computer Networks By A. Wahid Shaikh

8

What Next ?

Start with a simplest possible network

Two nodes connected directly through some suitable medium

Page 9: 1 CS716 Advanced Computer Networks By A. Wahid Shaikh

9

Point-to-Point Links

Reading: Peterson and Davie, Ch. 2

OutlineHardware building blocksEncodingFramingError DetectionReliable transmission

• Sliding Window Algorithm

Page 10: 1 CS716 Advanced Computer Networks By A. Wahid Shaikh

10

Direct Link Issues in the OSI and Hardware/Software Contexts

transport

network

data link

physical

session

presentation

application

user-level software

kernel software (device drivers)

reliability

framing, error detection, MAC

encoding hardware (network adapter)

Page 11: 1 CS716 Advanced Computer Networks By A. Wahid Shaikh

11

Hardware Building Blocks

• Nodes– Hosts: general-purpose computers– Switches: typically special-purpose hardware– Routers (connecting networks): varies

• Links– Copper wire with electronic signaling– Glass fiber with optical signaling– Wireless with electromagnetic (radio, infrared,

microwave) signaling

Page 12: 1 CS716 Advanced Computer Networks By A. Wahid Shaikh

12

Nodes – A Workstation Architecture

CPU(processor)

Cache $

MemoryI/O bus

Networkadaptor

to network

finite memory (implies limited

buffer space)

Device driver managing network adaptor which is using system’s I/O bus

Memory access much slower

than CPU speed

memory bus

Page 13: 1 CS716 Advanced Computer Networks By A. Wahid Shaikh

13

Links

• Physical media– twisted pair cable– coaxial cable– optical fiber– space

• Media is used to propagate signals

• Signals are electromagnetic waves of certain frequency, traveling at speed of light

Page 14: 1 CS716 Advanced Computer Networks By A. Wahid Shaikh

14

Electromagnetic Spectrum

Radio Infrared UVMicrowave Gamma ray

f (Hz)

FM

Coax

Satellite

TV

AM Terrestrial microwave

Fiber optics

X ray

100

104 105 106 107 108 109 1010 1011 1012 1013 1014 1015 1016

102 106 108 1010 1012 1014 1016 1018 1020 1022 1024104

Wavelength = speed/frequency = 2 x 108 / 300 = 667 meters

Page 15: 1 CS716 Advanced Computer Networks By A. Wahid Shaikh

15

Signals Over a Link

• Signal is modulated for transmission– varying frequency/amplitude/phase to

receive distinguishable signals

• Binary data (0s and 1s) is encoded in a signal– make it understandable by the receiving

host

Page 16: 1 CS716 Advanced Computer Networks By A. Wahid Shaikh

16

Bits Over a Link

• Bit streams may be transmitted both ways at a time on a point-to-point link– full-duplex

• Sometimes two nodes must alternate link usage– half duplex

Page 17: 1 CS716 Advanced Computer Networks By A. Wahid Shaikh

17

Which Link to Use ?

• Cables– same room / building / site

Cable Typical Bandwidths Distances

Cat-5 twisted pair 10-100 Mbps 100 m

Thin-net coax 10-100 Mbps 200 m

Thick-net coax 10-100 Mbps 500 m

Multimode fiber 100 Mbps 2 km

Single-mode fiber 100-2400 Mbps 40 km

insulation

braided conductor

copper core

coax

twisted pair

glass core (fiber)

glass clading

plastic jacket

Page 18: 1 CS716 Advanced Computer Networks By A. Wahid Shaikh

18

Leased Lines

• Across city / country

• Dedicated link from the telephone company

• Appears, but may not be a single link !!!

Service: DS1/T1 DS3 STS-1 STS-3 STS-12 ... STS-48

Bandwidth: 1.5M 44.7M 51.8M 155M 622M ... 2.5G

(bps)

Page 19: 1 CS716 Advanced Computer Networks By A. Wahid Shaikh

19

Last-mile Links

• Most economical

• Home to network service provider

• To take benefit of an existing network

Service: POTS ISDN xDSL CATV

Bandwidth: 28.8 - 56 K 64 - 128 K 16 K - 55.2 M 20 - 40 M

(bps)

Page 20: 1 CS716 Advanced Computer Networks By A. Wahid Shaikh

20

ADSL(Asymmetric Digital Subscriber Line)

• Connects the subscriber to the central office via the local loop

• Bandwidth depends on length of local loop

Centraloffice

Subscriberpremises

1.554– 8.448 Mbps

16– 640 Kbps

Local loop2.74 – 5.48 Km

Page 21: 1 CS716 Advanced Computer Networks By A. Wahid Shaikh

21

VDSL(Very high data rate DSL)

• Connects the subscriber to the optical network that reaches the neighborhood

• Runs over short distances

• Symmetric

Centraloffice

Neighborhood opticalnetwork unit

STS-N

over fiber

Subscriberpremises

VDSL at 12.96– 55.2 Mbps

over 1000– 4500 feet of copper

Page 22: 1 CS716 Advanced Computer Networks By A. Wahid Shaikh

22

CATV

• Uses existing cable TV (CATV) infrastructure– reaches 95% of households in U.S.

• Single CATV channel has bandwidth of 6 MHz

• Can be used in asymmetric way

• Currently achieves on a single channel:– 40 Mbps downstream (100 Mbps theoretical capacity)– 20 Mbps upstream

• Multiple access on shared channel (IEEE 802.14)

Page 23: 1 CS716 Advanced Computer Networks By A. Wahid Shaikh

23

Optical Communication

• Higher bandwidths• Superior attenuation properties• Immune from electromagnetic

interference• No cross-talk between fibers• Thin, lightweight and cheap (the fiber, not

the optical-electrical interfaces)

Page 24: 1 CS716 Advanced Computer Networks By A. Wahid Shaikh

24

Wireless Links• Satellite links

• Provide a grid of medium and low orbit satellites– Geosynchronous satellite 600-1000 Mbps

– Low Earth Orbit (LEO) array ~400 Mbps

• Targeted at voice communication modems

• Teledesic supports 1440 16 kbps satellite-to-earth channels (~2 Mbps); 155.5 Mbps intersatellite channels

Page 25: 1 CS716 Advanced Computer Networks By A. Wahid Shaikh

25

Wireless Links• Radio and infra-red frequency links

• 11 Mbps rates, 2.4 GHz band, distances of 50-150 meters– 5.2 GHz band, > 55 Mbps: HIPERLAN-1, IEEE

802.11a

• Bluetooth piconets: Infrared links, 1 Mbps, 10 meters

Page 26: 1 CS716 Advanced Computer Networks By A. Wahid Shaikh

26

Encoding

Page 27: 1 CS716 Advanced Computer Networks By A. Wahid Shaikh

27

Point-to-Point Links

• Reading: Peterson and Davie, Ch. 2

• Hardware building blocks• Encoding• Framing• Error Detection• Reliable transmission

– Sliding Window Algorithm

Page 28: 1 CS716 Advanced Computer Networks By A. Wahid Shaikh

28

Encoding

• Signals propagate over a physical medium– modulate electromagnetic waves

– e.g., vary voltage

• Encode binary data onto signals that propagate

Signalling component

Signal

Bits

Node NodeAdaptor Adaptor

Page 29: 1 CS716 Advanced Computer Networks By A. Wahid Shaikh

29

Encoding

• Problems with signal transmission– Attenuation: signal power absorbed by medium

– Dispersion: a discrete signal spreads in space

– Noise: random background “signals”

modulator demodulatora string

of signals

Digital data (a string of symbols)

Digital data (a string of symbols)

Page 30: 1 CS716 Advanced Computer Networks By A. Wahid Shaikh

30

Advantages of Digital Transmission over Analog

• Reasonably low-error rates over arbitrary distances– Calculate/measure effects of transmission

problems

– Periodically interpret and regenerate signal

• Simpler for multiplexing distinct data types (audio, video, e-mail, etc.)

Page 31: 1 CS716 Advanced Computer Networks By A. Wahid Shaikh

31

Advantages of Digital Transmission over Analog

• Examples of modulators-demodulators (modems)

• Electronic Industries Association (EIA) standard RS-232(-C)

• International Telecommunications Union (ITU) standard V.32 96 kbps modem

Page 32: 1 CS716 Advanced Computer Networks By A. Wahid Shaikh

32

RS-232(-C)

• Communication between computer and modem

• Uses two voltage levels (+15V, -15V), a binary voltage encoding

• Data rate limited to 19.2 kbps (RS-232-C); raised in later standards

Page 33: 1 CS716 Advanced Computer Networks By A. Wahid Shaikh

33

RS-232(-C)

• Characteristics

• 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

Page 34: 1 CS716 Advanced Computer Networks By A. Wahid Shaikh

34

RS-232 Timing Diagram

+15

-15

volt

age

Idle start 1 0 0 1 1 0 0 stop idle

time

Page 35: 1 CS716 Advanced Computer Networks By A. Wahid Shaikh

35

RS-232

• One bit per clock

• Voltage never returns to 0V (0V is a dead / disconnected line)

• -15V is both idle and “1”; initiates the send by pushing to 15V for one clock (start bit)

Page 36: 1 CS716 Advanced Computer Networks By A. Wahid Shaikh

36

RS-232

• Minimum delay between character transmissions idle for one clock at –15V (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

Page 37: 1 CS716 Advanced Computer Networks By A. Wahid Shaikh

37

Binary Voltage Encoding

• NRZ (non-return to zero)

• NRZI (NRZ inverted)

• Manchester (used by IEEE 802.3, 10 Mbps Ethernet)

• 4B/5B (8B/10B) in Fast Ethernet

Page 38: 1 CS716 Advanced Computer Networks By A. Wahid Shaikh

38

Non-Return to Zero (NRZ)

• Encode binary data onto signals– e.g., 0 as low signal and 1 as high signal

– voltage does not return to zero between bits

• known as Non-Return to Zero (NRZ)

Bits

NRZ

0 0 1 0 1 1 1 1 0 1 0 0 0 0 1 0

Page 39: 1 CS716 Advanced Computer Networks By A. Wahid Shaikh

39

Problem: Consecutive 1s or 0s

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

– sender’s and receiver’s clock have to be precisely synchronized

– receiver resynchronizes on each signal transition

– clock drift in long periods without transition

sender’s clock

receiver’s clock

Page 40: 1 CS716 Advanced Computer Networks By A. Wahid Shaikh

40

Alternative Encodings• Non-Return to Zero Inverted (NRZI)

• Make a transition from current signal (switch voltage level) to encode/transmit a “one”

• Stay at current signal (maintain voltage level) to encode/ transmit a “zero”

• Solves the problem of consecutive ones (shifts to 0s)

Page 41: 1 CS716 Advanced Computer Networks By A. Wahid Shaikh

41

Alternative Encodings• Manchester (in IEEE 802.3 – 10 Mbps

Ethernet)

• Split cycle into two parts– Send high--low for “1”, low--high for “0”– Transmit XOR of NRZ encoded data and the

clock

• Only 50% efficient (1/2 bit per transition)

Page 42: 1 CS716 Advanced Computer Networks By A. Wahid Shaikh

42

Different Encoding Schemes

Bits

NRZ

Clock

Manchester

NRZI

0 0 1 0 1 1 1 1 0 1 0 0 0 0 1 0

Page 43: 1 CS716 Advanced Computer Networks By A. Wahid Shaikh

43

4B/5B Encoding

• Every 4 consecutive bits of data encoded in a 5-bit code (symbol)– 4-bit pattern is “translated” to a 5-bit pattern (not addition)

• 5-bit codes selected to have no more than one leading 0 and no more than two trailing 0s – 00xxx (8 symbols) and xx000 (4 symbols) are illegal– 5 free symbols (non-data)

• Thus, never gets more than three consecutive 0s• Resulting 5-bit codes are transmitted using NRZI • Achieves 80% efficiency

Page 44: 1 CS716 Advanced Computer Networks By A. Wahid Shaikh

44

Binary Voltage Encoding

• Problem: wide frequency range required, implying– Significant dispersion– Uneven attenuation

• Prefer to use narrow frequency band (carrier frequency)

• Types of modulation– Amplitude (AM)– Frequency (FM)– Phase / phase shift– Combination of these (e.g. QAM)

Page 45: 1 CS716 Advanced Computer Networks By A. Wahid Shaikh

45

Amplitude Modulation

idle idle 1 idle idle 0 idle idle

time

Page 46: 1 CS716 Advanced Computer Networks By A. Wahid Shaikh

46

Frequency Modulation

idle idle 1 idle idle 0 idle

time

Page 47: 1 CS716 Advanced Computer Networks By A. Wahid Shaikh

47

Phase Modulation

idle idle 1 idle idle 0 idle idle

time

Page 48: 1 CS716 Advanced Computer Networks By A. Wahid Shaikh

48

Phase Shift in Carrier Frequency

108 degrees difference in phasecollapse for 108 degrees shift

Page 49: 1 CS716 Advanced Computer Networks By A. Wahid Shaikh

49

Review Lecture 5

• Simplest possible network – 2 nodes connected directly

• Building blocks – nodes and links• Nodes – workstation architecture• Links – several types, optical, wireless• Encoding – binary data into signals, RS 232• Binary voltage encoding – NRZ, NRZI,

Manchester, 4B/5B• Modulation schemes