Autumn 2000John Kristoff1 Data-link Layer Computer Networks.

48
Autumn 2000 John Kristoff 1 Data-link Layer Computer Networks

Transcript of Autumn 2000John Kristoff1 Data-link Layer Computer Networks.

Page 1: Autumn 2000John Kristoff1 Data-link Layer Computer Networks.

Autumn 2000 John Kristoff 1

Data-link Layer

Computer Networks

Page 2: Autumn 2000John Kristoff1 Data-link Layer Computer Networks.

Autumn 2000 John Kristoff 2

Where are we?

Page 3: Autumn 2000John Kristoff1 Data-link Layer Computer Networks.

Autumn 2000 John Kristoff 3

The Data Link Interface

Page 4: Autumn 2000John Kristoff1 Data-link Layer Computer Networks.

Autumn 2000 John Kristoff 4

The Local Area Network

Popular (most data links are LANs) High Throughput Low Cost Short Distances Often shared medium access

Most new installations usually "switched"

Page 5: Autumn 2000John Kristoff1 Data-link Layer Computer Networks.

Autumn 2000 John Kristoff 5

Shared Medium Access

A Shared Medium Used by All Only One Station Transmits at a

Time Stations "Take Turns MAC Protocol defines fairness policy

Page 6: Autumn 2000John Kristoff1 Data-link Layer Computer Networks.

Autumn 2000 John Kristoff 6

Topology Review

Page 7: Autumn 2000John Kristoff1 Data-link Layer Computer Networks.

Autumn 2000 John Kristoff 7

Data Link Bit Encoding

Page 8: Autumn 2000John Kristoff1 Data-link Layer Computer Networks.

Autumn 2000 John Kristoff 8

Example Bus: Ethernet

Most Popular LAN IEEE Standardized as 802.3 Several Generations

Same frame format (mostly) Changing data rates Different physical layer requirements

The book: Gigabit Ethernet, Rich Seifert

Page 9: Autumn 2000John Kristoff1 Data-link Layer Computer Networks.

Autumn 2000 John Kristoff 9

Ethernet Transmission

Only one station transmits at a time Signal propagates entire cable length All stations receive all transmissions CSMA/CD medium access control scheme

Page 10: Autumn 2000John Kristoff1 Data-link Layer Computer Networks.

Autumn 2000 John Kristoff 10

CSMA/CD

Carrier Sense (CS) Wait until medium is idle Begin to transmit frame

Multiple Access (MA) Multiple stations attached to shared media Each station uses the same access algorithm

Simultaneous Transmission is Possible

Page 11: Autumn 2000John Kristoff1 Data-link Layer Computer Networks.

Autumn 2000 John Kristoff 11

CSMA/CD [continued]

Simultaneous Transmission: Interfere with each other Known as a collision

CSMA with Collision Detect (CD) Listen to media during transmission Detect whether another stations signal

interferes Back off from interference and try again

Page 12: Autumn 2000John Kristoff1 Data-link Layer Computer Networks.

Autumn 2000 John Kristoff 12

Transmission Logic

1. If media is idle, transmit.2. Else, continue to listen to the media and

when it is available, transmit.3. Listen to media while transmitting.4. If collision is detected while transmitting,

send jam and back-off5. Go to step 1 until max-try counter is

reached.

Page 13: Autumn 2000John Kristoff1 Data-link Layer Computer Networks.

Autumn 2000 John Kristoff 13

Exponential Back-off Algorithm

Let 1 Slot Time = 512 bit times Upon 1st collision, randomly choose among {0,1} slot delay Upon 2nd collision, randomly choose among {0,1,2,3} slot

delay Up to a maximum of 16 transmission attempts with a range

of delay from {0 to 1024} bit times

0 <= r < 2k-1

Where r is the random number generated, where k = MIN(n,10) and where n is the n-th retransmission attempt

Page 14: Autumn 2000John Kristoff1 Data-link Layer Computer Networks.

Autumn 2000 John Kristoff 14

The Collision Domain

Minimum Length Frame Must Be >= Maximum RTT of the Ethernet segment

Minimum Frame is 512 bits Requires 46 bytes of data whether the

upper layer has them or not Distances decrease as speed increases Full-duplex mode eliminates the

collision domain

Page 15: Autumn 2000John Kristoff1 Data-link Layer Computer Networks.

Autumn 2000 John Kristoff 15

An Aside - Collisions

They are NOT bad, unless theyre late Collision statistics are mostly

meaningless Monitor utilization Distance Matters Becoming irrelevant with switching The name "Collision is misleading

Page 16: Autumn 2000John Kristoff1 Data-link Layer Computer Networks.

