fall 2000datacom 11 outline hardware building blocks encoding framing error detection sliding window...

31
Fall 2000 Datacom 1 1 Outline Hardware Building Blocks Encoding Framing Error Detection Sliding Window Algorithm Point-to-Point Links

Upload: shannon-merritt

Post on 13-Jan-2016

216 views

Category:

Documents


1 download

TRANSCRIPT

Page 1: Fall 2000Datacom 11 Outline Hardware Building Blocks Encoding Framing Error Detection Sliding Window Algorithm Point-to-Point Links

Fall 2000 Datacom 1 1

OutlineHardware Building BlocksEncodingFramingError DetectionSliding Window Algorithm

Point-to-Point Links

Page 2: Fall 2000Datacom 11 Outline Hardware Building Blocks Encoding Framing Error Detection Sliding Window Algorithm Point-to-Point Links

Fall 2000 Datacom 1 2

Network Connections

Memory latency is more important than CPU speed

Page 3: Fall 2000Datacom 11 Outline Hardware Building Blocks Encoding Framing Error Detection Sliding Window Algorithm Point-to-Point Links

Fall 2000 Datacom 1 3

Encoding

Bits

NRZ

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

Page 4: Fall 2000Datacom 11 Outline Hardware Building Blocks Encoding Framing Error Detection Sliding Window Algorithm Point-to-Point Links

Fall 2000 Datacom 1 4

The Electromagnetic Spectrum

Page 5: Fall 2000Datacom 11 Outline Hardware Building Blocks Encoding Framing Error Detection Sliding Window Algorithm Point-to-Point Links

Fall 2000 Datacom 1 5

Cables and Fiber Link Bandwidths

Cable Typical Bandwidth Length

Category 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

Page 6: Fall 2000Datacom 11 Outline Hardware Building Blocks Encoding Framing Error Detection Sliding Window Algorithm Point-to-Point Links

Fall 2000 Datacom 1 6

Leased Line Service BandwidthService Bandwidth

DS 1 1.544 Mbps=24*64 Kbps

DS 3 44.736 Mbps=30 * DS1

STS-1 (Synchronous Transport Signal also Optical Carrier (OC))

51.840 Mbps

STS-3 155.250 Mbps =3* STS-1

STS-12 622.080 Mbps

STS-24 1.244160 Mbps

STS-48 2.488320 Mbps

Page 7: Fall 2000Datacom 11 Outline Hardware Building Blocks Encoding Framing Error Detection Sliding Window Algorithm Point-to-Point Links

Fall 2000 Datacom 1 7

Services at the home

Service Bandwidth

POTS 28.8-56 Kbps

ISDN 64-128 Kbps

xDSL 16 Kbps-55.2 Mbps

CATV 20-40 Mbps

Page 8: Fall 2000Datacom 11 Outline Hardware Building Blocks Encoding Framing Error Detection Sliding Window Algorithm Point-to-Point Links

Fall 2000 Datacom 1 8

Asymmetric Digital Subscriber Line (ADSL)

Page 9: Fall 2000Datacom 11 Outline Hardware Building Blocks Encoding Framing Error Detection Sliding Window Algorithm Point-to-Point Links

Fall 2000 Datacom 1 9

Very high data rate DSL(symmetric)

Page 10: Fall 2000Datacom 11 Outline Hardware Building Blocks Encoding Framing Error Detection Sliding Window Algorithm Point-to-Point Links

Fall 2000 Datacom 1 10

Wireless Links

Project Orbit (km) Number of Satellites

Uplink freqs.

Downlink

Freq.

ICO 10,355 10 2170-2200 MHz

1980-2010 MHz

Globalstar 1,410 48 L-band S-band

Iridium 780 66 L-band L-band

Teledesic 1350 288 Ka-band Ka-band

Page 11: Fall 2000Datacom 11 Outline Hardware Building Blocks Encoding Framing Error Detection Sliding Window Algorithm Point-to-Point Links

Fall 2000 Datacom 1 11

Wireless LANs

