39
CS 164: Slide Set 3: Chapter 2 Direct Link Networks

CS 164: Slide Set 3: Chapter 2 Direct Link Networks

  • View
    218

  • Download
    1

Embed Size (px)

Citation preview

Page 1: CS 164: Slide Set 3: Chapter 2 Direct Link Networks

CS 164: Slide Set 3: Chapter 2 Direct Link Networks

Page 2: CS 164: Slide Set 3: Chapter 2 Direct Link Networks

What are we looking at ?

• Networks in which there is no routing involved.

• We will look at the physical layer– signal representation, error correction.

• We will look at the link layer– Point to Point links – Multiple-access

• Ethernet, Token Ring

Page 3: CS 164: Slide Set 3: Chapter 2 Direct Link Networks

Network Adaptor and Device Driver

• Network adaptor sits on the Systems I/O and delivers data from the workstation’s memory to the network link.

• Device driver is the software module that manages this adaptor.– Issues commands such as from what

memory location should outgoing data be transmitted, where should the incoming data be stored etc.

Page 4: CS 164: Slide Set 3: Chapter 2 Direct Link Networks

Example architecture

I/O bus

(To network)

CPU

Memory

NetworkadaptorCache

Page 5: CS 164: Slide Set 3: Chapter 2 Direct Link Networks

Links

• We have already seen --– Twisted pair -- phone– Coaxial cable -- Cable TV – Optical Fiber– Free space -- IR etc.

Page 6: CS 164: Slide Set 3: Chapter 2 Direct Link Networks

Leased Lines

• Telephone lines -- long distance– DS1 or T1 line -- 1.544 Mbps– DS3 or T3 line --- 44.736 Mbps -- 30 T1

lines.

• T1 lines originally conceived for 24 digital voice circuits -- each of 64 Kbps.

• Leased line does not have to be a single unbroken piece of fiber -- logical connection.

Page 7: CS 164: Slide Set 3: Chapter 2 Direct Link Networks

Synchronous Transport Signal (STS)

• Optical signals -- also called OC for optical carrier.

• We have STS-1 (or OC-1), STS-3, STS-12, STS-24 and STS-48.

• STS-1 --> 840 Mbps.

Page 8: CS 164: Slide Set 3: Chapter 2 Direct Link Networks

Last Mile Links

• We talked about this -- ADSL, POTS --(Plain old telephone service) etc.

1.554─ 8.448 Mbps

16─ 640 Kbps

Local loop

Centraloffice

Subscriberpremises

Page 9: CS 164: Slide Set 3: Chapter 2 Direct Link Networks

Signals

• Electromagnetic waves -- travel at speed of light

• Frequency -- rate at which wave oscillates (Measured in Hertz).

• Wavelength = speed of light/ frequency -- distance between maxima and minima of a wave.

Page 10: CS 164: Slide Set 3: Chapter 2 Direct Link Networks

The spectrum

Radio Infrared UVMicrowave

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

Gamma ray

Page 11: CS 164: Slide Set 3: Chapter 2 Direct Link Networks

Modulation

• Data is in bits -- we need to somehow translate this to signal variations.– This process is modulation.

• Vary either the amplitude, frequency or phase of the signal --- dictated by the bit stream.

Page 12: CS 164: Slide Set 3: Chapter 2 Direct Link Networks

Encoding

• Represent binary data as signals.• Let us ignore modulation for the

moment.• We have two signals -- high and

low for representing 0s and 1s.– signals represent voltages.– 1 is high voltage, 0 is low voltage– As an example +5 V and -5 V.

Page 13: CS 164: Slide Set 3: Chapter 2 Direct Link Networks

The NRZ scheme.

Bits

NRZ

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

Page 14: CS 164: Slide Set 3: Chapter 2 Direct Link Networks

Problem with NRZ

• Receiver keeps an average of the signal received so far.

• Compares incoming signal to this average -- if significantly higher -- high, if significantly lower, then low.

• If too many zeroes or ones, difficult to track this average -- the average wanders -- called the baseline wander.

• If there are clock drifts between the sender and receiver, this cannot be detected -- how many bits were transmitted ?

