Data-link Layer

48
1 Data-link Layer Computer Networks

description

Data-link Layer. Computer Networks. Where are we?. The Data Link Interface. 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". Shared Medium Access. - PowerPoint PPT Presentation

Transcript of Data-link Layer

Page 1: Data-link Layer

1

Data-link Layer

Computer Networks

Page 2: Data-link Layer

2

Where are we?

Page 3: Data-link Layer

3

The Data Link Interface

Page 4: Data-link Layer

4

The Local Area Network

Popular (most data links are LANs)High ThroughputLow CostShort DistancesOften shared medium access

Most new installations usually "switched"

Page 5: Data-link Layer

5

Shared Medium Access

A Shared Medium Used by AllOnly One Station Transmits at a TimeStations "Take Turns”MAC Protocol defines fairness policy

Page 6: Data-link Layer

6

Topology Review

Page 7: Data-link Layer

7

Data Link Bit Encoding

Page 8: Data-link Layer

8

Example Bus: Ethernet

Most Popular LANIEEE Standardized as 802.3Several Generations

Same frame format (mostly)Changing data ratesDifferent physical layer requirements

The book: Gigabit Ethernet, Rich Seifert

Page 9: Data-link Layer

9

Ethernet Transmission

Only one station transmits at a timeSignal propagates entire cable lengthAll stations receive all transmissionsCSMA/CD medium access control scheme

Page 10: Data-link Layer

10

CSMA/CD

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

Multiple Access (MA)Multiple stations attached to shared mediaEach station uses the same access

algorithm

Simultaneous Transmission is Possible

Page 11: Data-link Layer

11

CSMA/CD [continued]

Simultaneous Transmission:Interfere with each otherKnown as a collision

CSMA with Collision Detect (CD)Listen to media during transmissionDetect whether another station’s signal

interferesBack off from interference and try again

Page 12: Data-link Layer

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: Data-link Layer

13

Exponential Back-off Algorithm

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

delayUp 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: Data-link Layer

14

The Collision Domain

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

Minimum Frame is 512 bitsRequires 46 bytes of data whether the upper

layer has them or not

Distances decrease as speed increasesFull-duplex mode eliminates the collision

domain

Page 15: Data-link Layer

15

An Aside - Collisions

They are NOT bad, unless they’re lateCollision statistics are mostly

meaninglessMonitor utilizationDistance MattersBecoming irrelevant with switchingThe name "Collision” is misleading

Page 16: Data-link Layer

16

Ethernet Addressing

Standardized by IEEEEach station assigned a unique 48-bit address

First 24-bits are the OUISecond 24-bits are vendor assigned

Usually set when NIC is manufacturedCanonical address format

Page 17: Data-link Layer

17

Ethernet Address Recognition

Each Frame Contains a Destination AddressAll Stations Receive All TransmissionsStation Discards Any Frame Not Destined for

ItImportant: interface hardware, not software,

checks address

Page 18: Data-link Layer

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: Data-link Layer

19

Ethernet Destination Addresses

Page 20: Data-link Layer

20

Promiscuous Mode

Designed for testing/debuggingAllows interface to accept all framesAvailable on most Ethernet hardware

Page 21: Data-link Layer

21

IEEE 802.3 Frame Format

Sender fills in:Sender’s source

addressRecipient’s

destination addressType of data in the

frame type fieldCyclic Redundancy in

FCS field

Page 22: Data-link Layer

22

Demultiplexing on Frame Type Field

Network Interface HardwareReceives a copy of each transmitted frameExamines address and either accepts or discardsPasses accepted frame to system software

Network device softwareExamines frame typePasses frame to correct software module

Page 23: Data-link Layer

23

Ethernet Wiring - 10BASE5

Thick Ethernet (Thicknet)Heavy coaxial cable

Page 24: Data-link Layer

24

Ethernet Wiring - 10BASE2

Thin Ethernet (Thinnet)Smaller coaxial cable

Page 25: Data-link Layer

25

Ethernet Wiring - 10BASE-T

Uses a hubTwisted-pair wiring

Page 26: Data-link Layer

