30
CS 453 CS 453 Computer Networks Computer Networks Lecture 7 Lecture 7 Layer 1 – Physical Layer Layer 1 – Physical Layer

CS 453 Computer Networks

  • Upload
    cheng

  • View
    51

  • Download
    4

Embed Size (px)

DESCRIPTION

CS 453 Computer Networks. Lecture 7 Layer 1 – Physical Layer. Physical Layer - Layer 1 Real Networks for Real People. Recall that we said Layer 1 is about moving bits So we look at ways to move bits from one place to another without being concerned with higher level communications issues - PowerPoint PPT Presentation

Citation preview

Page 1: CS 453 Computer Networks

CS 453CS 453Computer NetworksComputer Networks

Lecture 7Lecture 7

Layer 1 – Physical LayerLayer 1 – Physical Layer

Page 2: CS 453 Computer Networks

Physical Layer - Layer 1 Physical Layer - Layer 1 Real Networks for Real PeopleReal Networks for Real People

Recall that we said Layer 1 is about Recall that we said Layer 1 is about moving bitsmoving bits

So we look at ways to move bits from one So we look at ways to move bits from one place to another without being concerned place to another without being concerned with higher level communications issueswith higher level communications issues

That means that we have to have some That means that we have to have some medium to move those bits from one place medium to move those bits from one place to anotherto another

Page 3: CS 453 Computer Networks

Physical Layer - Layer 1 Physical Layer - Layer 1

Remember the earlier discussion about Remember the earlier discussion about physically connecting a set of n computers…physically connecting a set of n computers… If n = 2, no problem – 1 wireIf n = 2, no problem – 1 wire If n = 3, no problem – 2 wiresIf n = 3, no problem – 2 wires If n = 5, ok - 10 wiresIf n = 5, ok - 10 wires If n = 6, well – 15 wiresIf n = 6, well – 15 wires Its getting out of controlIts getting out of control

… … so as our intended network gets bigger it gets so as our intended network gets bigger it gets increasingly impractical to directly connect all increasingly impractical to directly connect all pairs of computerspairs of computers

Page 4: CS 453 Computer Networks

Physical Layer - Layer 1Physical Layer - Layer 1

So, when computer networking was So, when computer networking was getting off the ground…getting off the ground…

……we needed a communication medium we needed a communication medium infrastructure that would not require us to infrastructure that would not require us to pull wire from every computer to every pull wire from every computer to every other computer…other computer…

……this is especially important for this is especially important for connections over distancesconnections over distances

Page 5: CS 453 Computer Networks

Physical Layer - Layer 1Physical Layer - Layer 1

The ideal solution to this problem would be The ideal solution to this problem would be to find an infrastructure that is already in to find an infrastructure that is already in place…place…

And it just so happened that there was And it just so happened that there was one…one…

PSTN – The Public Switched Telephone PSTN – The Public Switched Telephone NetworkNetwork

Page 6: CS 453 Computer Networks

Physical Layer - Layer 1Physical Layer - Layer 1PSTNPSTN

30 or so years ago the PSTN was almost 30 or so years ago the PSTN was almost exclusively the only infrastructure for exclusively the only infrastructure for computer networking…computer networking…… … and we could not imagine that that and we could not imagine that that would ever change much.would ever change much.Today, the PSTN has a much smaller role Today, the PSTN has a much smaller role in the computer networking world, but…in the computer networking world, but…It still has an important role…It still has an important role…… … and will for the foreseeable future.and will for the foreseeable future.

Page 7: CS 453 Computer Networks

Physical Layer - Layer 1Physical Layer - Layer 1PSTNPSTN

When the telephone was invented, in the late When the telephone was invented, in the late 1800s, it was point to point device…1800s, it was point to point device…To talk to your neighbor you had to string a wire To talk to your neighbor you had to string a wire from your phone to your neighbor’s phone, if from your phone to your neighbor’s phone, if your neighbor had a phone.your neighbor had a phone.If two neighbors had phones, then each If two neighbors had phones, then each neighbor had to have a wire running from their neighbor had to have a wire running from their phone to each other phone-owning neighbor’s phone to each other phone-owning neighbor’s phone… and …phone… and …Does this seem familiar?Does this seem familiar?

Page 8: CS 453 Computer Networks

Physical Layer - Layer 1Physical Layer - Layer 1PSTNPSTN

The immediate solution was to put is The immediate solution was to put is switchboards (switches) and …switchboards (switches) and …

Each phone in the neighborhood was Each phone in the neighborhood was connected to a neighborhood switch, soconnected to a neighborhood switch, so

Each home only had to run one wire.Each home only had to run one wire.

A call, by the way, involved calling the A call, by the way, involved calling the switch operator and being manually switch operator and being manually connected to the receiving phones circuitconnected to the receiving phones circuit

Page 9: CS 453 Computer Networks

Physical Layer - Layer 1Physical Layer - Layer 1PSTNPSTN

This worked pretty well as long as you wanted to This worked pretty well as long as you wanted to call a neighbor, but….call a neighbor, but….

What if you wanted call a friend in a different What if you wanted call a friend in a different neighborhood?neighborhood?