Page 15: CS 164: Slide Set 3: Chapter 2 Direct Link Networks

Other encoding schemes

Bits

NRZ

Clock

Manchester

NRZI

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

• NRZI : Transition from current signal to encode a `1’. Stay at the same signal if it is a `0’.

• Solves problem with consecutive 1s but not zeroes.

Page 16: CS 164: Slide Set 3: Chapter 2 Direct Link Networks

Manchester EncodingBits

NRZ

Clock

Manchester

NRZI

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

• X-OR the NRZ with a clock

• 0 --> represented as a low to high transition.

• 1 -- > represented as a high to low transition.

Page 17: CS 164: Slide Set 3: Chapter 2 Direct Link Networks

Problem with Manchester Encoding

• Doubles the rate of transitions.• Half the time for the receiver to detect

each pulse– Increase in complexity

• Bit rate = 1/2 Baud rate for Manchester encoding.

• Note -- baud rate represents signal rate and in some cases, bit rate could be higher than baud rate -- multiple bits mapped onto a signal.

Page 18: CS 164: Slide Set 3: Chapter 2 Direct Link Networks

4B/5B encoding• Insert extra bits into bit stream to break

long sequences of 0’s and 1’s.• Specifically every four bits of data encoded

into a five bit code.• Codes such that no more than 2 trailing