Autumn 2000 John Kristoff 16

Ethernet Addressing

Standardized by IEEE Each station assigned a unique 48-bit address

First 24-bits are the OUI Second 24-bits are vendor assigned

Usually set when NIC is manufactured Canonical address format

Page 17: Autumn 2000John Kristoff1 Data-link Layer Computer Networks.

Autumn 2000 John Kristoff 17

Ethernet Address Recognition

Each Frame Contains a Destination Address

All Stations Receive All Transmissions Station Discards Any Frame Not Destined

for It Important: interface hardware, not

software, checks address

Page 18: Autumn 2000John Kristoff1 Data-link Layer Computer Networks.

Autumn 2000 John Kristoff 18

Possible Destinations

1. Single destination (unicast) 2. All stations on the Ethernet

(broadcast) 3. Subset of stations on the Ethernet

(multicast)

MAC address is used to distinguish between the destinations

Page 19: Autumn 2000John Kristoff1 Data-link Layer Computer Networks.

Autumn 2000 John Kristoff 19

Ethernet Destination Addresses

Page 20: Autumn 2000John Kristoff1 Data-link Layer Computer Networks.

Autumn 2000 John Kristoff 20

Promiscuous Mode

Designed for testing/debugging Allows interface to accept all frames Available on most Ethernet hardware

Page 21: Autumn 2000John Kristoff1 Data-link Layer Computer Networks.

Autumn 2000 John Kristoff 21

IEEE 802.3 Frame Format

Sender fills in: Senders source

address Recipients

destination address Type of data in the

frame type field Cyclic Redundancy

in FCS field

Page 22: Autumn 2000John Kristoff1 Data-link Layer Computer Networks.

Autumn 2000 John Kristoff 22

Demultiplexing on Frame Type Field

Network Interface Hardware Receives a copy of each transmitted frame Examines address and either accepts or

discards Passes accepted frame to system software

Network device software Examines frame type Passes frame to correct software module

Page 23: Autumn 2000John Kristoff1 Data-link Layer Computer Networks.

Autumn 2000 John Kristoff 23

Ethernet Wiring - 10BASE5

Thick Ethernet (Thicknet) Heavy coaxial cable

Page 24: Autumn 2000John Kristoff1 Data-link Layer Computer Networks.

Autumn 2000 John Kristoff 24

Ethernet Wiring - 10BASE2

Thin Ethernet (Thinnet) Smaller coaxial cable

Page 25: Autumn 2000John Kristoff1 Data-link Layer Computer Networks.

Autumn 2000 John Kristoff 25

Ethernet Wiring - 10BASE-T

Uses a hub Twisted-pair wiring

Page 26: Autumn 2000John Kristoff1 Data-link Layer Computer Networks.

Autumn 2000 John Kristoff 26

Ethernet Office Wiring

Page 27: Autumn 2000John Kristoff1 Data-link Layer Computer Networks.

Autumn 2000 John Kristoff 27

High-speed Ethernet

Fast Ethernet Operates at 100 Mb/s Standardized in IEEE 802.3 as 100BASE-T and

100BASE-F standards 10/100 Devices available

Gigabit Ethernet Operates at 1 Gb/s Mostly fiber systems using switches

Even higher speeds coming!

Page 28: Autumn 2000John Kristoff1 Data-link Layer Computer Networks.

Autumn 2000 John Kristoff 28

Ethernet - Final Notes

Data Link Layer Usually Implemented with Physical Layer

Link Beat Interframe Gap Time Capture Effect Modern Ethernet is a star-shaped bus news://comp.dcom.lans.ethernet IETF increasing maximum frame size?

Page 29: Autumn 2000John Kristoff1 Data-link Layer Computer Networks.

Autumn 2000 John Kristoff 29

Example Ring: Token Ring

Popular in IBM environments IEEE Standardized as 802.5 Operates at 4Mb/s, 16Mb/s Quickly Being Abandoned

802.5 working group moved to "hibernation" status in July 2000

Still worth learning about!

Page 30: Autumn 2000John Kristoff1 Data-link Layer Computer Networks.

Autumn 2000 John Kristoff 30

Token Ring Transmission

Station waits for token before sending Signal travels the entire ring Sender receives its own transmission

Page 31: Autumn 2000John Kristoff1 Data-link Layer Computer Networks.

Autumn 2000 John Kristoff 31

Token Passing Paradigm

Frames travel in a unidirectional fashion around the ring

Stations must wait for token to transmit

Stations can reserve the token Token will circle indefinitely until a

station wants to transmit

Page 32: Autumn 2000John Kristoff1 Data-link Layer Computer Networks.