To solve this telephone companies created trunk To solve this telephone companies created trunk circuits to connect switchescircuits to connect switches

So a call to your friend might involve going from So a call to your friend might involve going from you to a switch, then to another switch, then to you to a switch, then to another switch, then to another switch, then your friendanother switch, then your friend

Page 10: CS 453 Computer Networks

Physical Layer - Layer 1Physical Layer - Layer 1PSTNPSTN

(a) all possible neighbors, (b) through a switchboard, (c) (a) all possible neighbors, (b) through a switchboard, (c) interconnected switchesinterconnected switches

From: Tanenbaum (2003) pg. 119

Page 11: CS 453 Computer Networks

Physical Layer - Layer 1Physical Layer - Layer 1PSTNPSTN

Lines or circuits interconnecting switches are Lines or circuits interconnecting switches are called trunkscalled trunks

Trunks are higher bandwidthTrunks are higher bandwidth

A lot of work has been invested in making trunks A lot of work has been invested in making trunks yet higher bandwidthyet higher bandwidth

The connection from the customer/home to the The connection from the customer/home to the switch is called the local loopswitch is called the local loop

The local loop in almost all cases is twisted pair The local loop in almost all cases is twisted pair (cat3 these days) copper cable(cat3 these days) copper cable

Page 12: CS 453 Computer Networks

Physical Layer - Layer 1Physical Layer - Layer 1PSTNPSTN

Trunks have improved tremendously over the Trunks have improved tremendously over the years, but…years, but…The local loop has remained roughly the same The local loop has remained roughly the same for about 100 years.for about 100 years.Recall that local loops terminate at the switch in Recall that local loops terminate at the switch in a 3100 Hz low pass filter.a 3100 Hz low pass filter.So we have bandwidth of about 3000 Hz on the So we have bandwidth of about 3000 Hz on the local loop…local loop…And remember at layer 1 we are trying to move And remember at layer 1 we are trying to move bits…bits…

Page 13: CS 453 Computer Networks

Physical Layer - Layer 1Physical Layer - Layer 1PSTNPSTN

So how do we move bits across the PSTN?So how do we move bits across the PSTN?

In particular, how do we move bits across the In particular, how do we move bits across the local loop?local loop?

Answer: Answer: Use a 1000 Hz – 2000 Hz sine wave carrier, andUse a 1000 Hz – 2000 Hz sine wave carrier, and Modulate our data on top of that carrier…Modulate our data on top of that carrier… And, of demodulate the signal on the other endAnd, of demodulate the signal on the other end

……How do we modulate the data signal?How do we modulate the data signal?

Page 14: CS 453 Computer Networks

Physical Layer - Layer 1Physical Layer - Layer 1PSTNPSTN

From: Tanenbaum (2003)

Page 15: CS 453 Computer Networks

Physical Layer - Layer 1Physical Layer - Layer 1PSTNPSTN

Types of modulationTypes of modulation Amplitude modulation – binary 0 and 1 Amplitude modulation – binary 0 and 1

encode with different amplitudesencode with different amplitudes Frequency modulations – frequency shift Frequency modulations – frequency shift

keying (FSK) – encode the data by shifting keying (FSK) – encode the data by shifting between two frequencies (tones)between two frequencies (tones)

Phase modulation – Phase Shift Keying (PSK) Phase modulation – Phase Shift Keying (PSK) – encode the data by shifting the phase of the – encode the data by shifting the phase of the sine wave 0 or 180 degrees with changes in sine wave 0 or 180 degrees with changes in the data streamthe data stream

Page 16: CS 453 Computer Networks

Physical Layer - Layer 1Physical Layer - Layer 1PSTNPSTN

Remember that our local loop only has about Remember that our local loop only has about 3000 Hz of bandwidth3000 Hz of bandwidth

Remember Nyquist’s theorem – so we can, at Remember Nyquist’s theorem – so we can, at max, sample the signal 6000 samples per max, sample the signal 6000 samples per second (assuming clean signals)second (assuming clean signals)

But the signal is not necessarily clean, so most But the signal is not necessarily clean, so most modems sample at 2400 samples per secondmodems sample at 2400 samples per second

… … this ought to leave you pondering some this ought to leave you pondering some thingsthings

Page 17: CS 453 Computer Networks

Physical Layer - Layer 1Physical Layer - Layer 1PSTNPSTN

OK, lets take a definition break…OK, lets take a definition break… Bandwidth – refers to the range of frequencies that Bandwidth – refers to the range of frequencies that

will propagate through a medium with little attenuation will propagate through a medium with little attenuation – measured in Hertz– measured in Hertz

Baud – refers to a sampling of a signalBaud – refers to a sampling of a signal Baud rate – is the rate of sampling a signal ( not the Baud rate – is the rate of sampling a signal ( not the

same a data rate) - samples/secondsame a data rate) - samples/second Symbol – the information encoded in one sampleSymbol – the information encoded in one sample Bit rate (or data rate) – is the speed in which Bit rate (or data rate) – is the speed in which

information travel through a mediuminformation travel through a medium

Page 18: CS 453 Computer Networks

Physical Layer - Layer 1Physical Layer - Layer 1PSTNPSTN

