getting connected (chapter 2 part 1)diesburg/courses/cs3470_fa14/sessions/s...five problems of...

35
Getting Connected (Chapter 2 Part 1) Networking CS 3470, Section 1 Sarah Diesburg

Upload: others

Post on 16-Oct-2020

0 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Getting Connected (Chapter 2 Part 1)diesburg/courses/cs3470_fa14/sessions/s...Five Problems of Chapter 2 Delineating the sequence of bits into complete messages is called framing

Getting Connected (Chapter 2 Part 1)

Networking CS 3470, Section 1

Sarah Diesburg

Page 2: Getting Connected (Chapter 2 Part 1)diesburg/courses/cs3470_fa14/sessions/s...Five Problems of Chapter 2 Delineating the sequence of bits into complete messages is called framing

Five Problems

Encoding/decoding Framing Error Detection Error Correction Media Access

Page 3: Getting Connected (Chapter 2 Part 1)diesburg/courses/cs3470_fa14/sessions/s...Five Problems of Chapter 2 Delineating the sequence of bits into complete messages is called framing

Five Problems of Chapter 2

How do we turn signals into bits that are recognized at the receiver?

This is known as the encoding problem

S R

Page 4: Getting Connected (Chapter 2 Part 1)diesburg/courses/cs3470_fa14/sessions/s...Five Problems of Chapter 2 Delineating the sequence of bits into complete messages is called framing

Five Problems of Chapter 2

Delineating the sequence of bits into complete messages is called framing.

When does a frame start? Byte-oriented Bit-oriented Clock-based

Page 5: Getting Connected (Chapter 2 Part 1)diesburg/courses/cs3470_fa14/sessions/s...Five Problems of Chapter 2 Delineating the sequence of bits into complete messages is called framing

Five Problems of Chapter 2

Data verification Has the data been corrupted? If data has been corrupted, can we take the

appropriate action? This is the error detection problem. CRC 2-D parity Checksums

Page 6: Getting Connected (Chapter 2 Part 1)diesburg/courses/cs3470_fa14/sessions/s...Five Problems of Chapter 2 Delineating the sequence of bits into complete messages is called framing

Five Problems of Chapter 2

Error Recovery Frames that are damaged will need to be

retransmitted. This is the reliability problem ARQ Stop and wait Sliding window Concurrent channels

Page 7: Getting Connected (Chapter 2 Part 1)diesburg/courses/cs3470_fa14/sessions/s...Five Problems of Chapter 2 Delineating the sequence of bits into complete messages is called framing

Five Problems of Chapter 2

How do you arbitrate, or self-regulate access to a shared link?

This is the media-access problem Ethernet Token Ring Wireless

Page 8: Getting Connected (Chapter 2 Part 1)diesburg/courses/cs3470_fa14/sessions/s...Five Problems of Chapter 2 Delineating the sequence of bits into complete messages is called framing

Perspectives on Connecting

Page 9: Getting Connected (Chapter 2 Part 1)diesburg/courses/cs3470_fa14/sessions/s...Five Problems of Chapter 2 Delineating the sequence of bits into complete messages is called framing

Perspectives on Connecting

All the links seem the same, yet can be characterized in different ways

We can characterize them by the services and bandwidth they provide

9

Service Bandwidth (typical) Dail-up 28-56 Kbps ISDN (Integrated Services Digital Network)

64-128 Kbps

DSL (Digital Subscriber Line) 128 Kbps – 100 Mbps CATV (CAble TV) 1 – 40 Mbps FTTH (Fibre To The Home) 50 Mbps – 1 Gbps

Page 10: Getting Connected (Chapter 2 Part 1)diesburg/courses/cs3470_fa14/sessions/s...Five Problems of Chapter 2 Delineating the sequence of bits into complete messages is called framing

Perspectives on Connecting

Another way to characterize links is by their physical makeup Copper – DSL, coaxial, cat5e/cat6 cables Optical fiber – FTTH Air – Wireless

10

Page 11: Getting Connected (Chapter 2 Part 1)diesburg/courses/cs3470_fa14/sessions/s...Five Problems of Chapter 2 Delineating the sequence of bits into complete messages is called framing

Links

We care about electromagnetic waves These links provide the foundation to

propagate binary information/bits (0’s and 1’s) – otherwise known as encoding

11

Page 12: Getting Connected (Chapter 2 Part 1)diesburg/courses/cs3470_fa14/sessions/s...Five Problems of Chapter 2 Delineating the sequence of bits into complete messages is called framing

Visualizing Links

Network adaptors connect nodes to links Why abbreviated NIC?

Signals travel between signaling components