• HIPERLAN (High Performance European Radio LAN--5.2 GHz and 17 GHz

• IEEE 802.11---2.4 GHz• PICONET

– Bluetooth (Ericsson, Nokia, IBM, Toshiba, Intel)

– 2.45 GHz, 1 Mbps, 10 M

Page 12: Fall 2000Datacom 11 Outline Hardware Building Blocks Encoding Framing Error Detection Sliding Window Algorithm Point-to-Point Links

Fall 2000 Datacom 1 12

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

Page 13: Fall 2000Datacom 11 Outline Hardware Building Blocks Encoding Framing Error Detection Sliding Window Algorithm Point-to-Point Links

Fall 2000 Datacom 1 13

Alternative Encodings

• Non-return to Zero Inverted (NRZI)– make a transition from current signal to encode a one;

stay at current signal to encode a zero– solves the problem of consecutive ones

• Manchester– transmit XOR of the NRZ encoded data and the clock– only 50% efficient.

Page 14: Fall 2000Datacom 11 Outline Hardware Building Blocks Encoding Framing Error Detection Sliding Window Algorithm Point-to-Point Links

Fall 2000 Datacom 1 14

Coding Examples

Page 15: Fall 2000Datacom 11 Outline Hardware Building Blocks Encoding Framing Error Detection Sliding Window Algorithm Point-to-Point Links

Fall 2000 Datacom 1 15

Encodings (cont)

• 4B/5B– every 4 bits of data encoded in a 5-bit code– 5-bit codes selected to have no more than one leading 0

and no more than two trailing 0s – thus, never get more than three consecutive 0s– resulting 5-bit codes are transmitted using NRZI – achieves 80% efficiency

Page 16: Fall 2000Datacom 11 Outline Hardware Building Blocks Encoding Framing Error Detection Sliding Window Algorithm Point-to-Point Links

Fall 2000 Datacom 1 16

Framing

• Break sequence of bits into a frame• Typically implemented by network adaptor

Frames

BitsAdaptor Adaptor Node BNode A

Page 17: Fall 2000Datacom 11 Outline Hardware Building Blocks Encoding Framing Error Detection Sliding Window Algorithm Point-to-Point Links

Fall 2000 Datacom 1 17

Approaches• Bit-Oriented Approach-High level Data Link

Control (HDLC)

– delineate frame with special pattern: 01111110

– problem: special pattern appears in the payload

– solution: bit stuffing

• sender: insert 0 after five consecutive 1s

• receiver: delete 0 that follows five consecutive 1s

Header Body

8 16 16 8

CRCBeginningsequence

Endingsequence

Page 18: Fall 2000Datacom 11 Outline Hardware Building Blocks Encoding Framing Error Detection Sliding Window Algorithm Point-to-Point Links

Fall 2000 Datacom 1 18

Bit stuffing example

Page 19: Fall 2000Datacom 11 Outline Hardware Building Blocks Encoding Framing Error Detection Sliding Window Algorithm Point-to-Point Links

Fall 2000 Datacom 1 19

Approaches (cont)

• Byte oriented Protocols• Byte Counting- based

– include payload length in header– e.g., Digital Data Communication Message Protocol (DDCMP)

– problem: count field corrupted– solution: catch when CRC fails

SY

N

Header Body

8 8 4214 168

SY

N

Cla

ss CRCCount

Page 20: Fall 2000Datacom 11 Outline Hardware Building Blocks Encoding Framing Error Detection Sliding Window Algorithm Point-to-Point Links

Fall 2000 Datacom 1 20

Byte stuffing example

Page 21: Fall 2000Datacom 11 Outline Hardware Building Blocks Encoding Framing Error Detection Sliding Window Algorithm Point-to-Point Links

Fall 2000 Datacom 1 21

Approaches (cont)

• Clock-based– each frame is 125us long– e.g., SONET: Synchronous Optical Network– STS-n (STS-1 = 51.84 Mbps)

Overhead Payload

90 columns

9 rows

STS-1Hdr STS-1Hdr STS-1Hdr

STS-3cHdr

Page 22: Fall 2000Datacom 11 Outline Hardware Building Blocks Encoding Framing Error Detection Sliding Window Algorithm Point-to-Point Links

Fall 2000 Datacom 1 22

Error Detection and Correction

• Two dimensional Parity• Internet checksum• Cyclic Redundency Check

Page 23: Fall 2000Datacom 11 Outline Hardware Building Blocks Encoding Framing Error Detection Sliding Window Algorithm Point-to-Point Links

Fall 2000 Datacom 1 23

Two Dimensional Parity

Page 24: Fall 2000Datacom 11 Outline Hardware Building Blocks Encoding Framing Error Detection Sliding Window Algorithm Point-to-Point Links

Fall 2000 Datacom 1 24

Cyclic Redundancy Check

• Add k bits of redundant data to an n-bit message– want k << n

– e.g., k = 32 and n = 12,000 (1500 bytes)

• Represent n-bit message as n-1 degree polynomial– e.g., MSG=10011010 as M(x) = x7 + x4 + x3 + x1

• Let k be the degree of some divisor polynomial– e.g., C(x) = x3 + x2 + 1

Page 25: Fall 2000Datacom 11 Outline Hardware Building Blocks Encoding Framing Error Detection Sliding Window Algorithm Point-to-Point Links

Fall 2000 Datacom 1 25

CRC (cont)

• Transmit polynomial P(x) that is evenly divisible by C(x) – shift left k bits, i.e., M(x)xk

– subtract remainder of M(x)xk / C(x) from M(x)xk

• Receiver polynomial P(x) + E(x)– E(x) = 0 implies no errors

• Divide (P(x) + E(x)) by C(x); remainder zero if:– E(x) was zero (no error), or

– E(x) is exactly divisible by C(x)

Page 26: Fall 2000Datacom 11 Outline Hardware Building Blocks Encoding Framing Error Detection Sliding Window Algorithm Point-to-Point Links

Fall 2000 Datacom 1 26

Selecting C(x)

• All single-bit errors, as long as the xk and x0 terms have non-zero coefficients.

• All double-bit errors, as long as C(x) contains a factor with at least three terms

• Any odd number of errors, as long as C(x) contains the factor (x + 1)

• Any ‘burst’ error (i.e., sequence of consecutive error bits) for which the length of the burst is less than k bits.

• Most burst errors of larger than k bits can also be detected

• See Table 2.6 on page 102 for common C(x)

Page 27: Fall 2000Datacom 11 Outline Hardware Building Blocks Encoding Framing Error Detection Sliding Window Algorithm Point-to-Point Links

Fall 2000 Datacom 1 27

CRC Example

Page 28: Fall 2000Datacom 11 Outline Hardware Building Blocks Encoding Framing Error Detection Sliding Window Algorithm Point-to-Point Links

Fall 2000 Datacom 1 28

CRC Example

Page 29: Fall 2000Datacom 11 Outline Hardware Building Blocks Encoding Framing Error Detection Sliding Window Algorithm Point-to-Point Links

Fall 2000 Datacom 1 29

CRC Example

Page 30: Fall 2000Datacom 11 Outline Hardware Building Blocks Encoding Framing Error Detection Sliding Window Algorithm Point-to-Point Links

Fall 2000 Datacom 1 30

CRC Example

Page 31: Fall 2000Datacom 11 Outline Hardware Building Blocks Encoding Framing Error Detection Sliding Window Algorithm Point-to-Point Links

Fall 2000 Datacom 1 31

Internet Checksum Algorithm

• View message as a sequence of 16-bit integers; sum using 16-bit ones-complement arithmetic; take ones-complement of the result.

u_shortcksum(u_short *buf, int count){ register u_long sum = 0; while (count--) { sum += *buf++; if (sum & 0xFFFF0000) { /* carry occurred, so wrap around */ sum &= 0xFFFF; sum++; } } return ~(sum & 0xFFFF);}