26

Ethernet Office Wiring

Page 27: Data-link Layer

27

High-speed Ethernet

Fast EthernetOperates at 100 Mb/s

Standardized in IEEE 802.3 as 100BASE-T and 100BASE-F standards

10/100 Devices available

Gigabit EthernetOperates at 1 Gb/s

Mostly fiber systems using switches

Even higher speeds coming!

Page 28: Data-link Layer

28

Ethernet - Final Notes

Data Link Layer Usually Implemented with Physical Layer

Link BeatInterframe Gap TimeCapture EffectModern Ethernet is a star-shaped busnews://comp.dcom.lans.ethernetIETF increasing maximum frame size?

Page 29: Data-link Layer

29

Example Ring: Token Ring

Popular in IBM environmentsIEEE Standardized as 802.5Operates 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: Data-link Layer

30

Token Ring Transmission

Station waits for token before sendingSignal travels the entire ringSender receives its own transmission

Page 31: Data-link Layer

31

Token Passing Paradigm

Frames travel in a unidirectional fashion around the ring

Stations must wait for token to transmit

Stations can reserve the tokenToken will circle indefinitely until a

station wants to transmit

Page 32: Data-link Layer

32

MAC Frames

Ring management and control framesBeacon, Ring purge, claim token, report

error

Ring Poll every 7 secondsActive monitor presentStandby monitor presentNAUN notification process

Page 33: Data-link Layer

33

Active and Standby Monitor

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

transmissionsAM ensures tokens/frames are presentAM removes circulating framesSMs are ready to take over if AM fails

Page 34: Data-link Layer

34

Monitor Contention

Ring elects a new Active MonitorInitiated when:

Loss of signal is detectedActive monitor not detectedTime-outs of token timer, NAUN, etc.

Highest MAC address winsEveryone else is Standby Monitor

Page 35: Data-link Layer

35

Token Ring Insertion Process

Phase 0 - Media Lobe CheckPhase 1 - Physical InsertionPhase 2 - Address VerificationPhase 3 - Participation in Ring PollPhase 4 - Request Initialization

Page 36: Data-link Layer

36

The Token Frame

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

Page 37: Data-link Layer

37

Token Ring Addressing

Standardized by IEEEEach station assigned a unique 48-bit address

First 24-bits are the OUISecond 24-bits are vendor assigned

Usually set when NIC is manufacturedNon-canonical address format

Page 38: Data-link Layer

38

Token Ring Address Recognition

Each Frame Contains a Destination AddressAll Stations Receive and Repeat All

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

checks address

Page 39: Data-link Layer

39

Token Ring Destination Addresses

Page 40: Data-link Layer

40

Token Ring Frame Format

Sender fills in:Sender’s source addressRecipient’s destination

addressCyclic Redundancy in

FCS field

Other stations may change:Frame Status

Page 41: Data-link Layer

41

High-speed Token Ring

HSTROperates at 100 Mb/s1 Gb/s was being worked onStandardized in IEEE 802.5Some 4/16/100 devices

Page 42: Data-link Layer

42

Why Token Ring Lost

IBM was the only systems manufacturer that promoted it

CostComplexitySupport throughout the industryOnly one vendor left to develop

product!

Page 43: Data-link Layer

43

Token Ring - Final Notes

JitterEarly Token ReleaseBackup PathToken Transmission TimerNeeds LLC - we haven’t talked about it

yetnews://comp.dcom.lans.token-ring

Page 44: Data-link Layer

44

Example Ring: FDDI

Uses Optical Fiber cablingHigh reliability (dual rings)Immune to interferenceStandardized by ANSITransmission rate of 100 Mb/sSimilar to token ring

Page 45: Data-link Layer

45

FDDI Dual Ring Operation

Page 46: Data-link Layer

46

Logical Link Control

Standardized by IEEE 802.2Often used for MACs that don’t use type field

Page 47: Data-link Layer

47

LLC with SNAP

Page 48: Data-link Layer

48

What else?

ATMWireless (802.11)Fiber ChannelHIPPIToken Bus (802.4)IEEE 802 standards may become free!