Presentation is loading. Please wait.

Presentation is loading. Please wait.

Lect-10-2: Physical Layer Computer Networks1 371-1-0291 : An Introduction to Computer Networks Handout #12: Physical Layer Signaling, Coding and Clocking.

Similar presentations


Presentation on theme: "Lect-10-2: Physical Layer Computer Networks1 371-1-0291 : An Introduction to Computer Networks Handout #12: Physical Layer Signaling, Coding and Clocking."— Presentation transcript:

1 Lect-10-2: Physical Layer Computer Networks1 371-1-0291 : An Introduction to Computer Networks Handout #12: Physical Layer Signaling, Coding and Clocking Additional Reading Text book: Chap. 2.1-2.5 Homepage http://help.cse.bgu.ac.il/cse/Courses/list.asp

2 Lect-10-2: Physical Layer Computer Networks2 Outline  Signaling bits on a link  Encoding bits for clock-recovery  Elasticity buffers

3 Lect-10-2: Physical Layer Computer Networks3 Signaling bits on a link Most electrical and optical networks signal bits using two distinct voltage/power levels called NRZ (Non-Return to Zero). 0 11 0 0 5 time Volts Coaxial cable Twisted pair 0 1 1 0 0mW 10mW time Power Optical Fiber 1 0 Physical media that propagate signals (electromagnetic waves) Rise and fall times

4 Lect-10-2: Physical Layer Computer Networks4 Signaling bits on a link All links have a maximum bandwidth that limits fast data bits can be generated. Thus, limits the maximum capacity or data rate of the link. Frequency Magnitude Bandwidth Frequency Magnitude Bandwidth

5 Lect-10-2: Physical Layer Computer Networks5 Maximum Capacity/Data Rate Shannon Capacity: Bandwidth of linkSignal-to-Noise ratio For example:  Bandwidth of voice grade telephone lines carry frequencies between 300-3300 Hz. Thus, its bandwidth is approx 3 KHz  Signal-to-noise ratio is approx 30dB = 10log 10 (S/N)  Therefore, C = 3000*log 2 (1001) ~= 30kb/s

6 Lect-10-2: Physical Layer Computer Networks6 Outline  Signaling bits on a link  Encoding bits for clock-recovery  Elasticity buffers

7 Lect-10-2: Physical Layer Computer Networks7 Encoding for clock recovery Problem:  Different hosts use locally-generated clocks of nominally the same frequency, but slightly different. E.g. 10MHz +/- 100ppm (“parts per million”) 1.  The receiver needs to “recover” the senders clock from the data stream, for example: 10MHz clock +/- 100ppm Flip- Flop Flip- Flop Sender Sender’s Clock Flip- Flop Clock Recovery Unit 10MHz clock +/- 100ppm Receiver Network Link 1) One part per million equals 10 -4 %. Elasticity buffer

8 Lect-10-2: Physical Layer Computer Networks8 If we don’t know the sender’s clock Data TX Clock RX Clock Missed! T Rx T Tx 1 23 123 Sampling points are in the middle 4 ( The bit times sum up to 0.5 frame)

9 Lect-10-2: Physical Layer Computer Networks9 Encoding for clock recovery  To decode a signal, a RCV averages the signal power it has been observed so far  If the signal is > a threshold it decodes “1”  Otherwise, it decodes “0”  Clock sync are recovered when a RCV notices a transition between two levels  Long sequences of “1” or of “0” jeopardize clock recovery  Thus, we want to prevent them by special encoding

10 Lect-10-2: Physical Layer Computer Networks10 Encoding for clock recovery  To encode “1”, switch from current level  To encode “o”, stay at current level  Takes care of long “1”’s but not on long “0” NRZ Inverted (NRZI)  Merges the local alternating clock with the data by transmitting their XOR  Used in 10Mb/s Ethernet Manchester Encoding

11 Lect-10-2: Physical Layer Computer Networks11 NRZ Data Clock cycle Manchester Encoding 01101011  “1” is a “low-2-high” transition and “0” a “high-2-low”  Because both bits result in transitions, clock can be recovered effectively  XOR at the RCV with a sync clock decodes the transmitted bits

12 Lect-10-2: Physical Layer Computer Networks12  Half the bit rate that can sent on the media  A transition needs to be detected rather than the power level Manchester Encoding Disadvantage

13 Lect-10-2: Physical Layer Computer Networks13 $B/5B Encoding for clock recovery Example #2: FDDI 4-bit data5-bit code 000011110 000101001 001010100 ……  Insert extra bit to break up long sequences of “1” or “0”  Blocks of 4 bits are encoded in to blocks of 5 bits:  Each block has no more than 1 leading 0  And no more than 2 trailing 0’s  No pair of blocks has more than 3 consecutive 0’s  The 5B blocks are transmitted with the NRZI encoding

14 Lect-10-2: Physical Layer Computer Networks14 Advantages of 4b/5b encoding:  More bandwidth efficient (only 25% overhead).  Allows extra codes to be used for control information. Disadvantages  Fewer transitions can make clock recovery harder.  Solved by the NRZI encoding

15 Lect-10-2: Physical Layer Computer Networks15 Outline  Signaling bits on a link  Encoding bits for clock-recovery  Elasticity buffers

16 Lect-10-2: Physical Layer Computer Networks16 The need for an elasticity buffer Problem:  The sender’s clock may be slower or faster than the receiver’s clock. E.g. 10MHz +/- 100ppm (“parts per million”).  How big should the FIFO be? 10MHz clock +/- 100ppm Flip- Flop Flip- Flop Sender Sender’s Clock Flip- Flop Clock Recovery Unit 10MHz clock +/- 100ppm Receiver Network Link B Elasticity buffer

17 Lect-10-2: Physical Layer Computer Networks17 Sizing an elasticity buffer time Cumulative bytes Receiver clock faster: Elasticity buffer underflows Receiver clock slower: Elasticity buffer overflows BxRate Entrance rate to RCV buffer Exit rate from RCV buffer

18 Lect-10-2: Physical Layer Computer Networks18 Sizing an elasticity buffer B 1.At start of new packet, allow buffer to fill to B/2. 2.Size buffer so that it does not overflow or underflow before packet completes. 3.Ensure that the inter-packet gap is long enough to allow buffer to drain before next packet arrives.

19 Lect-10-2: Physical Layer Computer Networks19 Preventing overflow time Cumulative bytes Inter-packet gap > B/2R max Max Packet Size, P max B/2R To prevent overflow: R min R max Transmitted bytes Received bytes B/2 Filling rate 2nd half Max filling time

20 Lect-10-2: Physical Layer Computer Networks20 Preventing underflow time Cumulative bytes Inter-packet gap > B/2R max Max Packet Size, P max B/2R min To prevent underflow: R max R min Transmitted bytes Received bytes B/2R Draining rate 1st half Max draining time

21 Lect-10-2: Physical Layer Computer Networks21 Sizing an elasticity buffer Example: FDDI Maximum packet size 4500bytes Clock tolerance +/- 50ppm Therefore, 1.Buffer larger than 7 bits 2.Wait for at least 3.5 bits before draining buffer 3.Inter-packet gap at least 3.5bits = 2x50 ppm


Download ppt "Lect-10-2: Physical Layer Computer Networks1 371-1-0291 : An Introduction to Computer Networks Handout #12: Physical Layer Signaling, Coding and Clocking."

Similar presentations


Ads by Google