Presenter
Presentation Notes
NIC = network interface card, another term for network adaptor
Page 13: Getting Connected (Chapter 2 Part 1)diesburg/courses/cs3470_fa14/sessions/s...Five Problems of Chapter 2 Delineating the sequence of bits into complete messages is called framing

Data Encoding (signals)

13

Page 14: Getting Connected (Chapter 2 Part 1)diesburg/courses/cs3470_fa14/sessions/s...Five Problems of Chapter 2 Delineating the sequence of bits into complete messages is called framing

Tick, tock! Let's synchronize the clock Encoding and decoding processes are driven

by a clock Every clock cycle the sender transmits a bit

and the receiver recovers a bit

14

Clock

0 1 0 1

Page 15: Getting Connected (Chapter 2 Part 1)diesburg/courses/cs3470_fa14/sessions/s...Five Problems of Chapter 2 Delineating the sequence of bits into complete messages is called framing

Encoding

Encoding schemes NRZ (Non-return to zero) NRZI (Non-return to zero inverted) Manchester 4B/5B

Page 16: Getting Connected (Chapter 2 Part 1)diesburg/courses/cs3470_fa14/sessions/s...Five Problems of Chapter 2 Delineating the sequence of bits into complete messages is called framing

NRZ Non-Return to Zero

The simplest thing to do is to map “1” onto the high signal and “0” onto the low signal

There are a few challenges to this approach

Clock

NRZ

0 1 0 1

Page 17: Getting Connected (Chapter 2 Part 1)diesburg/courses/cs3470_fa14/sessions/s...Five Problems of Chapter 2 Delineating the sequence of bits into complete messages is called framing

NRZ Non-Return to Zero

Baseline Wander caused by signal averaging Receiver keeps average of signal it has received

so far and uses average to distinguish highs and lows

Problem occurs when to many consecutive 1’s or 0’s cause average to change

17

Presenter
Presentation Notes
Not to be confused with the mind wander phenomenon, which happens during long PowerPoint presentations.
Page 18: Getting Connected (Chapter 2 Part 1)diesburg/courses/cs3470_fa14/sessions/s...Five Problems of Chapter 2 Delineating the sequence of bits into complete messages is called framing

NRZ Non-Return to Zero

Clock recovery required when signal remains constant too long Receiver uses high-low transitions to mark the

clock boundaries What happens when we send a lot of consecutive

1’s or 0’s?

18

Page 19: Getting Connected (Chapter 2 Part 1)diesburg/courses/cs3470_fa14/sessions/s...Five Problems of Chapter 2 Delineating the sequence of bits into complete messages is called framing

NRZI Non-Return to Zero Inverted

Transition on the half-cycles 1's indicated by a transition (low-to-high, high-to-low) 0's are where there is no transition

Takes care of problem of consecutive 1’s Still a problem for consecutive zeros

Clock

NRZI

1 1 0 0

Page 20: Getting Connected (Chapter 2 Part 1)diesburg/courses/cs3470_fa14/sessions/s...Five Problems of Chapter 2 Delineating the sequence of bits into complete messages is called framing

Manchester Encoding

Transition on the half-cycles low-to-high indicates a zero high-to-low indicates a one

Receiver is able to synchronize clock every cycle

Clock

Manchester

0 0 1 1

Page 21: Getting Connected (Chapter 2 Part 1)diesburg/courses/cs3470_fa14/sessions/s...Five Problems of Chapter 2 Delineating the sequence of bits into complete messages is called framing

Baud rate

The baud rate is the rate at which the signal changes

The bit rate is the rate at which you can transmit information

For the same baud rate, NRZ and NRZI have twice the bit rate as Manchester.

Page 22: Getting Connected (Chapter 2 Part 1)diesburg/courses/cs3470_fa14/sessions/s...Five Problems of Chapter 2 Delineating the sequence of bits into complete messages is called framing

Different Encoding Strategies So Far…

22

Page 23: Getting Connected (Chapter 2 Part 1)diesburg/courses/cs3470_fa14/sessions/s...Five Problems of Chapter 2 Delineating the sequence of bits into complete messages is called framing

4B/5B encoding

4-bit payload in a 5-bit gift box Goal is to improve upon Manchester (50%

efficiency), but to avoid baseline wander and clock drift

Insert extra bits into bit stream to break up long sequences of 0’s and 1’s

5-bit codes selected such that there are never more than three consecutive zero's.

Resulting codes transmitted through NRZI encoding

Page 24: Getting Connected (Chapter 2 Part 1)diesburg/courses/cs3470_fa14/sessions/s...Five Problems of Chapter 2 Delineating the sequence of bits into complete messages is called framing

4B/5B

5 bits (32 patterns) to represent 4 bits (16 patterns) 5-bit patterns with no more than 1 leading zero 5-bit patterns with no more than 2 trailing zero's

16 leftovers 7 not valid Others control signals

