Upload
gordon-bryant
View
217
Download
2
Embed Size (px)
Citation preview
Using the Internet from Home:The Physical Layer
Chapter 4
Copyright 2001 Prentice HallRevision 2: July 2001
2Orientation
Using the Internet from Home– There are other applications– There are other ways to access the Internet
Chapter 3– Upper layers: HTTP, TCP, IP, and PPP– Governed by messages
This Chapter (4)– Physical layer standards– Transmit one bit at a time– Direct connection host-router and router-router
3Analog Transmission
In analog transmission, the state of line can vary continuously and smoothly among an infinite number of states– States can be signal strengths, voltages, or other
measurable conditions– Human voice is analog; telephone mouthpiece
generates analogous electrical signal
Time
Strength
4Digital Transmission
Time is divided into fixed-length clock cycles– For modems, there are a few thousand clock cycles per
second– For LANs, there are millions of clock cycles per second
The line is kept in one of only a few possible states (conditions) during each time period– cycle; this is why the signal must be kept constant
At the end of each time period, the line may change abruptly to another of these few states– Can also stay the same
5Digital Versus Binary Transmission
Digital transmission: a few states Binary transmission: exactly two states (1 and 0)
– Binary is a special case of digital
Digital Binary
Two StatesFew States
0
1
6Digital Versus Binary Transmission
Sender and Receiver associate one or more bits with each state– Simplest case: High state = 1, Low state = 0
– If four states, might have the following: Highest = 11 Second highest = 10 Next highest = 01 Lowest = 00
7Number of States versus Number of Bits Represented per Clock Cycle
2Bits per clock cycle=Number of states– For 1 bit per clock cycle,– 2 states are required (One for 1, one for 0)– 21=2– Binary
1
00 0 0
1
Clock Cycle
States
8Number of States versus Number of Bits Represented per Clock Cycle
2Bits/clock cycle=States/clock cycle– For 2 bits per clock cycle, 4 states are required (22=4)– For 3 bits per clock cycle, 8 states are needed (23=8)– For 4 bits per clock cycle, 16 states are needed (24=16)
3 (11)
2 (10)
1 (01)
0 (00)00
01
10 11
Clock Cycle
States
9Number of States versus Number of Bits Represented per Clock Cycle
2Bits per clock cycle=States/clock cycle– With 4 states, send two bits per clock cycle (22=4)– With 8 states, send 3 bits per clock cycle (23=8)– With 16 states, send 4 bits per clock cycle (24=16)
3 (11)
2 (10)
1 (01)
0 (00)00
01
10 11
Clock Cycle
States
10Bits and Baud
Baud Rate = Number of clock cycles/sec– In this example, 4 baud (not 4 bauds/second)– Note: Number of clock cycles, not actual line changes
Bit Rate = Number of bits/second– In this example, 8 bits/second
00
01
10
01
1 Second
Possible Change Not Made
11Equations
For Each Clock Cycle– 2Bits per clock cycle = Number of possible states (Eq. 1)
Overall– Bit rate = Baud Rate * Bits per clock cycle (Eq. 2)
Example– Baud rate of 10,000 with four possible states– Bits per clock cycle = 2 (22=4) (Eq. 1)– Bit rate = 10,000 * 2 (Eq. 2)– Bit rate = 20,000 bps
12Transmission Speeds
Bit: A single 1 or 0 Bits per second (bps)
– Factors of 1,000 (not 1,024 as in memory)– kilobits per second (kbps)--Note lower case k– megabits per second (Mbps)– gigabits per second (Gbps)– terabits per second (Tbps)– petabits per second (Pbps)
Occasionally given in bytes per second (Bps)– Bits per second / 8– Uncommon
100101001 ...
New
13Wire Propagation Effects
Propagation Effects– Signal changes as it travels– If change is too great, receiver may not be able to
recognize it
Distance
OriginalSignal
FinalSignal
14Wire Propagation Effects: Attenuation
Attenuation: Signal Gets Weaker as it Propagates– May become too weak for receiver to recognize
SignalStrength
Distance
15Wire Propagation Effects: Distortion
Distortion: Signal changes shape as it propagates– Adjacent bits may overlap– May make recognition impossible for receiver
Distance
16Wire Propagation Effects: Noise
Noise: Thermal Energy in Wire Adds to Signal– Noise floor is average noise energy– Random energy, so brief noise spikes sometimes occur
SignalStrength
Time
Noise
Spike
Noise Floor
17Wire Propagation Effects: Noise
Noise: Thermal Energy in Wire Adds to Signal– If noise spikes become as large as the signal, they are
likely to cause errors, switching 1s and 0s or just distorting the signal so that it cannot be received
SignalStrength
Time
Signal
Noise
Spike
Error
18Wire Propagation Effects
Noise and Attenuation– As signal attenuates, gets closer to noise floor– Smaller spikes can harm the signal– So noise errors increase with distance, even if the
average noise level is constant
SignalStrength
Distance
Signal
Noise Floor
19Wire Propagation Effects: SNR
Want a high Signal-to-Noise Ratio (SNR)– Signal strength divided by average noise strength– As SNR falls, errors increase
SignalStrength
Distance
Signal
Noise FloorSNR
20Wire Propagation Effects: Noise & Speed
Noise and Speed– As speed increases, each bit is briefer– Noise fluctuations do not average out as much– So noise errors increase as speed increases
One BitNoiseSpike
Average NoiseDuring Bit
Low Speed(Long
Duration)
One BitNoiseSpike
Average NoiseDuring Bit
High Speed(Short
Duration)
OK Error
21Wire Propagation Effects: Interference
Interference– Energy from outside the wire (nearby motors, other
wires, etc.)– Adds to signal, like noise– Often intermittent (comes and goes), so hard to diagnose– Often called electromagnetic interference (EMI)
SignalStrength
Signal
Interference
New
22Wire Propagation Effects: Cross-Talk Interference
Cross-Talk Interference– Often, there are multiple wires in a bundle– Each radiates some of its signal– Causes “cross-talk” interference in nearby wires
23Wire Propagation Effects:Cross Talk
Wire Usually is Twisted– Usually, several twists per inch– Interference adds to signal over half twist, subtracts
over other half– Roughly cancels out– Simple but effective
Single Twist
Interference- +
Signal
24Wire Propagation Effects:Cross Talk
Terminal Cross-Talk Interference– Wire must be untwisted at ends to fit into connectors– So cross-talk interference is high at termination– Problems severe if untwist more than about 1.25 cm
(1/2 inch)– Usually the biggest propagation effect
TerminalCross Talk
25Practical Issues in Propagation Effects
Distance limits in standards prevent serious propagation effects– For instance, usually 100 meters maximum for ordinary
copper wire– If stay within limits, usually no serious problems
Problems usually occur at connectors– Crossed wires– Poor connections– Cross-talk interference
New
26Wire Media: UTP
Unshielded Twisted Pair (UTP)– Ordinary copper wire
– Twisted several times per inch to reduce interference
– Pair of wires needed for a complete electrical signal
– Unshielded: nothing but plastic coating No protection from interference such as a wrap-
around foil covering
27Wire Media: UTP
Unshielded Twisted Pair (UTP)– Business telephone wiring traditionally comes in 4-pair
UTP wire bundles
– Used in LAN wiring to use existing building wiring technology
Jacket
28Wire Propagation: RJ-45
RJ-45 connector terminates a UTP bundle– Slightly wider than RJ-11 residential telephone
connector
– Width needed for 8 wires
RJ-45Connector
RJ-45Jack
29Wire Media: UTP to the Desktop
UTP– Dominant for line from desktop to first hub or switch– Inexpensive to buy and install– Rugged: can take punishment of office work– Easily 100 Mbps, 1 Gbps with careful insulation
UTP
First Hub or Switch
30Wire Media: Optical Fiber
Optical Fiber– Glass core, surrounding glass cladding– Light source turned on/off for 1/0– Total internal reflection at boundary– Almost no attenuation
LightSource
Cladding
Core
Reflection
31Wire Media: Optical Fiber
Limited by Distortion– Light entering at different angles travels different
distances (different number of reflections)
– Called different modes
– Light from successive bits becomes mixed over long distances
LightSource
Mod B
32Wire Media: Optical Fiber
Multimode Fiber– Wide core makes easy to splice (50 or 62 microns)
– Many angles for rays (modes)
– Short propagation distance (usually 200 m to 500 m)
LightSource
Mod B
33Wire Media: Optical Fiber
Single Mode Fiber– Narrow core difficult to splice (5 or 8 microns)
– Only one angle for rays (one mode), so (almost) no distortion
– Longer propagation distance (usually up to 2 km for LAN fiber, longer for long-distance fiber)
– Narrow core makes fiber fragile and difficult to splice
Mod B
34Wire Media: Optical Fiber
Optical Fiber– High speeds over long distances
200 m to 2 km– Costs more than UTP, but worth it on long runs – Good for all links between hubs and switches within
and between buildings in a site network
OpticalFiber
35Wire Media: UTP and Optical Fiber
The emerging pattern: UTP from first hub or switch to desk, Fiber everywhere else on site
36Wire Media: Coax
Coaxial Cable– Used in cable TV, VCRs– Central wire, external concentric cylinder– Outer conductor wrapped in PVC
Screw-On Connector
InnerWire
Outer Conductor Wrapped in PVC
37Wire Media: Coaxial Cable
Coaxial Cable
– Installed widely today in old 10 Mbps Ethernet LANs
– Not being used in new installations
Optical fiber more cost-effective for long links
UTP more cost-effective for desktop links
38PC 232 Serial Ports
Ports– Connectors at back of PC– Plus related internal electronics to send/receive
PC 232 Serial Port– Follows EIA/TIA 232 standards
39PC 232 Serial Ports: 9-Pin and 25-Pin Ports
9 pins or 25 pins
Parallel ports have 25 holes
Pins
Holes
9-pin Serial Port
25-pin Serial Port
25-pin Parallel Port
40232 Serial Ports: Send on One Pin Each Way
9-Pin 232 Serial Ports– PC sends on Pin 3 (modem
receives)
– PC receives on Pin 2 (modem sends)
– Pin 5 is a signal ground defining zero volts
PC Modem
41232 Serial Ports: Send on One Pin Each Way
9-Pin 232 Serial Ports– Other pins are control signals
to tell other side when it may transmit
– Or tell PC what modem is hearing on the line (ringing, modem carrier signal) PC Modem
42Serial and Parallel Transmission
Serial: one wire, one bit per clock cycle*– Second (ground) wire needed for circuit is not shown
1 0
OneBit inClockCycleOne
OneBit inClockCycleTwo
*For simplicity, we assume binary transmission (2 possible states/clock cycle)
43Serial and Parallel Transmission
Parallel– N bits per second on N wires– Parallel is faster than serial
1101100
1101100
0 0
Eight BitsIn Clock
Cycle One
Eight BitsIn Clock
Cycle Two
44Serial and Parallel Transmission
Parallel Transmission– N bits per second on N wires– N=8 in this example, but this is not the only possibility– N can also be 4, 16, 32, etc.
1101100
1101100
0 0
45Serial and Parallel Transmission
Parallel Transmission is Only for Short Distances– Usually up to about 2 meters (6 feet)– Wire propagation speeds vary– Over long distances, bits from different clock cycles
overlap
11
01
10
00
11
0110
00
46PC 232 Serial Ports: Voltages
For sending data– One is -3 to -15 volts (Yes, one is low)– Zero is +3 to +15 volts (Yes, zero is high)– Binary (only two possible states)
+15v
-15v
0
1
0
47PC 232 Serial Ports
PC 232 serial ports are binary because there are only two states (voltage levels)
PC 232 serial ports are serial because data is sent on only one wire at a time
These are separate things– One does not require the other
48Duplex
Full-duplex transmission: both sides can transmit simultaneously– Even if only one sends, still full-duplex line– Even if neither is sending, still full-duplex line
A B
Time 1Both can send
Both do
A B
Time 2Both can sendOnly A does
A B
Time 3Both can sendNeither does
49Duplex
Half-duplex transmission: only one can transmit at a time; must take turns– Still half duplex if neither transmits
A B A B
Time 1Only one side
Can sendA does
Time 2Only one side
Can sendNeither does
50Duplex
Duplex is a Characteristic of the Transmission System, Not of Use at a Given Moment
– In full duplex, both sides can transmit at once; in half duplex, only one side can transmit at a time
– Still full duplex system if only one side or neither side actually is transmitting at a moment
– Still half duplex if neither side actually is transmitting at a moment
51Radio Propagation
Broadcast signal– Not confined to a wire
52Radio Waves
When Electron Oscillates, Gives Off Radio Waves– Single electron gives a very weak signal– Many electrons in an antenna are forced to oscillate in
unison to give a practical signal
53Radio Propagation Problems
Wires Propagation is Predictable– Signals go through a fixed path: the wire– Propagation problems can be easily anticipated– Problems can be addressed easily
Radio Propagation is Difficult– Signals begin propagating as a simple sphere– Inverse square law attenuation– If double distance, only ¼ signal strength– If triple distance only 1/9 signal strength
New
54Radio Propagation Problems
Radio Propagation is Difficult– Signals can be blocked by dense objects– Creates shadow zones with no reception
New
ShadowZone
55Radio Propagation Problems
Radio Propagation is Difficult– Signals are reflected– May arrive at a destination via multiple paths– Signals arriving by different paths can interfere with
one another: called multipath interference– Can be constructive or destructive interference– Very different reception characteristics with in a few
meters or centimeters
New
56Radio Propagation: Waves
Waves
Amplitude(strength)
Wavelength(meters)
Frequency in hertz (Hz)Cycles per Second
One Second7 Cycles
1 Hz = 1 cycle per second
1
4
3
2
57Radio Propagation: Frequency Spectrum
Frequency Spectrum– Frequencies vary (like strings in a harp)– Frequencies measured in hertz (Hz)– Frequency spectrum: all possible frequencies from 0
Hz to infinity
0 Hz
58Frequencies
Metric system– kHz (1,000 Hz) kilohertz; note lower-case k
– MHz (1,000 kHz) megahertz
– GHz (1,000 MHz) gigahertz
– THz (1,000 GHz) terahertz
59Radio Propagation: Service Bands
Service Bands– Divide spectrum into bands for services– A band is a contiguous range of frequencies– FM radio, cellular telephone service bands etc.
0 Hz
Cellular Telephone
FM Radio
AM Radio
ServiceBands
60Radio Propagation: Channels and Bandwidth
Service Bands are Further Divided into Channels– Like television channels– Bandwidth of a channel is highest frequency minus
lowest frequency
0 Hz
Channel 3
Channel 2
Channel 1
ServiceBand
ChannelBandwidth
61Radio Propagation: Channels and Bandwidth
Example– Highest frequency of a radio channel is 43 kHz– Lowest frequency of the radio channel is 38 kHz– Bandwidth of radio channel is 5 kHz (43-38 kHz)
0 Hz
Channel 3
Channel 2
Channel 1
ServiceBand
ChannelBandwidth
62Radio Propagation: Channels and Bandwidth
Shannon’s Equation– W is maximum possible (not actual) transmission speed
in a channel– B is bandwidth of the channel: highest frequency minus
lowest frequency– S/N is the signal-to-noise ratio
W = B Log2 (1 + S/N)
63Radio Transmission: Broadband
Speed and Bandwidth– The wider the channel bandwidth (B), the faster the
maximum possible transmission speed (W)– W = B Log2 (1+S/N)
MaximumPossible
Speed
Bandwidth
64Telephony is Narrowband
Bandwidth in Telephone Channels is Narrow– Sounds below about 300 Hz cut off to reduce
equipment hum within telephone system
– Sounds above about 3,400 Hz cut off to reduce the bandwidth needed to send a telephone signal
20 kHz300 Hz 3.4 kHz
3.1 kHzRevised
Discussion
65Telephony is Narrowband
Bandwidth in Telephone Channels is Narrow– Signal is placed within a 4 kHz channel
Gives “guardbands”– Compared to 20 kHz channels, allows 5x number of
signals in radio transmission
20 kHz300 Hz 3.4 kHz
3.1 kHz
4 kHz Channel
RevisedDiscussion
66Telephony is Narrowband
Narrow Channels Mean Low Speed– Through Shannon’s equation, maximum possible
transmission speed in each telephone channel is only about 35 kbps.
This is narrowband transmission
20 kHz300 Hz 3.4 kHz
3.1 kHz
4 kHz Channel
RevisedDiscussion
67Broadband
Two Uses of the Term “Broadband”
Technically, the signal is transmitted in a single channel AND the bandwidth of the channel is large
– Therefore, maximum possible transmission speed is high
Popularly, if the signal is fast, the system is called “broadband” whether it uses channels at all