Autumn 2000 John Kristoff 32

MAC Frames

Ring management and control frames Beacon, Ring purge, claim token, report

error Ring Poll every 7 seconds

Active monitor present Standby monitor present NAUN notification process

Page 33: Autumn 2000John Kristoff1 Data-link Layer Computer Networks.

Autumn 2000 John Kristoff 33

Active and Standby Monitor

Only 1 Active Monitor per ring AM is the master clock for the ring AM inserts 24-bit delay to

transmissions AM ensures tokens/frames are present AM removes circulating frames SMs are ready to take over if AM fails

Page 34: Autumn 2000John Kristoff1 Data-link Layer Computer Networks.

Autumn 2000 John Kristoff 34

Monitor Contention

Ring elects a new Active Monitor Initiated when:

Loss of signal is detected Active monitor not detected Time-outs of token timer, NAUN, etc.

Highest MAC address wins Everyone else is Standby Monitor

Page 35: Autumn 2000John Kristoff1 Data-link Layer Computer Networks.

Autumn 2000 John Kristoff 35

Token Ring Insertion Process

Phase 0 - Media Lobe Check Phase 1 - Physical Insertion Phase 2 - Address Verification Phase 3 - Participation in Ring Poll Phase 4 - Request Initialization

Page 36: Autumn 2000John Kristoff1 Data-link Layer Computer Networks.

Autumn 2000 John Kristoff 36

The Token Frame

When no station is transmitting, the token frame travels continuously around the ring.

Page 37: Autumn 2000John Kristoff1 Data-link Layer Computer Networks.

Autumn 2000 John Kristoff 37

Token Ring Addressing

Standardized by IEEE Each station assigned a unique 48-bit address

First 24-bits are the OUI Second 24-bits are vendor assigned

Usually set when NIC is manufactured Non-canonical address format

Page 38: Autumn 2000John Kristoff1 Data-link Layer Computer Networks.

Autumn 2000 John Kristoff 38

Token Ring Address Recognition

Each Frame Contains a Destination Address

All Stations Receive and Repeat All Transmissions

Stations Copy Any Frame Destined for It Important: interface hardware, not

software, checks address

Page 39: Autumn 2000John Kristoff1 Data-link Layer Computer Networks.

Autumn 2000 John Kristoff 39

Token Ring Destination Addresses

Page 40: Autumn 2000John Kristoff1 Data-link Layer Computer Networks.

Autumn 2000 John Kristoff 40

Token Ring Frame Format

Sender fills in: Senders source

address Recipients destination

address Cyclic Redundancy in

FCS field

Other stations may change: Frame Status

Page 41: Autumn 2000John Kristoff1 Data-link Layer Computer Networks.

Autumn 2000 John Kristoff 41

High-speed Token Ring

HSTR Operates at 100 Mb/s 1 Gb/s was being worked on Standardized in IEEE 802.5 Some 4/16/100 devices

Page 42: Autumn 2000John Kristoff1 Data-link Layer Computer Networks.

Autumn 2000 John Kristoff 42

Why Token Ring Lost

IBM was the only systems manufacturer that promoted it

Cost Complexity Support throughout the industry Only one vendor left to develop

product!

Page 43: Autumn 2000John Kristoff1 Data-link Layer Computer Networks.

Autumn 2000 John Kristoff 43

Token Ring - Final Notes

Jitter Early Token Release Backup Path Token Transmission Timer Needs LLC - we havent talked about

it yet news://comp.dcom.lans.token-ring

Page 44: Autumn 2000John Kristoff1 Data-link Layer Computer Networks.

Autumn 2000 John Kristoff 44

Example Ring: FDDI

Uses Optical Fiber cabling High reliability (dual rings) Immune to interference Standardized by ANSI Transmission rate of 100 Mb/s Similar to token ring

Page 45: Autumn 2000John Kristoff1 Data-link Layer Computer Networks.

Autumn 2000 John Kristoff 45

FDDI Dual Ring Operation

Page 46: Autumn 2000John Kristoff1 Data-link Layer Computer Networks.

Autumn 2000 John Kristoff 46

Logical Link Control

Standardized by IEEE 802.2 Often used for MACs that dont use type field

Page 47: Autumn 2000John Kristoff1 Data-link Layer Computer Networks.

Autumn 2000 John Kristoff 47

LLC with SNAP

Page 48: Autumn 2000John Kristoff1 Data-link Layer Computer Networks.

Autumn 2000 John Kristoff 48

What else?

ATM Wireless (802.11) Fiber Channel HIPPI Token Bus (802.4) IEEE 802 standards may become

free!