11111 (idle) 00000 (dead) 00100 (bad)

Page 25: Getting Connected (Chapter 2 Part 1)diesburg/courses/cs3470_fa14/sessions/s...Five Problems of Chapter 2 Delineating the sequence of bits into complete messages is called framing

Framing

We know how to transmit bits on a link between two nodes

Now we need to figure out how to send distinct messages in frames (Think packets at the link layer)

Why would we want to break up messages into frames instead of just a bit stream?

25

Page 26: Getting Connected (Chapter 2 Part 1)diesburg/courses/cs3470_fa14/sessions/s...Five Problems of Chapter 2 Delineating the sequence of bits into complete messages is called framing

Framing

Framing Protocols Bi-sync HDLC PPP SONET

Framing Approaches Sentinel Approach Byte-counting approach

Page 27: Getting Connected (Chapter 2 Part 1)diesburg/courses/cs3470_fa14/sessions/s...Five Problems of Chapter 2 Delineating the sequence of bits into complete messages is called framing

Sentinel Approach

Use sentinel characters to designate where frames start and end Bi-sync frame format (IBM and mainframes)

HEA

DER

SYN

SYN

SOH

STX

ETX

CR

C

BO

DY

Page 28: Getting Connected (Chapter 2 Part 1)diesburg/courses/cs3470_fa14/sessions/s...Five Problems of Chapter 2 Delineating the sequence of bits into complete messages is called framing

Sentinel Approach

SYN Synchronization

STX Start of Text

ETX End of Text

SOH Start of Header (Why no EOH?)

CRC Cyclic Redundancy Check

Page 29: Getting Connected (Chapter 2 Part 1)diesburg/courses/cs3470_fa14/sessions/s...Five Problems of Chapter 2 Delineating the sequence of bits into complete messages is called framing

Character Stuffing

How do you handle the situation where the body contains STX, ETX, SOH, etc?

Escape out ETX with at Data Link Escape Character (DLE) Now, how do you deal with a body that has a DLE

in it? Also known as character stuffing Examples in programming

Page 30: Getting Connected (Chapter 2 Part 1)diesburg/courses/cs3470_fa14/sessions/s...Five Problems of Chapter 2 Delineating the sequence of bits into complete messages is called framing

Byte-counting Protocols

Just like with C strings, we can detect the end of the string in two ways Special character An extra length field

Same is true in framing In the byte-counting approach, we detect

the end of the frame with an extra “Count” field

30

Page 31: Getting Connected (Chapter 2 Part 1)diesburg/courses/cs3470_fa14/sessions/s...Five Problems of Chapter 2 Delineating the sequence of bits into complete messages is called framing

Byte-counting Protocols

DECNET DDCMP

SYN: 8 CLASS: 8 Count:14 Header: 42

What happens if the count field gets corrupted? C

OU

NT

SYN

SYN

CLA

SS

HEA

DER

CR

C

BO

DY

Page 32: Getting Connected (Chapter 2 Part 1)diesburg/courses/cs3470_fa14/sessions/s...Five Problems of Chapter 2 Delineating the sequence of bits into complete messages is called framing

Bit-oriented Protocols

Unlike byte-oriented protocols, these protocols don’t care about bytes

Could be transmitting ASCII (7-bits) Pixel values in an image …

32

Page 33: Getting Connected (Chapter 2 Part 1)diesburg/courses/cs3470_fa14/sessions/s...Five Problems of Chapter 2 Delineating the sequence of bits into complete messages is called framing

Bit-oriented Protocols

High-Level Data Link Control (HDLC) protocol

Denotes beginning and end of a frame with the delimiter: 0 1 1 1 1 1 1 0

Also transmitted anytime link is idle to keep clocks synchronized

Still has bit stuffing problem if special delimiter occurs in body 5 1's; zero ALWAYS follows in the body.

Page 34: Getting Connected (Chapter 2 Part 1)diesburg/courses/cs3470_fa14/sessions/s...Five Problems of Chapter 2 Delineating the sequence of bits into complete messages is called framing

...and then there's Sonet

Synchronous Optical Network standard Dominant standard for long-distance transmission

of data over optical networks Every frame is exactly the same size! Has some special bit pattern to tell receiver

where frame starts and ends, with no bit stuffing

34

Page 35: Getting Connected (Chapter 2 Part 1)diesburg/courses/cs3470_fa14/sessions/s...Five Problems of Chapter 2 Delineating the sequence of bits into complete messages is called framing

Sonet

How does the receiver know where each frame starts and ends? Receiver looks for it consistently (once every fixed

number of bytes) Encoded using NRZ To combat NRZ clock recovery problem, XORs

data to be transmitted to a well-known bit patten Can XOR encoded data with well-known bit

pattern to decode

35