zeroes and no more than 1 leading zero. (When codes are transmitted back to back no more than 3 consecutive zeroes.

• Resulting codes transmitted using NRZI.• Specific codes -- 11111 -- Line idle

00000 -- Line dead 00100 -- Halt

Page 19: CS 164: Slide Set 3: Chapter 2 Direct Link Networks

Framing

• Blocks of data (each consisting of bits) exchanged between nodes that form a link-- these blocks are called frames.

• Network adaptor allows exchange of frames.

Page 20: CS 164: Slide Set 3: Chapter 2 Direct Link Networks

Point to Point Links

• Link Layer protocols are used.• Popular Link layer protocols

are BISYNC, PPP and DDCMP.• The protocols deal with the

transfer of frames across point-to-point links.

Page 21: CS 164: Slide Set 3: Chapter 2 Direct Link Networks

BISYNC

• Binary Synchronous Communication (IBM).

Header Body

8 8 8 8 168

CRC

• STX and ETX denote start of text and end of text.

• If ETX appears in body of message, precede with DLE (Data Link Escape).

• If DLE appears precede with another DLE.

• Called Character Stuffing

Page 22: CS 164: Slide Set 3: Chapter 2 Direct Link Networks

DDMCP• Digital Data Communication Message Protocol• Instead of indicating end of text, frame length

specified by a “count”.

Header Body

8 8 4214 168

CRCCount

• The danger is that count could get corrupted.

• Similar ETX in BISYNC could get corrupted.

• Framing errors could result -- error correction/ retransmissions

Page 23: CS 164: Slide Set 3: Chapter 2 Direct Link Networks

PPP

• Point to Point protocol -- most popular – Commonly run over dial up

modem links.– Can be used over Ethernet too -->

Look for RFC.

Page 24: CS 164: Slide Set 3: Chapter 2 Direct Link Networks

PPP Frame

ProtocolControlAddressFlag Payload

88 816168

FlagChecksum

Usually contain default values

Used for demultiplexing

• The protocol field identifies the higher layer protocol -- typically IP.

• Payload default is 1500 bytes but negotiable.

Page 25: CS 164: Slide Set 3: Chapter 2 Direct Link Networks

LCP -- Link Control Protocol

• Initial PPP set up.• Can be used to negotiate

payload size.• LCP messages encapsulated

into PPP frames.– Protocol field set to LCP

Page 26: CS 164: Slide Set 3: Chapter 2 Direct Link Networks

LCP Operations

Dead Link Establishment

Open

Authenticate

Network Layer Conf

Terminating

carrier detection or indication that PHY layer is present by system admin.

Send LinkConfiguration Options•Set Protocol = LCP• Configure req/ack

exchange

Configure NetworkLayer

Exchange IP addr.

Page 27: CS 164: Slide Set 3: Chapter 2 Direct Link Networks

Bit Oriented Protocols

• Previous protocols were byte oriented.

• Bit oriented protocols not concerned with byte boundaries.

• HDLC is an example.

Page 28: CS 164: Slide Set 3: Chapter 2 Direct Link Networks

HDLC• High level data link control

Header Body

8 16 16 8

CRCBeginningsequence

Endingsequence

• Both beginning and ending by a “distinguished” bit sequence.

• If sequence appears in text use character stuffing

• Analog of DLE -- bit stuffing -- upon 5 consecutive 1s, inserts a zero.

Page 29: CS 164: Slide Set 3: Chapter 2 Direct Link Networks

SONET

• Synchronous Optical Network Standard developed for transmission over fiber.

• SONET frame has special information that tells receiver where frame starts and ends -- no bit stuffing.

Page 30: CS 164: Slide Set 3: Chapter 2 Direct Link Networks

SONET or STS-1 FramesOverhead Payload

90 columns

9 rows

• First three bytes overhead

• Total 810 bytes.

• 2 byte pattern at beginning -- receiver has to see this every 810 bytes -- if it does it concludes that it is in sync.

Page 31: CS 164: Slide Set 3: Chapter 2 Direct Link Networks

Multiplexing with SONET

• Time is the same but now, a different amount of data is transmitted.

• In each STS-3 frame we have 3x810 = 2430 bytes.• Interleave bytes --1st byte of first STS-1, 1st byte of

2nd STS-1 and so on. – Ensures that bytes from each STS-1 are evenly paced and

arrive at a smooth 51 Mbps rate at receiver.• Bottomline: STS-3 channel could contain multiple low-

data rate STS-1 channel.

STS-1 STS-1 STS-1

STS-3cHdr

Page 32: CS 164: Slide Set 3: Chapter 2 Direct Link Networks

STS-Nc frames.

• Payloads linked together instead of interleaving.

• Concatenation instead of multiplexing.– Cannot be multiplexed from different

streams.– Called STS-Nc (As an example STS-3c).

• One of the fields in header used to denote concatenation.

• Read rest of stuff on SONET from book.

Page 33: CS 164: Slide Set 3: Chapter 2 Direct Link Networks

Error Detection

• How does one deal with bit errors ?• Simplest thing to do -- send two

copies of each bit. – If copies match, then data ok, else in

error.– Too much redundancy --in most cases

errors not that frequent (especially on fiber and coax).

• However, some redundancy will be needed.

Page 34: CS 164: Slide Set 3: Chapter 2 Direct Link Networks

Adding parity bits• We can add parity bits.• One dimensional parity -- One extra

parity bit added to a 7 bit code to balance the number of 1s.– If number of 1’s is odd, parity bit is odd.– Else it is even.

• If one of the bits gets corrupted, then it can be detected.

• Multiple errors cannot be :(.

Page 35: CS 164: Slide Set 3: Chapter 2 Direct Link Networks

Two Dimensional Parity

• Do a similar thing across frames in addition to along bytes!

• Catches 1 bit, 2 bit, 3 bit errors and most 4 bit errors.

• How? -- both row and column parities are affected by a bit error.

1011110 1

1101001 0

0101001 1

1011111 0

0110100 1

0001110 1

1111011 0

Paritybits

Paritybyte

Data

Page 36: CS 164: Slide Set 3: Chapter 2 Direct Link Networks

Internet Checksum

• Simple algorithm to compute a checksum.

• Take all words -- add up and transmit result of the sum using 1’s complement arithmetic.

• Smaller number of error protection bits but less protection.

Page 37: CS 164: Slide Set 3: Chapter 2 Direct Link Networks

Summary

• We have so far seen– What is modulation ?– Encoding schemes.

• Link layer protocols --BISYNC, PPP, DDMCP, SONET, HDLC.

• Error detection using parity• Internet Checksum.• Sections 2.1 to 2.4.2

Page 38: CS 164: Slide Set 3: Chapter 2 Direct Link Networks

Next

• CRC --cyclic redundancy check.• Retransmissions for reliable

transmission.• Multiple access channels.

Page 39: CS 164: Slide Set 3: Chapter 2 Direct Link Networks