More definitionsMore definitions So, for simple binary (1 bit) encoding…So, for simple binary (1 bit) encoding…

bit rate = Baud ratebit rate = Baud rate But, more generally…But, more generally…

Bit rate = baud rate * bits per symbol (i.e. bits per Bit rate = baud rate * bits per symbol (i.e. bits per sample)sample)

Page 19: CS 453 Computer Networks

Physical Layer - Layer 1Physical Layer - Layer 1PSTNPSTN

So, if the baud rate of our modems are So, if the baud rate of our modems are 2400 baud…2400 baud…

How do we get data rates of 4800 bps, How do we get data rates of 4800 bps, 9600 bps,…?9600 bps,…?

Page 20: CS 453 Computer Networks

Physical Layer - Layer 1Physical Layer - Layer 1PSTNPSTN

Remember that we talked about encoding Remember that we talked about encoding 1 bit per sample…1 bit per sample…

Can we do more than one bit?Can we do more than one bit?

If so, how?If so, how?

Page 21: CS 453 Computer Networks

Physical Layer - Layer 1Physical Layer - Layer 1PSTNPSTN

PSK – PSK – We said we can shift phase 0 or 180 degreesWe said we can shift phase 0 or 180 degrees ……that gives us 1 bitthat gives us 1 bit What if we used phase shifts of 45, 135, 225 What if we used phase shifts of 45, 135, 225

and 315 degrees?and 315 degrees? ……how many bits could we encode?how many bits could we encode?

Page 22: CS 453 Computer Networks

Physical Layer - Layer 1Physical Layer - Layer 1PSTNPSTN

PSKPSK So with 4 possible phase shifts…So with 4 possible phase shifts… We double the number of bits per sample We double the number of bits per sample

(bits per baud)(bits per baud) Now our bit rate doubles our baud rateNow our bit rate doubles our baud rate ……so what is our data rateso what is our data rate 4800 bps4800 bps … … called QPSK – Quadrature Phase Shift called QPSK – Quadrature Phase Shift

KeyingKeying

Page 23: CS 453 Computer Networks

Physical Layer - Layer 1Physical Layer - Layer 1PSTNPSTN

Constellation Diagrams for PSK and QPSKConstellation Diagrams for PSK and QPSK

QPSK

90

180

270

0

Binary PSK From: Tanenbaum (2003) pg. 128

Page 24: CS 453 Computer Networks

Physical Layer - Layer 1Physical Layer - Layer 1PSTNPSTN

So how do we get higher data rates?So how do we get higher data rates?

Can we take these modulation techniques Can we take these modulation techniques further?further?

How?How?

Page 25: CS 453 Computer Networks

Physical Layer - Layer 1Physical Layer - Layer 1PSTNPSTN

How about combining modulation techniques…How about combining modulation techniques…

Suppose you combine QPSK with 4 level Suppose you combine QPSK with 4 level amplitude modulation…amplitude modulation…

How many discrete states would you get in one How many discrete states would you get in one sample? sample?

4 phase shifts X 4 amplitude level = 16 states?4 phase shifts X 4 amplitude level = 16 states?

How many bits can you encode using this How many bits can you encode using this combined technique?combined technique?

QAM-16 – Quadrature Amplitude Modulation 16QAM-16 – Quadrature Amplitude Modulation 16

Page 26: CS 453 Computer Networks

Physical Layer - Layer 1Physical Layer - Layer 1PSTNPSTN

So with QAM-16So with QAM-16 How many bits can you encode per baud?How many bits can you encode per baud? What bit rate can you get at 2400 baud?What bit rate can you get at 2400 baud?

Can you take this idea further?Can you take this idea further? QAM-64 QAM-64 How many bits/baud?How many bits/baud? Bit rate?Bit rate?

Page 27: CS 453 Computer Networks

Physical Layer - Layer 1Physical Layer - Layer 1PSTNPSTN

Can you go further?Can you go further?Yes, but the quality of the signal depends on the Yes, but the quality of the signal depends on the modem’s ability to resolve phase shift levels and modem’s ability to resolve phase shift levels and amplitude levels.amplitude levels.Noise makes this differentNoise makes this differentTCM – Trellis Coded Modulation - using a bit for TCM – Trellis Coded Modulation - using a bit for parityparityV.32 modems – 32 Constellation pointsV.32 modems – 32 Constellation points4 data bits + 1 parity bit4 data bits + 1 parity bitData rate?Data rate?

Page 28: CS 453 Computer Networks

Physical Layer - Layer 1Physical Layer - Layer 1PSTNPSTN

From: Tanenbaum (2003) pg. 129

Page 29: CS 453 Computer Networks

Physical Layer - Layer 1Physical Layer - Layer 1PSTNPSTN

V.32bis modemsV.32bis modems Bit – 6+1 bits = 14,400 bpsBit – 6+1 bits = 14,400 bps QAM-128QAM-128

V.34 V.34 12 data bits/baud = 28,80012 data bits/baud = 28,800

V.34bisV.34bis 14 data bits/baud = ? 14 data bits/baud = ?

Page 30: CS 453 Computer Networks