66
5: DataLink Layer 5-1 Chapter 5 Link Layer and LANs Part B Computer Networking: A Top Down Approach 4 th edition. Jim Kurose, Keith Ross Addison-Wesley, July 2007.

Chapter 5B

Embed Size (px)

DESCRIPTION

 

Citation preview

Page 1: Chapter 5B

5 DataLink Layer 5-1

Chapter 5Link Layer and LANs

Part B

Computer Networking A Top Down Approach 4th edition Jim Kurose Keith RossAddison-Wesley July 2007

5 DataLink Layer 5-2

Link Layer

51 Introduction and services

52 Error detection and correction

53Multiple access protocols

54 Link-Layer Addressing

55 Ethernet

56 Hubs and switches 57 PPP 58 Link Virtualization

ATM

5 DataLink Layer 5-3

Ethernet

ldquodominantrdquo wired LAN technology cheap $20 for 100Mbs first widely used LAN technology Simpler cheaper than token LANs and ATM Kept up with speed race 10 Mbps ndash 10 Gbps

Metcalfersquos Ethernetsketch

5 DataLink Layer 5-4

Ethernet

ldquodominantrdquo wired LAN technology cheap $20 for 100Mbs first widely used LAN technology Simpler cheaper than token LANs and ATM Kept up with speed race 10 Mbps ndash 10 Gbps

5 DataLink Layer 5-5

Star topology bus topology popular through mid 90s

all nodes in same collision domain (can collide with each other)

today star topology prevails active switch in center each ldquospokerdquo runs a (separate) Ethernet protocol

(nodes do not collide with each other)

switch

bus coaxial cable star

5 DataLink Layer 5-6

Ethernet Frame Structure

Sending adapter encapsulates IP datagram (or other network layer protocol packet) in Ethernet frame

Preamble 7 bytes with pattern 10101010 followed by one

byte with pattern 10101011 used to synchronize receiver sender clock

rates

Destaddr

64 48 32

CRCPreamble Srcaddr Type Body

1648

5 DataLink Layer 5-7

Ethernet Frame Structure (more) Addresses 6 bytes

if adapter receives frame with matching destination address or with broadcast address (eg ARP packet) it passes data in frame to net-layer protocol

otherwise adapter discards frame

Type indicates the higher layer protocol (mostly IP but others may be supported such as Novell IPX and AppleTalk)

CRC checked at receiver if error is detected the frame is simply dropped

Destaddr

64 48 32

CRCPreamble Srcaddr Type Body

1648

5 DataLink Layer 5-8

Unreliable connectionless service Connectionless No handshaking between

sending and receiving adapter Unreliable receiving adapter doesnrsquot send

acks or nacks to sending adapter stream of datagrams passed to network layer can

have gaps gaps will be filled if app is using TCP otherwise app will see the gaps

5 DataLink Layer 5-9

Ethernet uses CSMACD

No slots adapter doesnrsquot

transmit if it senses that some other adapter is transmitting that is carrier sense

transmitting adapter aborts when it senses that another adapter is transmitting that is collision detection

Before attempting a retransmission adapter waits a random time that is random access

5 DataLink Layer 5-10

Ethernet CSMACD algorithm

1 Adaptor receives datagram from net layer amp creates frame

2 If adapter senses channel idle it starts to transmit frame If it senses channel busy waits until channel idle and then transmits

3 If adapter transmits entire frame without detecting another transmission the adapter is done with frame

4 If adapter detects another transmission while transmitting aborts and sends jam signal

5 After aborting adapter enters exponential backoff after the mth collision adapter chooses a K at random from 012hellip2m-1 Adapter waits K512 bit times and returns to Step 2

5 DataLink Layer 5-11

Ethernetrsquos CSMACD (more)

Jam Signal make sure all other transmitters are aware of collision 48 bits

Bit time 1 microsec for 10 Mbps Ethernet for K=1023 wait time is about 50 msec

Exponential Backoff Goal adapt retransmission

attempts to estimated current load heavy load random wait

will be longer first collision choose K

from 01 delay is K 512 bit transmission times

after second collision choose K from 0123hellip

after ten collisions choose K from 01234hellip1023

Seeinteract with Javaapplet on AWL Web sitehighly recommended

5 DataLink Layer 5-12

Collision Detection

On baseband bus collision produces much higher signal voltage than signal

Collision detected if cable signal greater than single station signal

Signal attenuated over distance Limit distance to 500m (10Base5) or 200m

(10Base2) For twisted pair (star-topology) activity on

more than one port is collision Special collision presence signal

5 DataLink Layer 5-13

Algorithm (cont)

If collisionhellip jam for 32 bits then stop transmitting frame minimum frame is 64 bytes (header + 46 bytes

of data) delay and try again

bull 1st time 0 or 512usbull 2nd time 0 512 or 1024usbull 3rd time512 1024 or 1536usbull nth time k x 512us for randomly selected

k=02n - 1bull give up after several tries (usually 16)bull exponential backoff

5 DataLink Layer 5-14

Binary Exponential Backoff

Attempt to transmit repeatedly if repeated collisions First 10 attempts mean value of random delay doubled Value then remains same for 6 further attempts After 16 unsuccessful attempts station gives up and

reports error As congestion increases stations back off by larger

amounts to reduce the probability of collision 1-persistent algorithm with binary exponential backoff

efficient over wide range of loads Low loads 1-persistence guarantees station can

seize channel once idle High loads at least as stable as other techniques

Backoff algorithm gives last-in first-out effect Stations with few collisions transmit first

5 DataLink Layer 5-15

Ethernet MAC Sublayer Protocol (2)

Collision detection can take as long as 2

5 DataLink Layer 5-16

CSMACD efficiency Tprop = max prop between 2 nodes in LAN

ttrans = time to transmit max-size frame

Efficiency goes to 1 as tprop goes to 0

Goes to 1 as ttrans goes to infinity Much better than ALOHA but still decentralized simple and cheap

transprop tt 51

1efficiency

5 DataLink Layer 5-17

Ethernet Performance

Efficiency of Ethernet at 10 Mbps with 512-bit slot times

5 DataLink Layer 5-18

8023 Ethernet Standards Link amp Physical Layers

many different Ethernet standards common MAC protocol and frame format different speeds 2 Mbps 10 Mbps 100

Mbps 1Gbps 10G bps different physical layer media fiber cable

applicationtransportnetwork

linkphysical

MAC protocoland frame format

100BASE-TX

100BASE-T4

100BASE-FX100BASE-T2

100BASE-SX 100BASE-BX

fiber physical layercopper (twisterpair) physical layer

5 DataLink Layer 5-19

Manchester encoding

used in 10BaseT each bit has a transition allows clocks in sending and receiving nodes to

synchronize to each other no need for a centralized global clock among nodes

Hey this is physical-layer stuff

5 DataLink Layer 5-20

Ethernet Cabling

The most common kinds of Ethernet cabling

5 DataLink Layer 5-21

Ethernet Cabling (2)

Three kinds of Ethernet cabling (a) 10Base5 (b) 10Base2 (c) 10Base-T

5 DataLink Layer 5-22

Ethernet Cabling (3)

Cable topologies (a) Linear (b) Spine (c) Tree (d) Segmented

5 DataLink Layer 5-23

10BaseT and 100BaseT 10100 Mbps rate latter called ldquofast ethernetrdquo T stands for Twisted Pair Nodes connect to a hub ldquostar topologyrdquo 100

m max distance between nodes and hub

twisted pair

hub

5 DataLink Layer 5-24

100Mbps Fast Ethernet

Use IEEE 8023 MAC protocol and frame format 100BASE-X use physical medium specifications

from FDDI Two physical links between nodes

bull Transmission and reception 100BASE-TX uses STP or Cat 5 UTP

bull May require new cable 100BASE-FX uses optical fiber 100BASE-T4 can use Cat 3 voice-grade UTP

bull Uses four twisted-pair lines between nodesbull Data transmission uses three pairs in one direction at a

time

Star-wire topology Similar to 10BASE-T

5 DataLink Layer 5-25

Fast Ethernet

The original fast Ethernet cabling

5 DataLink Layer 5-26

Gbit Ethernet

uses standard Ethernet frame format allows for point-to-point links and shared

broadcast channels in shared mode CSMACD is used short

distances between nodes required for efficiency

uses hubs called here ldquoBuffered Distributorsrdquo Full-Duplex at 1 Gbps for point-to-point links 10 Gbps now

5 DataLink Layer 5-27

Gigabit Ethernet

Gigabit Ethernet cabling

5 DataLink Layer 5-28

Wireless Link CharacteristicsDifferences from wired link hellip

decreased signal strength radio signal attenuates as it propagates through matter (path loss)

interference from other sources standardized wireless network frequencies (eg 24 GHz) shared by other devices (eg phone) devices (motors) interfere as well

multipath propagation radio signal reflects off objects ground arriving ad destination at slightly different times

hellip make communication across (even a point to point) wireless link much more ldquodifficultrdquo

5 DataLink Layer 5-29

Wireless network characteristicsMultiple wireless senders and receivers create

additional problems (beyond multiple access)

AB

C

Hidden terminal problem B A hear each other B C hear each other A C can not hear each

othermeans A C unaware of their

interference at B

A B C

Arsquos signalstrength

space

Crsquos signalstrength

Signal fading B A hear each other B C hear each other A C can not hear each other

interferring at B

5 DataLink Layer 5-30

IEEE 80211 Wireless LAN

80211b 24-5 GHz unlicensed

radio spectrum up to 11 Mbps direct sequence

spread spectrum (DSSS) in physical layer

bull all hosts use same chipping code

widely deployed using base stations

80211a 5-6 GHz range up to 54 Mbps

80211g 24-5 GHz range up to 54 Mbps

All use CSMACA for multiple access

All have base-station and ad-hoc network versions

5 DataLink Layer 5-31

Figure 3-12

ISM bands

5 DataLink Layer 5-32

80211 LAN architecture

wireless host communicates with base station base station = access

point (AP) Basic Service Set (BSS)

(aka ldquocellrdquo) in infrastructure mode contains wireless hosts access point (AP) base

station ad hoc mode hosts

only

BSS 1

BSS 2

Internet

hub switchor routerAP

AP

5 DataLink Layer 5-33

80211 Channels association 80211b 24GHz-2485GHz spectrum divided

into 11 channels at different frequencies AP admin chooses frequency for AP interference possible channel can be same as

that chosen by neighboring AP host must associate with an AP

scans channels listening for beacon frames containing APrsquos name (SSID) and MAC address

selects AP to associate with may perform authentication [Chapter 8] will typically run DHCP to get IP address in

APrsquos subnet

5 DataLink Layer 5-34

IEEE 80211 multiple access avoid collisions 2+ nodes transmitting at same

time 80211 CSMA - sense before transmitting

donrsquot collide with ongoing transmission by other node

80211 no collision detection difficult to receive (sense collisions) when transmitting

due to weak received signals (fading) canrsquot sense all collisions in any case hidden terminal

fading goal avoid collisions CSMAC(ollision)A(voidance)

AB

CA B C

Arsquos signalstrength

space

Crsquos signalstrength

5 DataLink Layer 5-35

IEEE 80211 MAC Protocol CSMACA

80211 sender1 if sense channel idle for DIFS then

transmit entire frame (no CD)2 if sense channel busy then

start random backoff timetimer counts down while channel idletransmit when timer expiresif no ACK increase random backoff

interval repeat 2

80211 receiver- if frame received OK

return ACK after SIFS (ACK needed due to hidden terminal problem)

sender receiver

DIFS

data

SIFS

ACK

5 DataLink Layer 5-36

Avoiding collisions (more)

idea allow sender to ldquoreserverdquo channel rather than random access of data frames avoid collisions of long data frames

sender first transmits small request-to-send (RTS) packets to BS using CSMA RTSs may still collide with each other (but theyrsquore

short) BS broadcasts clear-to-send CTS in response to RTS RTS heard by all nodes

sender transmits data frame other stations defer transmissions

Avoid data frame collisions completely using small reservation packets

5 DataLink Layer 5-37

Collision Avoidance RTS-CTS exchange

APA B

time

RTS(A)RTS(B)

RTS(A)

CTS(A) CTS(A)

DATA (A)

ACK(A) ACK(A)

reservation collision

defer

5 DataLink Layer 5-38

Manchester encoding

Used in 10BaseT Each bit has a transition Allows clocks in sending and receiving nodes to

synchronize to each other no need for a centralized global clock among nodes

Hey this is physical-layer stuff

5 DataLink Layer 5-39

Link Layer

51 Introduction and services

52 Error detection and correction

53Multiple access protocols

54 Link-Layer Addressing

55 Ethernet

56 Interconnections Hubs and switches

57 PPP 58 Link Virtualization

ATM

5 DataLink Layer 5-40

HubsHubs are essentially physical-layer repeaters

bits coming from one link go out all other links at the same rate no frame buffering no CSMACD at hub adapters detect collisions provides net management functionality

twisted pair

hub

5 DataLink Layer 5-41

Interconnecting with hubs Backbone hub interconnects LAN segments Extends max distance between nodes But individual segment collision domains become one large

collision domain Canrsquot interconnect 10BaseT amp 100BaseT

hub

hubhub

hub

5 DataLink Layer 5-42

Inter - Networking

Hubs Bridges Switches Routers

5 DataLink Layer 5-43

Learning Bridges Do not forward when unnecessary Maintain forwarding table

HostPort

A 1 B 1 C 1 X 2 Y 2 Z 2

Learn table entries based on source address Table is an optimization need not be complete Always forward broadcast frames

A

Bridge

B C

X Y Z

Port 1

Port 2

5 DataLink Layer 5-44

Spanning Tree Algorithm Problem loops

Bridges run a distributed spanning tree algorithm select which bridges actively forward developed by Radia Perlman now IEEE 8021 specification

A

C

E

D

B

K

F

H

J

G

I

B3

B7

B4

B2

B5

B1

B6

(a) (b)

5 DataLink Layer 5-45

Algorithm Overview Each bridge has unique id (eg B1 B2

B3) Select bridge with smallest id as root Select bridge on each LAN closest to root

as designated bridge (use id to break ties) Each bridge forwards frames over each LAN for which it is the designated bridge

A

C

E

D

B

K

F

H

J

G

I

B5

B2

B3

B7

B4

B1

B6

5 DataLink Layer 5-46

Algorithm Details

Bridges exchange configuration messages id for bridge sending the message id for what the sending bridge believes to be

root bridge distance (hops) from sending bridge to root

bridge Each bridge records current best

configuration message for each port Initially each bridge believes it is the root

5 DataLink Layer 5-47

Algorithm Detail (cont) When learn not root stop generating config

messages in steady state only root generates configuration messages

When learn not designated bridge stop forwarding config messages in steady state only designated bridges forward config

messages

Root continues to periodically send config messages If any bridge does not receive config message after

a period of time it starts generating config messages claiming to be the root

5 DataLink Layer 5-48

Broadcast and Multicast Forward all broadcastmulticast frames

current practice Learn when no group members

downstream Accomplished by having each member of

group G send a frame to bridge multicast address with G in source field

5 DataLink Layer 5-49

Limitations of Bridges

Do not scale spanning tree algorithm does not scale broadcast does not scale

Do not accommodate heterogeneity

Caution beware of transparency

5 DataLink Layer 5-50

Switch link-layer device smarter than hubs take active

role store forward Ethernet frames examine incoming framersquos MAC address selectively

forward frame to one-or-more outgoing links when frame is to be forwarded on segment uses CSMACD to access segment

transparent hosts are unaware of presence of switches

plug-and-play self-learning switches do not need to be configured

5 DataLink Layer 5-51

Switch allows multiple simultaneous transmissions

hosts have dedicated direct connection to switch

switches buffer packets Ethernet protocol used on

each incoming link but no collisions full duplex each link is its own collision

domain switching A-to-Arsquo and B-

to-Brsquo simultaneously without collisions not possible with dumb hub

A

Arsquo

B

Brsquo

C

Crsquo

switch with six interfaces(123456)

1 23

45

6

5 DataLink Layer 5-52

Switch Table

Q how does switch know that Arsquo reachable via interface 4 Brsquo reachable via interface 5

A each switch has a switch table each entry (MAC address of host interface

to reach host time stamp)

looks like a routing table Q how are entries created

maintained in switch table something like a routing

protocol

A

Arsquo

B

Brsquo

C

Crsquo

switch with six interfaces(123456)

1 23

45

6

5 DataLink Layer 5-53

Switch self-learning

switch learns which hosts can be reached through which interfaces when frame received

switch ldquolearnsrdquo location of sender incoming LAN segment

records senderlocation pair in switch table

A

Arsquo

B

Brsquo

C

Crsquo

1 23

45

6

A Arsquo

Source ADest Arsquo

MAC addr interface TTL

Switch table (initially empty)

A 1 60

5 DataLink Layer 5-54

Forwarding

bull How do determine onto which LAN segment to forward framebull Looks like a routing problem

hub

hubhub

switch1

2 3

5 DataLink Layer 5-55

Self learning

A switch has a switch table entry in switch table

(MAC Address Interface Time Stamp) stale entries in table dropped (TTL can be 60

min) switch learns which hosts can be reached through

which interfaces when frame received switch ldquolearnsrdquo location

of sender incoming LAN segment records senderlocation pair in switch table

5 DataLink Layer 5-56

Self-learning forwarding example

A

Arsquo

B

Brsquo

C

Crsquo

1 23

45

6

A Arsquo

Source ADest Arsquo

MAC addr interface TTL

Switch table (initially empty)

A 1 60

A ArsquoA ArsquoA ArsquoA ArsquoA Arsquo

frame destination unknownflood

Arsquo A

destination A location known

Arsquo 4 60

selective send

5 DataLink Layer 5-57

FilteringForwardingWhen switch receives a frame

index switch table using MAC dest addressif entry found for destination

then if dest on segment from which frame arrived

then drop the frame else forward the frame on interface indicated else flood

forward on all but the interface on which the frame arrived

5 DataLink Layer 5-58

Switch example

Suppose C sends frame to D

Switch receives frame from from C notes in bridge table that C is on interface 1 because D is not in table switch forwards frame into

interfaces 2 and 3

frame received by D

hub

hub hub

switch

A

B CD

EF

G H

I

address interface

ABEG

1123

12 3

5 DataLink Layer 5-59

Switch example

Suppose D replies back with frame to C

Switch receives frame from from D notes in bridge table that D is on interface 2 because C is in table switch forwards frame only to

interface 1

frame received by C

hub

hub hub

switch

A

B CD

EF

G H

I

address interface

ABEGC

11231

5 DataLink Layer 5-60

Switch traffic isolation switch installation breaks subnet into LAN

segments switch filters packets

same-LAN-segment frames not usually forwarded onto other LAN segments

segments become separate collision domains

hub hub hub

switch

collision domain collision domain

collision domain

5 DataLink Layer 5-61

Switches dedicated access Switch with many

interfaces Hosts have direct

connection to switch No collisions full duplex

Switching A-to-Arsquo and B-to-Brsquo simultaneously no collisions

switch

A

Arsquo

B

Brsquo

C

Crsquo

5 DataLink Layer 5-62

More on Switches

cut-through switching frame forwarded from input to output port without first collecting entire frameslight reduction in latency

combinations of shareddedicated 101001000 Mbps interfaces

5 DataLink Layer 5-63

Institutional network

hub

hubhub

switch

to externalnetwork

router

IP subnet

mail server

web server

5 DataLink Layer 5-64

Switches vs Routers both store-and-forward devices

routers network layer devices (examine network layer headers) switches are link layer devices

routers maintain routing tables implement routing algorithms

switches maintain switch tables implement filtering learning algorithms

5 DataLink Layer 5-65

Summary comparison

hubs routers switches

traffi c isolation

no yes yes

plug amp play yes no yes

optimal routing

no yes no

cut through

yes no yes

5 DataLink Layer 5-66

IEEE 802 Standards

The 802 working groups The important ones are marked with The ones marked with are hibernating The one marked with dagger gave up

  • Slide 1
  • Link Layer
  • Ethernet
  • Slide 4
  • Star topology
  • Ethernet Frame Structure
  • Ethernet Frame Structure (more)
  • Unreliable connectionless service
  • Ethernet uses CSMACD
  • Ethernet CSMACD algorithm
  • Ethernetrsquos CSMACD (more)
  • Collision Detection
  • Algorithm (cont)
  • Binary Exponential Backoff
  • Ethernet MAC Sublayer Protocol (2)
  • CSMACD efficiency
  • Ethernet Performance
  • 8023 Ethernet Standards Link amp Physical Layers
  • Manchester encoding
  • Ethernet Cabling
  • Ethernet Cabling (2)
  • Ethernet Cabling (3)
  • 10BaseT and 100BaseT
  • 100Mbps Fast Ethernet
  • Fast Ethernet
  • Gbit Ethernet
  • Gigabit Ethernet
  • Wireless Link Characteristics
  • Wireless network characteristics
  • IEEE 80211 Wireless LAN
  • Slide 31
  • 80211 LAN architecture
  • 80211 Channels association
  • IEEE 80211 multiple access
  • IEEE 80211 MAC Protocol CSMACA
  • Avoiding collisions (more)
  • Collision Avoidance RTS-CTS exchange
  • Slide 38
  • Slide 39
  • Hubs
  • Interconnecting with hubs
  • Inter - Networking
  • Learning Bridges
  • Spanning Tree Algorithm
  • Algorithm Overview
  • Algorithm Details
  • Algorithm Detail (cont)
  • Broadcast and Multicast
  • Limitations of Bridges
  • Switch
  • Switch allows multiple simultaneous transmissions
  • Switch Table
  • Switch self-learning
  • Forwarding
  • Self learning
  • Self-learning forwarding example
  • FilteringForwarding
  • Switch example
  • Slide 59
  • Switch traffic isolation
  • Switches dedicated access
  • More on Switches
  • Institutional network
  • Switches vs Routers
  • Summary comparison
  • IEEE 802 Standards
Page 2: Chapter 5B

5 DataLink Layer 5-2

Link Layer

51 Introduction and services

52 Error detection and correction

53Multiple access protocols

54 Link-Layer Addressing

55 Ethernet

56 Hubs and switches 57 PPP 58 Link Virtualization

ATM

5 DataLink Layer 5-3

Ethernet

ldquodominantrdquo wired LAN technology cheap $20 for 100Mbs first widely used LAN technology Simpler cheaper than token LANs and ATM Kept up with speed race 10 Mbps ndash 10 Gbps

Metcalfersquos Ethernetsketch

5 DataLink Layer 5-4

Ethernet

ldquodominantrdquo wired LAN technology cheap $20 for 100Mbs first widely used LAN technology Simpler cheaper than token LANs and ATM Kept up with speed race 10 Mbps ndash 10 Gbps

5 DataLink Layer 5-5

Star topology bus topology popular through mid 90s

all nodes in same collision domain (can collide with each other)

today star topology prevails active switch in center each ldquospokerdquo runs a (separate) Ethernet protocol

(nodes do not collide with each other)

switch

bus coaxial cable star

5 DataLink Layer 5-6

Ethernet Frame Structure

Sending adapter encapsulates IP datagram (or other network layer protocol packet) in Ethernet frame

Preamble 7 bytes with pattern 10101010 followed by one

byte with pattern 10101011 used to synchronize receiver sender clock

rates

Destaddr

64 48 32

CRCPreamble Srcaddr Type Body

1648

5 DataLink Layer 5-7

Ethernet Frame Structure (more) Addresses 6 bytes

if adapter receives frame with matching destination address or with broadcast address (eg ARP packet) it passes data in frame to net-layer protocol

otherwise adapter discards frame

Type indicates the higher layer protocol (mostly IP but others may be supported such as Novell IPX and AppleTalk)

CRC checked at receiver if error is detected the frame is simply dropped

Destaddr

64 48 32

CRCPreamble Srcaddr Type Body

1648

5 DataLink Layer 5-8

Unreliable connectionless service Connectionless No handshaking between

sending and receiving adapter Unreliable receiving adapter doesnrsquot send

acks or nacks to sending adapter stream of datagrams passed to network layer can

have gaps gaps will be filled if app is using TCP otherwise app will see the gaps

5 DataLink Layer 5-9

Ethernet uses CSMACD

No slots adapter doesnrsquot

transmit if it senses that some other adapter is transmitting that is carrier sense

transmitting adapter aborts when it senses that another adapter is transmitting that is collision detection

Before attempting a retransmission adapter waits a random time that is random access

5 DataLink Layer 5-10

Ethernet CSMACD algorithm

1 Adaptor receives datagram from net layer amp creates frame

2 If adapter senses channel idle it starts to transmit frame If it senses channel busy waits until channel idle and then transmits

3 If adapter transmits entire frame without detecting another transmission the adapter is done with frame

4 If adapter detects another transmission while transmitting aborts and sends jam signal

5 After aborting adapter enters exponential backoff after the mth collision adapter chooses a K at random from 012hellip2m-1 Adapter waits K512 bit times and returns to Step 2

5 DataLink Layer 5-11

Ethernetrsquos CSMACD (more)

Jam Signal make sure all other transmitters are aware of collision 48 bits

Bit time 1 microsec for 10 Mbps Ethernet for K=1023 wait time is about 50 msec

Exponential Backoff Goal adapt retransmission

attempts to estimated current load heavy load random wait

will be longer first collision choose K

from 01 delay is K 512 bit transmission times

after second collision choose K from 0123hellip

after ten collisions choose K from 01234hellip1023

Seeinteract with Javaapplet on AWL Web sitehighly recommended

5 DataLink Layer 5-12

Collision Detection

On baseband bus collision produces much higher signal voltage than signal

Collision detected if cable signal greater than single station signal

Signal attenuated over distance Limit distance to 500m (10Base5) or 200m

(10Base2) For twisted pair (star-topology) activity on

more than one port is collision Special collision presence signal

5 DataLink Layer 5-13

Algorithm (cont)

If collisionhellip jam for 32 bits then stop transmitting frame minimum frame is 64 bytes (header + 46 bytes

of data) delay and try again

bull 1st time 0 or 512usbull 2nd time 0 512 or 1024usbull 3rd time512 1024 or 1536usbull nth time k x 512us for randomly selected

k=02n - 1bull give up after several tries (usually 16)bull exponential backoff

5 DataLink Layer 5-14

Binary Exponential Backoff

Attempt to transmit repeatedly if repeated collisions First 10 attempts mean value of random delay doubled Value then remains same for 6 further attempts After 16 unsuccessful attempts station gives up and

reports error As congestion increases stations back off by larger

amounts to reduce the probability of collision 1-persistent algorithm with binary exponential backoff

efficient over wide range of loads Low loads 1-persistence guarantees station can

seize channel once idle High loads at least as stable as other techniques

Backoff algorithm gives last-in first-out effect Stations with few collisions transmit first

5 DataLink Layer 5-15

Ethernet MAC Sublayer Protocol (2)

Collision detection can take as long as 2

5 DataLink Layer 5-16

CSMACD efficiency Tprop = max prop between 2 nodes in LAN

ttrans = time to transmit max-size frame

Efficiency goes to 1 as tprop goes to 0

Goes to 1 as ttrans goes to infinity Much better than ALOHA but still decentralized simple and cheap

transprop tt 51

1efficiency

5 DataLink Layer 5-17

Ethernet Performance

Efficiency of Ethernet at 10 Mbps with 512-bit slot times

5 DataLink Layer 5-18

8023 Ethernet Standards Link amp Physical Layers

many different Ethernet standards common MAC protocol and frame format different speeds 2 Mbps 10 Mbps 100

Mbps 1Gbps 10G bps different physical layer media fiber cable

applicationtransportnetwork

linkphysical

MAC protocoland frame format

100BASE-TX

100BASE-T4

100BASE-FX100BASE-T2

100BASE-SX 100BASE-BX

fiber physical layercopper (twisterpair) physical layer

5 DataLink Layer 5-19

Manchester encoding

used in 10BaseT each bit has a transition allows clocks in sending and receiving nodes to

synchronize to each other no need for a centralized global clock among nodes

Hey this is physical-layer stuff

5 DataLink Layer 5-20

Ethernet Cabling

The most common kinds of Ethernet cabling

5 DataLink Layer 5-21

Ethernet Cabling (2)

Three kinds of Ethernet cabling (a) 10Base5 (b) 10Base2 (c) 10Base-T

5 DataLink Layer 5-22

Ethernet Cabling (3)

Cable topologies (a) Linear (b) Spine (c) Tree (d) Segmented

5 DataLink Layer 5-23

10BaseT and 100BaseT 10100 Mbps rate latter called ldquofast ethernetrdquo T stands for Twisted Pair Nodes connect to a hub ldquostar topologyrdquo 100

m max distance between nodes and hub

twisted pair

hub

5 DataLink Layer 5-24

100Mbps Fast Ethernet

Use IEEE 8023 MAC protocol and frame format 100BASE-X use physical medium specifications

from FDDI Two physical links between nodes

bull Transmission and reception 100BASE-TX uses STP or Cat 5 UTP

bull May require new cable 100BASE-FX uses optical fiber 100BASE-T4 can use Cat 3 voice-grade UTP

bull Uses four twisted-pair lines between nodesbull Data transmission uses three pairs in one direction at a

time

Star-wire topology Similar to 10BASE-T

5 DataLink Layer 5-25

Fast Ethernet

The original fast Ethernet cabling

5 DataLink Layer 5-26

Gbit Ethernet

uses standard Ethernet frame format allows for point-to-point links and shared

broadcast channels in shared mode CSMACD is used short

distances between nodes required for efficiency

uses hubs called here ldquoBuffered Distributorsrdquo Full-Duplex at 1 Gbps for point-to-point links 10 Gbps now

5 DataLink Layer 5-27

Gigabit Ethernet

Gigabit Ethernet cabling

5 DataLink Layer 5-28

Wireless Link CharacteristicsDifferences from wired link hellip

decreased signal strength radio signal attenuates as it propagates through matter (path loss)

interference from other sources standardized wireless network frequencies (eg 24 GHz) shared by other devices (eg phone) devices (motors) interfere as well

multipath propagation radio signal reflects off objects ground arriving ad destination at slightly different times

hellip make communication across (even a point to point) wireless link much more ldquodifficultrdquo

5 DataLink Layer 5-29

Wireless network characteristicsMultiple wireless senders and receivers create

additional problems (beyond multiple access)

AB

C

Hidden terminal problem B A hear each other B C hear each other A C can not hear each

othermeans A C unaware of their

interference at B

A B C

Arsquos signalstrength

space

Crsquos signalstrength

Signal fading B A hear each other B C hear each other A C can not hear each other

interferring at B

5 DataLink Layer 5-30

IEEE 80211 Wireless LAN

80211b 24-5 GHz unlicensed

radio spectrum up to 11 Mbps direct sequence

spread spectrum (DSSS) in physical layer

bull all hosts use same chipping code

widely deployed using base stations

80211a 5-6 GHz range up to 54 Mbps

80211g 24-5 GHz range up to 54 Mbps

All use CSMACA for multiple access

All have base-station and ad-hoc network versions

5 DataLink Layer 5-31

Figure 3-12

ISM bands

5 DataLink Layer 5-32

80211 LAN architecture

wireless host communicates with base station base station = access

point (AP) Basic Service Set (BSS)

(aka ldquocellrdquo) in infrastructure mode contains wireless hosts access point (AP) base

station ad hoc mode hosts

only

BSS 1

BSS 2

Internet

hub switchor routerAP

AP

5 DataLink Layer 5-33

80211 Channels association 80211b 24GHz-2485GHz spectrum divided

into 11 channels at different frequencies AP admin chooses frequency for AP interference possible channel can be same as

that chosen by neighboring AP host must associate with an AP

scans channels listening for beacon frames containing APrsquos name (SSID) and MAC address

selects AP to associate with may perform authentication [Chapter 8] will typically run DHCP to get IP address in

APrsquos subnet

5 DataLink Layer 5-34

IEEE 80211 multiple access avoid collisions 2+ nodes transmitting at same

time 80211 CSMA - sense before transmitting

donrsquot collide with ongoing transmission by other node

80211 no collision detection difficult to receive (sense collisions) when transmitting

due to weak received signals (fading) canrsquot sense all collisions in any case hidden terminal

fading goal avoid collisions CSMAC(ollision)A(voidance)

AB

CA B C

Arsquos signalstrength

space

Crsquos signalstrength

5 DataLink Layer 5-35

IEEE 80211 MAC Protocol CSMACA

80211 sender1 if sense channel idle for DIFS then

transmit entire frame (no CD)2 if sense channel busy then

start random backoff timetimer counts down while channel idletransmit when timer expiresif no ACK increase random backoff

interval repeat 2

80211 receiver- if frame received OK

return ACK after SIFS (ACK needed due to hidden terminal problem)

sender receiver

DIFS

data

SIFS

ACK

5 DataLink Layer 5-36

Avoiding collisions (more)

idea allow sender to ldquoreserverdquo channel rather than random access of data frames avoid collisions of long data frames

sender first transmits small request-to-send (RTS) packets to BS using CSMA RTSs may still collide with each other (but theyrsquore

short) BS broadcasts clear-to-send CTS in response to RTS RTS heard by all nodes

sender transmits data frame other stations defer transmissions

Avoid data frame collisions completely using small reservation packets

5 DataLink Layer 5-37

Collision Avoidance RTS-CTS exchange

APA B

time

RTS(A)RTS(B)

RTS(A)

CTS(A) CTS(A)

DATA (A)

ACK(A) ACK(A)

reservation collision

defer

5 DataLink Layer 5-38

Manchester encoding

Used in 10BaseT Each bit has a transition Allows clocks in sending and receiving nodes to

synchronize to each other no need for a centralized global clock among nodes

Hey this is physical-layer stuff

5 DataLink Layer 5-39

Link Layer

51 Introduction and services

52 Error detection and correction

53Multiple access protocols

54 Link-Layer Addressing

55 Ethernet

56 Interconnections Hubs and switches

57 PPP 58 Link Virtualization

ATM

5 DataLink Layer 5-40

HubsHubs are essentially physical-layer repeaters

bits coming from one link go out all other links at the same rate no frame buffering no CSMACD at hub adapters detect collisions provides net management functionality

twisted pair

hub

5 DataLink Layer 5-41

Interconnecting with hubs Backbone hub interconnects LAN segments Extends max distance between nodes But individual segment collision domains become one large

collision domain Canrsquot interconnect 10BaseT amp 100BaseT

hub

hubhub

hub

5 DataLink Layer 5-42

Inter - Networking

Hubs Bridges Switches Routers

5 DataLink Layer 5-43

Learning Bridges Do not forward when unnecessary Maintain forwarding table

HostPort

A 1 B 1 C 1 X 2 Y 2 Z 2

Learn table entries based on source address Table is an optimization need not be complete Always forward broadcast frames

A

Bridge

B C

X Y Z

Port 1

Port 2

5 DataLink Layer 5-44

Spanning Tree Algorithm Problem loops

Bridges run a distributed spanning tree algorithm select which bridges actively forward developed by Radia Perlman now IEEE 8021 specification

A

C

E

D

B

K

F

H

J

G

I

B3

B7

B4

B2

B5

B1

B6

(a) (b)

5 DataLink Layer 5-45

Algorithm Overview Each bridge has unique id (eg B1 B2

B3) Select bridge with smallest id as root Select bridge on each LAN closest to root

as designated bridge (use id to break ties) Each bridge forwards frames over each LAN for which it is the designated bridge

A

C

E

D

B

K

F

H

J

G

I

B5

B2

B3

B7

B4

B1

B6

5 DataLink Layer 5-46

Algorithm Details

Bridges exchange configuration messages id for bridge sending the message id for what the sending bridge believes to be

root bridge distance (hops) from sending bridge to root

bridge Each bridge records current best

configuration message for each port Initially each bridge believes it is the root

5 DataLink Layer 5-47

Algorithm Detail (cont) When learn not root stop generating config

messages in steady state only root generates configuration messages

When learn not designated bridge stop forwarding config messages in steady state only designated bridges forward config

messages

Root continues to periodically send config messages If any bridge does not receive config message after

a period of time it starts generating config messages claiming to be the root

5 DataLink Layer 5-48

Broadcast and Multicast Forward all broadcastmulticast frames

current practice Learn when no group members

downstream Accomplished by having each member of

group G send a frame to bridge multicast address with G in source field

5 DataLink Layer 5-49

Limitations of Bridges

Do not scale spanning tree algorithm does not scale broadcast does not scale

Do not accommodate heterogeneity

Caution beware of transparency

5 DataLink Layer 5-50

Switch link-layer device smarter than hubs take active

role store forward Ethernet frames examine incoming framersquos MAC address selectively

forward frame to one-or-more outgoing links when frame is to be forwarded on segment uses CSMACD to access segment

transparent hosts are unaware of presence of switches

plug-and-play self-learning switches do not need to be configured

5 DataLink Layer 5-51

Switch allows multiple simultaneous transmissions

hosts have dedicated direct connection to switch

switches buffer packets Ethernet protocol used on

each incoming link but no collisions full duplex each link is its own collision

domain switching A-to-Arsquo and B-

to-Brsquo simultaneously without collisions not possible with dumb hub

A

Arsquo

B

Brsquo

C

Crsquo

switch with six interfaces(123456)

1 23

45

6

5 DataLink Layer 5-52

Switch Table

Q how does switch know that Arsquo reachable via interface 4 Brsquo reachable via interface 5

A each switch has a switch table each entry (MAC address of host interface

to reach host time stamp)

looks like a routing table Q how are entries created

maintained in switch table something like a routing

protocol

A

Arsquo

B

Brsquo

C

Crsquo

switch with six interfaces(123456)

1 23

45

6

5 DataLink Layer 5-53

Switch self-learning

switch learns which hosts can be reached through which interfaces when frame received

switch ldquolearnsrdquo location of sender incoming LAN segment

records senderlocation pair in switch table

A

Arsquo

B

Brsquo

C

Crsquo

1 23

45

6

A Arsquo

Source ADest Arsquo

MAC addr interface TTL

Switch table (initially empty)

A 1 60

5 DataLink Layer 5-54

Forwarding

bull How do determine onto which LAN segment to forward framebull Looks like a routing problem

hub

hubhub

switch1

2 3

5 DataLink Layer 5-55

Self learning

A switch has a switch table entry in switch table

(MAC Address Interface Time Stamp) stale entries in table dropped (TTL can be 60

min) switch learns which hosts can be reached through

which interfaces when frame received switch ldquolearnsrdquo location

of sender incoming LAN segment records senderlocation pair in switch table

5 DataLink Layer 5-56

Self-learning forwarding example

A

Arsquo

B

Brsquo

C

Crsquo

1 23

45

6

A Arsquo

Source ADest Arsquo

MAC addr interface TTL

Switch table (initially empty)

A 1 60

A ArsquoA ArsquoA ArsquoA ArsquoA Arsquo

frame destination unknownflood

Arsquo A

destination A location known

Arsquo 4 60

selective send

5 DataLink Layer 5-57

FilteringForwardingWhen switch receives a frame

index switch table using MAC dest addressif entry found for destination

then if dest on segment from which frame arrived

then drop the frame else forward the frame on interface indicated else flood

forward on all but the interface on which the frame arrived

5 DataLink Layer 5-58

Switch example

Suppose C sends frame to D

Switch receives frame from from C notes in bridge table that C is on interface 1 because D is not in table switch forwards frame into

interfaces 2 and 3

frame received by D

hub

hub hub

switch

A

B CD

EF

G H

I

address interface

ABEG

1123

12 3

5 DataLink Layer 5-59

Switch example

Suppose D replies back with frame to C

Switch receives frame from from D notes in bridge table that D is on interface 2 because C is in table switch forwards frame only to

interface 1

frame received by C

hub

hub hub

switch

A

B CD

EF

G H

I

address interface

ABEGC

11231

5 DataLink Layer 5-60

Switch traffic isolation switch installation breaks subnet into LAN

segments switch filters packets

same-LAN-segment frames not usually forwarded onto other LAN segments

segments become separate collision domains

hub hub hub

switch

collision domain collision domain

collision domain

5 DataLink Layer 5-61

Switches dedicated access Switch with many

interfaces Hosts have direct

connection to switch No collisions full duplex

Switching A-to-Arsquo and B-to-Brsquo simultaneously no collisions

switch

A

Arsquo

B

Brsquo

C

Crsquo

5 DataLink Layer 5-62

More on Switches

cut-through switching frame forwarded from input to output port without first collecting entire frameslight reduction in latency

combinations of shareddedicated 101001000 Mbps interfaces

5 DataLink Layer 5-63

Institutional network

hub

hubhub

switch

to externalnetwork

router

IP subnet

mail server

web server

5 DataLink Layer 5-64

Switches vs Routers both store-and-forward devices

routers network layer devices (examine network layer headers) switches are link layer devices

routers maintain routing tables implement routing algorithms

switches maintain switch tables implement filtering learning algorithms

5 DataLink Layer 5-65

Summary comparison

hubs routers switches

traffi c isolation

no yes yes

plug amp play yes no yes

optimal routing

no yes no

cut through

yes no yes

5 DataLink Layer 5-66

IEEE 802 Standards

The 802 working groups The important ones are marked with The ones marked with are hibernating The one marked with dagger gave up

  • Slide 1
  • Link Layer
  • Ethernet
  • Slide 4
  • Star topology
  • Ethernet Frame Structure
  • Ethernet Frame Structure (more)
  • Unreliable connectionless service
  • Ethernet uses CSMACD
  • Ethernet CSMACD algorithm
  • Ethernetrsquos CSMACD (more)
  • Collision Detection
  • Algorithm (cont)
  • Binary Exponential Backoff
  • Ethernet MAC Sublayer Protocol (2)
  • CSMACD efficiency
  • Ethernet Performance
  • 8023 Ethernet Standards Link amp Physical Layers
  • Manchester encoding
  • Ethernet Cabling
  • Ethernet Cabling (2)
  • Ethernet Cabling (3)
  • 10BaseT and 100BaseT
  • 100Mbps Fast Ethernet
  • Fast Ethernet
  • Gbit Ethernet
  • Gigabit Ethernet
  • Wireless Link Characteristics
  • Wireless network characteristics
  • IEEE 80211 Wireless LAN
  • Slide 31
  • 80211 LAN architecture
  • 80211 Channels association
  • IEEE 80211 multiple access
  • IEEE 80211 MAC Protocol CSMACA
  • Avoiding collisions (more)
  • Collision Avoidance RTS-CTS exchange
  • Slide 38
  • Slide 39
  • Hubs
  • Interconnecting with hubs
  • Inter - Networking
  • Learning Bridges
  • Spanning Tree Algorithm
  • Algorithm Overview
  • Algorithm Details
  • Algorithm Detail (cont)
  • Broadcast and Multicast
  • Limitations of Bridges
  • Switch
  • Switch allows multiple simultaneous transmissions
  • Switch Table
  • Switch self-learning
  • Forwarding
  • Self learning
  • Self-learning forwarding example
  • FilteringForwarding
  • Switch example
  • Slide 59
  • Switch traffic isolation
  • Switches dedicated access
  • More on Switches
  • Institutional network
  • Switches vs Routers
  • Summary comparison
  • IEEE 802 Standards
Page 3: Chapter 5B

5 DataLink Layer 5-3

Ethernet

ldquodominantrdquo wired LAN technology cheap $20 for 100Mbs first widely used LAN technology Simpler cheaper than token LANs and ATM Kept up with speed race 10 Mbps ndash 10 Gbps

Metcalfersquos Ethernetsketch

5 DataLink Layer 5-4

Ethernet

ldquodominantrdquo wired LAN technology cheap $20 for 100Mbs first widely used LAN technology Simpler cheaper than token LANs and ATM Kept up with speed race 10 Mbps ndash 10 Gbps

5 DataLink Layer 5-5

Star topology bus topology popular through mid 90s

all nodes in same collision domain (can collide with each other)

today star topology prevails active switch in center each ldquospokerdquo runs a (separate) Ethernet protocol

(nodes do not collide with each other)

switch

bus coaxial cable star

5 DataLink Layer 5-6

Ethernet Frame Structure

Sending adapter encapsulates IP datagram (or other network layer protocol packet) in Ethernet frame

Preamble 7 bytes with pattern 10101010 followed by one

byte with pattern 10101011 used to synchronize receiver sender clock

rates

Destaddr

64 48 32

CRCPreamble Srcaddr Type Body

1648

5 DataLink Layer 5-7

Ethernet Frame Structure (more) Addresses 6 bytes

if adapter receives frame with matching destination address or with broadcast address (eg ARP packet) it passes data in frame to net-layer protocol

otherwise adapter discards frame

Type indicates the higher layer protocol (mostly IP but others may be supported such as Novell IPX and AppleTalk)

CRC checked at receiver if error is detected the frame is simply dropped

Destaddr

64 48 32

CRCPreamble Srcaddr Type Body

1648

5 DataLink Layer 5-8

Unreliable connectionless service Connectionless No handshaking between

sending and receiving adapter Unreliable receiving adapter doesnrsquot send

acks or nacks to sending adapter stream of datagrams passed to network layer can

have gaps gaps will be filled if app is using TCP otherwise app will see the gaps

5 DataLink Layer 5-9

Ethernet uses CSMACD

No slots adapter doesnrsquot

transmit if it senses that some other adapter is transmitting that is carrier sense

transmitting adapter aborts when it senses that another adapter is transmitting that is collision detection

Before attempting a retransmission adapter waits a random time that is random access

5 DataLink Layer 5-10

Ethernet CSMACD algorithm

1 Adaptor receives datagram from net layer amp creates frame

2 If adapter senses channel idle it starts to transmit frame If it senses channel busy waits until channel idle and then transmits

3 If adapter transmits entire frame without detecting another transmission the adapter is done with frame

4 If adapter detects another transmission while transmitting aborts and sends jam signal

5 After aborting adapter enters exponential backoff after the mth collision adapter chooses a K at random from 012hellip2m-1 Adapter waits K512 bit times and returns to Step 2

5 DataLink Layer 5-11

Ethernetrsquos CSMACD (more)

Jam Signal make sure all other transmitters are aware of collision 48 bits

Bit time 1 microsec for 10 Mbps Ethernet for K=1023 wait time is about 50 msec

Exponential Backoff Goal adapt retransmission

attempts to estimated current load heavy load random wait

will be longer first collision choose K

from 01 delay is K 512 bit transmission times

after second collision choose K from 0123hellip

after ten collisions choose K from 01234hellip1023

Seeinteract with Javaapplet on AWL Web sitehighly recommended

5 DataLink Layer 5-12

Collision Detection

On baseband bus collision produces much higher signal voltage than signal

Collision detected if cable signal greater than single station signal

Signal attenuated over distance Limit distance to 500m (10Base5) or 200m

(10Base2) For twisted pair (star-topology) activity on

more than one port is collision Special collision presence signal

5 DataLink Layer 5-13

Algorithm (cont)

If collisionhellip jam for 32 bits then stop transmitting frame minimum frame is 64 bytes (header + 46 bytes

of data) delay and try again

bull 1st time 0 or 512usbull 2nd time 0 512 or 1024usbull 3rd time512 1024 or 1536usbull nth time k x 512us for randomly selected

k=02n - 1bull give up after several tries (usually 16)bull exponential backoff

5 DataLink Layer 5-14

Binary Exponential Backoff

Attempt to transmit repeatedly if repeated collisions First 10 attempts mean value of random delay doubled Value then remains same for 6 further attempts After 16 unsuccessful attempts station gives up and

reports error As congestion increases stations back off by larger

amounts to reduce the probability of collision 1-persistent algorithm with binary exponential backoff

efficient over wide range of loads Low loads 1-persistence guarantees station can

seize channel once idle High loads at least as stable as other techniques

Backoff algorithm gives last-in first-out effect Stations with few collisions transmit first

5 DataLink Layer 5-15

Ethernet MAC Sublayer Protocol (2)

Collision detection can take as long as 2

5 DataLink Layer 5-16

CSMACD efficiency Tprop = max prop between 2 nodes in LAN

ttrans = time to transmit max-size frame

Efficiency goes to 1 as tprop goes to 0

Goes to 1 as ttrans goes to infinity Much better than ALOHA but still decentralized simple and cheap

transprop tt 51

1efficiency

5 DataLink Layer 5-17

Ethernet Performance

Efficiency of Ethernet at 10 Mbps with 512-bit slot times

5 DataLink Layer 5-18

8023 Ethernet Standards Link amp Physical Layers

many different Ethernet standards common MAC protocol and frame format different speeds 2 Mbps 10 Mbps 100

Mbps 1Gbps 10G bps different physical layer media fiber cable

applicationtransportnetwork

linkphysical

MAC protocoland frame format

100BASE-TX

100BASE-T4

100BASE-FX100BASE-T2

100BASE-SX 100BASE-BX

fiber physical layercopper (twisterpair) physical layer

5 DataLink Layer 5-19

Manchester encoding

used in 10BaseT each bit has a transition allows clocks in sending and receiving nodes to

synchronize to each other no need for a centralized global clock among nodes

Hey this is physical-layer stuff

5 DataLink Layer 5-20

Ethernet Cabling

The most common kinds of Ethernet cabling

5 DataLink Layer 5-21

Ethernet Cabling (2)

Three kinds of Ethernet cabling (a) 10Base5 (b) 10Base2 (c) 10Base-T

5 DataLink Layer 5-22

Ethernet Cabling (3)

Cable topologies (a) Linear (b) Spine (c) Tree (d) Segmented

5 DataLink Layer 5-23

10BaseT and 100BaseT 10100 Mbps rate latter called ldquofast ethernetrdquo T stands for Twisted Pair Nodes connect to a hub ldquostar topologyrdquo 100

m max distance between nodes and hub

twisted pair

hub

5 DataLink Layer 5-24

100Mbps Fast Ethernet

Use IEEE 8023 MAC protocol and frame format 100BASE-X use physical medium specifications

from FDDI Two physical links between nodes

bull Transmission and reception 100BASE-TX uses STP or Cat 5 UTP

bull May require new cable 100BASE-FX uses optical fiber 100BASE-T4 can use Cat 3 voice-grade UTP

bull Uses four twisted-pair lines between nodesbull Data transmission uses three pairs in one direction at a

time

Star-wire topology Similar to 10BASE-T

5 DataLink Layer 5-25

Fast Ethernet

The original fast Ethernet cabling

5 DataLink Layer 5-26

Gbit Ethernet

uses standard Ethernet frame format allows for point-to-point links and shared

broadcast channels in shared mode CSMACD is used short

distances between nodes required for efficiency

uses hubs called here ldquoBuffered Distributorsrdquo Full-Duplex at 1 Gbps for point-to-point links 10 Gbps now

5 DataLink Layer 5-27

Gigabit Ethernet

Gigabit Ethernet cabling

5 DataLink Layer 5-28

Wireless Link CharacteristicsDifferences from wired link hellip

decreased signal strength radio signal attenuates as it propagates through matter (path loss)

interference from other sources standardized wireless network frequencies (eg 24 GHz) shared by other devices (eg phone) devices (motors) interfere as well

multipath propagation radio signal reflects off objects ground arriving ad destination at slightly different times

hellip make communication across (even a point to point) wireless link much more ldquodifficultrdquo

5 DataLink Layer 5-29

Wireless network characteristicsMultiple wireless senders and receivers create

additional problems (beyond multiple access)

AB

C

Hidden terminal problem B A hear each other B C hear each other A C can not hear each

othermeans A C unaware of their

interference at B

A B C

Arsquos signalstrength

space

Crsquos signalstrength

Signal fading B A hear each other B C hear each other A C can not hear each other

interferring at B

5 DataLink Layer 5-30

IEEE 80211 Wireless LAN

80211b 24-5 GHz unlicensed

radio spectrum up to 11 Mbps direct sequence

spread spectrum (DSSS) in physical layer

bull all hosts use same chipping code

widely deployed using base stations

80211a 5-6 GHz range up to 54 Mbps

80211g 24-5 GHz range up to 54 Mbps

All use CSMACA for multiple access

All have base-station and ad-hoc network versions

5 DataLink Layer 5-31

Figure 3-12

ISM bands

5 DataLink Layer 5-32

80211 LAN architecture

wireless host communicates with base station base station = access

point (AP) Basic Service Set (BSS)

(aka ldquocellrdquo) in infrastructure mode contains wireless hosts access point (AP) base

station ad hoc mode hosts

only

BSS 1

BSS 2

Internet

hub switchor routerAP

AP

5 DataLink Layer 5-33

80211 Channels association 80211b 24GHz-2485GHz spectrum divided

into 11 channels at different frequencies AP admin chooses frequency for AP interference possible channel can be same as

that chosen by neighboring AP host must associate with an AP

scans channels listening for beacon frames containing APrsquos name (SSID) and MAC address

selects AP to associate with may perform authentication [Chapter 8] will typically run DHCP to get IP address in

APrsquos subnet

5 DataLink Layer 5-34

IEEE 80211 multiple access avoid collisions 2+ nodes transmitting at same

time 80211 CSMA - sense before transmitting

donrsquot collide with ongoing transmission by other node

80211 no collision detection difficult to receive (sense collisions) when transmitting

due to weak received signals (fading) canrsquot sense all collisions in any case hidden terminal

fading goal avoid collisions CSMAC(ollision)A(voidance)

AB

CA B C

Arsquos signalstrength

space

Crsquos signalstrength

5 DataLink Layer 5-35

IEEE 80211 MAC Protocol CSMACA

80211 sender1 if sense channel idle for DIFS then

transmit entire frame (no CD)2 if sense channel busy then

start random backoff timetimer counts down while channel idletransmit when timer expiresif no ACK increase random backoff

interval repeat 2

80211 receiver- if frame received OK

return ACK after SIFS (ACK needed due to hidden terminal problem)

sender receiver

DIFS

data

SIFS

ACK

5 DataLink Layer 5-36

Avoiding collisions (more)

idea allow sender to ldquoreserverdquo channel rather than random access of data frames avoid collisions of long data frames

sender first transmits small request-to-send (RTS) packets to BS using CSMA RTSs may still collide with each other (but theyrsquore

short) BS broadcasts clear-to-send CTS in response to RTS RTS heard by all nodes

sender transmits data frame other stations defer transmissions

Avoid data frame collisions completely using small reservation packets

5 DataLink Layer 5-37

Collision Avoidance RTS-CTS exchange

APA B

time

RTS(A)RTS(B)

RTS(A)

CTS(A) CTS(A)

DATA (A)

ACK(A) ACK(A)

reservation collision

defer

5 DataLink Layer 5-38

Manchester encoding

Used in 10BaseT Each bit has a transition Allows clocks in sending and receiving nodes to

synchronize to each other no need for a centralized global clock among nodes

Hey this is physical-layer stuff

5 DataLink Layer 5-39

Link Layer

51 Introduction and services

52 Error detection and correction

53Multiple access protocols

54 Link-Layer Addressing

55 Ethernet

56 Interconnections Hubs and switches

57 PPP 58 Link Virtualization

ATM

5 DataLink Layer 5-40

HubsHubs are essentially physical-layer repeaters

bits coming from one link go out all other links at the same rate no frame buffering no CSMACD at hub adapters detect collisions provides net management functionality

twisted pair

hub

5 DataLink Layer 5-41

Interconnecting with hubs Backbone hub interconnects LAN segments Extends max distance between nodes But individual segment collision domains become one large

collision domain Canrsquot interconnect 10BaseT amp 100BaseT

hub

hubhub

hub

5 DataLink Layer 5-42

Inter - Networking

Hubs Bridges Switches Routers

5 DataLink Layer 5-43

Learning Bridges Do not forward when unnecessary Maintain forwarding table

HostPort

A 1 B 1 C 1 X 2 Y 2 Z 2

Learn table entries based on source address Table is an optimization need not be complete Always forward broadcast frames

A

Bridge

B C

X Y Z

Port 1

Port 2

5 DataLink Layer 5-44

Spanning Tree Algorithm Problem loops

Bridges run a distributed spanning tree algorithm select which bridges actively forward developed by Radia Perlman now IEEE 8021 specification

A

C

E

D

B

K

F

H

J

G

I

B3

B7

B4

B2

B5

B1

B6

(a) (b)

5 DataLink Layer 5-45

Algorithm Overview Each bridge has unique id (eg B1 B2

B3) Select bridge with smallest id as root Select bridge on each LAN closest to root

as designated bridge (use id to break ties) Each bridge forwards frames over each LAN for which it is the designated bridge

A

C

E

D

B

K

F

H

J

G

I

B5

B2

B3

B7

B4

B1

B6

5 DataLink Layer 5-46

Algorithm Details

Bridges exchange configuration messages id for bridge sending the message id for what the sending bridge believes to be

root bridge distance (hops) from sending bridge to root

bridge Each bridge records current best

configuration message for each port Initially each bridge believes it is the root

5 DataLink Layer 5-47

Algorithm Detail (cont) When learn not root stop generating config

messages in steady state only root generates configuration messages

When learn not designated bridge stop forwarding config messages in steady state only designated bridges forward config

messages

Root continues to periodically send config messages If any bridge does not receive config message after

a period of time it starts generating config messages claiming to be the root

5 DataLink Layer 5-48

Broadcast and Multicast Forward all broadcastmulticast frames

current practice Learn when no group members

downstream Accomplished by having each member of

group G send a frame to bridge multicast address with G in source field

5 DataLink Layer 5-49

Limitations of Bridges

Do not scale spanning tree algorithm does not scale broadcast does not scale

Do not accommodate heterogeneity

Caution beware of transparency

5 DataLink Layer 5-50

Switch link-layer device smarter than hubs take active

role store forward Ethernet frames examine incoming framersquos MAC address selectively

forward frame to one-or-more outgoing links when frame is to be forwarded on segment uses CSMACD to access segment

transparent hosts are unaware of presence of switches

plug-and-play self-learning switches do not need to be configured

5 DataLink Layer 5-51

Switch allows multiple simultaneous transmissions

hosts have dedicated direct connection to switch

switches buffer packets Ethernet protocol used on

each incoming link but no collisions full duplex each link is its own collision

domain switching A-to-Arsquo and B-

to-Brsquo simultaneously without collisions not possible with dumb hub

A

Arsquo

B

Brsquo

C

Crsquo

switch with six interfaces(123456)

1 23

45

6

5 DataLink Layer 5-52

Switch Table

Q how does switch know that Arsquo reachable via interface 4 Brsquo reachable via interface 5

A each switch has a switch table each entry (MAC address of host interface

to reach host time stamp)

looks like a routing table Q how are entries created

maintained in switch table something like a routing

protocol

A

Arsquo

B

Brsquo

C

Crsquo

switch with six interfaces(123456)

1 23

45

6

5 DataLink Layer 5-53

Switch self-learning

switch learns which hosts can be reached through which interfaces when frame received

switch ldquolearnsrdquo location of sender incoming LAN segment

records senderlocation pair in switch table

A

Arsquo

B

Brsquo

C

Crsquo

1 23

45

6

A Arsquo

Source ADest Arsquo

MAC addr interface TTL

Switch table (initially empty)

A 1 60

5 DataLink Layer 5-54

Forwarding

bull How do determine onto which LAN segment to forward framebull Looks like a routing problem

hub

hubhub

switch1

2 3

5 DataLink Layer 5-55

Self learning

A switch has a switch table entry in switch table

(MAC Address Interface Time Stamp) stale entries in table dropped (TTL can be 60

min) switch learns which hosts can be reached through

which interfaces when frame received switch ldquolearnsrdquo location

of sender incoming LAN segment records senderlocation pair in switch table

5 DataLink Layer 5-56

Self-learning forwarding example

A

Arsquo

B

Brsquo

C

Crsquo

1 23

45

6

A Arsquo

Source ADest Arsquo

MAC addr interface TTL

Switch table (initially empty)

A 1 60

A ArsquoA ArsquoA ArsquoA ArsquoA Arsquo

frame destination unknownflood

Arsquo A

destination A location known

Arsquo 4 60

selective send

5 DataLink Layer 5-57

FilteringForwardingWhen switch receives a frame

index switch table using MAC dest addressif entry found for destination

then if dest on segment from which frame arrived

then drop the frame else forward the frame on interface indicated else flood

forward on all but the interface on which the frame arrived

5 DataLink Layer 5-58

Switch example

Suppose C sends frame to D

Switch receives frame from from C notes in bridge table that C is on interface 1 because D is not in table switch forwards frame into

interfaces 2 and 3

frame received by D

hub

hub hub

switch

A

B CD

EF

G H

I

address interface

ABEG

1123

12 3

5 DataLink Layer 5-59

Switch example

Suppose D replies back with frame to C

Switch receives frame from from D notes in bridge table that D is on interface 2 because C is in table switch forwards frame only to

interface 1

frame received by C

hub

hub hub

switch

A

B CD

EF

G H

I

address interface

ABEGC

11231

5 DataLink Layer 5-60

Switch traffic isolation switch installation breaks subnet into LAN

segments switch filters packets

same-LAN-segment frames not usually forwarded onto other LAN segments

segments become separate collision domains

hub hub hub

switch

collision domain collision domain

collision domain

5 DataLink Layer 5-61

Switches dedicated access Switch with many

interfaces Hosts have direct

connection to switch No collisions full duplex

Switching A-to-Arsquo and B-to-Brsquo simultaneously no collisions

switch

A

Arsquo

B

Brsquo

C

Crsquo

5 DataLink Layer 5-62

More on Switches

cut-through switching frame forwarded from input to output port without first collecting entire frameslight reduction in latency

combinations of shareddedicated 101001000 Mbps interfaces

5 DataLink Layer 5-63

Institutional network

hub

hubhub

switch

to externalnetwork

router

IP subnet

mail server

web server

5 DataLink Layer 5-64

Switches vs Routers both store-and-forward devices

routers network layer devices (examine network layer headers) switches are link layer devices

routers maintain routing tables implement routing algorithms

switches maintain switch tables implement filtering learning algorithms

5 DataLink Layer 5-65

Summary comparison

hubs routers switches

traffi c isolation

no yes yes

plug amp play yes no yes

optimal routing

no yes no

cut through

yes no yes

5 DataLink Layer 5-66

IEEE 802 Standards

The 802 working groups The important ones are marked with The ones marked with are hibernating The one marked with dagger gave up

  • Slide 1
  • Link Layer
  • Ethernet
  • Slide 4
  • Star topology
  • Ethernet Frame Structure
  • Ethernet Frame Structure (more)
  • Unreliable connectionless service
  • Ethernet uses CSMACD
  • Ethernet CSMACD algorithm
  • Ethernetrsquos CSMACD (more)
  • Collision Detection
  • Algorithm (cont)
  • Binary Exponential Backoff
  • Ethernet MAC Sublayer Protocol (2)
  • CSMACD efficiency
  • Ethernet Performance
  • 8023 Ethernet Standards Link amp Physical Layers
  • Manchester encoding
  • Ethernet Cabling
  • Ethernet Cabling (2)
  • Ethernet Cabling (3)
  • 10BaseT and 100BaseT
  • 100Mbps Fast Ethernet
  • Fast Ethernet
  • Gbit Ethernet
  • Gigabit Ethernet
  • Wireless Link Characteristics
  • Wireless network characteristics
  • IEEE 80211 Wireless LAN
  • Slide 31
  • 80211 LAN architecture
  • 80211 Channels association
  • IEEE 80211 multiple access
  • IEEE 80211 MAC Protocol CSMACA
  • Avoiding collisions (more)
  • Collision Avoidance RTS-CTS exchange
  • Slide 38
  • Slide 39
  • Hubs
  • Interconnecting with hubs
  • Inter - Networking
  • Learning Bridges
  • Spanning Tree Algorithm
  • Algorithm Overview
  • Algorithm Details
  • Algorithm Detail (cont)
  • Broadcast and Multicast
  • Limitations of Bridges
  • Switch
  • Switch allows multiple simultaneous transmissions
  • Switch Table
  • Switch self-learning
  • Forwarding
  • Self learning
  • Self-learning forwarding example
  • FilteringForwarding
  • Switch example
  • Slide 59
  • Switch traffic isolation
  • Switches dedicated access
  • More on Switches
  • Institutional network
  • Switches vs Routers
  • Summary comparison
  • IEEE 802 Standards
Page 4: Chapter 5B

5 DataLink Layer 5-4

Ethernet

ldquodominantrdquo wired LAN technology cheap $20 for 100Mbs first widely used LAN technology Simpler cheaper than token LANs and ATM Kept up with speed race 10 Mbps ndash 10 Gbps

5 DataLink Layer 5-5

Star topology bus topology popular through mid 90s

all nodes in same collision domain (can collide with each other)

today star topology prevails active switch in center each ldquospokerdquo runs a (separate) Ethernet protocol

(nodes do not collide with each other)

switch

bus coaxial cable star

5 DataLink Layer 5-6

Ethernet Frame Structure

Sending adapter encapsulates IP datagram (or other network layer protocol packet) in Ethernet frame

Preamble 7 bytes with pattern 10101010 followed by one

byte with pattern 10101011 used to synchronize receiver sender clock

rates

Destaddr

64 48 32

CRCPreamble Srcaddr Type Body

1648

5 DataLink Layer 5-7

Ethernet Frame Structure (more) Addresses 6 bytes

if adapter receives frame with matching destination address or with broadcast address (eg ARP packet) it passes data in frame to net-layer protocol

otherwise adapter discards frame

Type indicates the higher layer protocol (mostly IP but others may be supported such as Novell IPX and AppleTalk)

CRC checked at receiver if error is detected the frame is simply dropped

Destaddr

64 48 32

CRCPreamble Srcaddr Type Body

1648

5 DataLink Layer 5-8

Unreliable connectionless service Connectionless No handshaking between

sending and receiving adapter Unreliable receiving adapter doesnrsquot send

acks or nacks to sending adapter stream of datagrams passed to network layer can

have gaps gaps will be filled if app is using TCP otherwise app will see the gaps

5 DataLink Layer 5-9

Ethernet uses CSMACD

No slots adapter doesnrsquot

transmit if it senses that some other adapter is transmitting that is carrier sense

transmitting adapter aborts when it senses that another adapter is transmitting that is collision detection

Before attempting a retransmission adapter waits a random time that is random access

5 DataLink Layer 5-10

Ethernet CSMACD algorithm

1 Adaptor receives datagram from net layer amp creates frame

2 If adapter senses channel idle it starts to transmit frame If it senses channel busy waits until channel idle and then transmits

3 If adapter transmits entire frame without detecting another transmission the adapter is done with frame

4 If adapter detects another transmission while transmitting aborts and sends jam signal

5 After aborting adapter enters exponential backoff after the mth collision adapter chooses a K at random from 012hellip2m-1 Adapter waits K512 bit times and returns to Step 2

5 DataLink Layer 5-11

Ethernetrsquos CSMACD (more)

Jam Signal make sure all other transmitters are aware of collision 48 bits

Bit time 1 microsec for 10 Mbps Ethernet for K=1023 wait time is about 50 msec

Exponential Backoff Goal adapt retransmission

attempts to estimated current load heavy load random wait

will be longer first collision choose K

from 01 delay is K 512 bit transmission times

after second collision choose K from 0123hellip

after ten collisions choose K from 01234hellip1023

Seeinteract with Javaapplet on AWL Web sitehighly recommended

5 DataLink Layer 5-12

Collision Detection

On baseband bus collision produces much higher signal voltage than signal

Collision detected if cable signal greater than single station signal

Signal attenuated over distance Limit distance to 500m (10Base5) or 200m

(10Base2) For twisted pair (star-topology) activity on

more than one port is collision Special collision presence signal

5 DataLink Layer 5-13

Algorithm (cont)

If collisionhellip jam for 32 bits then stop transmitting frame minimum frame is 64 bytes (header + 46 bytes

of data) delay and try again

bull 1st time 0 or 512usbull 2nd time 0 512 or 1024usbull 3rd time512 1024 or 1536usbull nth time k x 512us for randomly selected

k=02n - 1bull give up after several tries (usually 16)bull exponential backoff

5 DataLink Layer 5-14

Binary Exponential Backoff

Attempt to transmit repeatedly if repeated collisions First 10 attempts mean value of random delay doubled Value then remains same for 6 further attempts After 16 unsuccessful attempts station gives up and

reports error As congestion increases stations back off by larger

amounts to reduce the probability of collision 1-persistent algorithm with binary exponential backoff

efficient over wide range of loads Low loads 1-persistence guarantees station can

seize channel once idle High loads at least as stable as other techniques

Backoff algorithm gives last-in first-out effect Stations with few collisions transmit first

5 DataLink Layer 5-15

Ethernet MAC Sublayer Protocol (2)

Collision detection can take as long as 2

5 DataLink Layer 5-16

CSMACD efficiency Tprop = max prop between 2 nodes in LAN

ttrans = time to transmit max-size frame

Efficiency goes to 1 as tprop goes to 0

Goes to 1 as ttrans goes to infinity Much better than ALOHA but still decentralized simple and cheap

transprop tt 51

1efficiency

5 DataLink Layer 5-17

Ethernet Performance

Efficiency of Ethernet at 10 Mbps with 512-bit slot times

5 DataLink Layer 5-18

8023 Ethernet Standards Link amp Physical Layers

many different Ethernet standards common MAC protocol and frame format different speeds 2 Mbps 10 Mbps 100

Mbps 1Gbps 10G bps different physical layer media fiber cable

applicationtransportnetwork

linkphysical

MAC protocoland frame format

100BASE-TX

100BASE-T4

100BASE-FX100BASE-T2

100BASE-SX 100BASE-BX

fiber physical layercopper (twisterpair) physical layer

5 DataLink Layer 5-19

Manchester encoding

used in 10BaseT each bit has a transition allows clocks in sending and receiving nodes to

synchronize to each other no need for a centralized global clock among nodes

Hey this is physical-layer stuff

5 DataLink Layer 5-20

Ethernet Cabling

The most common kinds of Ethernet cabling

5 DataLink Layer 5-21

Ethernet Cabling (2)

Three kinds of Ethernet cabling (a) 10Base5 (b) 10Base2 (c) 10Base-T

5 DataLink Layer 5-22

Ethernet Cabling (3)

Cable topologies (a) Linear (b) Spine (c) Tree (d) Segmented

5 DataLink Layer 5-23

10BaseT and 100BaseT 10100 Mbps rate latter called ldquofast ethernetrdquo T stands for Twisted Pair Nodes connect to a hub ldquostar topologyrdquo 100

m max distance between nodes and hub

twisted pair

hub

5 DataLink Layer 5-24

100Mbps Fast Ethernet

Use IEEE 8023 MAC protocol and frame format 100BASE-X use physical medium specifications

from FDDI Two physical links between nodes

bull Transmission and reception 100BASE-TX uses STP or Cat 5 UTP

bull May require new cable 100BASE-FX uses optical fiber 100BASE-T4 can use Cat 3 voice-grade UTP

bull Uses four twisted-pair lines between nodesbull Data transmission uses three pairs in one direction at a

time

Star-wire topology Similar to 10BASE-T

5 DataLink Layer 5-25

Fast Ethernet

The original fast Ethernet cabling

5 DataLink Layer 5-26

Gbit Ethernet

uses standard Ethernet frame format allows for point-to-point links and shared

broadcast channels in shared mode CSMACD is used short

distances between nodes required for efficiency

uses hubs called here ldquoBuffered Distributorsrdquo Full-Duplex at 1 Gbps for point-to-point links 10 Gbps now

5 DataLink Layer 5-27

Gigabit Ethernet

Gigabit Ethernet cabling

5 DataLink Layer 5-28

Wireless Link CharacteristicsDifferences from wired link hellip

decreased signal strength radio signal attenuates as it propagates through matter (path loss)

interference from other sources standardized wireless network frequencies (eg 24 GHz) shared by other devices (eg phone) devices (motors) interfere as well

multipath propagation radio signal reflects off objects ground arriving ad destination at slightly different times

hellip make communication across (even a point to point) wireless link much more ldquodifficultrdquo

5 DataLink Layer 5-29

Wireless network characteristicsMultiple wireless senders and receivers create

additional problems (beyond multiple access)

AB

C

Hidden terminal problem B A hear each other B C hear each other A C can not hear each

othermeans A C unaware of their

interference at B

A B C

Arsquos signalstrength

space

Crsquos signalstrength

Signal fading B A hear each other B C hear each other A C can not hear each other

interferring at B

5 DataLink Layer 5-30

IEEE 80211 Wireless LAN

80211b 24-5 GHz unlicensed

radio spectrum up to 11 Mbps direct sequence

spread spectrum (DSSS) in physical layer

bull all hosts use same chipping code

widely deployed using base stations

80211a 5-6 GHz range up to 54 Mbps

80211g 24-5 GHz range up to 54 Mbps

All use CSMACA for multiple access

All have base-station and ad-hoc network versions

5 DataLink Layer 5-31

Figure 3-12

ISM bands

5 DataLink Layer 5-32

80211 LAN architecture

wireless host communicates with base station base station = access

point (AP) Basic Service Set (BSS)

(aka ldquocellrdquo) in infrastructure mode contains wireless hosts access point (AP) base

station ad hoc mode hosts

only

BSS 1

BSS 2

Internet

hub switchor routerAP

AP

5 DataLink Layer 5-33

80211 Channels association 80211b 24GHz-2485GHz spectrum divided

into 11 channels at different frequencies AP admin chooses frequency for AP interference possible channel can be same as

that chosen by neighboring AP host must associate with an AP

scans channels listening for beacon frames containing APrsquos name (SSID) and MAC address

selects AP to associate with may perform authentication [Chapter 8] will typically run DHCP to get IP address in

APrsquos subnet

5 DataLink Layer 5-34

IEEE 80211 multiple access avoid collisions 2+ nodes transmitting at same

time 80211 CSMA - sense before transmitting

donrsquot collide with ongoing transmission by other node

80211 no collision detection difficult to receive (sense collisions) when transmitting

due to weak received signals (fading) canrsquot sense all collisions in any case hidden terminal

fading goal avoid collisions CSMAC(ollision)A(voidance)

AB

CA B C

Arsquos signalstrength

space

Crsquos signalstrength

5 DataLink Layer 5-35

IEEE 80211 MAC Protocol CSMACA

80211 sender1 if sense channel idle for DIFS then

transmit entire frame (no CD)2 if sense channel busy then

start random backoff timetimer counts down while channel idletransmit when timer expiresif no ACK increase random backoff

interval repeat 2

80211 receiver- if frame received OK

return ACK after SIFS (ACK needed due to hidden terminal problem)

sender receiver

DIFS

data

SIFS

ACK

5 DataLink Layer 5-36

Avoiding collisions (more)

idea allow sender to ldquoreserverdquo channel rather than random access of data frames avoid collisions of long data frames

sender first transmits small request-to-send (RTS) packets to BS using CSMA RTSs may still collide with each other (but theyrsquore

short) BS broadcasts clear-to-send CTS in response to RTS RTS heard by all nodes

sender transmits data frame other stations defer transmissions

Avoid data frame collisions completely using small reservation packets

5 DataLink Layer 5-37

Collision Avoidance RTS-CTS exchange

APA B

time

RTS(A)RTS(B)

RTS(A)

CTS(A) CTS(A)

DATA (A)

ACK(A) ACK(A)

reservation collision

defer

5 DataLink Layer 5-38

Manchester encoding

Used in 10BaseT Each bit has a transition Allows clocks in sending and receiving nodes to

synchronize to each other no need for a centralized global clock among nodes

Hey this is physical-layer stuff

5 DataLink Layer 5-39

Link Layer

51 Introduction and services

52 Error detection and correction

53Multiple access protocols

54 Link-Layer Addressing

55 Ethernet

56 Interconnections Hubs and switches

57 PPP 58 Link Virtualization

ATM

5 DataLink Layer 5-40

HubsHubs are essentially physical-layer repeaters

bits coming from one link go out all other links at the same rate no frame buffering no CSMACD at hub adapters detect collisions provides net management functionality

twisted pair

hub

5 DataLink Layer 5-41

Interconnecting with hubs Backbone hub interconnects LAN segments Extends max distance between nodes But individual segment collision domains become one large

collision domain Canrsquot interconnect 10BaseT amp 100BaseT

hub

hubhub

hub

5 DataLink Layer 5-42

Inter - Networking

Hubs Bridges Switches Routers

5 DataLink Layer 5-43

Learning Bridges Do not forward when unnecessary Maintain forwarding table

HostPort

A 1 B 1 C 1 X 2 Y 2 Z 2

Learn table entries based on source address Table is an optimization need not be complete Always forward broadcast frames

A

Bridge

B C

X Y Z

Port 1

Port 2

5 DataLink Layer 5-44

Spanning Tree Algorithm Problem loops

Bridges run a distributed spanning tree algorithm select which bridges actively forward developed by Radia Perlman now IEEE 8021 specification

A

C

E

D

B

K

F

H

J

G

I

B3

B7

B4

B2

B5

B1

B6

(a) (b)

5 DataLink Layer 5-45

Algorithm Overview Each bridge has unique id (eg B1 B2

B3) Select bridge with smallest id as root Select bridge on each LAN closest to root

as designated bridge (use id to break ties) Each bridge forwards frames over each LAN for which it is the designated bridge

A

C

E

D

B

K

F

H

J

G

I

B5

B2

B3

B7

B4

B1

B6

5 DataLink Layer 5-46

Algorithm Details

Bridges exchange configuration messages id for bridge sending the message id for what the sending bridge believes to be

root bridge distance (hops) from sending bridge to root

bridge Each bridge records current best

configuration message for each port Initially each bridge believes it is the root

5 DataLink Layer 5-47

Algorithm Detail (cont) When learn not root stop generating config

messages in steady state only root generates configuration messages

When learn not designated bridge stop forwarding config messages in steady state only designated bridges forward config

messages

Root continues to periodically send config messages If any bridge does not receive config message after

a period of time it starts generating config messages claiming to be the root

5 DataLink Layer 5-48

Broadcast and Multicast Forward all broadcastmulticast frames

current practice Learn when no group members

downstream Accomplished by having each member of

group G send a frame to bridge multicast address with G in source field

5 DataLink Layer 5-49

Limitations of Bridges

Do not scale spanning tree algorithm does not scale broadcast does not scale

Do not accommodate heterogeneity

Caution beware of transparency

5 DataLink Layer 5-50

Switch link-layer device smarter than hubs take active

role store forward Ethernet frames examine incoming framersquos MAC address selectively

forward frame to one-or-more outgoing links when frame is to be forwarded on segment uses CSMACD to access segment

transparent hosts are unaware of presence of switches

plug-and-play self-learning switches do not need to be configured

5 DataLink Layer 5-51

Switch allows multiple simultaneous transmissions

hosts have dedicated direct connection to switch

switches buffer packets Ethernet protocol used on

each incoming link but no collisions full duplex each link is its own collision

domain switching A-to-Arsquo and B-

to-Brsquo simultaneously without collisions not possible with dumb hub

A

Arsquo

B

Brsquo

C

Crsquo

switch with six interfaces(123456)

1 23

45

6

5 DataLink Layer 5-52

Switch Table

Q how does switch know that Arsquo reachable via interface 4 Brsquo reachable via interface 5

A each switch has a switch table each entry (MAC address of host interface

to reach host time stamp)

looks like a routing table Q how are entries created

maintained in switch table something like a routing

protocol

A

Arsquo

B

Brsquo

C

Crsquo

switch with six interfaces(123456)

1 23

45

6

5 DataLink Layer 5-53

Switch self-learning

switch learns which hosts can be reached through which interfaces when frame received

switch ldquolearnsrdquo location of sender incoming LAN segment

records senderlocation pair in switch table

A

Arsquo

B

Brsquo

C

Crsquo

1 23

45

6

A Arsquo

Source ADest Arsquo

MAC addr interface TTL

Switch table (initially empty)

A 1 60

5 DataLink Layer 5-54

Forwarding

bull How do determine onto which LAN segment to forward framebull Looks like a routing problem

hub

hubhub

switch1

2 3

5 DataLink Layer 5-55

Self learning

A switch has a switch table entry in switch table

(MAC Address Interface Time Stamp) stale entries in table dropped (TTL can be 60

min) switch learns which hosts can be reached through

which interfaces when frame received switch ldquolearnsrdquo location

of sender incoming LAN segment records senderlocation pair in switch table

5 DataLink Layer 5-56

Self-learning forwarding example

A

Arsquo

B

Brsquo

C

Crsquo

1 23

45

6

A Arsquo

Source ADest Arsquo

MAC addr interface TTL

Switch table (initially empty)

A 1 60

A ArsquoA ArsquoA ArsquoA ArsquoA Arsquo

frame destination unknownflood

Arsquo A

destination A location known

Arsquo 4 60

selective send

5 DataLink Layer 5-57

FilteringForwardingWhen switch receives a frame

index switch table using MAC dest addressif entry found for destination

then if dest on segment from which frame arrived

then drop the frame else forward the frame on interface indicated else flood

forward on all but the interface on which the frame arrived

5 DataLink Layer 5-58

Switch example

Suppose C sends frame to D

Switch receives frame from from C notes in bridge table that C is on interface 1 because D is not in table switch forwards frame into

interfaces 2 and 3

frame received by D

hub

hub hub

switch

A

B CD

EF

G H

I

address interface

ABEG

1123

12 3

5 DataLink Layer 5-59

Switch example

Suppose D replies back with frame to C

Switch receives frame from from D notes in bridge table that D is on interface 2 because C is in table switch forwards frame only to

interface 1

frame received by C

hub

hub hub

switch

A

B CD

EF

G H

I

address interface

ABEGC

11231

5 DataLink Layer 5-60

Switch traffic isolation switch installation breaks subnet into LAN

segments switch filters packets

same-LAN-segment frames not usually forwarded onto other LAN segments

segments become separate collision domains

hub hub hub

switch

collision domain collision domain

collision domain

5 DataLink Layer 5-61

Switches dedicated access Switch with many

interfaces Hosts have direct

connection to switch No collisions full duplex

Switching A-to-Arsquo and B-to-Brsquo simultaneously no collisions

switch

A

Arsquo

B

Brsquo

C

Crsquo

5 DataLink Layer 5-62

More on Switches

cut-through switching frame forwarded from input to output port without first collecting entire frameslight reduction in latency

combinations of shareddedicated 101001000 Mbps interfaces

5 DataLink Layer 5-63

Institutional network

hub

hubhub

switch

to externalnetwork

router

IP subnet

mail server

web server

5 DataLink Layer 5-64

Switches vs Routers both store-and-forward devices

routers network layer devices (examine network layer headers) switches are link layer devices

routers maintain routing tables implement routing algorithms

switches maintain switch tables implement filtering learning algorithms

5 DataLink Layer 5-65

Summary comparison

hubs routers switches

traffi c isolation

no yes yes

plug amp play yes no yes

optimal routing

no yes no

cut through

yes no yes

5 DataLink Layer 5-66

IEEE 802 Standards

The 802 working groups The important ones are marked with The ones marked with are hibernating The one marked with dagger gave up

  • Slide 1
  • Link Layer
  • Ethernet
  • Slide 4
  • Star topology
  • Ethernet Frame Structure
  • Ethernet Frame Structure (more)
  • Unreliable connectionless service
  • Ethernet uses CSMACD
  • Ethernet CSMACD algorithm
  • Ethernetrsquos CSMACD (more)
  • Collision Detection
  • Algorithm (cont)
  • Binary Exponential Backoff
  • Ethernet MAC Sublayer Protocol (2)
  • CSMACD efficiency
  • Ethernet Performance
  • 8023 Ethernet Standards Link amp Physical Layers
  • Manchester encoding
  • Ethernet Cabling
  • Ethernet Cabling (2)
  • Ethernet Cabling (3)
  • 10BaseT and 100BaseT
  • 100Mbps Fast Ethernet
  • Fast Ethernet
  • Gbit Ethernet
  • Gigabit Ethernet
  • Wireless Link Characteristics
  • Wireless network characteristics
  • IEEE 80211 Wireless LAN
  • Slide 31
  • 80211 LAN architecture
  • 80211 Channels association
  • IEEE 80211 multiple access
  • IEEE 80211 MAC Protocol CSMACA
  • Avoiding collisions (more)
  • Collision Avoidance RTS-CTS exchange
  • Slide 38
  • Slide 39
  • Hubs
  • Interconnecting with hubs
  • Inter - Networking
  • Learning Bridges
  • Spanning Tree Algorithm
  • Algorithm Overview
  • Algorithm Details
  • Algorithm Detail (cont)
  • Broadcast and Multicast
  • Limitations of Bridges
  • Switch
  • Switch allows multiple simultaneous transmissions
  • Switch Table
  • Switch self-learning
  • Forwarding
  • Self learning
  • Self-learning forwarding example
  • FilteringForwarding
  • Switch example
  • Slide 59
  • Switch traffic isolation
  • Switches dedicated access
  • More on Switches
  • Institutional network
  • Switches vs Routers
  • Summary comparison
  • IEEE 802 Standards
Page 5: Chapter 5B

5 DataLink Layer 5-5

Star topology bus topology popular through mid 90s

all nodes in same collision domain (can collide with each other)

today star topology prevails active switch in center each ldquospokerdquo runs a (separate) Ethernet protocol

(nodes do not collide with each other)

switch

bus coaxial cable star

5 DataLink Layer 5-6

Ethernet Frame Structure

Sending adapter encapsulates IP datagram (or other network layer protocol packet) in Ethernet frame

Preamble 7 bytes with pattern 10101010 followed by one

byte with pattern 10101011 used to synchronize receiver sender clock

rates

Destaddr

64 48 32

CRCPreamble Srcaddr Type Body

1648

5 DataLink Layer 5-7

Ethernet Frame Structure (more) Addresses 6 bytes

if adapter receives frame with matching destination address or with broadcast address (eg ARP packet) it passes data in frame to net-layer protocol

otherwise adapter discards frame

Type indicates the higher layer protocol (mostly IP but others may be supported such as Novell IPX and AppleTalk)

CRC checked at receiver if error is detected the frame is simply dropped

Destaddr

64 48 32

CRCPreamble Srcaddr Type Body

1648

5 DataLink Layer 5-8

Unreliable connectionless service Connectionless No handshaking between

sending and receiving adapter Unreliable receiving adapter doesnrsquot send

acks or nacks to sending adapter stream of datagrams passed to network layer can

have gaps gaps will be filled if app is using TCP otherwise app will see the gaps

5 DataLink Layer 5-9

Ethernet uses CSMACD

No slots adapter doesnrsquot

transmit if it senses that some other adapter is transmitting that is carrier sense

transmitting adapter aborts when it senses that another adapter is transmitting that is collision detection

Before attempting a retransmission adapter waits a random time that is random access

5 DataLink Layer 5-10

Ethernet CSMACD algorithm

1 Adaptor receives datagram from net layer amp creates frame

2 If adapter senses channel idle it starts to transmit frame If it senses channel busy waits until channel idle and then transmits

3 If adapter transmits entire frame without detecting another transmission the adapter is done with frame

4 If adapter detects another transmission while transmitting aborts and sends jam signal

5 After aborting adapter enters exponential backoff after the mth collision adapter chooses a K at random from 012hellip2m-1 Adapter waits K512 bit times and returns to Step 2

5 DataLink Layer 5-11

Ethernetrsquos CSMACD (more)

Jam Signal make sure all other transmitters are aware of collision 48 bits

Bit time 1 microsec for 10 Mbps Ethernet for K=1023 wait time is about 50 msec

Exponential Backoff Goal adapt retransmission

attempts to estimated current load heavy load random wait

will be longer first collision choose K

from 01 delay is K 512 bit transmission times

after second collision choose K from 0123hellip

after ten collisions choose K from 01234hellip1023

Seeinteract with Javaapplet on AWL Web sitehighly recommended

5 DataLink Layer 5-12

Collision Detection

On baseband bus collision produces much higher signal voltage than signal

Collision detected if cable signal greater than single station signal

Signal attenuated over distance Limit distance to 500m (10Base5) or 200m

(10Base2) For twisted pair (star-topology) activity on

more than one port is collision Special collision presence signal

5 DataLink Layer 5-13

Algorithm (cont)

If collisionhellip jam for 32 bits then stop transmitting frame minimum frame is 64 bytes (header + 46 bytes

of data) delay and try again

bull 1st time 0 or 512usbull 2nd time 0 512 or 1024usbull 3rd time512 1024 or 1536usbull nth time k x 512us for randomly selected

k=02n - 1bull give up after several tries (usually 16)bull exponential backoff

5 DataLink Layer 5-14

Binary Exponential Backoff

Attempt to transmit repeatedly if repeated collisions First 10 attempts mean value of random delay doubled Value then remains same for 6 further attempts After 16 unsuccessful attempts station gives up and

reports error As congestion increases stations back off by larger

amounts to reduce the probability of collision 1-persistent algorithm with binary exponential backoff

efficient over wide range of loads Low loads 1-persistence guarantees station can

seize channel once idle High loads at least as stable as other techniques

Backoff algorithm gives last-in first-out effect Stations with few collisions transmit first

5 DataLink Layer 5-15

Ethernet MAC Sublayer Protocol (2)

Collision detection can take as long as 2

5 DataLink Layer 5-16

CSMACD efficiency Tprop = max prop between 2 nodes in LAN

ttrans = time to transmit max-size frame

Efficiency goes to 1 as tprop goes to 0

Goes to 1 as ttrans goes to infinity Much better than ALOHA but still decentralized simple and cheap

transprop tt 51

1efficiency

5 DataLink Layer 5-17

Ethernet Performance

Efficiency of Ethernet at 10 Mbps with 512-bit slot times

5 DataLink Layer 5-18

8023 Ethernet Standards Link amp Physical Layers

many different Ethernet standards common MAC protocol and frame format different speeds 2 Mbps 10 Mbps 100

Mbps 1Gbps 10G bps different physical layer media fiber cable

applicationtransportnetwork

linkphysical

MAC protocoland frame format

100BASE-TX

100BASE-T4

100BASE-FX100BASE-T2

100BASE-SX 100BASE-BX

fiber physical layercopper (twisterpair) physical layer

5 DataLink Layer 5-19

Manchester encoding

used in 10BaseT each bit has a transition allows clocks in sending and receiving nodes to

synchronize to each other no need for a centralized global clock among nodes

Hey this is physical-layer stuff

5 DataLink Layer 5-20

Ethernet Cabling

The most common kinds of Ethernet cabling

5 DataLink Layer 5-21

Ethernet Cabling (2)

Three kinds of Ethernet cabling (a) 10Base5 (b) 10Base2 (c) 10Base-T

5 DataLink Layer 5-22

Ethernet Cabling (3)

Cable topologies (a) Linear (b) Spine (c) Tree (d) Segmented

5 DataLink Layer 5-23

10BaseT and 100BaseT 10100 Mbps rate latter called ldquofast ethernetrdquo T stands for Twisted Pair Nodes connect to a hub ldquostar topologyrdquo 100

m max distance between nodes and hub

twisted pair

hub

5 DataLink Layer 5-24

100Mbps Fast Ethernet

Use IEEE 8023 MAC protocol and frame format 100BASE-X use physical medium specifications

from FDDI Two physical links between nodes

bull Transmission and reception 100BASE-TX uses STP or Cat 5 UTP

bull May require new cable 100BASE-FX uses optical fiber 100BASE-T4 can use Cat 3 voice-grade UTP

bull Uses four twisted-pair lines between nodesbull Data transmission uses three pairs in one direction at a

time

Star-wire topology Similar to 10BASE-T

5 DataLink Layer 5-25

Fast Ethernet

The original fast Ethernet cabling

5 DataLink Layer 5-26

Gbit Ethernet

uses standard Ethernet frame format allows for point-to-point links and shared

broadcast channels in shared mode CSMACD is used short

distances between nodes required for efficiency

uses hubs called here ldquoBuffered Distributorsrdquo Full-Duplex at 1 Gbps for point-to-point links 10 Gbps now

5 DataLink Layer 5-27

Gigabit Ethernet

Gigabit Ethernet cabling

5 DataLink Layer 5-28

Wireless Link CharacteristicsDifferences from wired link hellip

decreased signal strength radio signal attenuates as it propagates through matter (path loss)

interference from other sources standardized wireless network frequencies (eg 24 GHz) shared by other devices (eg phone) devices (motors) interfere as well

multipath propagation radio signal reflects off objects ground arriving ad destination at slightly different times

hellip make communication across (even a point to point) wireless link much more ldquodifficultrdquo

5 DataLink Layer 5-29

Wireless network characteristicsMultiple wireless senders and receivers create

additional problems (beyond multiple access)

AB

C

Hidden terminal problem B A hear each other B C hear each other A C can not hear each

othermeans A C unaware of their

interference at B

A B C

Arsquos signalstrength

space

Crsquos signalstrength

Signal fading B A hear each other B C hear each other A C can not hear each other

interferring at B

5 DataLink Layer 5-30

IEEE 80211 Wireless LAN

80211b 24-5 GHz unlicensed

radio spectrum up to 11 Mbps direct sequence

spread spectrum (DSSS) in physical layer

bull all hosts use same chipping code

widely deployed using base stations

80211a 5-6 GHz range up to 54 Mbps

80211g 24-5 GHz range up to 54 Mbps

All use CSMACA for multiple access

All have base-station and ad-hoc network versions

5 DataLink Layer 5-31

Figure 3-12

ISM bands

5 DataLink Layer 5-32

80211 LAN architecture

wireless host communicates with base station base station = access

point (AP) Basic Service Set (BSS)

(aka ldquocellrdquo) in infrastructure mode contains wireless hosts access point (AP) base

station ad hoc mode hosts

only

BSS 1

BSS 2

Internet

hub switchor routerAP

AP

5 DataLink Layer 5-33

80211 Channels association 80211b 24GHz-2485GHz spectrum divided

into 11 channels at different frequencies AP admin chooses frequency for AP interference possible channel can be same as

that chosen by neighboring AP host must associate with an AP

scans channels listening for beacon frames containing APrsquos name (SSID) and MAC address

selects AP to associate with may perform authentication [Chapter 8] will typically run DHCP to get IP address in

APrsquos subnet

5 DataLink Layer 5-34

IEEE 80211 multiple access avoid collisions 2+ nodes transmitting at same

time 80211 CSMA - sense before transmitting

donrsquot collide with ongoing transmission by other node

80211 no collision detection difficult to receive (sense collisions) when transmitting

due to weak received signals (fading) canrsquot sense all collisions in any case hidden terminal

fading goal avoid collisions CSMAC(ollision)A(voidance)

AB

CA B C

Arsquos signalstrength

space

Crsquos signalstrength

5 DataLink Layer 5-35

IEEE 80211 MAC Protocol CSMACA

80211 sender1 if sense channel idle for DIFS then

transmit entire frame (no CD)2 if sense channel busy then

start random backoff timetimer counts down while channel idletransmit when timer expiresif no ACK increase random backoff

interval repeat 2

80211 receiver- if frame received OK

return ACK after SIFS (ACK needed due to hidden terminal problem)

sender receiver

DIFS

data

SIFS

ACK

5 DataLink Layer 5-36

Avoiding collisions (more)

idea allow sender to ldquoreserverdquo channel rather than random access of data frames avoid collisions of long data frames

sender first transmits small request-to-send (RTS) packets to BS using CSMA RTSs may still collide with each other (but theyrsquore

short) BS broadcasts clear-to-send CTS in response to RTS RTS heard by all nodes

sender transmits data frame other stations defer transmissions

Avoid data frame collisions completely using small reservation packets

5 DataLink Layer 5-37

Collision Avoidance RTS-CTS exchange

APA B

time

RTS(A)RTS(B)

RTS(A)

CTS(A) CTS(A)

DATA (A)

ACK(A) ACK(A)

reservation collision

defer

5 DataLink Layer 5-38

Manchester encoding

Used in 10BaseT Each bit has a transition Allows clocks in sending and receiving nodes to

synchronize to each other no need for a centralized global clock among nodes

Hey this is physical-layer stuff

5 DataLink Layer 5-39

Link Layer

51 Introduction and services

52 Error detection and correction

53Multiple access protocols

54 Link-Layer Addressing

55 Ethernet

56 Interconnections Hubs and switches

57 PPP 58 Link Virtualization

ATM

5 DataLink Layer 5-40

HubsHubs are essentially physical-layer repeaters

bits coming from one link go out all other links at the same rate no frame buffering no CSMACD at hub adapters detect collisions provides net management functionality

twisted pair

hub

5 DataLink Layer 5-41

Interconnecting with hubs Backbone hub interconnects LAN segments Extends max distance between nodes But individual segment collision domains become one large

collision domain Canrsquot interconnect 10BaseT amp 100BaseT

hub

hubhub

hub

5 DataLink Layer 5-42

Inter - Networking

Hubs Bridges Switches Routers

5 DataLink Layer 5-43

Learning Bridges Do not forward when unnecessary Maintain forwarding table

HostPort

A 1 B 1 C 1 X 2 Y 2 Z 2

Learn table entries based on source address Table is an optimization need not be complete Always forward broadcast frames

A

Bridge

B C

X Y Z

Port 1

Port 2

5 DataLink Layer 5-44

Spanning Tree Algorithm Problem loops

Bridges run a distributed spanning tree algorithm select which bridges actively forward developed by Radia Perlman now IEEE 8021 specification

A

C

E

D

B

K

F

H

J

G

I

B3

B7

B4

B2

B5

B1

B6

(a) (b)

5 DataLink Layer 5-45

Algorithm Overview Each bridge has unique id (eg B1 B2

B3) Select bridge with smallest id as root Select bridge on each LAN closest to root

as designated bridge (use id to break ties) Each bridge forwards frames over each LAN for which it is the designated bridge

A

C

E

D

B

K

F

H

J

G

I

B5

B2

B3

B7

B4

B1

B6

5 DataLink Layer 5-46

Algorithm Details

Bridges exchange configuration messages id for bridge sending the message id for what the sending bridge believes to be

root bridge distance (hops) from sending bridge to root

bridge Each bridge records current best

configuration message for each port Initially each bridge believes it is the root

5 DataLink Layer 5-47

Algorithm Detail (cont) When learn not root stop generating config

messages in steady state only root generates configuration messages

When learn not designated bridge stop forwarding config messages in steady state only designated bridges forward config

messages

Root continues to periodically send config messages If any bridge does not receive config message after

a period of time it starts generating config messages claiming to be the root

5 DataLink Layer 5-48

Broadcast and Multicast Forward all broadcastmulticast frames

current practice Learn when no group members

downstream Accomplished by having each member of

group G send a frame to bridge multicast address with G in source field

5 DataLink Layer 5-49

Limitations of Bridges

Do not scale spanning tree algorithm does not scale broadcast does not scale

Do not accommodate heterogeneity

Caution beware of transparency

5 DataLink Layer 5-50

Switch link-layer device smarter than hubs take active

role store forward Ethernet frames examine incoming framersquos MAC address selectively

forward frame to one-or-more outgoing links when frame is to be forwarded on segment uses CSMACD to access segment

transparent hosts are unaware of presence of switches

plug-and-play self-learning switches do not need to be configured

5 DataLink Layer 5-51

Switch allows multiple simultaneous transmissions

hosts have dedicated direct connection to switch

switches buffer packets Ethernet protocol used on

each incoming link but no collisions full duplex each link is its own collision

domain switching A-to-Arsquo and B-

to-Brsquo simultaneously without collisions not possible with dumb hub

A

Arsquo

B

Brsquo

C

Crsquo

switch with six interfaces(123456)

1 23

45

6

5 DataLink Layer 5-52

Switch Table

Q how does switch know that Arsquo reachable via interface 4 Brsquo reachable via interface 5

A each switch has a switch table each entry (MAC address of host interface

to reach host time stamp)

looks like a routing table Q how are entries created

maintained in switch table something like a routing

protocol

A

Arsquo

B

Brsquo

C

Crsquo

switch with six interfaces(123456)

1 23

45

6

5 DataLink Layer 5-53

Switch self-learning

switch learns which hosts can be reached through which interfaces when frame received

switch ldquolearnsrdquo location of sender incoming LAN segment

records senderlocation pair in switch table

A

Arsquo

B

Brsquo

C

Crsquo

1 23

45

6

A Arsquo

Source ADest Arsquo

MAC addr interface TTL

Switch table (initially empty)

A 1 60

5 DataLink Layer 5-54

Forwarding

bull How do determine onto which LAN segment to forward framebull Looks like a routing problem

hub

hubhub

switch1

2 3

5 DataLink Layer 5-55

Self learning

A switch has a switch table entry in switch table

(MAC Address Interface Time Stamp) stale entries in table dropped (TTL can be 60

min) switch learns which hosts can be reached through

which interfaces when frame received switch ldquolearnsrdquo location

of sender incoming LAN segment records senderlocation pair in switch table

5 DataLink Layer 5-56

Self-learning forwarding example

A

Arsquo

B

Brsquo

C

Crsquo

1 23

45

6

A Arsquo

Source ADest Arsquo

MAC addr interface TTL

Switch table (initially empty)

A 1 60

A ArsquoA ArsquoA ArsquoA ArsquoA Arsquo

frame destination unknownflood

Arsquo A

destination A location known

Arsquo 4 60

selective send

5 DataLink Layer 5-57

FilteringForwardingWhen switch receives a frame

index switch table using MAC dest addressif entry found for destination

then if dest on segment from which frame arrived

then drop the frame else forward the frame on interface indicated else flood

forward on all but the interface on which the frame arrived

5 DataLink Layer 5-58

Switch example

Suppose C sends frame to D

Switch receives frame from from C notes in bridge table that C is on interface 1 because D is not in table switch forwards frame into

interfaces 2 and 3

frame received by D

hub

hub hub

switch

A

B CD

EF

G H

I

address interface

ABEG

1123

12 3

5 DataLink Layer 5-59

Switch example

Suppose D replies back with frame to C

Switch receives frame from from D notes in bridge table that D is on interface 2 because C is in table switch forwards frame only to

interface 1

frame received by C

hub

hub hub

switch

A

B CD

EF

G H

I

address interface

ABEGC

11231

5 DataLink Layer 5-60

Switch traffic isolation switch installation breaks subnet into LAN

segments switch filters packets

same-LAN-segment frames not usually forwarded onto other LAN segments

segments become separate collision domains

hub hub hub

switch

collision domain collision domain

collision domain

5 DataLink Layer 5-61

Switches dedicated access Switch with many

interfaces Hosts have direct

connection to switch No collisions full duplex

Switching A-to-Arsquo and B-to-Brsquo simultaneously no collisions

switch

A

Arsquo

B

Brsquo

C

Crsquo

5 DataLink Layer 5-62

More on Switches

cut-through switching frame forwarded from input to output port without first collecting entire frameslight reduction in latency

combinations of shareddedicated 101001000 Mbps interfaces

5 DataLink Layer 5-63

Institutional network

hub

hubhub

switch

to externalnetwork

router

IP subnet

mail server

web server

5 DataLink Layer 5-64

Switches vs Routers both store-and-forward devices

routers network layer devices (examine network layer headers) switches are link layer devices

routers maintain routing tables implement routing algorithms

switches maintain switch tables implement filtering learning algorithms

5 DataLink Layer 5-65

Summary comparison

hubs routers switches

traffi c isolation

no yes yes

plug amp play yes no yes

optimal routing

no yes no

cut through

yes no yes

5 DataLink Layer 5-66

IEEE 802 Standards

The 802 working groups The important ones are marked with The ones marked with are hibernating The one marked with dagger gave up

  • Slide 1
  • Link Layer
  • Ethernet
  • Slide 4
  • Star topology
  • Ethernet Frame Structure
  • Ethernet Frame Structure (more)
  • Unreliable connectionless service
  • Ethernet uses CSMACD
  • Ethernet CSMACD algorithm
  • Ethernetrsquos CSMACD (more)
  • Collision Detection
  • Algorithm (cont)
  • Binary Exponential Backoff
  • Ethernet MAC Sublayer Protocol (2)
  • CSMACD efficiency
  • Ethernet Performance
  • 8023 Ethernet Standards Link amp Physical Layers
  • Manchester encoding
  • Ethernet Cabling
  • Ethernet Cabling (2)
  • Ethernet Cabling (3)
  • 10BaseT and 100BaseT
  • 100Mbps Fast Ethernet
  • Fast Ethernet
  • Gbit Ethernet
  • Gigabit Ethernet
  • Wireless Link Characteristics
  • Wireless network characteristics
  • IEEE 80211 Wireless LAN
  • Slide 31
  • 80211 LAN architecture
  • 80211 Channels association
  • IEEE 80211 multiple access
  • IEEE 80211 MAC Protocol CSMACA
  • Avoiding collisions (more)
  • Collision Avoidance RTS-CTS exchange
  • Slide 38
  • Slide 39
  • Hubs
  • Interconnecting with hubs
  • Inter - Networking
  • Learning Bridges
  • Spanning Tree Algorithm
  • Algorithm Overview
  • Algorithm Details
  • Algorithm Detail (cont)
  • Broadcast and Multicast
  • Limitations of Bridges
  • Switch
  • Switch allows multiple simultaneous transmissions
  • Switch Table
  • Switch self-learning
  • Forwarding
  • Self learning
  • Self-learning forwarding example
  • FilteringForwarding
  • Switch example
  • Slide 59
  • Switch traffic isolation
  • Switches dedicated access
  • More on Switches
  • Institutional network
  • Switches vs Routers
  • Summary comparison
  • IEEE 802 Standards
Page 6: Chapter 5B

5 DataLink Layer 5-6

Ethernet Frame Structure

Sending adapter encapsulates IP datagram (or other network layer protocol packet) in Ethernet frame

Preamble 7 bytes with pattern 10101010 followed by one

byte with pattern 10101011 used to synchronize receiver sender clock

rates

Destaddr

64 48 32

CRCPreamble Srcaddr Type Body

1648

5 DataLink Layer 5-7

Ethernet Frame Structure (more) Addresses 6 bytes

if adapter receives frame with matching destination address or with broadcast address (eg ARP packet) it passes data in frame to net-layer protocol

otherwise adapter discards frame

Type indicates the higher layer protocol (mostly IP but others may be supported such as Novell IPX and AppleTalk)

CRC checked at receiver if error is detected the frame is simply dropped

Destaddr

64 48 32

CRCPreamble Srcaddr Type Body

1648

5 DataLink Layer 5-8

Unreliable connectionless service Connectionless No handshaking between

sending and receiving adapter Unreliable receiving adapter doesnrsquot send

acks or nacks to sending adapter stream of datagrams passed to network layer can

have gaps gaps will be filled if app is using TCP otherwise app will see the gaps

5 DataLink Layer 5-9

Ethernet uses CSMACD

No slots adapter doesnrsquot

transmit if it senses that some other adapter is transmitting that is carrier sense

transmitting adapter aborts when it senses that another adapter is transmitting that is collision detection

Before attempting a retransmission adapter waits a random time that is random access

5 DataLink Layer 5-10

Ethernet CSMACD algorithm

1 Adaptor receives datagram from net layer amp creates frame

2 If adapter senses channel idle it starts to transmit frame If it senses channel busy waits until channel idle and then transmits

3 If adapter transmits entire frame without detecting another transmission the adapter is done with frame

4 If adapter detects another transmission while transmitting aborts and sends jam signal

5 After aborting adapter enters exponential backoff after the mth collision adapter chooses a K at random from 012hellip2m-1 Adapter waits K512 bit times and returns to Step 2

5 DataLink Layer 5-11

Ethernetrsquos CSMACD (more)

Jam Signal make sure all other transmitters are aware of collision 48 bits

Bit time 1 microsec for 10 Mbps Ethernet for K=1023 wait time is about 50 msec

Exponential Backoff Goal adapt retransmission

attempts to estimated current load heavy load random wait

will be longer first collision choose K

from 01 delay is K 512 bit transmission times

after second collision choose K from 0123hellip

after ten collisions choose K from 01234hellip1023

Seeinteract with Javaapplet on AWL Web sitehighly recommended

5 DataLink Layer 5-12

Collision Detection

On baseband bus collision produces much higher signal voltage than signal

Collision detected if cable signal greater than single station signal

Signal attenuated over distance Limit distance to 500m (10Base5) or 200m

(10Base2) For twisted pair (star-topology) activity on

more than one port is collision Special collision presence signal

5 DataLink Layer 5-13

Algorithm (cont)

If collisionhellip jam for 32 bits then stop transmitting frame minimum frame is 64 bytes (header + 46 bytes

of data) delay and try again

bull 1st time 0 or 512usbull 2nd time 0 512 or 1024usbull 3rd time512 1024 or 1536usbull nth time k x 512us for randomly selected

k=02n - 1bull give up after several tries (usually 16)bull exponential backoff

5 DataLink Layer 5-14

Binary Exponential Backoff

Attempt to transmit repeatedly if repeated collisions First 10 attempts mean value of random delay doubled Value then remains same for 6 further attempts After 16 unsuccessful attempts station gives up and

reports error As congestion increases stations back off by larger

amounts to reduce the probability of collision 1-persistent algorithm with binary exponential backoff

efficient over wide range of loads Low loads 1-persistence guarantees station can

seize channel once idle High loads at least as stable as other techniques

Backoff algorithm gives last-in first-out effect Stations with few collisions transmit first

5 DataLink Layer 5-15

Ethernet MAC Sublayer Protocol (2)

Collision detection can take as long as 2

5 DataLink Layer 5-16

CSMACD efficiency Tprop = max prop between 2 nodes in LAN

ttrans = time to transmit max-size frame

Efficiency goes to 1 as tprop goes to 0

Goes to 1 as ttrans goes to infinity Much better than ALOHA but still decentralized simple and cheap

transprop tt 51

1efficiency

5 DataLink Layer 5-17

Ethernet Performance

Efficiency of Ethernet at 10 Mbps with 512-bit slot times

5 DataLink Layer 5-18

8023 Ethernet Standards Link amp Physical Layers

many different Ethernet standards common MAC protocol and frame format different speeds 2 Mbps 10 Mbps 100

Mbps 1Gbps 10G bps different physical layer media fiber cable

applicationtransportnetwork

linkphysical

MAC protocoland frame format

100BASE-TX

100BASE-T4

100BASE-FX100BASE-T2

100BASE-SX 100BASE-BX

fiber physical layercopper (twisterpair) physical layer

5 DataLink Layer 5-19

Manchester encoding

used in 10BaseT each bit has a transition allows clocks in sending and receiving nodes to

synchronize to each other no need for a centralized global clock among nodes

Hey this is physical-layer stuff

5 DataLink Layer 5-20

Ethernet Cabling

The most common kinds of Ethernet cabling

5 DataLink Layer 5-21

Ethernet Cabling (2)

Three kinds of Ethernet cabling (a) 10Base5 (b) 10Base2 (c) 10Base-T

5 DataLink Layer 5-22

Ethernet Cabling (3)

Cable topologies (a) Linear (b) Spine (c) Tree (d) Segmented

5 DataLink Layer 5-23

10BaseT and 100BaseT 10100 Mbps rate latter called ldquofast ethernetrdquo T stands for Twisted Pair Nodes connect to a hub ldquostar topologyrdquo 100

m max distance between nodes and hub

twisted pair

hub

5 DataLink Layer 5-24

100Mbps Fast Ethernet

Use IEEE 8023 MAC protocol and frame format 100BASE-X use physical medium specifications

from FDDI Two physical links between nodes

bull Transmission and reception 100BASE-TX uses STP or Cat 5 UTP

bull May require new cable 100BASE-FX uses optical fiber 100BASE-T4 can use Cat 3 voice-grade UTP

bull Uses four twisted-pair lines between nodesbull Data transmission uses three pairs in one direction at a

time

Star-wire topology Similar to 10BASE-T

5 DataLink Layer 5-25

Fast Ethernet

The original fast Ethernet cabling

5 DataLink Layer 5-26

Gbit Ethernet

uses standard Ethernet frame format allows for point-to-point links and shared

broadcast channels in shared mode CSMACD is used short

distances between nodes required for efficiency

uses hubs called here ldquoBuffered Distributorsrdquo Full-Duplex at 1 Gbps for point-to-point links 10 Gbps now

5 DataLink Layer 5-27

Gigabit Ethernet

Gigabit Ethernet cabling

5 DataLink Layer 5-28

Wireless Link CharacteristicsDifferences from wired link hellip

decreased signal strength radio signal attenuates as it propagates through matter (path loss)

interference from other sources standardized wireless network frequencies (eg 24 GHz) shared by other devices (eg phone) devices (motors) interfere as well

multipath propagation radio signal reflects off objects ground arriving ad destination at slightly different times

hellip make communication across (even a point to point) wireless link much more ldquodifficultrdquo

5 DataLink Layer 5-29

Wireless network characteristicsMultiple wireless senders and receivers create

additional problems (beyond multiple access)

AB

C

Hidden terminal problem B A hear each other B C hear each other A C can not hear each

othermeans A C unaware of their

interference at B

A B C

Arsquos signalstrength

space

Crsquos signalstrength

Signal fading B A hear each other B C hear each other A C can not hear each other

interferring at B

5 DataLink Layer 5-30

IEEE 80211 Wireless LAN

80211b 24-5 GHz unlicensed

radio spectrum up to 11 Mbps direct sequence

spread spectrum (DSSS) in physical layer

bull all hosts use same chipping code

widely deployed using base stations

80211a 5-6 GHz range up to 54 Mbps

80211g 24-5 GHz range up to 54 Mbps

All use CSMACA for multiple access

All have base-station and ad-hoc network versions

5 DataLink Layer 5-31

Figure 3-12

ISM bands

5 DataLink Layer 5-32

80211 LAN architecture

wireless host communicates with base station base station = access

point (AP) Basic Service Set (BSS)

(aka ldquocellrdquo) in infrastructure mode contains wireless hosts access point (AP) base

station ad hoc mode hosts

only

BSS 1

BSS 2

Internet

hub switchor routerAP

AP

5 DataLink Layer 5-33

80211 Channels association 80211b 24GHz-2485GHz spectrum divided

into 11 channels at different frequencies AP admin chooses frequency for AP interference possible channel can be same as

that chosen by neighboring AP host must associate with an AP

scans channels listening for beacon frames containing APrsquos name (SSID) and MAC address

selects AP to associate with may perform authentication [Chapter 8] will typically run DHCP to get IP address in

APrsquos subnet

5 DataLink Layer 5-34

IEEE 80211 multiple access avoid collisions 2+ nodes transmitting at same

time 80211 CSMA - sense before transmitting

donrsquot collide with ongoing transmission by other node

80211 no collision detection difficult to receive (sense collisions) when transmitting

due to weak received signals (fading) canrsquot sense all collisions in any case hidden terminal

fading goal avoid collisions CSMAC(ollision)A(voidance)

AB

CA B C

Arsquos signalstrength

space

Crsquos signalstrength

5 DataLink Layer 5-35

IEEE 80211 MAC Protocol CSMACA

80211 sender1 if sense channel idle for DIFS then

transmit entire frame (no CD)2 if sense channel busy then

start random backoff timetimer counts down while channel idletransmit when timer expiresif no ACK increase random backoff

interval repeat 2

80211 receiver- if frame received OK

return ACK after SIFS (ACK needed due to hidden terminal problem)

sender receiver

DIFS

data

SIFS

ACK

5 DataLink Layer 5-36

Avoiding collisions (more)

idea allow sender to ldquoreserverdquo channel rather than random access of data frames avoid collisions of long data frames

sender first transmits small request-to-send (RTS) packets to BS using CSMA RTSs may still collide with each other (but theyrsquore

short) BS broadcasts clear-to-send CTS in response to RTS RTS heard by all nodes

sender transmits data frame other stations defer transmissions

Avoid data frame collisions completely using small reservation packets

5 DataLink Layer 5-37

Collision Avoidance RTS-CTS exchange

APA B

time

RTS(A)RTS(B)

RTS(A)

CTS(A) CTS(A)

DATA (A)

ACK(A) ACK(A)

reservation collision

defer

5 DataLink Layer 5-38

Manchester encoding

Used in 10BaseT Each bit has a transition Allows clocks in sending and receiving nodes to

synchronize to each other no need for a centralized global clock among nodes

Hey this is physical-layer stuff

5 DataLink Layer 5-39

Link Layer

51 Introduction and services

52 Error detection and correction

53Multiple access protocols

54 Link-Layer Addressing

55 Ethernet

56 Interconnections Hubs and switches

57 PPP 58 Link Virtualization

ATM

5 DataLink Layer 5-40

HubsHubs are essentially physical-layer repeaters

bits coming from one link go out all other links at the same rate no frame buffering no CSMACD at hub adapters detect collisions provides net management functionality

twisted pair

hub

5 DataLink Layer 5-41

Interconnecting with hubs Backbone hub interconnects LAN segments Extends max distance between nodes But individual segment collision domains become one large

collision domain Canrsquot interconnect 10BaseT amp 100BaseT

hub

hubhub

hub

5 DataLink Layer 5-42

Inter - Networking

Hubs Bridges Switches Routers

5 DataLink Layer 5-43

Learning Bridges Do not forward when unnecessary Maintain forwarding table

HostPort

A 1 B 1 C 1 X 2 Y 2 Z 2

Learn table entries based on source address Table is an optimization need not be complete Always forward broadcast frames

A

Bridge

B C

X Y Z

Port 1

Port 2

5 DataLink Layer 5-44

Spanning Tree Algorithm Problem loops

Bridges run a distributed spanning tree algorithm select which bridges actively forward developed by Radia Perlman now IEEE 8021 specification

A

C

E

D

B

K

F

H

J

G

I

B3

B7

B4

B2

B5

B1

B6

(a) (b)

5 DataLink Layer 5-45

Algorithm Overview Each bridge has unique id (eg B1 B2

B3) Select bridge with smallest id as root Select bridge on each LAN closest to root

as designated bridge (use id to break ties) Each bridge forwards frames over each LAN for which it is the designated bridge

A

C

E

D

B

K

F

H

J

G

I

B5

B2

B3

B7

B4

B1

B6

5 DataLink Layer 5-46

Algorithm Details

Bridges exchange configuration messages id for bridge sending the message id for what the sending bridge believes to be

root bridge distance (hops) from sending bridge to root

bridge Each bridge records current best

configuration message for each port Initially each bridge believes it is the root

5 DataLink Layer 5-47

Algorithm Detail (cont) When learn not root stop generating config

messages in steady state only root generates configuration messages

When learn not designated bridge stop forwarding config messages in steady state only designated bridges forward config

messages

Root continues to periodically send config messages If any bridge does not receive config message after

a period of time it starts generating config messages claiming to be the root

5 DataLink Layer 5-48

Broadcast and Multicast Forward all broadcastmulticast frames

current practice Learn when no group members

downstream Accomplished by having each member of

group G send a frame to bridge multicast address with G in source field

5 DataLink Layer 5-49

Limitations of Bridges

Do not scale spanning tree algorithm does not scale broadcast does not scale

Do not accommodate heterogeneity

Caution beware of transparency

5 DataLink Layer 5-50

Switch link-layer device smarter than hubs take active

role store forward Ethernet frames examine incoming framersquos MAC address selectively

forward frame to one-or-more outgoing links when frame is to be forwarded on segment uses CSMACD to access segment

transparent hosts are unaware of presence of switches

plug-and-play self-learning switches do not need to be configured

5 DataLink Layer 5-51

Switch allows multiple simultaneous transmissions

hosts have dedicated direct connection to switch

switches buffer packets Ethernet protocol used on

each incoming link but no collisions full duplex each link is its own collision

domain switching A-to-Arsquo and B-

to-Brsquo simultaneously without collisions not possible with dumb hub

A

Arsquo

B

Brsquo

C

Crsquo

switch with six interfaces(123456)

1 23

45

6

5 DataLink Layer 5-52

Switch Table

Q how does switch know that Arsquo reachable via interface 4 Brsquo reachable via interface 5

A each switch has a switch table each entry (MAC address of host interface

to reach host time stamp)

looks like a routing table Q how are entries created

maintained in switch table something like a routing

protocol

A

Arsquo

B

Brsquo

C

Crsquo

switch with six interfaces(123456)

1 23

45

6

5 DataLink Layer 5-53

Switch self-learning

switch learns which hosts can be reached through which interfaces when frame received

switch ldquolearnsrdquo location of sender incoming LAN segment

records senderlocation pair in switch table

A

Arsquo

B

Brsquo

C

Crsquo

1 23

45

6

A Arsquo

Source ADest Arsquo

MAC addr interface TTL

Switch table (initially empty)

A 1 60

5 DataLink Layer 5-54

Forwarding

bull How do determine onto which LAN segment to forward framebull Looks like a routing problem

hub

hubhub

switch1

2 3

5 DataLink Layer 5-55

Self learning

A switch has a switch table entry in switch table

(MAC Address Interface Time Stamp) stale entries in table dropped (TTL can be 60

min) switch learns which hosts can be reached through

which interfaces when frame received switch ldquolearnsrdquo location

of sender incoming LAN segment records senderlocation pair in switch table

5 DataLink Layer 5-56

Self-learning forwarding example

A

Arsquo

B

Brsquo

C

Crsquo

1 23

45

6

A Arsquo

Source ADest Arsquo

MAC addr interface TTL

Switch table (initially empty)

A 1 60

A ArsquoA ArsquoA ArsquoA ArsquoA Arsquo

frame destination unknownflood

Arsquo A

destination A location known

Arsquo 4 60

selective send

5 DataLink Layer 5-57

FilteringForwardingWhen switch receives a frame

index switch table using MAC dest addressif entry found for destination

then if dest on segment from which frame arrived

then drop the frame else forward the frame on interface indicated else flood

forward on all but the interface on which the frame arrived

5 DataLink Layer 5-58

Switch example

Suppose C sends frame to D

Switch receives frame from from C notes in bridge table that C is on interface 1 because D is not in table switch forwards frame into

interfaces 2 and 3

frame received by D

hub

hub hub

switch

A

B CD

EF

G H

I

address interface

ABEG

1123

12 3

5 DataLink Layer 5-59

Switch example

Suppose D replies back with frame to C

Switch receives frame from from D notes in bridge table that D is on interface 2 because C is in table switch forwards frame only to

interface 1

frame received by C

hub

hub hub

switch

A

B CD

EF

G H

I

address interface

ABEGC

11231

5 DataLink Layer 5-60

Switch traffic isolation switch installation breaks subnet into LAN

segments switch filters packets

same-LAN-segment frames not usually forwarded onto other LAN segments

segments become separate collision domains

hub hub hub

switch

collision domain collision domain

collision domain

5 DataLink Layer 5-61

Switches dedicated access Switch with many

interfaces Hosts have direct

connection to switch No collisions full duplex

Switching A-to-Arsquo and B-to-Brsquo simultaneously no collisions

switch

A

Arsquo

B

Brsquo

C

Crsquo

5 DataLink Layer 5-62

More on Switches

cut-through switching frame forwarded from input to output port without first collecting entire frameslight reduction in latency

combinations of shareddedicated 101001000 Mbps interfaces

5 DataLink Layer 5-63

Institutional network

hub

hubhub

switch

to externalnetwork

router

IP subnet

mail server

web server

5 DataLink Layer 5-64

Switches vs Routers both store-and-forward devices

routers network layer devices (examine network layer headers) switches are link layer devices

routers maintain routing tables implement routing algorithms

switches maintain switch tables implement filtering learning algorithms

5 DataLink Layer 5-65

Summary comparison

hubs routers switches

traffi c isolation

no yes yes

plug amp play yes no yes

optimal routing

no yes no

cut through

yes no yes

5 DataLink Layer 5-66

IEEE 802 Standards

The 802 working groups The important ones are marked with The ones marked with are hibernating The one marked with dagger gave up

  • Slide 1
  • Link Layer
  • Ethernet
  • Slide 4
  • Star topology
  • Ethernet Frame Structure
  • Ethernet Frame Structure (more)
  • Unreliable connectionless service
  • Ethernet uses CSMACD
  • Ethernet CSMACD algorithm
  • Ethernetrsquos CSMACD (more)
  • Collision Detection
  • Algorithm (cont)
  • Binary Exponential Backoff
  • Ethernet MAC Sublayer Protocol (2)
  • CSMACD efficiency
  • Ethernet Performance
  • 8023 Ethernet Standards Link amp Physical Layers
  • Manchester encoding
  • Ethernet Cabling
  • Ethernet Cabling (2)
  • Ethernet Cabling (3)
  • 10BaseT and 100BaseT
  • 100Mbps Fast Ethernet
  • Fast Ethernet
  • Gbit Ethernet
  • Gigabit Ethernet
  • Wireless Link Characteristics
  • Wireless network characteristics
  • IEEE 80211 Wireless LAN
  • Slide 31
  • 80211 LAN architecture
  • 80211 Channels association
  • IEEE 80211 multiple access
  • IEEE 80211 MAC Protocol CSMACA
  • Avoiding collisions (more)
  • Collision Avoidance RTS-CTS exchange
  • Slide 38
  • Slide 39
  • Hubs
  • Interconnecting with hubs
  • Inter - Networking
  • Learning Bridges
  • Spanning Tree Algorithm
  • Algorithm Overview
  • Algorithm Details
  • Algorithm Detail (cont)
  • Broadcast and Multicast
  • Limitations of Bridges
  • Switch
  • Switch allows multiple simultaneous transmissions
  • Switch Table
  • Switch self-learning
  • Forwarding
  • Self learning
  • Self-learning forwarding example
  • FilteringForwarding
  • Switch example
  • Slide 59
  • Switch traffic isolation
  • Switches dedicated access
  • More on Switches
  • Institutional network
  • Switches vs Routers
  • Summary comparison
  • IEEE 802 Standards
Page 7: Chapter 5B

5 DataLink Layer 5-7

Ethernet Frame Structure (more) Addresses 6 bytes

if adapter receives frame with matching destination address or with broadcast address (eg ARP packet) it passes data in frame to net-layer protocol

otherwise adapter discards frame

Type indicates the higher layer protocol (mostly IP but others may be supported such as Novell IPX and AppleTalk)

CRC checked at receiver if error is detected the frame is simply dropped

Destaddr

64 48 32

CRCPreamble Srcaddr Type Body

1648

5 DataLink Layer 5-8

Unreliable connectionless service Connectionless No handshaking between

sending and receiving adapter Unreliable receiving adapter doesnrsquot send

acks or nacks to sending adapter stream of datagrams passed to network layer can

have gaps gaps will be filled if app is using TCP otherwise app will see the gaps

5 DataLink Layer 5-9

Ethernet uses CSMACD

No slots adapter doesnrsquot

transmit if it senses that some other adapter is transmitting that is carrier sense

transmitting adapter aborts when it senses that another adapter is transmitting that is collision detection

Before attempting a retransmission adapter waits a random time that is random access

5 DataLink Layer 5-10

Ethernet CSMACD algorithm

1 Adaptor receives datagram from net layer amp creates frame

2 If adapter senses channel idle it starts to transmit frame If it senses channel busy waits until channel idle and then transmits

3 If adapter transmits entire frame without detecting another transmission the adapter is done with frame

4 If adapter detects another transmission while transmitting aborts and sends jam signal

5 After aborting adapter enters exponential backoff after the mth collision adapter chooses a K at random from 012hellip2m-1 Adapter waits K512 bit times and returns to Step 2

5 DataLink Layer 5-11

Ethernetrsquos CSMACD (more)

Jam Signal make sure all other transmitters are aware of collision 48 bits

Bit time 1 microsec for 10 Mbps Ethernet for K=1023 wait time is about 50 msec

Exponential Backoff Goal adapt retransmission

attempts to estimated current load heavy load random wait

will be longer first collision choose K

from 01 delay is K 512 bit transmission times

after second collision choose K from 0123hellip

after ten collisions choose K from 01234hellip1023

Seeinteract with Javaapplet on AWL Web sitehighly recommended

5 DataLink Layer 5-12

Collision Detection

On baseband bus collision produces much higher signal voltage than signal

Collision detected if cable signal greater than single station signal

Signal attenuated over distance Limit distance to 500m (10Base5) or 200m

(10Base2) For twisted pair (star-topology) activity on

more than one port is collision Special collision presence signal

5 DataLink Layer 5-13

Algorithm (cont)

If collisionhellip jam for 32 bits then stop transmitting frame minimum frame is 64 bytes (header + 46 bytes

of data) delay and try again

bull 1st time 0 or 512usbull 2nd time 0 512 or 1024usbull 3rd time512 1024 or 1536usbull nth time k x 512us for randomly selected

k=02n - 1bull give up after several tries (usually 16)bull exponential backoff

5 DataLink Layer 5-14

Binary Exponential Backoff

Attempt to transmit repeatedly if repeated collisions First 10 attempts mean value of random delay doubled Value then remains same for 6 further attempts After 16 unsuccessful attempts station gives up and

reports error As congestion increases stations back off by larger

amounts to reduce the probability of collision 1-persistent algorithm with binary exponential backoff

efficient over wide range of loads Low loads 1-persistence guarantees station can

seize channel once idle High loads at least as stable as other techniques

Backoff algorithm gives last-in first-out effect Stations with few collisions transmit first

5 DataLink Layer 5-15

Ethernet MAC Sublayer Protocol (2)

Collision detection can take as long as 2

5 DataLink Layer 5-16

CSMACD efficiency Tprop = max prop between 2 nodes in LAN

ttrans = time to transmit max-size frame

Efficiency goes to 1 as tprop goes to 0

Goes to 1 as ttrans goes to infinity Much better than ALOHA but still decentralized simple and cheap

transprop tt 51

1efficiency

5 DataLink Layer 5-17

Ethernet Performance

Efficiency of Ethernet at 10 Mbps with 512-bit slot times

5 DataLink Layer 5-18

8023 Ethernet Standards Link amp Physical Layers

many different Ethernet standards common MAC protocol and frame format different speeds 2 Mbps 10 Mbps 100

Mbps 1Gbps 10G bps different physical layer media fiber cable

applicationtransportnetwork

linkphysical

MAC protocoland frame format

100BASE-TX

100BASE-T4

100BASE-FX100BASE-T2

100BASE-SX 100BASE-BX

fiber physical layercopper (twisterpair) physical layer

5 DataLink Layer 5-19

Manchester encoding

used in 10BaseT each bit has a transition allows clocks in sending and receiving nodes to

synchronize to each other no need for a centralized global clock among nodes

Hey this is physical-layer stuff

5 DataLink Layer 5-20

Ethernet Cabling

The most common kinds of Ethernet cabling

5 DataLink Layer 5-21

Ethernet Cabling (2)

Three kinds of Ethernet cabling (a) 10Base5 (b) 10Base2 (c) 10Base-T

5 DataLink Layer 5-22

Ethernet Cabling (3)

Cable topologies (a) Linear (b) Spine (c) Tree (d) Segmented

5 DataLink Layer 5-23

10BaseT and 100BaseT 10100 Mbps rate latter called ldquofast ethernetrdquo T stands for Twisted Pair Nodes connect to a hub ldquostar topologyrdquo 100

m max distance between nodes and hub

twisted pair

hub

5 DataLink Layer 5-24

100Mbps Fast Ethernet

Use IEEE 8023 MAC protocol and frame format 100BASE-X use physical medium specifications

from FDDI Two physical links between nodes

bull Transmission and reception 100BASE-TX uses STP or Cat 5 UTP

bull May require new cable 100BASE-FX uses optical fiber 100BASE-T4 can use Cat 3 voice-grade UTP

bull Uses four twisted-pair lines between nodesbull Data transmission uses three pairs in one direction at a

time

Star-wire topology Similar to 10BASE-T

5 DataLink Layer 5-25

Fast Ethernet

The original fast Ethernet cabling

5 DataLink Layer 5-26

Gbit Ethernet

uses standard Ethernet frame format allows for point-to-point links and shared

broadcast channels in shared mode CSMACD is used short

distances between nodes required for efficiency

uses hubs called here ldquoBuffered Distributorsrdquo Full-Duplex at 1 Gbps for point-to-point links 10 Gbps now

5 DataLink Layer 5-27

Gigabit Ethernet

Gigabit Ethernet cabling

5 DataLink Layer 5-28

Wireless Link CharacteristicsDifferences from wired link hellip

decreased signal strength radio signal attenuates as it propagates through matter (path loss)

interference from other sources standardized wireless network frequencies (eg 24 GHz) shared by other devices (eg phone) devices (motors) interfere as well

multipath propagation radio signal reflects off objects ground arriving ad destination at slightly different times

hellip make communication across (even a point to point) wireless link much more ldquodifficultrdquo

5 DataLink Layer 5-29

Wireless network characteristicsMultiple wireless senders and receivers create

additional problems (beyond multiple access)

AB

C

Hidden terminal problem B A hear each other B C hear each other A C can not hear each

othermeans A C unaware of their

interference at B

A B C

Arsquos signalstrength

space

Crsquos signalstrength

Signal fading B A hear each other B C hear each other A C can not hear each other

interferring at B

5 DataLink Layer 5-30

IEEE 80211 Wireless LAN

80211b 24-5 GHz unlicensed

radio spectrum up to 11 Mbps direct sequence

spread spectrum (DSSS) in physical layer

bull all hosts use same chipping code

widely deployed using base stations

80211a 5-6 GHz range up to 54 Mbps

80211g 24-5 GHz range up to 54 Mbps

All use CSMACA for multiple access

All have base-station and ad-hoc network versions

5 DataLink Layer 5-31

Figure 3-12

ISM bands

5 DataLink Layer 5-32

80211 LAN architecture

wireless host communicates with base station base station = access

point (AP) Basic Service Set (BSS)

(aka ldquocellrdquo) in infrastructure mode contains wireless hosts access point (AP) base

station ad hoc mode hosts

only

BSS 1

BSS 2

Internet

hub switchor routerAP

AP

5 DataLink Layer 5-33

80211 Channels association 80211b 24GHz-2485GHz spectrum divided

into 11 channels at different frequencies AP admin chooses frequency for AP interference possible channel can be same as

that chosen by neighboring AP host must associate with an AP

scans channels listening for beacon frames containing APrsquos name (SSID) and MAC address

selects AP to associate with may perform authentication [Chapter 8] will typically run DHCP to get IP address in

APrsquos subnet

5 DataLink Layer 5-34

IEEE 80211 multiple access avoid collisions 2+ nodes transmitting at same

time 80211 CSMA - sense before transmitting

donrsquot collide with ongoing transmission by other node

80211 no collision detection difficult to receive (sense collisions) when transmitting

due to weak received signals (fading) canrsquot sense all collisions in any case hidden terminal

fading goal avoid collisions CSMAC(ollision)A(voidance)

AB

CA B C

Arsquos signalstrength

space

Crsquos signalstrength

5 DataLink Layer 5-35

IEEE 80211 MAC Protocol CSMACA

80211 sender1 if sense channel idle for DIFS then

transmit entire frame (no CD)2 if sense channel busy then

start random backoff timetimer counts down while channel idletransmit when timer expiresif no ACK increase random backoff

interval repeat 2

80211 receiver- if frame received OK

return ACK after SIFS (ACK needed due to hidden terminal problem)

sender receiver

DIFS

data

SIFS

ACK

5 DataLink Layer 5-36

Avoiding collisions (more)

idea allow sender to ldquoreserverdquo channel rather than random access of data frames avoid collisions of long data frames

sender first transmits small request-to-send (RTS) packets to BS using CSMA RTSs may still collide with each other (but theyrsquore

short) BS broadcasts clear-to-send CTS in response to RTS RTS heard by all nodes

sender transmits data frame other stations defer transmissions

Avoid data frame collisions completely using small reservation packets

5 DataLink Layer 5-37

Collision Avoidance RTS-CTS exchange

APA B

time

RTS(A)RTS(B)

RTS(A)

CTS(A) CTS(A)

DATA (A)

ACK(A) ACK(A)

reservation collision

defer

5 DataLink Layer 5-38

Manchester encoding

Used in 10BaseT Each bit has a transition Allows clocks in sending and receiving nodes to

synchronize to each other no need for a centralized global clock among nodes

Hey this is physical-layer stuff

5 DataLink Layer 5-39

Link Layer

51 Introduction and services

52 Error detection and correction

53Multiple access protocols

54 Link-Layer Addressing

55 Ethernet

56 Interconnections Hubs and switches

57 PPP 58 Link Virtualization

ATM

5 DataLink Layer 5-40

HubsHubs are essentially physical-layer repeaters

bits coming from one link go out all other links at the same rate no frame buffering no CSMACD at hub adapters detect collisions provides net management functionality

twisted pair

hub

5 DataLink Layer 5-41

Interconnecting with hubs Backbone hub interconnects LAN segments Extends max distance between nodes But individual segment collision domains become one large

collision domain Canrsquot interconnect 10BaseT amp 100BaseT

hub

hubhub

hub

5 DataLink Layer 5-42

Inter - Networking

Hubs Bridges Switches Routers

5 DataLink Layer 5-43

Learning Bridges Do not forward when unnecessary Maintain forwarding table

HostPort

A 1 B 1 C 1 X 2 Y 2 Z 2

Learn table entries based on source address Table is an optimization need not be complete Always forward broadcast frames

A

Bridge

B C

X Y Z

Port 1

Port 2

5 DataLink Layer 5-44

Spanning Tree Algorithm Problem loops

Bridges run a distributed spanning tree algorithm select which bridges actively forward developed by Radia Perlman now IEEE 8021 specification

A

C

E

D

B

K

F

H

J

G

I

B3

B7

B4

B2

B5

B1

B6

(a) (b)

5 DataLink Layer 5-45

Algorithm Overview Each bridge has unique id (eg B1 B2

B3) Select bridge with smallest id as root Select bridge on each LAN closest to root

as designated bridge (use id to break ties) Each bridge forwards frames over each LAN for which it is the designated bridge

A

C

E

D

B

K

F

H

J

G

I

B5

B2

B3

B7

B4

B1

B6

5 DataLink Layer 5-46

Algorithm Details

Bridges exchange configuration messages id for bridge sending the message id for what the sending bridge believes to be

root bridge distance (hops) from sending bridge to root

bridge Each bridge records current best

configuration message for each port Initially each bridge believes it is the root

5 DataLink Layer 5-47

Algorithm Detail (cont) When learn not root stop generating config

messages in steady state only root generates configuration messages

When learn not designated bridge stop forwarding config messages in steady state only designated bridges forward config

messages

Root continues to periodically send config messages If any bridge does not receive config message after

a period of time it starts generating config messages claiming to be the root

5 DataLink Layer 5-48

Broadcast and Multicast Forward all broadcastmulticast frames

current practice Learn when no group members

downstream Accomplished by having each member of

group G send a frame to bridge multicast address with G in source field

5 DataLink Layer 5-49

Limitations of Bridges

Do not scale spanning tree algorithm does not scale broadcast does not scale

Do not accommodate heterogeneity

Caution beware of transparency

5 DataLink Layer 5-50

Switch link-layer device smarter than hubs take active

role store forward Ethernet frames examine incoming framersquos MAC address selectively

forward frame to one-or-more outgoing links when frame is to be forwarded on segment uses CSMACD to access segment

transparent hosts are unaware of presence of switches

plug-and-play self-learning switches do not need to be configured

5 DataLink Layer 5-51

Switch allows multiple simultaneous transmissions

hosts have dedicated direct connection to switch

switches buffer packets Ethernet protocol used on

each incoming link but no collisions full duplex each link is its own collision

domain switching A-to-Arsquo and B-

to-Brsquo simultaneously without collisions not possible with dumb hub

A

Arsquo

B

Brsquo

C

Crsquo

switch with six interfaces(123456)

1 23

45

6

5 DataLink Layer 5-52

Switch Table

Q how does switch know that Arsquo reachable via interface 4 Brsquo reachable via interface 5

A each switch has a switch table each entry (MAC address of host interface

to reach host time stamp)

looks like a routing table Q how are entries created

maintained in switch table something like a routing

protocol

A

Arsquo

B

Brsquo

C

Crsquo

switch with six interfaces(123456)

1 23

45

6

5 DataLink Layer 5-53

Switch self-learning

switch learns which hosts can be reached through which interfaces when frame received

switch ldquolearnsrdquo location of sender incoming LAN segment

records senderlocation pair in switch table

A

Arsquo

B

Brsquo

C

Crsquo

1 23

45

6

A Arsquo

Source ADest Arsquo

MAC addr interface TTL

Switch table (initially empty)

A 1 60

5 DataLink Layer 5-54

Forwarding

bull How do determine onto which LAN segment to forward framebull Looks like a routing problem

hub

hubhub

switch1

2 3

5 DataLink Layer 5-55

Self learning

A switch has a switch table entry in switch table

(MAC Address Interface Time Stamp) stale entries in table dropped (TTL can be 60

min) switch learns which hosts can be reached through

which interfaces when frame received switch ldquolearnsrdquo location

of sender incoming LAN segment records senderlocation pair in switch table

5 DataLink Layer 5-56

Self-learning forwarding example

A

Arsquo

B

Brsquo

C

Crsquo

1 23

45

6

A Arsquo

Source ADest Arsquo

MAC addr interface TTL

Switch table (initially empty)

A 1 60

A ArsquoA ArsquoA ArsquoA ArsquoA Arsquo

frame destination unknownflood

Arsquo A

destination A location known

Arsquo 4 60

selective send

5 DataLink Layer 5-57

FilteringForwardingWhen switch receives a frame

index switch table using MAC dest addressif entry found for destination

then if dest on segment from which frame arrived

then drop the frame else forward the frame on interface indicated else flood

forward on all but the interface on which the frame arrived

5 DataLink Layer 5-58

Switch example

Suppose C sends frame to D

Switch receives frame from from C notes in bridge table that C is on interface 1 because D is not in table switch forwards frame into

interfaces 2 and 3

frame received by D

hub

hub hub

switch

A

B CD

EF

G H

I

address interface

ABEG

1123

12 3

5 DataLink Layer 5-59

Switch example

Suppose D replies back with frame to C

Switch receives frame from from D notes in bridge table that D is on interface 2 because C is in table switch forwards frame only to

interface 1

frame received by C

hub

hub hub

switch

A

B CD

EF

G H

I

address interface

ABEGC

11231

5 DataLink Layer 5-60

Switch traffic isolation switch installation breaks subnet into LAN

segments switch filters packets

same-LAN-segment frames not usually forwarded onto other LAN segments

segments become separate collision domains

hub hub hub

switch

collision domain collision domain

collision domain

5 DataLink Layer 5-61

Switches dedicated access Switch with many

interfaces Hosts have direct

connection to switch No collisions full duplex

Switching A-to-Arsquo and B-to-Brsquo simultaneously no collisions

switch

A

Arsquo

B

Brsquo

C

Crsquo

5 DataLink Layer 5-62

More on Switches

cut-through switching frame forwarded from input to output port without first collecting entire frameslight reduction in latency

combinations of shareddedicated 101001000 Mbps interfaces

5 DataLink Layer 5-63

Institutional network

hub

hubhub

switch

to externalnetwork

router

IP subnet

mail server

web server

5 DataLink Layer 5-64

Switches vs Routers both store-and-forward devices

routers network layer devices (examine network layer headers) switches are link layer devices

routers maintain routing tables implement routing algorithms

switches maintain switch tables implement filtering learning algorithms

5 DataLink Layer 5-65

Summary comparison

hubs routers switches

traffi c isolation

no yes yes

plug amp play yes no yes

optimal routing

no yes no

cut through

yes no yes

5 DataLink Layer 5-66

IEEE 802 Standards

The 802 working groups The important ones are marked with The ones marked with are hibernating The one marked with dagger gave up

  • Slide 1
  • Link Layer
  • Ethernet
  • Slide 4
  • Star topology
  • Ethernet Frame Structure
  • Ethernet Frame Structure (more)
  • Unreliable connectionless service
  • Ethernet uses CSMACD
  • Ethernet CSMACD algorithm
  • Ethernetrsquos CSMACD (more)
  • Collision Detection
  • Algorithm (cont)
  • Binary Exponential Backoff
  • Ethernet MAC Sublayer Protocol (2)
  • CSMACD efficiency
  • Ethernet Performance
  • 8023 Ethernet Standards Link amp Physical Layers
  • Manchester encoding
  • Ethernet Cabling
  • Ethernet Cabling (2)
  • Ethernet Cabling (3)
  • 10BaseT and 100BaseT
  • 100Mbps Fast Ethernet
  • Fast Ethernet
  • Gbit Ethernet
  • Gigabit Ethernet
  • Wireless Link Characteristics
  • Wireless network characteristics
  • IEEE 80211 Wireless LAN
  • Slide 31
  • 80211 LAN architecture
  • 80211 Channels association
  • IEEE 80211 multiple access
  • IEEE 80211 MAC Protocol CSMACA
  • Avoiding collisions (more)
  • Collision Avoidance RTS-CTS exchange
  • Slide 38
  • Slide 39
  • Hubs
  • Interconnecting with hubs
  • Inter - Networking
  • Learning Bridges
  • Spanning Tree Algorithm
  • Algorithm Overview
  • Algorithm Details
  • Algorithm Detail (cont)
  • Broadcast and Multicast
  • Limitations of Bridges
  • Switch
  • Switch allows multiple simultaneous transmissions
  • Switch Table
  • Switch self-learning
  • Forwarding
  • Self learning
  • Self-learning forwarding example
  • FilteringForwarding
  • Switch example
  • Slide 59
  • Switch traffic isolation
  • Switches dedicated access
  • More on Switches
  • Institutional network
  • Switches vs Routers
  • Summary comparison
  • IEEE 802 Standards
Page 8: Chapter 5B

5 DataLink Layer 5-8

Unreliable connectionless service Connectionless No handshaking between

sending and receiving adapter Unreliable receiving adapter doesnrsquot send

acks or nacks to sending adapter stream of datagrams passed to network layer can

have gaps gaps will be filled if app is using TCP otherwise app will see the gaps

5 DataLink Layer 5-9

Ethernet uses CSMACD

No slots adapter doesnrsquot

transmit if it senses that some other adapter is transmitting that is carrier sense

transmitting adapter aborts when it senses that another adapter is transmitting that is collision detection

Before attempting a retransmission adapter waits a random time that is random access

5 DataLink Layer 5-10

Ethernet CSMACD algorithm

1 Adaptor receives datagram from net layer amp creates frame

2 If adapter senses channel idle it starts to transmit frame If it senses channel busy waits until channel idle and then transmits

3 If adapter transmits entire frame without detecting another transmission the adapter is done with frame

4 If adapter detects another transmission while transmitting aborts and sends jam signal

5 After aborting adapter enters exponential backoff after the mth collision adapter chooses a K at random from 012hellip2m-1 Adapter waits K512 bit times and returns to Step 2

5 DataLink Layer 5-11

Ethernetrsquos CSMACD (more)

Jam Signal make sure all other transmitters are aware of collision 48 bits

Bit time 1 microsec for 10 Mbps Ethernet for K=1023 wait time is about 50 msec

Exponential Backoff Goal adapt retransmission

attempts to estimated current load heavy load random wait

will be longer first collision choose K

from 01 delay is K 512 bit transmission times

after second collision choose K from 0123hellip

after ten collisions choose K from 01234hellip1023

Seeinteract with Javaapplet on AWL Web sitehighly recommended

5 DataLink Layer 5-12

Collision Detection

On baseband bus collision produces much higher signal voltage than signal

Collision detected if cable signal greater than single station signal

Signal attenuated over distance Limit distance to 500m (10Base5) or 200m

(10Base2) For twisted pair (star-topology) activity on

more than one port is collision Special collision presence signal

5 DataLink Layer 5-13

Algorithm (cont)

If collisionhellip jam for 32 bits then stop transmitting frame minimum frame is 64 bytes (header + 46 bytes

of data) delay and try again

bull 1st time 0 or 512usbull 2nd time 0 512 or 1024usbull 3rd time512 1024 or 1536usbull nth time k x 512us for randomly selected

k=02n - 1bull give up after several tries (usually 16)bull exponential backoff

5 DataLink Layer 5-14

Binary Exponential Backoff

Attempt to transmit repeatedly if repeated collisions First 10 attempts mean value of random delay doubled Value then remains same for 6 further attempts After 16 unsuccessful attempts station gives up and

reports error As congestion increases stations back off by larger

amounts to reduce the probability of collision 1-persistent algorithm with binary exponential backoff

efficient over wide range of loads Low loads 1-persistence guarantees station can

seize channel once idle High loads at least as stable as other techniques

Backoff algorithm gives last-in first-out effect Stations with few collisions transmit first

5 DataLink Layer 5-15

Ethernet MAC Sublayer Protocol (2)

Collision detection can take as long as 2

5 DataLink Layer 5-16

CSMACD efficiency Tprop = max prop between 2 nodes in LAN

ttrans = time to transmit max-size frame

Efficiency goes to 1 as tprop goes to 0

Goes to 1 as ttrans goes to infinity Much better than ALOHA but still decentralized simple and cheap

transprop tt 51

1efficiency

5 DataLink Layer 5-17

Ethernet Performance

Efficiency of Ethernet at 10 Mbps with 512-bit slot times

5 DataLink Layer 5-18

8023 Ethernet Standards Link amp Physical Layers

many different Ethernet standards common MAC protocol and frame format different speeds 2 Mbps 10 Mbps 100

Mbps 1Gbps 10G bps different physical layer media fiber cable

applicationtransportnetwork

linkphysical

MAC protocoland frame format

100BASE-TX

100BASE-T4

100BASE-FX100BASE-T2

100BASE-SX 100BASE-BX

fiber physical layercopper (twisterpair) physical layer

5 DataLink Layer 5-19

Manchester encoding

used in 10BaseT each bit has a transition allows clocks in sending and receiving nodes to

synchronize to each other no need for a centralized global clock among nodes

Hey this is physical-layer stuff

5 DataLink Layer 5-20

Ethernet Cabling

The most common kinds of Ethernet cabling

5 DataLink Layer 5-21

Ethernet Cabling (2)

Three kinds of Ethernet cabling (a) 10Base5 (b) 10Base2 (c) 10Base-T

5 DataLink Layer 5-22

Ethernet Cabling (3)

Cable topologies (a) Linear (b) Spine (c) Tree (d) Segmented

5 DataLink Layer 5-23

10BaseT and 100BaseT 10100 Mbps rate latter called ldquofast ethernetrdquo T stands for Twisted Pair Nodes connect to a hub ldquostar topologyrdquo 100

m max distance between nodes and hub

twisted pair

hub

5 DataLink Layer 5-24

100Mbps Fast Ethernet

Use IEEE 8023 MAC protocol and frame format 100BASE-X use physical medium specifications

from FDDI Two physical links between nodes

bull Transmission and reception 100BASE-TX uses STP or Cat 5 UTP

bull May require new cable 100BASE-FX uses optical fiber 100BASE-T4 can use Cat 3 voice-grade UTP

bull Uses four twisted-pair lines between nodesbull Data transmission uses three pairs in one direction at a

time

Star-wire topology Similar to 10BASE-T

5 DataLink Layer 5-25

Fast Ethernet

The original fast Ethernet cabling

5 DataLink Layer 5-26

Gbit Ethernet

uses standard Ethernet frame format allows for point-to-point links and shared

broadcast channels in shared mode CSMACD is used short

distances between nodes required for efficiency

uses hubs called here ldquoBuffered Distributorsrdquo Full-Duplex at 1 Gbps for point-to-point links 10 Gbps now

5 DataLink Layer 5-27

Gigabit Ethernet

Gigabit Ethernet cabling

5 DataLink Layer 5-28

Wireless Link CharacteristicsDifferences from wired link hellip

decreased signal strength radio signal attenuates as it propagates through matter (path loss)

interference from other sources standardized wireless network frequencies (eg 24 GHz) shared by other devices (eg phone) devices (motors) interfere as well

multipath propagation radio signal reflects off objects ground arriving ad destination at slightly different times

hellip make communication across (even a point to point) wireless link much more ldquodifficultrdquo

5 DataLink Layer 5-29

Wireless network characteristicsMultiple wireless senders and receivers create

additional problems (beyond multiple access)

AB

C

Hidden terminal problem B A hear each other B C hear each other A C can not hear each

othermeans A C unaware of their

interference at B

A B C

Arsquos signalstrength

space

Crsquos signalstrength

Signal fading B A hear each other B C hear each other A C can not hear each other

interferring at B

5 DataLink Layer 5-30

IEEE 80211 Wireless LAN

80211b 24-5 GHz unlicensed

radio spectrum up to 11 Mbps direct sequence

spread spectrum (DSSS) in physical layer

bull all hosts use same chipping code

widely deployed using base stations

80211a 5-6 GHz range up to 54 Mbps

80211g 24-5 GHz range up to 54 Mbps

All use CSMACA for multiple access

All have base-station and ad-hoc network versions

5 DataLink Layer 5-31

Figure 3-12

ISM bands

5 DataLink Layer 5-32

80211 LAN architecture

wireless host communicates with base station base station = access

point (AP) Basic Service Set (BSS)

(aka ldquocellrdquo) in infrastructure mode contains wireless hosts access point (AP) base

station ad hoc mode hosts

only

BSS 1

BSS 2

Internet

hub switchor routerAP

AP

5 DataLink Layer 5-33

80211 Channels association 80211b 24GHz-2485GHz spectrum divided

into 11 channels at different frequencies AP admin chooses frequency for AP interference possible channel can be same as

that chosen by neighboring AP host must associate with an AP

scans channels listening for beacon frames containing APrsquos name (SSID) and MAC address

selects AP to associate with may perform authentication [Chapter 8] will typically run DHCP to get IP address in

APrsquos subnet

5 DataLink Layer 5-34

IEEE 80211 multiple access avoid collisions 2+ nodes transmitting at same

time 80211 CSMA - sense before transmitting

donrsquot collide with ongoing transmission by other node

80211 no collision detection difficult to receive (sense collisions) when transmitting

due to weak received signals (fading) canrsquot sense all collisions in any case hidden terminal

fading goal avoid collisions CSMAC(ollision)A(voidance)

AB

CA B C

Arsquos signalstrength

space

Crsquos signalstrength

5 DataLink Layer 5-35

IEEE 80211 MAC Protocol CSMACA

80211 sender1 if sense channel idle for DIFS then

transmit entire frame (no CD)2 if sense channel busy then

start random backoff timetimer counts down while channel idletransmit when timer expiresif no ACK increase random backoff

interval repeat 2

80211 receiver- if frame received OK

return ACK after SIFS (ACK needed due to hidden terminal problem)

sender receiver

DIFS

data

SIFS

ACK

5 DataLink Layer 5-36

Avoiding collisions (more)

idea allow sender to ldquoreserverdquo channel rather than random access of data frames avoid collisions of long data frames

sender first transmits small request-to-send (RTS) packets to BS using CSMA RTSs may still collide with each other (but theyrsquore

short) BS broadcasts clear-to-send CTS in response to RTS RTS heard by all nodes

sender transmits data frame other stations defer transmissions

Avoid data frame collisions completely using small reservation packets

5 DataLink Layer 5-37

Collision Avoidance RTS-CTS exchange

APA B

time

RTS(A)RTS(B)

RTS(A)

CTS(A) CTS(A)

DATA (A)

ACK(A) ACK(A)

reservation collision

defer

5 DataLink Layer 5-38

Manchester encoding

Used in 10BaseT Each bit has a transition Allows clocks in sending and receiving nodes to

synchronize to each other no need for a centralized global clock among nodes

Hey this is physical-layer stuff

5 DataLink Layer 5-39

Link Layer

51 Introduction and services

52 Error detection and correction

53Multiple access protocols

54 Link-Layer Addressing

55 Ethernet

56 Interconnections Hubs and switches

57 PPP 58 Link Virtualization

ATM

5 DataLink Layer 5-40

HubsHubs are essentially physical-layer repeaters

bits coming from one link go out all other links at the same rate no frame buffering no CSMACD at hub adapters detect collisions provides net management functionality

twisted pair

hub

5 DataLink Layer 5-41

Interconnecting with hubs Backbone hub interconnects LAN segments Extends max distance between nodes But individual segment collision domains become one large

collision domain Canrsquot interconnect 10BaseT amp 100BaseT

hub

hubhub

hub

5 DataLink Layer 5-42

Inter - Networking

Hubs Bridges Switches Routers

5 DataLink Layer 5-43

Learning Bridges Do not forward when unnecessary Maintain forwarding table

HostPort

A 1 B 1 C 1 X 2 Y 2 Z 2

Learn table entries based on source address Table is an optimization need not be complete Always forward broadcast frames

A

Bridge

B C

X Y Z

Port 1

Port 2

5 DataLink Layer 5-44

Spanning Tree Algorithm Problem loops

Bridges run a distributed spanning tree algorithm select which bridges actively forward developed by Radia Perlman now IEEE 8021 specification

A

C

E

D

B

K

F

H

J

G

I

B3

B7

B4

B2

B5

B1

B6

(a) (b)

5 DataLink Layer 5-45

Algorithm Overview Each bridge has unique id (eg B1 B2

B3) Select bridge with smallest id as root Select bridge on each LAN closest to root

as designated bridge (use id to break ties) Each bridge forwards frames over each LAN for which it is the designated bridge

A

C

E

D

B

K

F

H

J

G

I

B5

B2

B3

B7

B4

B1

B6

5 DataLink Layer 5-46

Algorithm Details

Bridges exchange configuration messages id for bridge sending the message id for what the sending bridge believes to be

root bridge distance (hops) from sending bridge to root

bridge Each bridge records current best

configuration message for each port Initially each bridge believes it is the root

5 DataLink Layer 5-47

Algorithm Detail (cont) When learn not root stop generating config

messages in steady state only root generates configuration messages

When learn not designated bridge stop forwarding config messages in steady state only designated bridges forward config

messages

Root continues to periodically send config messages If any bridge does not receive config message after

a period of time it starts generating config messages claiming to be the root

5 DataLink Layer 5-48

Broadcast and Multicast Forward all broadcastmulticast frames

current practice Learn when no group members

downstream Accomplished by having each member of

group G send a frame to bridge multicast address with G in source field

5 DataLink Layer 5-49

Limitations of Bridges

Do not scale spanning tree algorithm does not scale broadcast does not scale

Do not accommodate heterogeneity

Caution beware of transparency

5 DataLink Layer 5-50

Switch link-layer device smarter than hubs take active

role store forward Ethernet frames examine incoming framersquos MAC address selectively

forward frame to one-or-more outgoing links when frame is to be forwarded on segment uses CSMACD to access segment

transparent hosts are unaware of presence of switches

plug-and-play self-learning switches do not need to be configured

5 DataLink Layer 5-51

Switch allows multiple simultaneous transmissions

hosts have dedicated direct connection to switch

switches buffer packets Ethernet protocol used on

each incoming link but no collisions full duplex each link is its own collision

domain switching A-to-Arsquo and B-

to-Brsquo simultaneously without collisions not possible with dumb hub

A

Arsquo

B

Brsquo

C

Crsquo

switch with six interfaces(123456)

1 23

45

6

5 DataLink Layer 5-52

Switch Table

Q how does switch know that Arsquo reachable via interface 4 Brsquo reachable via interface 5

A each switch has a switch table each entry (MAC address of host interface

to reach host time stamp)

looks like a routing table Q how are entries created

maintained in switch table something like a routing

protocol

A

Arsquo

B

Brsquo

C

Crsquo

switch with six interfaces(123456)

1 23

45

6

5 DataLink Layer 5-53

Switch self-learning

switch learns which hosts can be reached through which interfaces when frame received

switch ldquolearnsrdquo location of sender incoming LAN segment

records senderlocation pair in switch table

A

Arsquo

B

Brsquo

C

Crsquo

1 23

45

6

A Arsquo

Source ADest Arsquo

MAC addr interface TTL

Switch table (initially empty)

A 1 60

5 DataLink Layer 5-54

Forwarding

bull How do determine onto which LAN segment to forward framebull Looks like a routing problem

hub

hubhub

switch1

2 3

5 DataLink Layer 5-55

Self learning

A switch has a switch table entry in switch table

(MAC Address Interface Time Stamp) stale entries in table dropped (TTL can be 60

min) switch learns which hosts can be reached through

which interfaces when frame received switch ldquolearnsrdquo location

of sender incoming LAN segment records senderlocation pair in switch table

5 DataLink Layer 5-56

Self-learning forwarding example

A

Arsquo

B

Brsquo

C

Crsquo

1 23

45

6

A Arsquo

Source ADest Arsquo

MAC addr interface TTL

Switch table (initially empty)

A 1 60

A ArsquoA ArsquoA ArsquoA ArsquoA Arsquo

frame destination unknownflood

Arsquo A

destination A location known

Arsquo 4 60

selective send

5 DataLink Layer 5-57

FilteringForwardingWhen switch receives a frame

index switch table using MAC dest addressif entry found for destination

then if dest on segment from which frame arrived

then drop the frame else forward the frame on interface indicated else flood

forward on all but the interface on which the frame arrived

5 DataLink Layer 5-58

Switch example

Suppose C sends frame to D

Switch receives frame from from C notes in bridge table that C is on interface 1 because D is not in table switch forwards frame into

interfaces 2 and 3

frame received by D

hub

hub hub

switch

A

B CD

EF

G H

I

address interface

ABEG

1123

12 3

5 DataLink Layer 5-59

Switch example

Suppose D replies back with frame to C

Switch receives frame from from D notes in bridge table that D is on interface 2 because C is in table switch forwards frame only to

interface 1

frame received by C

hub

hub hub

switch

A

B CD

EF

G H

I

address interface

ABEGC

11231

5 DataLink Layer 5-60

Switch traffic isolation switch installation breaks subnet into LAN

segments switch filters packets

same-LAN-segment frames not usually forwarded onto other LAN segments

segments become separate collision domains

hub hub hub

switch

collision domain collision domain

collision domain

5 DataLink Layer 5-61

Switches dedicated access Switch with many

interfaces Hosts have direct

connection to switch No collisions full duplex

Switching A-to-Arsquo and B-to-Brsquo simultaneously no collisions

switch

A

Arsquo

B

Brsquo

C

Crsquo

5 DataLink Layer 5-62

More on Switches

cut-through switching frame forwarded from input to output port without first collecting entire frameslight reduction in latency

combinations of shareddedicated 101001000 Mbps interfaces

5 DataLink Layer 5-63

Institutional network

hub

hubhub

switch

to externalnetwork

router

IP subnet

mail server

web server

5 DataLink Layer 5-64

Switches vs Routers both store-and-forward devices

routers network layer devices (examine network layer headers) switches are link layer devices

routers maintain routing tables implement routing algorithms

switches maintain switch tables implement filtering learning algorithms

5 DataLink Layer 5-65

Summary comparison

hubs routers switches

traffi c isolation

no yes yes

plug amp play yes no yes

optimal routing

no yes no

cut through

yes no yes

5 DataLink Layer 5-66

IEEE 802 Standards

The 802 working groups The important ones are marked with The ones marked with are hibernating The one marked with dagger gave up

  • Slide 1
  • Link Layer
  • Ethernet
  • Slide 4
  • Star topology
  • Ethernet Frame Structure
  • Ethernet Frame Structure (more)
  • Unreliable connectionless service
  • Ethernet uses CSMACD
  • Ethernet CSMACD algorithm
  • Ethernetrsquos CSMACD (more)
  • Collision Detection
  • Algorithm (cont)
  • Binary Exponential Backoff
  • Ethernet MAC Sublayer Protocol (2)
  • CSMACD efficiency
  • Ethernet Performance
  • 8023 Ethernet Standards Link amp Physical Layers
  • Manchester encoding
  • Ethernet Cabling
  • Ethernet Cabling (2)
  • Ethernet Cabling (3)
  • 10BaseT and 100BaseT
  • 100Mbps Fast Ethernet
  • Fast Ethernet
  • Gbit Ethernet
  • Gigabit Ethernet
  • Wireless Link Characteristics
  • Wireless network characteristics
  • IEEE 80211 Wireless LAN
  • Slide 31
  • 80211 LAN architecture
  • 80211 Channels association
  • IEEE 80211 multiple access
  • IEEE 80211 MAC Protocol CSMACA
  • Avoiding collisions (more)
  • Collision Avoidance RTS-CTS exchange
  • Slide 38
  • Slide 39
  • Hubs
  • Interconnecting with hubs
  • Inter - Networking
  • Learning Bridges
  • Spanning Tree Algorithm
  • Algorithm Overview
  • Algorithm Details
  • Algorithm Detail (cont)
  • Broadcast and Multicast
  • Limitations of Bridges
  • Switch
  • Switch allows multiple simultaneous transmissions
  • Switch Table
  • Switch self-learning
  • Forwarding
  • Self learning
  • Self-learning forwarding example
  • FilteringForwarding
  • Switch example
  • Slide 59
  • Switch traffic isolation
  • Switches dedicated access
  • More on Switches
  • Institutional network
  • Switches vs Routers
  • Summary comparison
  • IEEE 802 Standards
Page 9: Chapter 5B

5 DataLink Layer 5-9

Ethernet uses CSMACD

No slots adapter doesnrsquot

transmit if it senses that some other adapter is transmitting that is carrier sense

transmitting adapter aborts when it senses that another adapter is transmitting that is collision detection

Before attempting a retransmission adapter waits a random time that is random access

5 DataLink Layer 5-10

Ethernet CSMACD algorithm

1 Adaptor receives datagram from net layer amp creates frame

2 If adapter senses channel idle it starts to transmit frame If it senses channel busy waits until channel idle and then transmits

3 If adapter transmits entire frame without detecting another transmission the adapter is done with frame

4 If adapter detects another transmission while transmitting aborts and sends jam signal

5 After aborting adapter enters exponential backoff after the mth collision adapter chooses a K at random from 012hellip2m-1 Adapter waits K512 bit times and returns to Step 2

5 DataLink Layer 5-11

Ethernetrsquos CSMACD (more)

Jam Signal make sure all other transmitters are aware of collision 48 bits

Bit time 1 microsec for 10 Mbps Ethernet for K=1023 wait time is about 50 msec

Exponential Backoff Goal adapt retransmission

attempts to estimated current load heavy load random wait

will be longer first collision choose K

from 01 delay is K 512 bit transmission times

after second collision choose K from 0123hellip

after ten collisions choose K from 01234hellip1023

Seeinteract with Javaapplet on AWL Web sitehighly recommended

5 DataLink Layer 5-12

Collision Detection

On baseband bus collision produces much higher signal voltage than signal

Collision detected if cable signal greater than single station signal

Signal attenuated over distance Limit distance to 500m (10Base5) or 200m

(10Base2) For twisted pair (star-topology) activity on

more than one port is collision Special collision presence signal

5 DataLink Layer 5-13

Algorithm (cont)

If collisionhellip jam for 32 bits then stop transmitting frame minimum frame is 64 bytes (header + 46 bytes

of data) delay and try again

bull 1st time 0 or 512usbull 2nd time 0 512 or 1024usbull 3rd time512 1024 or 1536usbull nth time k x 512us for randomly selected

k=02n - 1bull give up after several tries (usually 16)bull exponential backoff

5 DataLink Layer 5-14

Binary Exponential Backoff

Attempt to transmit repeatedly if repeated collisions First 10 attempts mean value of random delay doubled Value then remains same for 6 further attempts After 16 unsuccessful attempts station gives up and

reports error As congestion increases stations back off by larger

amounts to reduce the probability of collision 1-persistent algorithm with binary exponential backoff

efficient over wide range of loads Low loads 1-persistence guarantees station can

seize channel once idle High loads at least as stable as other techniques

Backoff algorithm gives last-in first-out effect Stations with few collisions transmit first

5 DataLink Layer 5-15

Ethernet MAC Sublayer Protocol (2)

Collision detection can take as long as 2

5 DataLink Layer 5-16

CSMACD efficiency Tprop = max prop between 2 nodes in LAN

ttrans = time to transmit max-size frame

Efficiency goes to 1 as tprop goes to 0

Goes to 1 as ttrans goes to infinity Much better than ALOHA but still decentralized simple and cheap

transprop tt 51

1efficiency

5 DataLink Layer 5-17

Ethernet Performance

Efficiency of Ethernet at 10 Mbps with 512-bit slot times

5 DataLink Layer 5-18

8023 Ethernet Standards Link amp Physical Layers

many different Ethernet standards common MAC protocol and frame format different speeds 2 Mbps 10 Mbps 100

Mbps 1Gbps 10G bps different physical layer media fiber cable

applicationtransportnetwork

linkphysical

MAC protocoland frame format

100BASE-TX

100BASE-T4

100BASE-FX100BASE-T2

100BASE-SX 100BASE-BX

fiber physical layercopper (twisterpair) physical layer

5 DataLink Layer 5-19

Manchester encoding

used in 10BaseT each bit has a transition allows clocks in sending and receiving nodes to

synchronize to each other no need for a centralized global clock among nodes

Hey this is physical-layer stuff

5 DataLink Layer 5-20

Ethernet Cabling

The most common kinds of Ethernet cabling

5 DataLink Layer 5-21

Ethernet Cabling (2)

Three kinds of Ethernet cabling (a) 10Base5 (b) 10Base2 (c) 10Base-T

5 DataLink Layer 5-22

Ethernet Cabling (3)

Cable topologies (a) Linear (b) Spine (c) Tree (d) Segmented

5 DataLink Layer 5-23

10BaseT and 100BaseT 10100 Mbps rate latter called ldquofast ethernetrdquo T stands for Twisted Pair Nodes connect to a hub ldquostar topologyrdquo 100

m max distance between nodes and hub

twisted pair

hub

5 DataLink Layer 5-24

100Mbps Fast Ethernet

Use IEEE 8023 MAC protocol and frame format 100BASE-X use physical medium specifications

from FDDI Two physical links between nodes

bull Transmission and reception 100BASE-TX uses STP or Cat 5 UTP

bull May require new cable 100BASE-FX uses optical fiber 100BASE-T4 can use Cat 3 voice-grade UTP

bull Uses four twisted-pair lines between nodesbull Data transmission uses three pairs in one direction at a

time

Star-wire topology Similar to 10BASE-T

5 DataLink Layer 5-25

Fast Ethernet

The original fast Ethernet cabling

5 DataLink Layer 5-26

Gbit Ethernet

uses standard Ethernet frame format allows for point-to-point links and shared

broadcast channels in shared mode CSMACD is used short

distances between nodes required for efficiency

uses hubs called here ldquoBuffered Distributorsrdquo Full-Duplex at 1 Gbps for point-to-point links 10 Gbps now

5 DataLink Layer 5-27

Gigabit Ethernet

Gigabit Ethernet cabling

5 DataLink Layer 5-28

Wireless Link CharacteristicsDifferences from wired link hellip

decreased signal strength radio signal attenuates as it propagates through matter (path loss)

interference from other sources standardized wireless network frequencies (eg 24 GHz) shared by other devices (eg phone) devices (motors) interfere as well

multipath propagation radio signal reflects off objects ground arriving ad destination at slightly different times

hellip make communication across (even a point to point) wireless link much more ldquodifficultrdquo

5 DataLink Layer 5-29

Wireless network characteristicsMultiple wireless senders and receivers create

additional problems (beyond multiple access)

AB

C

Hidden terminal problem B A hear each other B C hear each other A C can not hear each

othermeans A C unaware of their

interference at B

A B C

Arsquos signalstrength

space

Crsquos signalstrength

Signal fading B A hear each other B C hear each other A C can not hear each other

interferring at B

5 DataLink Layer 5-30

IEEE 80211 Wireless LAN

80211b 24-5 GHz unlicensed

radio spectrum up to 11 Mbps direct sequence

spread spectrum (DSSS) in physical layer

bull all hosts use same chipping code

widely deployed using base stations

80211a 5-6 GHz range up to 54 Mbps

80211g 24-5 GHz range up to 54 Mbps

All use CSMACA for multiple access

All have base-station and ad-hoc network versions

5 DataLink Layer 5-31

Figure 3-12

ISM bands

5 DataLink Layer 5-32

80211 LAN architecture

wireless host communicates with base station base station = access

point (AP) Basic Service Set (BSS)

(aka ldquocellrdquo) in infrastructure mode contains wireless hosts access point (AP) base

station ad hoc mode hosts

only

BSS 1

BSS 2

Internet

hub switchor routerAP

AP

5 DataLink Layer 5-33

80211 Channels association 80211b 24GHz-2485GHz spectrum divided

into 11 channels at different frequencies AP admin chooses frequency for AP interference possible channel can be same as

that chosen by neighboring AP host must associate with an AP

scans channels listening for beacon frames containing APrsquos name (SSID) and MAC address

selects AP to associate with may perform authentication [Chapter 8] will typically run DHCP to get IP address in

APrsquos subnet

5 DataLink Layer 5-34

IEEE 80211 multiple access avoid collisions 2+ nodes transmitting at same

time 80211 CSMA - sense before transmitting

donrsquot collide with ongoing transmission by other node

80211 no collision detection difficult to receive (sense collisions) when transmitting

due to weak received signals (fading) canrsquot sense all collisions in any case hidden terminal

fading goal avoid collisions CSMAC(ollision)A(voidance)

AB

CA B C

Arsquos signalstrength

space

Crsquos signalstrength

5 DataLink Layer 5-35

IEEE 80211 MAC Protocol CSMACA

80211 sender1 if sense channel idle for DIFS then

transmit entire frame (no CD)2 if sense channel busy then

start random backoff timetimer counts down while channel idletransmit when timer expiresif no ACK increase random backoff

interval repeat 2

80211 receiver- if frame received OK

return ACK after SIFS (ACK needed due to hidden terminal problem)

sender receiver

DIFS

data

SIFS

ACK

5 DataLink Layer 5-36

Avoiding collisions (more)

idea allow sender to ldquoreserverdquo channel rather than random access of data frames avoid collisions of long data frames

sender first transmits small request-to-send (RTS) packets to BS using CSMA RTSs may still collide with each other (but theyrsquore

short) BS broadcasts clear-to-send CTS in response to RTS RTS heard by all nodes

sender transmits data frame other stations defer transmissions

Avoid data frame collisions completely using small reservation packets

5 DataLink Layer 5-37

Collision Avoidance RTS-CTS exchange

APA B

time

RTS(A)RTS(B)

RTS(A)

CTS(A) CTS(A)

DATA (A)

ACK(A) ACK(A)

reservation collision

defer

5 DataLink Layer 5-38

Manchester encoding

Used in 10BaseT Each bit has a transition Allows clocks in sending and receiving nodes to

synchronize to each other no need for a centralized global clock among nodes

Hey this is physical-layer stuff

5 DataLink Layer 5-39

Link Layer

51 Introduction and services

52 Error detection and correction

53Multiple access protocols

54 Link-Layer Addressing

55 Ethernet

56 Interconnections Hubs and switches

57 PPP 58 Link Virtualization

ATM

5 DataLink Layer 5-40

HubsHubs are essentially physical-layer repeaters

bits coming from one link go out all other links at the same rate no frame buffering no CSMACD at hub adapters detect collisions provides net management functionality

twisted pair

hub

5 DataLink Layer 5-41

Interconnecting with hubs Backbone hub interconnects LAN segments Extends max distance between nodes But individual segment collision domains become one large

collision domain Canrsquot interconnect 10BaseT amp 100BaseT

hub

hubhub

hub

5 DataLink Layer 5-42

Inter - Networking

Hubs Bridges Switches Routers

5 DataLink Layer 5-43

Learning Bridges Do not forward when unnecessary Maintain forwarding table

HostPort

A 1 B 1 C 1 X 2 Y 2 Z 2

Learn table entries based on source address Table is an optimization need not be complete Always forward broadcast frames

A

Bridge

B C

X Y Z

Port 1

Port 2

5 DataLink Layer 5-44

Spanning Tree Algorithm Problem loops

Bridges run a distributed spanning tree algorithm select which bridges actively forward developed by Radia Perlman now IEEE 8021 specification

A

C

E

D

B

K

F

H

J

G

I

B3

B7

B4

B2

B5

B1

B6

(a) (b)

5 DataLink Layer 5-45

Algorithm Overview Each bridge has unique id (eg B1 B2

B3) Select bridge with smallest id as root Select bridge on each LAN closest to root

as designated bridge (use id to break ties) Each bridge forwards frames over each LAN for which it is the designated bridge

A

C

E

D

B

K

F

H

J

G

I

B5

B2

B3

B7

B4

B1

B6

5 DataLink Layer 5-46

Algorithm Details

Bridges exchange configuration messages id for bridge sending the message id for what the sending bridge believes to be

root bridge distance (hops) from sending bridge to root

bridge Each bridge records current best

configuration message for each port Initially each bridge believes it is the root

5 DataLink Layer 5-47

Algorithm Detail (cont) When learn not root stop generating config

messages in steady state only root generates configuration messages

When learn not designated bridge stop forwarding config messages in steady state only designated bridges forward config

messages

Root continues to periodically send config messages If any bridge does not receive config message after

a period of time it starts generating config messages claiming to be the root

5 DataLink Layer 5-48

Broadcast and Multicast Forward all broadcastmulticast frames

current practice Learn when no group members

downstream Accomplished by having each member of

group G send a frame to bridge multicast address with G in source field

5 DataLink Layer 5-49

Limitations of Bridges

Do not scale spanning tree algorithm does not scale broadcast does not scale

Do not accommodate heterogeneity

Caution beware of transparency

5 DataLink Layer 5-50

Switch link-layer device smarter than hubs take active

role store forward Ethernet frames examine incoming framersquos MAC address selectively

forward frame to one-or-more outgoing links when frame is to be forwarded on segment uses CSMACD to access segment

transparent hosts are unaware of presence of switches

plug-and-play self-learning switches do not need to be configured

5 DataLink Layer 5-51

Switch allows multiple simultaneous transmissions

hosts have dedicated direct connection to switch

switches buffer packets Ethernet protocol used on

each incoming link but no collisions full duplex each link is its own collision

domain switching A-to-Arsquo and B-

to-Brsquo simultaneously without collisions not possible with dumb hub

A

Arsquo

B

Brsquo

C

Crsquo

switch with six interfaces(123456)

1 23

45

6

5 DataLink Layer 5-52

Switch Table

Q how does switch know that Arsquo reachable via interface 4 Brsquo reachable via interface 5

A each switch has a switch table each entry (MAC address of host interface

to reach host time stamp)

looks like a routing table Q how are entries created

maintained in switch table something like a routing

protocol

A

Arsquo

B

Brsquo

C

Crsquo

switch with six interfaces(123456)

1 23

45

6

5 DataLink Layer 5-53

Switch self-learning

switch learns which hosts can be reached through which interfaces when frame received

switch ldquolearnsrdquo location of sender incoming LAN segment

records senderlocation pair in switch table

A

Arsquo

B

Brsquo

C

Crsquo

1 23

45

6

A Arsquo

Source ADest Arsquo

MAC addr interface TTL

Switch table (initially empty)

A 1 60

5 DataLink Layer 5-54

Forwarding

bull How do determine onto which LAN segment to forward framebull Looks like a routing problem

hub

hubhub

switch1

2 3

5 DataLink Layer 5-55

Self learning

A switch has a switch table entry in switch table

(MAC Address Interface Time Stamp) stale entries in table dropped (TTL can be 60

min) switch learns which hosts can be reached through

which interfaces when frame received switch ldquolearnsrdquo location

of sender incoming LAN segment records senderlocation pair in switch table

5 DataLink Layer 5-56

Self-learning forwarding example

A

Arsquo

B

Brsquo

C

Crsquo

1 23

45

6

A Arsquo

Source ADest Arsquo

MAC addr interface TTL

Switch table (initially empty)

A 1 60

A ArsquoA ArsquoA ArsquoA ArsquoA Arsquo

frame destination unknownflood

Arsquo A

destination A location known

Arsquo 4 60

selective send

5 DataLink Layer 5-57

FilteringForwardingWhen switch receives a frame

index switch table using MAC dest addressif entry found for destination

then if dest on segment from which frame arrived

then drop the frame else forward the frame on interface indicated else flood

forward on all but the interface on which the frame arrived

5 DataLink Layer 5-58

Switch example

Suppose C sends frame to D

Switch receives frame from from C notes in bridge table that C is on interface 1 because D is not in table switch forwards frame into

interfaces 2 and 3

frame received by D

hub

hub hub

switch

A

B CD

EF

G H

I

address interface

ABEG

1123

12 3

5 DataLink Layer 5-59

Switch example

Suppose D replies back with frame to C

Switch receives frame from from D notes in bridge table that D is on interface 2 because C is in table switch forwards frame only to

interface 1

frame received by C

hub

hub hub

switch

A

B CD

EF

G H

I

address interface

ABEGC

11231

5 DataLink Layer 5-60

Switch traffic isolation switch installation breaks subnet into LAN

segments switch filters packets

same-LAN-segment frames not usually forwarded onto other LAN segments

segments become separate collision domains

hub hub hub

switch

collision domain collision domain

collision domain

5 DataLink Layer 5-61

Switches dedicated access Switch with many

interfaces Hosts have direct

connection to switch No collisions full duplex

Switching A-to-Arsquo and B-to-Brsquo simultaneously no collisions

switch

A

Arsquo

B

Brsquo

C

Crsquo

5 DataLink Layer 5-62

More on Switches

cut-through switching frame forwarded from input to output port without first collecting entire frameslight reduction in latency

combinations of shareddedicated 101001000 Mbps interfaces

5 DataLink Layer 5-63

Institutional network

hub

hubhub

switch

to externalnetwork

router

IP subnet

mail server

web server

5 DataLink Layer 5-64

Switches vs Routers both store-and-forward devices

routers network layer devices (examine network layer headers) switches are link layer devices

routers maintain routing tables implement routing algorithms

switches maintain switch tables implement filtering learning algorithms

5 DataLink Layer 5-65

Summary comparison

hubs routers switches

traffi c isolation

no yes yes

plug amp play yes no yes

optimal routing

no yes no

cut through

yes no yes

5 DataLink Layer 5-66

IEEE 802 Standards

The 802 working groups The important ones are marked with The ones marked with are hibernating The one marked with dagger gave up

  • Slide 1
  • Link Layer
  • Ethernet
  • Slide 4
  • Star topology
  • Ethernet Frame Structure
  • Ethernet Frame Structure (more)
  • Unreliable connectionless service
  • Ethernet uses CSMACD
  • Ethernet CSMACD algorithm
  • Ethernetrsquos CSMACD (more)
  • Collision Detection
  • Algorithm (cont)
  • Binary Exponential Backoff
  • Ethernet MAC Sublayer Protocol (2)
  • CSMACD efficiency
  • Ethernet Performance
  • 8023 Ethernet Standards Link amp Physical Layers
  • Manchester encoding
  • Ethernet Cabling
  • Ethernet Cabling (2)
  • Ethernet Cabling (3)
  • 10BaseT and 100BaseT
  • 100Mbps Fast Ethernet
  • Fast Ethernet
  • Gbit Ethernet
  • Gigabit Ethernet
  • Wireless Link Characteristics
  • Wireless network characteristics
  • IEEE 80211 Wireless LAN
  • Slide 31
  • 80211 LAN architecture
  • 80211 Channels association
  • IEEE 80211 multiple access
  • IEEE 80211 MAC Protocol CSMACA
  • Avoiding collisions (more)
  • Collision Avoidance RTS-CTS exchange
  • Slide 38
  • Slide 39
  • Hubs
  • Interconnecting with hubs
  • Inter - Networking
  • Learning Bridges
  • Spanning Tree Algorithm
  • Algorithm Overview
  • Algorithm Details
  • Algorithm Detail (cont)
  • Broadcast and Multicast
  • Limitations of Bridges
  • Switch
  • Switch allows multiple simultaneous transmissions
  • Switch Table
  • Switch self-learning
  • Forwarding
  • Self learning
  • Self-learning forwarding example
  • FilteringForwarding
  • Switch example
  • Slide 59
  • Switch traffic isolation
  • Switches dedicated access
  • More on Switches
  • Institutional network
  • Switches vs Routers
  • Summary comparison
  • IEEE 802 Standards
Page 10: Chapter 5B

5 DataLink Layer 5-10

Ethernet CSMACD algorithm

1 Adaptor receives datagram from net layer amp creates frame

2 If adapter senses channel idle it starts to transmit frame If it senses channel busy waits until channel idle and then transmits

3 If adapter transmits entire frame without detecting another transmission the adapter is done with frame

4 If adapter detects another transmission while transmitting aborts and sends jam signal

5 After aborting adapter enters exponential backoff after the mth collision adapter chooses a K at random from 012hellip2m-1 Adapter waits K512 bit times and returns to Step 2

5 DataLink Layer 5-11

Ethernetrsquos CSMACD (more)

Jam Signal make sure all other transmitters are aware of collision 48 bits

Bit time 1 microsec for 10 Mbps Ethernet for K=1023 wait time is about 50 msec

Exponential Backoff Goal adapt retransmission

attempts to estimated current load heavy load random wait

will be longer first collision choose K

from 01 delay is K 512 bit transmission times

after second collision choose K from 0123hellip

after ten collisions choose K from 01234hellip1023

Seeinteract with Javaapplet on AWL Web sitehighly recommended

5 DataLink Layer 5-12

Collision Detection

On baseband bus collision produces much higher signal voltage than signal

Collision detected if cable signal greater than single station signal

Signal attenuated over distance Limit distance to 500m (10Base5) or 200m

(10Base2) For twisted pair (star-topology) activity on

more than one port is collision Special collision presence signal

5 DataLink Layer 5-13

Algorithm (cont)

If collisionhellip jam for 32 bits then stop transmitting frame minimum frame is 64 bytes (header + 46 bytes

of data) delay and try again

bull 1st time 0 or 512usbull 2nd time 0 512 or 1024usbull 3rd time512 1024 or 1536usbull nth time k x 512us for randomly selected

k=02n - 1bull give up after several tries (usually 16)bull exponential backoff

5 DataLink Layer 5-14

Binary Exponential Backoff

Attempt to transmit repeatedly if repeated collisions First 10 attempts mean value of random delay doubled Value then remains same for 6 further attempts After 16 unsuccessful attempts station gives up and

reports error As congestion increases stations back off by larger

amounts to reduce the probability of collision 1-persistent algorithm with binary exponential backoff

efficient over wide range of loads Low loads 1-persistence guarantees station can

seize channel once idle High loads at least as stable as other techniques

Backoff algorithm gives last-in first-out effect Stations with few collisions transmit first

5 DataLink Layer 5-15

Ethernet MAC Sublayer Protocol (2)

Collision detection can take as long as 2

5 DataLink Layer 5-16

CSMACD efficiency Tprop = max prop between 2 nodes in LAN

ttrans = time to transmit max-size frame

Efficiency goes to 1 as tprop goes to 0

Goes to 1 as ttrans goes to infinity Much better than ALOHA but still decentralized simple and cheap

transprop tt 51

1efficiency

5 DataLink Layer 5-17

Ethernet Performance

Efficiency of Ethernet at 10 Mbps with 512-bit slot times

5 DataLink Layer 5-18

8023 Ethernet Standards Link amp Physical Layers

many different Ethernet standards common MAC protocol and frame format different speeds 2 Mbps 10 Mbps 100

Mbps 1Gbps 10G bps different physical layer media fiber cable

applicationtransportnetwork

linkphysical

MAC protocoland frame format

100BASE-TX

100BASE-T4

100BASE-FX100BASE-T2

100BASE-SX 100BASE-BX

fiber physical layercopper (twisterpair) physical layer

5 DataLink Layer 5-19

Manchester encoding

used in 10BaseT each bit has a transition allows clocks in sending and receiving nodes to

synchronize to each other no need for a centralized global clock among nodes

Hey this is physical-layer stuff

5 DataLink Layer 5-20

Ethernet Cabling

The most common kinds of Ethernet cabling

5 DataLink Layer 5-21

Ethernet Cabling (2)

Three kinds of Ethernet cabling (a) 10Base5 (b) 10Base2 (c) 10Base-T

5 DataLink Layer 5-22

Ethernet Cabling (3)

Cable topologies (a) Linear (b) Spine (c) Tree (d) Segmented

5 DataLink Layer 5-23

10BaseT and 100BaseT 10100 Mbps rate latter called ldquofast ethernetrdquo T stands for Twisted Pair Nodes connect to a hub ldquostar topologyrdquo 100

m max distance between nodes and hub

twisted pair

hub

5 DataLink Layer 5-24

100Mbps Fast Ethernet

Use IEEE 8023 MAC protocol and frame format 100BASE-X use physical medium specifications

from FDDI Two physical links between nodes

bull Transmission and reception 100BASE-TX uses STP or Cat 5 UTP

bull May require new cable 100BASE-FX uses optical fiber 100BASE-T4 can use Cat 3 voice-grade UTP

bull Uses four twisted-pair lines between nodesbull Data transmission uses three pairs in one direction at a

time

Star-wire topology Similar to 10BASE-T

5 DataLink Layer 5-25

Fast Ethernet

The original fast Ethernet cabling

5 DataLink Layer 5-26

Gbit Ethernet

uses standard Ethernet frame format allows for point-to-point links and shared

broadcast channels in shared mode CSMACD is used short

distances between nodes required for efficiency

uses hubs called here ldquoBuffered Distributorsrdquo Full-Duplex at 1 Gbps for point-to-point links 10 Gbps now

5 DataLink Layer 5-27

Gigabit Ethernet

Gigabit Ethernet cabling

5 DataLink Layer 5-28

Wireless Link CharacteristicsDifferences from wired link hellip

decreased signal strength radio signal attenuates as it propagates through matter (path loss)

interference from other sources standardized wireless network frequencies (eg 24 GHz) shared by other devices (eg phone) devices (motors) interfere as well

multipath propagation radio signal reflects off objects ground arriving ad destination at slightly different times

hellip make communication across (even a point to point) wireless link much more ldquodifficultrdquo

5 DataLink Layer 5-29

Wireless network characteristicsMultiple wireless senders and receivers create

additional problems (beyond multiple access)

AB

C

Hidden terminal problem B A hear each other B C hear each other A C can not hear each

othermeans A C unaware of their

interference at B

A B C

Arsquos signalstrength

space

Crsquos signalstrength

Signal fading B A hear each other B C hear each other A C can not hear each other

interferring at B

5 DataLink Layer 5-30

IEEE 80211 Wireless LAN

80211b 24-5 GHz unlicensed

radio spectrum up to 11 Mbps direct sequence

spread spectrum (DSSS) in physical layer

bull all hosts use same chipping code

widely deployed using base stations

80211a 5-6 GHz range up to 54 Mbps

80211g 24-5 GHz range up to 54 Mbps

All use CSMACA for multiple access

All have base-station and ad-hoc network versions

5 DataLink Layer 5-31

Figure 3-12

ISM bands

5 DataLink Layer 5-32

80211 LAN architecture

wireless host communicates with base station base station = access

point (AP) Basic Service Set (BSS)

(aka ldquocellrdquo) in infrastructure mode contains wireless hosts access point (AP) base

station ad hoc mode hosts

only

BSS 1

BSS 2

Internet

hub switchor routerAP

AP

5 DataLink Layer 5-33

80211 Channels association 80211b 24GHz-2485GHz spectrum divided

into 11 channels at different frequencies AP admin chooses frequency for AP interference possible channel can be same as

that chosen by neighboring AP host must associate with an AP

scans channels listening for beacon frames containing APrsquos name (SSID) and MAC address

selects AP to associate with may perform authentication [Chapter 8] will typically run DHCP to get IP address in

APrsquos subnet

5 DataLink Layer 5-34

IEEE 80211 multiple access avoid collisions 2+ nodes transmitting at same

time 80211 CSMA - sense before transmitting

donrsquot collide with ongoing transmission by other node

80211 no collision detection difficult to receive (sense collisions) when transmitting

due to weak received signals (fading) canrsquot sense all collisions in any case hidden terminal

fading goal avoid collisions CSMAC(ollision)A(voidance)

AB

CA B C

Arsquos signalstrength

space

Crsquos signalstrength

5 DataLink Layer 5-35

IEEE 80211 MAC Protocol CSMACA

80211 sender1 if sense channel idle for DIFS then

transmit entire frame (no CD)2 if sense channel busy then

start random backoff timetimer counts down while channel idletransmit when timer expiresif no ACK increase random backoff

interval repeat 2

80211 receiver- if frame received OK

return ACK after SIFS (ACK needed due to hidden terminal problem)

sender receiver

DIFS

data

SIFS

ACK

5 DataLink Layer 5-36

Avoiding collisions (more)

idea allow sender to ldquoreserverdquo channel rather than random access of data frames avoid collisions of long data frames

sender first transmits small request-to-send (RTS) packets to BS using CSMA RTSs may still collide with each other (but theyrsquore

short) BS broadcasts clear-to-send CTS in response to RTS RTS heard by all nodes

sender transmits data frame other stations defer transmissions

Avoid data frame collisions completely using small reservation packets

5 DataLink Layer 5-37

Collision Avoidance RTS-CTS exchange

APA B

time

RTS(A)RTS(B)

RTS(A)

CTS(A) CTS(A)

DATA (A)

ACK(A) ACK(A)

reservation collision

defer

5 DataLink Layer 5-38

Manchester encoding

Used in 10BaseT Each bit has a transition Allows clocks in sending and receiving nodes to

synchronize to each other no need for a centralized global clock among nodes

Hey this is physical-layer stuff

5 DataLink Layer 5-39

Link Layer

51 Introduction and services

52 Error detection and correction

53Multiple access protocols

54 Link-Layer Addressing

55 Ethernet

56 Interconnections Hubs and switches

57 PPP 58 Link Virtualization

ATM

5 DataLink Layer 5-40

HubsHubs are essentially physical-layer repeaters

bits coming from one link go out all other links at the same rate no frame buffering no CSMACD at hub adapters detect collisions provides net management functionality

twisted pair

hub

5 DataLink Layer 5-41

Interconnecting with hubs Backbone hub interconnects LAN segments Extends max distance between nodes But individual segment collision domains become one large

collision domain Canrsquot interconnect 10BaseT amp 100BaseT

hub

hubhub

hub

5 DataLink Layer 5-42

Inter - Networking

Hubs Bridges Switches Routers

5 DataLink Layer 5-43

Learning Bridges Do not forward when unnecessary Maintain forwarding table

HostPort

A 1 B 1 C 1 X 2 Y 2 Z 2

Learn table entries based on source address Table is an optimization need not be complete Always forward broadcast frames

A

Bridge

B C

X Y Z

Port 1

Port 2

5 DataLink Layer 5-44

Spanning Tree Algorithm Problem loops

Bridges run a distributed spanning tree algorithm select which bridges actively forward developed by Radia Perlman now IEEE 8021 specification

A

C

E

D

B

K

F

H

J

G

I

B3

B7

B4

B2

B5

B1

B6

(a) (b)

5 DataLink Layer 5-45

Algorithm Overview Each bridge has unique id (eg B1 B2

B3) Select bridge with smallest id as root Select bridge on each LAN closest to root

as designated bridge (use id to break ties) Each bridge forwards frames over each LAN for which it is the designated bridge

A

C

E

D

B

K

F

H

J

G

I

B5

B2

B3

B7

B4

B1

B6

5 DataLink Layer 5-46

Algorithm Details

Bridges exchange configuration messages id for bridge sending the message id for what the sending bridge believes to be

root bridge distance (hops) from sending bridge to root

bridge Each bridge records current best

configuration message for each port Initially each bridge believes it is the root

5 DataLink Layer 5-47

Algorithm Detail (cont) When learn not root stop generating config

messages in steady state only root generates configuration messages

When learn not designated bridge stop forwarding config messages in steady state only designated bridges forward config

messages

Root continues to periodically send config messages If any bridge does not receive config message after

a period of time it starts generating config messages claiming to be the root

5 DataLink Layer 5-48

Broadcast and Multicast Forward all broadcastmulticast frames

current practice Learn when no group members

downstream Accomplished by having each member of

group G send a frame to bridge multicast address with G in source field

5 DataLink Layer 5-49

Limitations of Bridges

Do not scale spanning tree algorithm does not scale broadcast does not scale

Do not accommodate heterogeneity

Caution beware of transparency

5 DataLink Layer 5-50

Switch link-layer device smarter than hubs take active

role store forward Ethernet frames examine incoming framersquos MAC address selectively

forward frame to one-or-more outgoing links when frame is to be forwarded on segment uses CSMACD to access segment

transparent hosts are unaware of presence of switches

plug-and-play self-learning switches do not need to be configured

5 DataLink Layer 5-51

Switch allows multiple simultaneous transmissions

hosts have dedicated direct connection to switch

switches buffer packets Ethernet protocol used on

each incoming link but no collisions full duplex each link is its own collision

domain switching A-to-Arsquo and B-

to-Brsquo simultaneously without collisions not possible with dumb hub

A

Arsquo

B

Brsquo

C

Crsquo

switch with six interfaces(123456)

1 23

45

6

5 DataLink Layer 5-52

Switch Table

Q how does switch know that Arsquo reachable via interface 4 Brsquo reachable via interface 5

A each switch has a switch table each entry (MAC address of host interface

to reach host time stamp)

looks like a routing table Q how are entries created

maintained in switch table something like a routing

protocol

A

Arsquo

B

Brsquo

C

Crsquo

switch with six interfaces(123456)

1 23

45

6

5 DataLink Layer 5-53

Switch self-learning

switch learns which hosts can be reached through which interfaces when frame received

switch ldquolearnsrdquo location of sender incoming LAN segment

records senderlocation pair in switch table

A

Arsquo

B

Brsquo

C

Crsquo

1 23

45

6

A Arsquo

Source ADest Arsquo

MAC addr interface TTL

Switch table (initially empty)

A 1 60

5 DataLink Layer 5-54

Forwarding

bull How do determine onto which LAN segment to forward framebull Looks like a routing problem

hub

hubhub

switch1

2 3

5 DataLink Layer 5-55

Self learning

A switch has a switch table entry in switch table

(MAC Address Interface Time Stamp) stale entries in table dropped (TTL can be 60

min) switch learns which hosts can be reached through

which interfaces when frame received switch ldquolearnsrdquo location

of sender incoming LAN segment records senderlocation pair in switch table

5 DataLink Layer 5-56

Self-learning forwarding example

A

Arsquo

B

Brsquo

C

Crsquo

1 23

45

6

A Arsquo

Source ADest Arsquo

MAC addr interface TTL

Switch table (initially empty)

A 1 60

A ArsquoA ArsquoA ArsquoA ArsquoA Arsquo

frame destination unknownflood

Arsquo A

destination A location known

Arsquo 4 60

selective send

5 DataLink Layer 5-57

FilteringForwardingWhen switch receives a frame

index switch table using MAC dest addressif entry found for destination

then if dest on segment from which frame arrived

then drop the frame else forward the frame on interface indicated else flood

forward on all but the interface on which the frame arrived

5 DataLink Layer 5-58

Switch example

Suppose C sends frame to D

Switch receives frame from from C notes in bridge table that C is on interface 1 because D is not in table switch forwards frame into

interfaces 2 and 3

frame received by D

hub

hub hub

switch

A

B CD

EF

G H

I

address interface

ABEG

1123

12 3

5 DataLink Layer 5-59

Switch example

Suppose D replies back with frame to C

Switch receives frame from from D notes in bridge table that D is on interface 2 because C is in table switch forwards frame only to

interface 1

frame received by C

hub

hub hub

switch

A

B CD

EF

G H

I

address interface

ABEGC

11231

5 DataLink Layer 5-60

Switch traffic isolation switch installation breaks subnet into LAN

segments switch filters packets

same-LAN-segment frames not usually forwarded onto other LAN segments

segments become separate collision domains

hub hub hub

switch

collision domain collision domain

collision domain

5 DataLink Layer 5-61

Switches dedicated access Switch with many

interfaces Hosts have direct

connection to switch No collisions full duplex

Switching A-to-Arsquo and B-to-Brsquo simultaneously no collisions

switch

A

Arsquo

B

Brsquo

C

Crsquo

5 DataLink Layer 5-62

More on Switches

cut-through switching frame forwarded from input to output port without first collecting entire frameslight reduction in latency

combinations of shareddedicated 101001000 Mbps interfaces

5 DataLink Layer 5-63

Institutional network

hub

hubhub

switch

to externalnetwork

router

IP subnet

mail server

web server

5 DataLink Layer 5-64

Switches vs Routers both store-and-forward devices

routers network layer devices (examine network layer headers) switches are link layer devices

routers maintain routing tables implement routing algorithms

switches maintain switch tables implement filtering learning algorithms

5 DataLink Layer 5-65

Summary comparison

hubs routers switches

traffi c isolation

no yes yes

plug amp play yes no yes

optimal routing

no yes no

cut through

yes no yes

5 DataLink Layer 5-66

IEEE 802 Standards

The 802 working groups The important ones are marked with The ones marked with are hibernating The one marked with dagger gave up

  • Slide 1
  • Link Layer
  • Ethernet
  • Slide 4
  • Star topology
  • Ethernet Frame Structure
  • Ethernet Frame Structure (more)
  • Unreliable connectionless service
  • Ethernet uses CSMACD
  • Ethernet CSMACD algorithm
  • Ethernetrsquos CSMACD (more)
  • Collision Detection
  • Algorithm (cont)
  • Binary Exponential Backoff
  • Ethernet MAC Sublayer Protocol (2)
  • CSMACD efficiency
  • Ethernet Performance
  • 8023 Ethernet Standards Link amp Physical Layers
  • Manchester encoding
  • Ethernet Cabling
  • Ethernet Cabling (2)
  • Ethernet Cabling (3)
  • 10BaseT and 100BaseT
  • 100Mbps Fast Ethernet
  • Fast Ethernet
  • Gbit Ethernet
  • Gigabit Ethernet
  • Wireless Link Characteristics
  • Wireless network characteristics
  • IEEE 80211 Wireless LAN
  • Slide 31
  • 80211 LAN architecture
  • 80211 Channels association
  • IEEE 80211 multiple access
  • IEEE 80211 MAC Protocol CSMACA
  • Avoiding collisions (more)
  • Collision Avoidance RTS-CTS exchange
  • Slide 38
  • Slide 39
  • Hubs
  • Interconnecting with hubs
  • Inter - Networking
  • Learning Bridges
  • Spanning Tree Algorithm
  • Algorithm Overview
  • Algorithm Details
  • Algorithm Detail (cont)
  • Broadcast and Multicast
  • Limitations of Bridges
  • Switch
  • Switch allows multiple simultaneous transmissions
  • Switch Table
  • Switch self-learning
  • Forwarding
  • Self learning
  • Self-learning forwarding example
  • FilteringForwarding
  • Switch example
  • Slide 59
  • Switch traffic isolation
  • Switches dedicated access
  • More on Switches
  • Institutional network
  • Switches vs Routers
  • Summary comparison
  • IEEE 802 Standards
Page 11: Chapter 5B

5 DataLink Layer 5-11

Ethernetrsquos CSMACD (more)

Jam Signal make sure all other transmitters are aware of collision 48 bits

Bit time 1 microsec for 10 Mbps Ethernet for K=1023 wait time is about 50 msec

Exponential Backoff Goal adapt retransmission

attempts to estimated current load heavy load random wait

will be longer first collision choose K

from 01 delay is K 512 bit transmission times

after second collision choose K from 0123hellip

after ten collisions choose K from 01234hellip1023

Seeinteract with Javaapplet on AWL Web sitehighly recommended

5 DataLink Layer 5-12

Collision Detection

On baseband bus collision produces much higher signal voltage than signal

Collision detected if cable signal greater than single station signal

Signal attenuated over distance Limit distance to 500m (10Base5) or 200m

(10Base2) For twisted pair (star-topology) activity on

more than one port is collision Special collision presence signal

5 DataLink Layer 5-13

Algorithm (cont)

If collisionhellip jam for 32 bits then stop transmitting frame minimum frame is 64 bytes (header + 46 bytes

of data) delay and try again

bull 1st time 0 or 512usbull 2nd time 0 512 or 1024usbull 3rd time512 1024 or 1536usbull nth time k x 512us for randomly selected

k=02n - 1bull give up after several tries (usually 16)bull exponential backoff

5 DataLink Layer 5-14

Binary Exponential Backoff

Attempt to transmit repeatedly if repeated collisions First 10 attempts mean value of random delay doubled Value then remains same for 6 further attempts After 16 unsuccessful attempts station gives up and

reports error As congestion increases stations back off by larger

amounts to reduce the probability of collision 1-persistent algorithm with binary exponential backoff

efficient over wide range of loads Low loads 1-persistence guarantees station can

seize channel once idle High loads at least as stable as other techniques

Backoff algorithm gives last-in first-out effect Stations with few collisions transmit first

5 DataLink Layer 5-15

Ethernet MAC Sublayer Protocol (2)

Collision detection can take as long as 2

5 DataLink Layer 5-16

CSMACD efficiency Tprop = max prop between 2 nodes in LAN

ttrans = time to transmit max-size frame

Efficiency goes to 1 as tprop goes to 0

Goes to 1 as ttrans goes to infinity Much better than ALOHA but still decentralized simple and cheap

transprop tt 51

1efficiency

5 DataLink Layer 5-17

Ethernet Performance

Efficiency of Ethernet at 10 Mbps with 512-bit slot times

5 DataLink Layer 5-18

8023 Ethernet Standards Link amp Physical Layers

many different Ethernet standards common MAC protocol and frame format different speeds 2 Mbps 10 Mbps 100

Mbps 1Gbps 10G bps different physical layer media fiber cable

applicationtransportnetwork

linkphysical

MAC protocoland frame format

100BASE-TX

100BASE-T4

100BASE-FX100BASE-T2

100BASE-SX 100BASE-BX

fiber physical layercopper (twisterpair) physical layer

5 DataLink Layer 5-19

Manchester encoding

used in 10BaseT each bit has a transition allows clocks in sending and receiving nodes to

synchronize to each other no need for a centralized global clock among nodes

Hey this is physical-layer stuff

5 DataLink Layer 5-20

Ethernet Cabling

The most common kinds of Ethernet cabling

5 DataLink Layer 5-21

Ethernet Cabling (2)

Three kinds of Ethernet cabling (a) 10Base5 (b) 10Base2 (c) 10Base-T

5 DataLink Layer 5-22

Ethernet Cabling (3)

Cable topologies (a) Linear (b) Spine (c) Tree (d) Segmented

5 DataLink Layer 5-23

10BaseT and 100BaseT 10100 Mbps rate latter called ldquofast ethernetrdquo T stands for Twisted Pair Nodes connect to a hub ldquostar topologyrdquo 100

m max distance between nodes and hub

twisted pair

hub

5 DataLink Layer 5-24

100Mbps Fast Ethernet

Use IEEE 8023 MAC protocol and frame format 100BASE-X use physical medium specifications

from FDDI Two physical links between nodes

bull Transmission and reception 100BASE-TX uses STP or Cat 5 UTP

bull May require new cable 100BASE-FX uses optical fiber 100BASE-T4 can use Cat 3 voice-grade UTP

bull Uses four twisted-pair lines between nodesbull Data transmission uses three pairs in one direction at a

time

Star-wire topology Similar to 10BASE-T

5 DataLink Layer 5-25

Fast Ethernet

The original fast Ethernet cabling

5 DataLink Layer 5-26

Gbit Ethernet

uses standard Ethernet frame format allows for point-to-point links and shared

broadcast channels in shared mode CSMACD is used short

distances between nodes required for efficiency

uses hubs called here ldquoBuffered Distributorsrdquo Full-Duplex at 1 Gbps for point-to-point links 10 Gbps now

5 DataLink Layer 5-27

Gigabit Ethernet

Gigabit Ethernet cabling

5 DataLink Layer 5-28

Wireless Link CharacteristicsDifferences from wired link hellip

decreased signal strength radio signal attenuates as it propagates through matter (path loss)

interference from other sources standardized wireless network frequencies (eg 24 GHz) shared by other devices (eg phone) devices (motors) interfere as well

multipath propagation radio signal reflects off objects ground arriving ad destination at slightly different times

hellip make communication across (even a point to point) wireless link much more ldquodifficultrdquo

5 DataLink Layer 5-29

Wireless network characteristicsMultiple wireless senders and receivers create

additional problems (beyond multiple access)

AB

C

Hidden terminal problem B A hear each other B C hear each other A C can not hear each

othermeans A C unaware of their

interference at B

A B C

Arsquos signalstrength

space

Crsquos signalstrength

Signal fading B A hear each other B C hear each other A C can not hear each other

interferring at B

5 DataLink Layer 5-30

IEEE 80211 Wireless LAN

80211b 24-5 GHz unlicensed

radio spectrum up to 11 Mbps direct sequence

spread spectrum (DSSS) in physical layer

bull all hosts use same chipping code

widely deployed using base stations

80211a 5-6 GHz range up to 54 Mbps

80211g 24-5 GHz range up to 54 Mbps

All use CSMACA for multiple access

All have base-station and ad-hoc network versions

5 DataLink Layer 5-31

Figure 3-12

ISM bands

5 DataLink Layer 5-32

80211 LAN architecture

wireless host communicates with base station base station = access

point (AP) Basic Service Set (BSS)

(aka ldquocellrdquo) in infrastructure mode contains wireless hosts access point (AP) base

station ad hoc mode hosts

only

BSS 1

BSS 2

Internet

hub switchor routerAP

AP

5 DataLink Layer 5-33

80211 Channels association 80211b 24GHz-2485GHz spectrum divided

into 11 channels at different frequencies AP admin chooses frequency for AP interference possible channel can be same as

that chosen by neighboring AP host must associate with an AP

scans channels listening for beacon frames containing APrsquos name (SSID) and MAC address

selects AP to associate with may perform authentication [Chapter 8] will typically run DHCP to get IP address in

APrsquos subnet

5 DataLink Layer 5-34

IEEE 80211 multiple access avoid collisions 2+ nodes transmitting at same

time 80211 CSMA - sense before transmitting

donrsquot collide with ongoing transmission by other node

80211 no collision detection difficult to receive (sense collisions) when transmitting

due to weak received signals (fading) canrsquot sense all collisions in any case hidden terminal

fading goal avoid collisions CSMAC(ollision)A(voidance)

AB

CA B C

Arsquos signalstrength

space

Crsquos signalstrength

5 DataLink Layer 5-35

IEEE 80211 MAC Protocol CSMACA

80211 sender1 if sense channel idle for DIFS then

transmit entire frame (no CD)2 if sense channel busy then

start random backoff timetimer counts down while channel idletransmit when timer expiresif no ACK increase random backoff

interval repeat 2

80211 receiver- if frame received OK

return ACK after SIFS (ACK needed due to hidden terminal problem)

sender receiver

DIFS

data

SIFS

ACK

5 DataLink Layer 5-36

Avoiding collisions (more)

idea allow sender to ldquoreserverdquo channel rather than random access of data frames avoid collisions of long data frames

sender first transmits small request-to-send (RTS) packets to BS using CSMA RTSs may still collide with each other (but theyrsquore

short) BS broadcasts clear-to-send CTS in response to RTS RTS heard by all nodes

sender transmits data frame other stations defer transmissions

Avoid data frame collisions completely using small reservation packets

5 DataLink Layer 5-37

Collision Avoidance RTS-CTS exchange

APA B

time

RTS(A)RTS(B)

RTS(A)

CTS(A) CTS(A)

DATA (A)

ACK(A) ACK(A)

reservation collision

defer

5 DataLink Layer 5-38

Manchester encoding

Used in 10BaseT Each bit has a transition Allows clocks in sending and receiving nodes to

synchronize to each other no need for a centralized global clock among nodes

Hey this is physical-layer stuff

5 DataLink Layer 5-39

Link Layer

51 Introduction and services

52 Error detection and correction

53Multiple access protocols

54 Link-Layer Addressing

55 Ethernet

56 Interconnections Hubs and switches

57 PPP 58 Link Virtualization

ATM

5 DataLink Layer 5-40

HubsHubs are essentially physical-layer repeaters

bits coming from one link go out all other links at the same rate no frame buffering no CSMACD at hub adapters detect collisions provides net management functionality

twisted pair

hub

5 DataLink Layer 5-41

Interconnecting with hubs Backbone hub interconnects LAN segments Extends max distance between nodes But individual segment collision domains become one large

collision domain Canrsquot interconnect 10BaseT amp 100BaseT

hub

hubhub

hub

5 DataLink Layer 5-42

Inter - Networking

Hubs Bridges Switches Routers

5 DataLink Layer 5-43

Learning Bridges Do not forward when unnecessary Maintain forwarding table

HostPort

A 1 B 1 C 1 X 2 Y 2 Z 2

Learn table entries based on source address Table is an optimization need not be complete Always forward broadcast frames

A

Bridge

B C

X Y Z

Port 1

Port 2

5 DataLink Layer 5-44

Spanning Tree Algorithm Problem loops

Bridges run a distributed spanning tree algorithm select which bridges actively forward developed by Radia Perlman now IEEE 8021 specification

A

C

E

D

B

K

F

H

J

G

I

B3

B7

B4

B2

B5

B1

B6

(a) (b)

5 DataLink Layer 5-45

Algorithm Overview Each bridge has unique id (eg B1 B2

B3) Select bridge with smallest id as root Select bridge on each LAN closest to root

as designated bridge (use id to break ties) Each bridge forwards frames over each LAN for which it is the designated bridge

A

C

E

D

B

K

F

H

J

G

I

B5

B2

B3

B7

B4

B1

B6

5 DataLink Layer 5-46

Algorithm Details

Bridges exchange configuration messages id for bridge sending the message id for what the sending bridge believes to be

root bridge distance (hops) from sending bridge to root

bridge Each bridge records current best

configuration message for each port Initially each bridge believes it is the root

5 DataLink Layer 5-47

Algorithm Detail (cont) When learn not root stop generating config

messages in steady state only root generates configuration messages

When learn not designated bridge stop forwarding config messages in steady state only designated bridges forward config

messages

Root continues to periodically send config messages If any bridge does not receive config message after

a period of time it starts generating config messages claiming to be the root

5 DataLink Layer 5-48

Broadcast and Multicast Forward all broadcastmulticast frames

current practice Learn when no group members

downstream Accomplished by having each member of

group G send a frame to bridge multicast address with G in source field

5 DataLink Layer 5-49

Limitations of Bridges

Do not scale spanning tree algorithm does not scale broadcast does not scale

Do not accommodate heterogeneity

Caution beware of transparency

5 DataLink Layer 5-50

Switch link-layer device smarter than hubs take active

role store forward Ethernet frames examine incoming framersquos MAC address selectively

forward frame to one-or-more outgoing links when frame is to be forwarded on segment uses CSMACD to access segment

transparent hosts are unaware of presence of switches

plug-and-play self-learning switches do not need to be configured

5 DataLink Layer 5-51

Switch allows multiple simultaneous transmissions

hosts have dedicated direct connection to switch

switches buffer packets Ethernet protocol used on

each incoming link but no collisions full duplex each link is its own collision

domain switching A-to-Arsquo and B-

to-Brsquo simultaneously without collisions not possible with dumb hub

A

Arsquo

B

Brsquo

C

Crsquo

switch with six interfaces(123456)

1 23

45

6

5 DataLink Layer 5-52

Switch Table

Q how does switch know that Arsquo reachable via interface 4 Brsquo reachable via interface 5

A each switch has a switch table each entry (MAC address of host interface

to reach host time stamp)

looks like a routing table Q how are entries created

maintained in switch table something like a routing

protocol

A

Arsquo

B

Brsquo

C

Crsquo

switch with six interfaces(123456)

1 23

45

6

5 DataLink Layer 5-53

Switch self-learning

switch learns which hosts can be reached through which interfaces when frame received

switch ldquolearnsrdquo location of sender incoming LAN segment

records senderlocation pair in switch table

A

Arsquo

B

Brsquo

C

Crsquo

1 23

45

6

A Arsquo

Source ADest Arsquo

MAC addr interface TTL

Switch table (initially empty)

A 1 60

5 DataLink Layer 5-54

Forwarding

bull How do determine onto which LAN segment to forward framebull Looks like a routing problem

hub

hubhub

switch1

2 3

5 DataLink Layer 5-55

Self learning

A switch has a switch table entry in switch table

(MAC Address Interface Time Stamp) stale entries in table dropped (TTL can be 60

min) switch learns which hosts can be reached through

which interfaces when frame received switch ldquolearnsrdquo location

of sender incoming LAN segment records senderlocation pair in switch table

5 DataLink Layer 5-56

Self-learning forwarding example

A

Arsquo

B

Brsquo

C

Crsquo

1 23

45

6

A Arsquo

Source ADest Arsquo

MAC addr interface TTL

Switch table (initially empty)

A 1 60

A ArsquoA ArsquoA ArsquoA ArsquoA Arsquo

frame destination unknownflood

Arsquo A

destination A location known

Arsquo 4 60

selective send

5 DataLink Layer 5-57

FilteringForwardingWhen switch receives a frame

index switch table using MAC dest addressif entry found for destination

then if dest on segment from which frame arrived

then drop the frame else forward the frame on interface indicated else flood

forward on all but the interface on which the frame arrived

5 DataLink Layer 5-58

Switch example

Suppose C sends frame to D

Switch receives frame from from C notes in bridge table that C is on interface 1 because D is not in table switch forwards frame into

interfaces 2 and 3

frame received by D

hub

hub hub

switch

A

B CD

EF

G H

I

address interface

ABEG

1123

12 3

5 DataLink Layer 5-59

Switch example

Suppose D replies back with frame to C

Switch receives frame from from D notes in bridge table that D is on interface 2 because C is in table switch forwards frame only to

interface 1

frame received by C

hub

hub hub

switch

A

B CD

EF

G H

I

address interface

ABEGC

11231

5 DataLink Layer 5-60

Switch traffic isolation switch installation breaks subnet into LAN

segments switch filters packets

same-LAN-segment frames not usually forwarded onto other LAN segments

segments become separate collision domains

hub hub hub

switch

collision domain collision domain

collision domain

5 DataLink Layer 5-61

Switches dedicated access Switch with many

interfaces Hosts have direct

connection to switch No collisions full duplex

Switching A-to-Arsquo and B-to-Brsquo simultaneously no collisions

switch

A

Arsquo

B

Brsquo

C

Crsquo

5 DataLink Layer 5-62

More on Switches

cut-through switching frame forwarded from input to output port without first collecting entire frameslight reduction in latency

combinations of shareddedicated 101001000 Mbps interfaces

5 DataLink Layer 5-63

Institutional network

hub

hubhub

switch

to externalnetwork

router

IP subnet

mail server

web server

5 DataLink Layer 5-64

Switches vs Routers both store-and-forward devices

routers network layer devices (examine network layer headers) switches are link layer devices

routers maintain routing tables implement routing algorithms

switches maintain switch tables implement filtering learning algorithms

5 DataLink Layer 5-65

Summary comparison

hubs routers switches

traffi c isolation

no yes yes

plug amp play yes no yes

optimal routing

no yes no

cut through

yes no yes

5 DataLink Layer 5-66

IEEE 802 Standards

The 802 working groups The important ones are marked with The ones marked with are hibernating The one marked with dagger gave up

  • Slide 1
  • Link Layer
  • Ethernet
  • Slide 4
  • Star topology
  • Ethernet Frame Structure
  • Ethernet Frame Structure (more)
  • Unreliable connectionless service
  • Ethernet uses CSMACD
  • Ethernet CSMACD algorithm
  • Ethernetrsquos CSMACD (more)
  • Collision Detection
  • Algorithm (cont)
  • Binary Exponential Backoff
  • Ethernet MAC Sublayer Protocol (2)
  • CSMACD efficiency
  • Ethernet Performance
  • 8023 Ethernet Standards Link amp Physical Layers
  • Manchester encoding
  • Ethernet Cabling
  • Ethernet Cabling (2)
  • Ethernet Cabling (3)
  • 10BaseT and 100BaseT
  • 100Mbps Fast Ethernet
  • Fast Ethernet
  • Gbit Ethernet
  • Gigabit Ethernet
  • Wireless Link Characteristics
  • Wireless network characteristics
  • IEEE 80211 Wireless LAN
  • Slide 31
  • 80211 LAN architecture
  • 80211 Channels association
  • IEEE 80211 multiple access
  • IEEE 80211 MAC Protocol CSMACA
  • Avoiding collisions (more)
  • Collision Avoidance RTS-CTS exchange
  • Slide 38
  • Slide 39
  • Hubs
  • Interconnecting with hubs
  • Inter - Networking
  • Learning Bridges
  • Spanning Tree Algorithm
  • Algorithm Overview
  • Algorithm Details
  • Algorithm Detail (cont)
  • Broadcast and Multicast
  • Limitations of Bridges
  • Switch
  • Switch allows multiple simultaneous transmissions
  • Switch Table
  • Switch self-learning
  • Forwarding
  • Self learning
  • Self-learning forwarding example
  • FilteringForwarding
  • Switch example
  • Slide 59
  • Switch traffic isolation
  • Switches dedicated access
  • More on Switches
  • Institutional network
  • Switches vs Routers
  • Summary comparison
  • IEEE 802 Standards
Page 12: Chapter 5B

5 DataLink Layer 5-12

Collision Detection

On baseband bus collision produces much higher signal voltage than signal

Collision detected if cable signal greater than single station signal

Signal attenuated over distance Limit distance to 500m (10Base5) or 200m

(10Base2) For twisted pair (star-topology) activity on

more than one port is collision Special collision presence signal

5 DataLink Layer 5-13

Algorithm (cont)

If collisionhellip jam for 32 bits then stop transmitting frame minimum frame is 64 bytes (header + 46 bytes

of data) delay and try again

bull 1st time 0 or 512usbull 2nd time 0 512 or 1024usbull 3rd time512 1024 or 1536usbull nth time k x 512us for randomly selected

k=02n - 1bull give up after several tries (usually 16)bull exponential backoff

5 DataLink Layer 5-14

Binary Exponential Backoff

Attempt to transmit repeatedly if repeated collisions First 10 attempts mean value of random delay doubled Value then remains same for 6 further attempts After 16 unsuccessful attempts station gives up and

reports error As congestion increases stations back off by larger

amounts to reduce the probability of collision 1-persistent algorithm with binary exponential backoff

efficient over wide range of loads Low loads 1-persistence guarantees station can

seize channel once idle High loads at least as stable as other techniques

Backoff algorithm gives last-in first-out effect Stations with few collisions transmit first

5 DataLink Layer 5-15

Ethernet MAC Sublayer Protocol (2)

Collision detection can take as long as 2

5 DataLink Layer 5-16

CSMACD efficiency Tprop = max prop between 2 nodes in LAN

ttrans = time to transmit max-size frame

Efficiency goes to 1 as tprop goes to 0

Goes to 1 as ttrans goes to infinity Much better than ALOHA but still decentralized simple and cheap

transprop tt 51

1efficiency

5 DataLink Layer 5-17

Ethernet Performance

Efficiency of Ethernet at 10 Mbps with 512-bit slot times

5 DataLink Layer 5-18

8023 Ethernet Standards Link amp Physical Layers

many different Ethernet standards common MAC protocol and frame format different speeds 2 Mbps 10 Mbps 100

Mbps 1Gbps 10G bps different physical layer media fiber cable

applicationtransportnetwork

linkphysical

MAC protocoland frame format

100BASE-TX

100BASE-T4

100BASE-FX100BASE-T2

100BASE-SX 100BASE-BX

fiber physical layercopper (twisterpair) physical layer

5 DataLink Layer 5-19

Manchester encoding

used in 10BaseT each bit has a transition allows clocks in sending and receiving nodes to

synchronize to each other no need for a centralized global clock among nodes

Hey this is physical-layer stuff

5 DataLink Layer 5-20

Ethernet Cabling

The most common kinds of Ethernet cabling

5 DataLink Layer 5-21

Ethernet Cabling (2)

Three kinds of Ethernet cabling (a) 10Base5 (b) 10Base2 (c) 10Base-T

5 DataLink Layer 5-22

Ethernet Cabling (3)

Cable topologies (a) Linear (b) Spine (c) Tree (d) Segmented

5 DataLink Layer 5-23

10BaseT and 100BaseT 10100 Mbps rate latter called ldquofast ethernetrdquo T stands for Twisted Pair Nodes connect to a hub ldquostar topologyrdquo 100

m max distance between nodes and hub

twisted pair

hub

5 DataLink Layer 5-24

100Mbps Fast Ethernet

Use IEEE 8023 MAC protocol and frame format 100BASE-X use physical medium specifications

from FDDI Two physical links between nodes

bull Transmission and reception 100BASE-TX uses STP or Cat 5 UTP

bull May require new cable 100BASE-FX uses optical fiber 100BASE-T4 can use Cat 3 voice-grade UTP

bull Uses four twisted-pair lines between nodesbull Data transmission uses three pairs in one direction at a

time

Star-wire topology Similar to 10BASE-T

5 DataLink Layer 5-25

Fast Ethernet

The original fast Ethernet cabling

5 DataLink Layer 5-26

Gbit Ethernet

uses standard Ethernet frame format allows for point-to-point links and shared

broadcast channels in shared mode CSMACD is used short

distances between nodes required for efficiency

uses hubs called here ldquoBuffered Distributorsrdquo Full-Duplex at 1 Gbps for point-to-point links 10 Gbps now

5 DataLink Layer 5-27

Gigabit Ethernet

Gigabit Ethernet cabling

5 DataLink Layer 5-28

Wireless Link CharacteristicsDifferences from wired link hellip

decreased signal strength radio signal attenuates as it propagates through matter (path loss)

interference from other sources standardized wireless network frequencies (eg 24 GHz) shared by other devices (eg phone) devices (motors) interfere as well

multipath propagation radio signal reflects off objects ground arriving ad destination at slightly different times

hellip make communication across (even a point to point) wireless link much more ldquodifficultrdquo

5 DataLink Layer 5-29

Wireless network characteristicsMultiple wireless senders and receivers create

additional problems (beyond multiple access)

AB

C

Hidden terminal problem B A hear each other B C hear each other A C can not hear each

othermeans A C unaware of their

interference at B

A B C

Arsquos signalstrength

space

Crsquos signalstrength

Signal fading B A hear each other B C hear each other A C can not hear each other

interferring at B

5 DataLink Layer 5-30

IEEE 80211 Wireless LAN

80211b 24-5 GHz unlicensed

radio spectrum up to 11 Mbps direct sequence

spread spectrum (DSSS) in physical layer

bull all hosts use same chipping code

widely deployed using base stations

80211a 5-6 GHz range up to 54 Mbps

80211g 24-5 GHz range up to 54 Mbps

All use CSMACA for multiple access

All have base-station and ad-hoc network versions

5 DataLink Layer 5-31

Figure 3-12

ISM bands

5 DataLink Layer 5-32

80211 LAN architecture

wireless host communicates with base station base station = access

point (AP) Basic Service Set (BSS)

(aka ldquocellrdquo) in infrastructure mode contains wireless hosts access point (AP) base

station ad hoc mode hosts

only

BSS 1

BSS 2

Internet

hub switchor routerAP

AP

5 DataLink Layer 5-33

80211 Channels association 80211b 24GHz-2485GHz spectrum divided

into 11 channels at different frequencies AP admin chooses frequency for AP interference possible channel can be same as

that chosen by neighboring AP host must associate with an AP

scans channels listening for beacon frames containing APrsquos name (SSID) and MAC address

selects AP to associate with may perform authentication [Chapter 8] will typically run DHCP to get IP address in

APrsquos subnet

5 DataLink Layer 5-34

IEEE 80211 multiple access avoid collisions 2+ nodes transmitting at same

time 80211 CSMA - sense before transmitting

donrsquot collide with ongoing transmission by other node

80211 no collision detection difficult to receive (sense collisions) when transmitting

due to weak received signals (fading) canrsquot sense all collisions in any case hidden terminal

fading goal avoid collisions CSMAC(ollision)A(voidance)

AB

CA B C

Arsquos signalstrength

space

Crsquos signalstrength

5 DataLink Layer 5-35

IEEE 80211 MAC Protocol CSMACA

80211 sender1 if sense channel idle for DIFS then

transmit entire frame (no CD)2 if sense channel busy then

start random backoff timetimer counts down while channel idletransmit when timer expiresif no ACK increase random backoff

interval repeat 2

80211 receiver- if frame received OK

return ACK after SIFS (ACK needed due to hidden terminal problem)

sender receiver

DIFS

data

SIFS

ACK

5 DataLink Layer 5-36

Avoiding collisions (more)

idea allow sender to ldquoreserverdquo channel rather than random access of data frames avoid collisions of long data frames

sender first transmits small request-to-send (RTS) packets to BS using CSMA RTSs may still collide with each other (but theyrsquore

short) BS broadcasts clear-to-send CTS in response to RTS RTS heard by all nodes

sender transmits data frame other stations defer transmissions

Avoid data frame collisions completely using small reservation packets

5 DataLink Layer 5-37

Collision Avoidance RTS-CTS exchange

APA B

time

RTS(A)RTS(B)

RTS(A)

CTS(A) CTS(A)

DATA (A)

ACK(A) ACK(A)

reservation collision

defer

5 DataLink Layer 5-38

Manchester encoding

Used in 10BaseT Each bit has a transition Allows clocks in sending and receiving nodes to

synchronize to each other no need for a centralized global clock among nodes

Hey this is physical-layer stuff

5 DataLink Layer 5-39

Link Layer

51 Introduction and services

52 Error detection and correction

53Multiple access protocols

54 Link-Layer Addressing

55 Ethernet

56 Interconnections Hubs and switches

57 PPP 58 Link Virtualization

ATM

5 DataLink Layer 5-40

HubsHubs are essentially physical-layer repeaters

bits coming from one link go out all other links at the same rate no frame buffering no CSMACD at hub adapters detect collisions provides net management functionality

twisted pair

hub

5 DataLink Layer 5-41

Interconnecting with hubs Backbone hub interconnects LAN segments Extends max distance between nodes But individual segment collision domains become one large

collision domain Canrsquot interconnect 10BaseT amp 100BaseT

hub

hubhub

hub

5 DataLink Layer 5-42

Inter - Networking

Hubs Bridges Switches Routers

5 DataLink Layer 5-43

Learning Bridges Do not forward when unnecessary Maintain forwarding table

HostPort

A 1 B 1 C 1 X 2 Y 2 Z 2

Learn table entries based on source address Table is an optimization need not be complete Always forward broadcast frames

A

Bridge

B C

X Y Z

Port 1

Port 2

5 DataLink Layer 5-44

Spanning Tree Algorithm Problem loops

Bridges run a distributed spanning tree algorithm select which bridges actively forward developed by Radia Perlman now IEEE 8021 specification

A

C

E

D

B

K

F

H

J

G

I

B3

B7

B4

B2

B5

B1

B6

(a) (b)

5 DataLink Layer 5-45

Algorithm Overview Each bridge has unique id (eg B1 B2

B3) Select bridge with smallest id as root Select bridge on each LAN closest to root

as designated bridge (use id to break ties) Each bridge forwards frames over each LAN for which it is the designated bridge

A

C

E

D

B

K

F

H

J

G

I

B5

B2

B3

B7

B4

B1

B6

5 DataLink Layer 5-46

Algorithm Details

Bridges exchange configuration messages id for bridge sending the message id for what the sending bridge believes to be

root bridge distance (hops) from sending bridge to root

bridge Each bridge records current best

configuration message for each port Initially each bridge believes it is the root

5 DataLink Layer 5-47

Algorithm Detail (cont) When learn not root stop generating config

messages in steady state only root generates configuration messages

When learn not designated bridge stop forwarding config messages in steady state only designated bridges forward config

messages

Root continues to periodically send config messages If any bridge does not receive config message after

a period of time it starts generating config messages claiming to be the root

5 DataLink Layer 5-48

Broadcast and Multicast Forward all broadcastmulticast frames

current practice Learn when no group members

downstream Accomplished by having each member of

group G send a frame to bridge multicast address with G in source field

5 DataLink Layer 5-49

Limitations of Bridges

Do not scale spanning tree algorithm does not scale broadcast does not scale

Do not accommodate heterogeneity

Caution beware of transparency

5 DataLink Layer 5-50

Switch link-layer device smarter than hubs take active

role store forward Ethernet frames examine incoming framersquos MAC address selectively

forward frame to one-or-more outgoing links when frame is to be forwarded on segment uses CSMACD to access segment

transparent hosts are unaware of presence of switches

plug-and-play self-learning switches do not need to be configured

5 DataLink Layer 5-51

Switch allows multiple simultaneous transmissions

hosts have dedicated direct connection to switch

switches buffer packets Ethernet protocol used on

each incoming link but no collisions full duplex each link is its own collision

domain switching A-to-Arsquo and B-

to-Brsquo simultaneously without collisions not possible with dumb hub

A

Arsquo

B

Brsquo

C

Crsquo

switch with six interfaces(123456)

1 23

45

6

5 DataLink Layer 5-52

Switch Table

Q how does switch know that Arsquo reachable via interface 4 Brsquo reachable via interface 5

A each switch has a switch table each entry (MAC address of host interface

to reach host time stamp)

looks like a routing table Q how are entries created

maintained in switch table something like a routing

protocol

A

Arsquo

B

Brsquo

C

Crsquo

switch with six interfaces(123456)

1 23

45

6

5 DataLink Layer 5-53

Switch self-learning

switch learns which hosts can be reached through which interfaces when frame received

switch ldquolearnsrdquo location of sender incoming LAN segment

records senderlocation pair in switch table

A

Arsquo

B

Brsquo

C

Crsquo

1 23

45

6

A Arsquo

Source ADest Arsquo

MAC addr interface TTL

Switch table (initially empty)

A 1 60

5 DataLink Layer 5-54

Forwarding

bull How do determine onto which LAN segment to forward framebull Looks like a routing problem

hub

hubhub

switch1

2 3

5 DataLink Layer 5-55

Self learning

A switch has a switch table entry in switch table

(MAC Address Interface Time Stamp) stale entries in table dropped (TTL can be 60

min) switch learns which hosts can be reached through

which interfaces when frame received switch ldquolearnsrdquo location

of sender incoming LAN segment records senderlocation pair in switch table

5 DataLink Layer 5-56

Self-learning forwarding example

A

Arsquo

B

Brsquo

C

Crsquo

1 23

45

6

A Arsquo

Source ADest Arsquo

MAC addr interface TTL

Switch table (initially empty)

A 1 60

A ArsquoA ArsquoA ArsquoA ArsquoA Arsquo

frame destination unknownflood

Arsquo A

destination A location known

Arsquo 4 60

selective send

5 DataLink Layer 5-57

FilteringForwardingWhen switch receives a frame

index switch table using MAC dest addressif entry found for destination

then if dest on segment from which frame arrived

then drop the frame else forward the frame on interface indicated else flood

forward on all but the interface on which the frame arrived

5 DataLink Layer 5-58

Switch example

Suppose C sends frame to D

Switch receives frame from from C notes in bridge table that C is on interface 1 because D is not in table switch forwards frame into

interfaces 2 and 3

frame received by D

hub

hub hub

switch

A

B CD

EF

G H

I

address interface

ABEG

1123

12 3

5 DataLink Layer 5-59

Switch example

Suppose D replies back with frame to C

Switch receives frame from from D notes in bridge table that D is on interface 2 because C is in table switch forwards frame only to

interface 1

frame received by C

hub

hub hub

switch

A

B CD

EF

G H

I

address interface

ABEGC

11231

5 DataLink Layer 5-60

Switch traffic isolation switch installation breaks subnet into LAN

segments switch filters packets

same-LAN-segment frames not usually forwarded onto other LAN segments

segments become separate collision domains

hub hub hub

switch

collision domain collision domain

collision domain

5 DataLink Layer 5-61

Switches dedicated access Switch with many

interfaces Hosts have direct

connection to switch No collisions full duplex

Switching A-to-Arsquo and B-to-Brsquo simultaneously no collisions

switch

A

Arsquo

B

Brsquo

C

Crsquo

5 DataLink Layer 5-62

More on Switches

cut-through switching frame forwarded from input to output port without first collecting entire frameslight reduction in latency

combinations of shareddedicated 101001000 Mbps interfaces

5 DataLink Layer 5-63

Institutional network

hub

hubhub

switch

to externalnetwork

router

IP subnet

mail server

web server

5 DataLink Layer 5-64

Switches vs Routers both store-and-forward devices

routers network layer devices (examine network layer headers) switches are link layer devices

routers maintain routing tables implement routing algorithms

switches maintain switch tables implement filtering learning algorithms

5 DataLink Layer 5-65

Summary comparison

hubs routers switches

traffi c isolation

no yes yes

plug amp play yes no yes

optimal routing

no yes no

cut through

yes no yes

5 DataLink Layer 5-66

IEEE 802 Standards

The 802 working groups The important ones are marked with The ones marked with are hibernating The one marked with dagger gave up

  • Slide 1
  • Link Layer
  • Ethernet
  • Slide 4
  • Star topology
  • Ethernet Frame Structure
  • Ethernet Frame Structure (more)
  • Unreliable connectionless service
  • Ethernet uses CSMACD
  • Ethernet CSMACD algorithm
  • Ethernetrsquos CSMACD (more)
  • Collision Detection
  • Algorithm (cont)
  • Binary Exponential Backoff
  • Ethernet MAC Sublayer Protocol (2)
  • CSMACD efficiency
  • Ethernet Performance
  • 8023 Ethernet Standards Link amp Physical Layers
  • Manchester encoding
  • Ethernet Cabling
  • Ethernet Cabling (2)
  • Ethernet Cabling (3)
  • 10BaseT and 100BaseT
  • 100Mbps Fast Ethernet
  • Fast Ethernet
  • Gbit Ethernet
  • Gigabit Ethernet
  • Wireless Link Characteristics
  • Wireless network characteristics
  • IEEE 80211 Wireless LAN
  • Slide 31
  • 80211 LAN architecture
  • 80211 Channels association
  • IEEE 80211 multiple access
  • IEEE 80211 MAC Protocol CSMACA
  • Avoiding collisions (more)
  • Collision Avoidance RTS-CTS exchange
  • Slide 38
  • Slide 39
  • Hubs
  • Interconnecting with hubs
  • Inter - Networking
  • Learning Bridges
  • Spanning Tree Algorithm
  • Algorithm Overview
  • Algorithm Details
  • Algorithm Detail (cont)
  • Broadcast and Multicast
  • Limitations of Bridges
  • Switch
  • Switch allows multiple simultaneous transmissions
  • Switch Table
  • Switch self-learning
  • Forwarding
  • Self learning
  • Self-learning forwarding example
  • FilteringForwarding
  • Switch example
  • Slide 59
  • Switch traffic isolation
  • Switches dedicated access
  • More on Switches
  • Institutional network
  • Switches vs Routers
  • Summary comparison
  • IEEE 802 Standards
Page 13: Chapter 5B

5 DataLink Layer 5-13

Algorithm (cont)

If collisionhellip jam for 32 bits then stop transmitting frame minimum frame is 64 bytes (header + 46 bytes

of data) delay and try again

bull 1st time 0 or 512usbull 2nd time 0 512 or 1024usbull 3rd time512 1024 or 1536usbull nth time k x 512us for randomly selected

k=02n - 1bull give up after several tries (usually 16)bull exponential backoff

5 DataLink Layer 5-14

Binary Exponential Backoff

Attempt to transmit repeatedly if repeated collisions First 10 attempts mean value of random delay doubled Value then remains same for 6 further attempts After 16 unsuccessful attempts station gives up and

reports error As congestion increases stations back off by larger

amounts to reduce the probability of collision 1-persistent algorithm with binary exponential backoff

efficient over wide range of loads Low loads 1-persistence guarantees station can

seize channel once idle High loads at least as stable as other techniques

Backoff algorithm gives last-in first-out effect Stations with few collisions transmit first

5 DataLink Layer 5-15

Ethernet MAC Sublayer Protocol (2)

Collision detection can take as long as 2

5 DataLink Layer 5-16

CSMACD efficiency Tprop = max prop between 2 nodes in LAN

ttrans = time to transmit max-size frame

Efficiency goes to 1 as tprop goes to 0

Goes to 1 as ttrans goes to infinity Much better than ALOHA but still decentralized simple and cheap

transprop tt 51

1efficiency

5 DataLink Layer 5-17

Ethernet Performance

Efficiency of Ethernet at 10 Mbps with 512-bit slot times

5 DataLink Layer 5-18

8023 Ethernet Standards Link amp Physical Layers

many different Ethernet standards common MAC protocol and frame format different speeds 2 Mbps 10 Mbps 100

Mbps 1Gbps 10G bps different physical layer media fiber cable

applicationtransportnetwork

linkphysical

MAC protocoland frame format

100BASE-TX

100BASE-T4

100BASE-FX100BASE-T2

100BASE-SX 100BASE-BX

fiber physical layercopper (twisterpair) physical layer

5 DataLink Layer 5-19

Manchester encoding

used in 10BaseT each bit has a transition allows clocks in sending and receiving nodes to

synchronize to each other no need for a centralized global clock among nodes

Hey this is physical-layer stuff

5 DataLink Layer 5-20

Ethernet Cabling

The most common kinds of Ethernet cabling

5 DataLink Layer 5-21

Ethernet Cabling (2)

Three kinds of Ethernet cabling (a) 10Base5 (b) 10Base2 (c) 10Base-T

5 DataLink Layer 5-22

Ethernet Cabling (3)

Cable topologies (a) Linear (b) Spine (c) Tree (d) Segmented

5 DataLink Layer 5-23

10BaseT and 100BaseT 10100 Mbps rate latter called ldquofast ethernetrdquo T stands for Twisted Pair Nodes connect to a hub ldquostar topologyrdquo 100

m max distance between nodes and hub

twisted pair

hub

5 DataLink Layer 5-24

100Mbps Fast Ethernet

Use IEEE 8023 MAC protocol and frame format 100BASE-X use physical medium specifications

from FDDI Two physical links between nodes

bull Transmission and reception 100BASE-TX uses STP or Cat 5 UTP

bull May require new cable 100BASE-FX uses optical fiber 100BASE-T4 can use Cat 3 voice-grade UTP

bull Uses four twisted-pair lines between nodesbull Data transmission uses three pairs in one direction at a

time

Star-wire topology Similar to 10BASE-T

5 DataLink Layer 5-25

Fast Ethernet

The original fast Ethernet cabling

5 DataLink Layer 5-26

Gbit Ethernet

uses standard Ethernet frame format allows for point-to-point links and shared

broadcast channels in shared mode CSMACD is used short

distances between nodes required for efficiency

uses hubs called here ldquoBuffered Distributorsrdquo Full-Duplex at 1 Gbps for point-to-point links 10 Gbps now

5 DataLink Layer 5-27

Gigabit Ethernet

Gigabit Ethernet cabling

5 DataLink Layer 5-28

Wireless Link CharacteristicsDifferences from wired link hellip

decreased signal strength radio signal attenuates as it propagates through matter (path loss)

interference from other sources standardized wireless network frequencies (eg 24 GHz) shared by other devices (eg phone) devices (motors) interfere as well

multipath propagation radio signal reflects off objects ground arriving ad destination at slightly different times

hellip make communication across (even a point to point) wireless link much more ldquodifficultrdquo

5 DataLink Layer 5-29

Wireless network characteristicsMultiple wireless senders and receivers create

additional problems (beyond multiple access)

AB

C

Hidden terminal problem B A hear each other B C hear each other A C can not hear each

othermeans A C unaware of their

interference at B

A B C

Arsquos signalstrength

space

Crsquos signalstrength

Signal fading B A hear each other B C hear each other A C can not hear each other

interferring at B

5 DataLink Layer 5-30

IEEE 80211 Wireless LAN

80211b 24-5 GHz unlicensed

radio spectrum up to 11 Mbps direct sequence

spread spectrum (DSSS) in physical layer

bull all hosts use same chipping code

widely deployed using base stations

80211a 5-6 GHz range up to 54 Mbps

80211g 24-5 GHz range up to 54 Mbps

All use CSMACA for multiple access

All have base-station and ad-hoc network versions

5 DataLink Layer 5-31

Figure 3-12

ISM bands

5 DataLink Layer 5-32

80211 LAN architecture

wireless host communicates with base station base station = access

point (AP) Basic Service Set (BSS)

(aka ldquocellrdquo) in infrastructure mode contains wireless hosts access point (AP) base

station ad hoc mode hosts

only

BSS 1

BSS 2

Internet

hub switchor routerAP

AP

5 DataLink Layer 5-33

80211 Channels association 80211b 24GHz-2485GHz spectrum divided

into 11 channels at different frequencies AP admin chooses frequency for AP interference possible channel can be same as

that chosen by neighboring AP host must associate with an AP

scans channels listening for beacon frames containing APrsquos name (SSID) and MAC address

selects AP to associate with may perform authentication [Chapter 8] will typically run DHCP to get IP address in

APrsquos subnet

5 DataLink Layer 5-34

IEEE 80211 multiple access avoid collisions 2+ nodes transmitting at same

time 80211 CSMA - sense before transmitting

donrsquot collide with ongoing transmission by other node

80211 no collision detection difficult to receive (sense collisions) when transmitting

due to weak received signals (fading) canrsquot sense all collisions in any case hidden terminal

fading goal avoid collisions CSMAC(ollision)A(voidance)

AB

CA B C

Arsquos signalstrength

space

Crsquos signalstrength

5 DataLink Layer 5-35

IEEE 80211 MAC Protocol CSMACA

80211 sender1 if sense channel idle for DIFS then

transmit entire frame (no CD)2 if sense channel busy then

start random backoff timetimer counts down while channel idletransmit when timer expiresif no ACK increase random backoff

interval repeat 2

80211 receiver- if frame received OK

return ACK after SIFS (ACK needed due to hidden terminal problem)

sender receiver

DIFS

data

SIFS

ACK

5 DataLink Layer 5-36

Avoiding collisions (more)

idea allow sender to ldquoreserverdquo channel rather than random access of data frames avoid collisions of long data frames

sender first transmits small request-to-send (RTS) packets to BS using CSMA RTSs may still collide with each other (but theyrsquore

short) BS broadcasts clear-to-send CTS in response to RTS RTS heard by all nodes

sender transmits data frame other stations defer transmissions

Avoid data frame collisions completely using small reservation packets

5 DataLink Layer 5-37

Collision Avoidance RTS-CTS exchange

APA B

time

RTS(A)RTS(B)

RTS(A)

CTS(A) CTS(A)

DATA (A)

ACK(A) ACK(A)

reservation collision

defer

5 DataLink Layer 5-38

Manchester encoding

Used in 10BaseT Each bit has a transition Allows clocks in sending and receiving nodes to

synchronize to each other no need for a centralized global clock among nodes

Hey this is physical-layer stuff

5 DataLink Layer 5-39

Link Layer

51 Introduction and services

52 Error detection and correction

53Multiple access protocols

54 Link-Layer Addressing

55 Ethernet

56 Interconnections Hubs and switches

57 PPP 58 Link Virtualization

ATM

5 DataLink Layer 5-40

HubsHubs are essentially physical-layer repeaters

bits coming from one link go out all other links at the same rate no frame buffering no CSMACD at hub adapters detect collisions provides net management functionality

twisted pair

hub

5 DataLink Layer 5-41

Interconnecting with hubs Backbone hub interconnects LAN segments Extends max distance between nodes But individual segment collision domains become one large

collision domain Canrsquot interconnect 10BaseT amp 100BaseT

hub

hubhub

hub

5 DataLink Layer 5-42

Inter - Networking

Hubs Bridges Switches Routers

5 DataLink Layer 5-43

Learning Bridges Do not forward when unnecessary Maintain forwarding table

HostPort

A 1 B 1 C 1 X 2 Y 2 Z 2

Learn table entries based on source address Table is an optimization need not be complete Always forward broadcast frames

A

Bridge

B C

X Y Z

Port 1

Port 2

5 DataLink Layer 5-44

Spanning Tree Algorithm Problem loops

Bridges run a distributed spanning tree algorithm select which bridges actively forward developed by Radia Perlman now IEEE 8021 specification

A

C

E

D

B

K

F

H

J

G

I

B3

B7

B4

B2

B5

B1

B6

(a) (b)

5 DataLink Layer 5-45

Algorithm Overview Each bridge has unique id (eg B1 B2

B3) Select bridge with smallest id as root Select bridge on each LAN closest to root

as designated bridge (use id to break ties) Each bridge forwards frames over each LAN for which it is the designated bridge

A

C

E

D

B

K

F

H

J

G

I

B5

B2

B3

B7

B4

B1

B6

5 DataLink Layer 5-46

Algorithm Details

Bridges exchange configuration messages id for bridge sending the message id for what the sending bridge believes to be

root bridge distance (hops) from sending bridge to root

bridge Each bridge records current best

configuration message for each port Initially each bridge believes it is the root

5 DataLink Layer 5-47

Algorithm Detail (cont) When learn not root stop generating config

messages in steady state only root generates configuration messages

When learn not designated bridge stop forwarding config messages in steady state only designated bridges forward config

messages

Root continues to periodically send config messages If any bridge does not receive config message after

a period of time it starts generating config messages claiming to be the root

5 DataLink Layer 5-48

Broadcast and Multicast Forward all broadcastmulticast frames

current practice Learn when no group members

downstream Accomplished by having each member of

group G send a frame to bridge multicast address with G in source field

5 DataLink Layer 5-49

Limitations of Bridges

Do not scale spanning tree algorithm does not scale broadcast does not scale

Do not accommodate heterogeneity

Caution beware of transparency

5 DataLink Layer 5-50

Switch link-layer device smarter than hubs take active

role store forward Ethernet frames examine incoming framersquos MAC address selectively

forward frame to one-or-more outgoing links when frame is to be forwarded on segment uses CSMACD to access segment

transparent hosts are unaware of presence of switches

plug-and-play self-learning switches do not need to be configured

5 DataLink Layer 5-51

Switch allows multiple simultaneous transmissions

hosts have dedicated direct connection to switch

switches buffer packets Ethernet protocol used on

each incoming link but no collisions full duplex each link is its own collision

domain switching A-to-Arsquo and B-

to-Brsquo simultaneously without collisions not possible with dumb hub

A

Arsquo

B

Brsquo

C

Crsquo

switch with six interfaces(123456)

1 23

45

6

5 DataLink Layer 5-52

Switch Table

Q how does switch know that Arsquo reachable via interface 4 Brsquo reachable via interface 5

A each switch has a switch table each entry (MAC address of host interface

to reach host time stamp)

looks like a routing table Q how are entries created

maintained in switch table something like a routing

protocol

A

Arsquo

B

Brsquo

C

Crsquo

switch with six interfaces(123456)

1 23

45

6

5 DataLink Layer 5-53

Switch self-learning

switch learns which hosts can be reached through which interfaces when frame received

switch ldquolearnsrdquo location of sender incoming LAN segment

records senderlocation pair in switch table

A

Arsquo

B

Brsquo

C

Crsquo

1 23

45

6

A Arsquo

Source ADest Arsquo

MAC addr interface TTL

Switch table (initially empty)

A 1 60

5 DataLink Layer 5-54

Forwarding

bull How do determine onto which LAN segment to forward framebull Looks like a routing problem

hub

hubhub

switch1

2 3

5 DataLink Layer 5-55

Self learning

A switch has a switch table entry in switch table

(MAC Address Interface Time Stamp) stale entries in table dropped (TTL can be 60

min) switch learns which hosts can be reached through

which interfaces when frame received switch ldquolearnsrdquo location

of sender incoming LAN segment records senderlocation pair in switch table

5 DataLink Layer 5-56

Self-learning forwarding example

A

Arsquo

B

Brsquo

C

Crsquo

1 23

45

6

A Arsquo

Source ADest Arsquo

MAC addr interface TTL

Switch table (initially empty)

A 1 60

A ArsquoA ArsquoA ArsquoA ArsquoA Arsquo

frame destination unknownflood

Arsquo A

destination A location known

Arsquo 4 60

selective send

5 DataLink Layer 5-57

FilteringForwardingWhen switch receives a frame

index switch table using MAC dest addressif entry found for destination

then if dest on segment from which frame arrived

then drop the frame else forward the frame on interface indicated else flood

forward on all but the interface on which the frame arrived

5 DataLink Layer 5-58

Switch example

Suppose C sends frame to D

Switch receives frame from from C notes in bridge table that C is on interface 1 because D is not in table switch forwards frame into

interfaces 2 and 3

frame received by D

hub

hub hub

switch

A

B CD

EF

G H

I

address interface

ABEG

1123

12 3

5 DataLink Layer 5-59

Switch example

Suppose D replies back with frame to C

Switch receives frame from from D notes in bridge table that D is on interface 2 because C is in table switch forwards frame only to

interface 1

frame received by C

hub

hub hub

switch

A

B CD

EF

G H

I

address interface

ABEGC

11231

5 DataLink Layer 5-60

Switch traffic isolation switch installation breaks subnet into LAN

segments switch filters packets

same-LAN-segment frames not usually forwarded onto other LAN segments

segments become separate collision domains

hub hub hub

switch

collision domain collision domain

collision domain

5 DataLink Layer 5-61

Switches dedicated access Switch with many

interfaces Hosts have direct

connection to switch No collisions full duplex

Switching A-to-Arsquo and B-to-Brsquo simultaneously no collisions

switch

A

Arsquo

B

Brsquo

C

Crsquo

5 DataLink Layer 5-62

More on Switches

cut-through switching frame forwarded from input to output port without first collecting entire frameslight reduction in latency

combinations of shareddedicated 101001000 Mbps interfaces

5 DataLink Layer 5-63

Institutional network

hub

hubhub

switch

to externalnetwork

router

IP subnet

mail server

web server

5 DataLink Layer 5-64

Switches vs Routers both store-and-forward devices

routers network layer devices (examine network layer headers) switches are link layer devices

routers maintain routing tables implement routing algorithms

switches maintain switch tables implement filtering learning algorithms

5 DataLink Layer 5-65

Summary comparison

hubs routers switches

traffi c isolation

no yes yes

plug amp play yes no yes

optimal routing

no yes no

cut through

yes no yes

5 DataLink Layer 5-66

IEEE 802 Standards

The 802 working groups The important ones are marked with The ones marked with are hibernating The one marked with dagger gave up

  • Slide 1
  • Link Layer
  • Ethernet
  • Slide 4
  • Star topology
  • Ethernet Frame Structure
  • Ethernet Frame Structure (more)
  • Unreliable connectionless service
  • Ethernet uses CSMACD
  • Ethernet CSMACD algorithm
  • Ethernetrsquos CSMACD (more)
  • Collision Detection
  • Algorithm (cont)
  • Binary Exponential Backoff
  • Ethernet MAC Sublayer Protocol (2)
  • CSMACD efficiency
  • Ethernet Performance
  • 8023 Ethernet Standards Link amp Physical Layers
  • Manchester encoding
  • Ethernet Cabling
  • Ethernet Cabling (2)
  • Ethernet Cabling (3)
  • 10BaseT and 100BaseT
  • 100Mbps Fast Ethernet
  • Fast Ethernet
  • Gbit Ethernet
  • Gigabit Ethernet
  • Wireless Link Characteristics
  • Wireless network characteristics
  • IEEE 80211 Wireless LAN
  • Slide 31
  • 80211 LAN architecture
  • 80211 Channels association
  • IEEE 80211 multiple access
  • IEEE 80211 MAC Protocol CSMACA
  • Avoiding collisions (more)
  • Collision Avoidance RTS-CTS exchange
  • Slide 38
  • Slide 39
  • Hubs
  • Interconnecting with hubs
  • Inter - Networking
  • Learning Bridges
  • Spanning Tree Algorithm
  • Algorithm Overview
  • Algorithm Details
  • Algorithm Detail (cont)
  • Broadcast and Multicast
  • Limitations of Bridges
  • Switch
  • Switch allows multiple simultaneous transmissions
  • Switch Table
  • Switch self-learning
  • Forwarding
  • Self learning
  • Self-learning forwarding example
  • FilteringForwarding
  • Switch example
  • Slide 59
  • Switch traffic isolation
  • Switches dedicated access
  • More on Switches
  • Institutional network
  • Switches vs Routers
  • Summary comparison
  • IEEE 802 Standards
Page 14: Chapter 5B

5 DataLink Layer 5-14

Binary Exponential Backoff

Attempt to transmit repeatedly if repeated collisions First 10 attempts mean value of random delay doubled Value then remains same for 6 further attempts After 16 unsuccessful attempts station gives up and

reports error As congestion increases stations back off by larger

amounts to reduce the probability of collision 1-persistent algorithm with binary exponential backoff

efficient over wide range of loads Low loads 1-persistence guarantees station can

seize channel once idle High loads at least as stable as other techniques

Backoff algorithm gives last-in first-out effect Stations with few collisions transmit first

5 DataLink Layer 5-15

Ethernet MAC Sublayer Protocol (2)

Collision detection can take as long as 2

5 DataLink Layer 5-16

CSMACD efficiency Tprop = max prop between 2 nodes in LAN

ttrans = time to transmit max-size frame

Efficiency goes to 1 as tprop goes to 0

Goes to 1 as ttrans goes to infinity Much better than ALOHA but still decentralized simple and cheap

transprop tt 51

1efficiency

5 DataLink Layer 5-17

Ethernet Performance

Efficiency of Ethernet at 10 Mbps with 512-bit slot times

5 DataLink Layer 5-18

8023 Ethernet Standards Link amp Physical Layers

many different Ethernet standards common MAC protocol and frame format different speeds 2 Mbps 10 Mbps 100

Mbps 1Gbps 10G bps different physical layer media fiber cable

applicationtransportnetwork

linkphysical

MAC protocoland frame format

100BASE-TX

100BASE-T4

100BASE-FX100BASE-T2

100BASE-SX 100BASE-BX

fiber physical layercopper (twisterpair) physical layer

5 DataLink Layer 5-19

Manchester encoding

used in 10BaseT each bit has a transition allows clocks in sending and receiving nodes to

synchronize to each other no need for a centralized global clock among nodes

Hey this is physical-layer stuff

5 DataLink Layer 5-20

Ethernet Cabling

The most common kinds of Ethernet cabling

5 DataLink Layer 5-21

Ethernet Cabling (2)

Three kinds of Ethernet cabling (a) 10Base5 (b) 10Base2 (c) 10Base-T

5 DataLink Layer 5-22

Ethernet Cabling (3)

Cable topologies (a) Linear (b) Spine (c) Tree (d) Segmented

5 DataLink Layer 5-23

10BaseT and 100BaseT 10100 Mbps rate latter called ldquofast ethernetrdquo T stands for Twisted Pair Nodes connect to a hub ldquostar topologyrdquo 100

m max distance between nodes and hub

twisted pair

hub

5 DataLink Layer 5-24

100Mbps Fast Ethernet

Use IEEE 8023 MAC protocol and frame format 100BASE-X use physical medium specifications

from FDDI Two physical links between nodes

bull Transmission and reception 100BASE-TX uses STP or Cat 5 UTP

bull May require new cable 100BASE-FX uses optical fiber 100BASE-T4 can use Cat 3 voice-grade UTP

bull Uses four twisted-pair lines between nodesbull Data transmission uses three pairs in one direction at a

time

Star-wire topology Similar to 10BASE-T

5 DataLink Layer 5-25

Fast Ethernet

The original fast Ethernet cabling

5 DataLink Layer 5-26

Gbit Ethernet

uses standard Ethernet frame format allows for point-to-point links and shared

broadcast channels in shared mode CSMACD is used short

distances between nodes required for efficiency

uses hubs called here ldquoBuffered Distributorsrdquo Full-Duplex at 1 Gbps for point-to-point links 10 Gbps now

5 DataLink Layer 5-27

Gigabit Ethernet

Gigabit Ethernet cabling

5 DataLink Layer 5-28

Wireless Link CharacteristicsDifferences from wired link hellip

decreased signal strength radio signal attenuates as it propagates through matter (path loss)

interference from other sources standardized wireless network frequencies (eg 24 GHz) shared by other devices (eg phone) devices (motors) interfere as well

multipath propagation radio signal reflects off objects ground arriving ad destination at slightly different times

hellip make communication across (even a point to point) wireless link much more ldquodifficultrdquo

5 DataLink Layer 5-29

Wireless network characteristicsMultiple wireless senders and receivers create

additional problems (beyond multiple access)

AB

C

Hidden terminal problem B A hear each other B C hear each other A C can not hear each

othermeans A C unaware of their

interference at B

A B C

Arsquos signalstrength

space

Crsquos signalstrength

Signal fading B A hear each other B C hear each other A C can not hear each other

interferring at B

5 DataLink Layer 5-30

IEEE 80211 Wireless LAN

80211b 24-5 GHz unlicensed

radio spectrum up to 11 Mbps direct sequence

spread spectrum (DSSS) in physical layer

bull all hosts use same chipping code

widely deployed using base stations

80211a 5-6 GHz range up to 54 Mbps

80211g 24-5 GHz range up to 54 Mbps

All use CSMACA for multiple access

All have base-station and ad-hoc network versions

5 DataLink Layer 5-31

Figure 3-12

ISM bands

5 DataLink Layer 5-32

80211 LAN architecture

wireless host communicates with base station base station = access

point (AP) Basic Service Set (BSS)

(aka ldquocellrdquo) in infrastructure mode contains wireless hosts access point (AP) base

station ad hoc mode hosts

only

BSS 1

BSS 2

Internet

hub switchor routerAP

AP

5 DataLink Layer 5-33

80211 Channels association 80211b 24GHz-2485GHz spectrum divided

into 11 channels at different frequencies AP admin chooses frequency for AP interference possible channel can be same as

that chosen by neighboring AP host must associate with an AP

scans channels listening for beacon frames containing APrsquos name (SSID) and MAC address

selects AP to associate with may perform authentication [Chapter 8] will typically run DHCP to get IP address in

APrsquos subnet

5 DataLink Layer 5-34

IEEE 80211 multiple access avoid collisions 2+ nodes transmitting at same

time 80211 CSMA - sense before transmitting

donrsquot collide with ongoing transmission by other node

80211 no collision detection difficult to receive (sense collisions) when transmitting

due to weak received signals (fading) canrsquot sense all collisions in any case hidden terminal

fading goal avoid collisions CSMAC(ollision)A(voidance)

AB

CA B C

Arsquos signalstrength

space

Crsquos signalstrength

5 DataLink Layer 5-35

IEEE 80211 MAC Protocol CSMACA

80211 sender1 if sense channel idle for DIFS then

transmit entire frame (no CD)2 if sense channel busy then

start random backoff timetimer counts down while channel idletransmit when timer expiresif no ACK increase random backoff

interval repeat 2

80211 receiver- if frame received OK

return ACK after SIFS (ACK needed due to hidden terminal problem)

sender receiver

DIFS

data

SIFS

ACK

5 DataLink Layer 5-36

Avoiding collisions (more)

idea allow sender to ldquoreserverdquo channel rather than random access of data frames avoid collisions of long data frames

sender first transmits small request-to-send (RTS) packets to BS using CSMA RTSs may still collide with each other (but theyrsquore

short) BS broadcasts clear-to-send CTS in response to RTS RTS heard by all nodes

sender transmits data frame other stations defer transmissions

Avoid data frame collisions completely using small reservation packets

5 DataLink Layer 5-37

Collision Avoidance RTS-CTS exchange

APA B

time

RTS(A)RTS(B)

RTS(A)

CTS(A) CTS(A)

DATA (A)

ACK(A) ACK(A)

reservation collision

defer

5 DataLink Layer 5-38

Manchester encoding

Used in 10BaseT Each bit has a transition Allows clocks in sending and receiving nodes to

synchronize to each other no need for a centralized global clock among nodes

Hey this is physical-layer stuff

5 DataLink Layer 5-39

Link Layer

51 Introduction and services

52 Error detection and correction

53Multiple access protocols

54 Link-Layer Addressing

55 Ethernet

56 Interconnections Hubs and switches

57 PPP 58 Link Virtualization

ATM

5 DataLink Layer 5-40

HubsHubs are essentially physical-layer repeaters

bits coming from one link go out all other links at the same rate no frame buffering no CSMACD at hub adapters detect collisions provides net management functionality

twisted pair

hub

5 DataLink Layer 5-41

Interconnecting with hubs Backbone hub interconnects LAN segments Extends max distance between nodes But individual segment collision domains become one large

collision domain Canrsquot interconnect 10BaseT amp 100BaseT

hub

hubhub

hub

5 DataLink Layer 5-42

Inter - Networking

Hubs Bridges Switches Routers

5 DataLink Layer 5-43

Learning Bridges Do not forward when unnecessary Maintain forwarding table

HostPort

A 1 B 1 C 1 X 2 Y 2 Z 2

Learn table entries based on source address Table is an optimization need not be complete Always forward broadcast frames

A

Bridge

B C

X Y Z

Port 1

Port 2

5 DataLink Layer 5-44

Spanning Tree Algorithm Problem loops

Bridges run a distributed spanning tree algorithm select which bridges actively forward developed by Radia Perlman now IEEE 8021 specification

A

C

E

D

B

K

F

H

J

G

I

B3

B7

B4

B2

B5

B1

B6

(a) (b)

5 DataLink Layer 5-45

Algorithm Overview Each bridge has unique id (eg B1 B2

B3) Select bridge with smallest id as root Select bridge on each LAN closest to root

as designated bridge (use id to break ties) Each bridge forwards frames over each LAN for which it is the designated bridge

A

C

E

D

B

K

F

H

J

G

I

B5

B2

B3

B7

B4

B1

B6

5 DataLink Layer 5-46

Algorithm Details

Bridges exchange configuration messages id for bridge sending the message id for what the sending bridge believes to be

root bridge distance (hops) from sending bridge to root

bridge Each bridge records current best

configuration message for each port Initially each bridge believes it is the root

5 DataLink Layer 5-47

Algorithm Detail (cont) When learn not root stop generating config

messages in steady state only root generates configuration messages

When learn not designated bridge stop forwarding config messages in steady state only designated bridges forward config

messages

Root continues to periodically send config messages If any bridge does not receive config message after

a period of time it starts generating config messages claiming to be the root

5 DataLink Layer 5-48

Broadcast and Multicast Forward all broadcastmulticast frames

current practice Learn when no group members

downstream Accomplished by having each member of

group G send a frame to bridge multicast address with G in source field

5 DataLink Layer 5-49

Limitations of Bridges

Do not scale spanning tree algorithm does not scale broadcast does not scale

Do not accommodate heterogeneity

Caution beware of transparency

5 DataLink Layer 5-50

Switch link-layer device smarter than hubs take active

role store forward Ethernet frames examine incoming framersquos MAC address selectively

forward frame to one-or-more outgoing links when frame is to be forwarded on segment uses CSMACD to access segment

transparent hosts are unaware of presence of switches

plug-and-play self-learning switches do not need to be configured

5 DataLink Layer 5-51

Switch allows multiple simultaneous transmissions

hosts have dedicated direct connection to switch

switches buffer packets Ethernet protocol used on

each incoming link but no collisions full duplex each link is its own collision

domain switching A-to-Arsquo and B-

to-Brsquo simultaneously without collisions not possible with dumb hub

A

Arsquo

B

Brsquo

C

Crsquo

switch with six interfaces(123456)

1 23

45

6

5 DataLink Layer 5-52

Switch Table

Q how does switch know that Arsquo reachable via interface 4 Brsquo reachable via interface 5

A each switch has a switch table each entry (MAC address of host interface

to reach host time stamp)

looks like a routing table Q how are entries created

maintained in switch table something like a routing

protocol

A

Arsquo

B

Brsquo

C

Crsquo

switch with six interfaces(123456)

1 23

45

6

5 DataLink Layer 5-53

Switch self-learning

switch learns which hosts can be reached through which interfaces when frame received

switch ldquolearnsrdquo location of sender incoming LAN segment

records senderlocation pair in switch table

A

Arsquo

B

Brsquo

C

Crsquo

1 23

45

6

A Arsquo

Source ADest Arsquo

MAC addr interface TTL

Switch table (initially empty)

A 1 60

5 DataLink Layer 5-54

Forwarding

bull How do determine onto which LAN segment to forward framebull Looks like a routing problem

hub

hubhub

switch1

2 3

5 DataLink Layer 5-55

Self learning

A switch has a switch table entry in switch table

(MAC Address Interface Time Stamp) stale entries in table dropped (TTL can be 60

min) switch learns which hosts can be reached through

which interfaces when frame received switch ldquolearnsrdquo location

of sender incoming LAN segment records senderlocation pair in switch table

5 DataLink Layer 5-56

Self-learning forwarding example

A

Arsquo

B

Brsquo

C

Crsquo

1 23

45

6

A Arsquo

Source ADest Arsquo

MAC addr interface TTL

Switch table (initially empty)

A 1 60

A ArsquoA ArsquoA ArsquoA ArsquoA Arsquo

frame destination unknownflood

Arsquo A

destination A location known

Arsquo 4 60

selective send

5 DataLink Layer 5-57

FilteringForwardingWhen switch receives a frame

index switch table using MAC dest addressif entry found for destination

then if dest on segment from which frame arrived

then drop the frame else forward the frame on interface indicated else flood

forward on all but the interface on which the frame arrived

5 DataLink Layer 5-58

Switch example

Suppose C sends frame to D

Switch receives frame from from C notes in bridge table that C is on interface 1 because D is not in table switch forwards frame into

interfaces 2 and 3

frame received by D

hub

hub hub

switch

A

B CD

EF

G H

I

address interface

ABEG

1123

12 3

5 DataLink Layer 5-59

Switch example

Suppose D replies back with frame to C

Switch receives frame from from D notes in bridge table that D is on interface 2 because C is in table switch forwards frame only to

interface 1

frame received by C

hub

hub hub

switch

A

B CD

EF

G H

I

address interface

ABEGC

11231

5 DataLink Layer 5-60

Switch traffic isolation switch installation breaks subnet into LAN

segments switch filters packets

same-LAN-segment frames not usually forwarded onto other LAN segments

segments become separate collision domains

hub hub hub

switch

collision domain collision domain

collision domain

5 DataLink Layer 5-61

Switches dedicated access Switch with many

interfaces Hosts have direct

connection to switch No collisions full duplex

Switching A-to-Arsquo and B-to-Brsquo simultaneously no collisions

switch

A

Arsquo

B

Brsquo

C

Crsquo

5 DataLink Layer 5-62

More on Switches

cut-through switching frame forwarded from input to output port without first collecting entire frameslight reduction in latency

combinations of shareddedicated 101001000 Mbps interfaces

5 DataLink Layer 5-63

Institutional network

hub

hubhub

switch

to externalnetwork

router

IP subnet

mail server

web server

5 DataLink Layer 5-64

Switches vs Routers both store-and-forward devices

routers network layer devices (examine network layer headers) switches are link layer devices

routers maintain routing tables implement routing algorithms

switches maintain switch tables implement filtering learning algorithms

5 DataLink Layer 5-65

Summary comparison

hubs routers switches

traffi c isolation

no yes yes

plug amp play yes no yes

optimal routing

no yes no

cut through

yes no yes

5 DataLink Layer 5-66

IEEE 802 Standards

The 802 working groups The important ones are marked with The ones marked with are hibernating The one marked with dagger gave up

  • Slide 1
  • Link Layer
  • Ethernet
  • Slide 4
  • Star topology
  • Ethernet Frame Structure
  • Ethernet Frame Structure (more)
  • Unreliable connectionless service
  • Ethernet uses CSMACD
  • Ethernet CSMACD algorithm
  • Ethernetrsquos CSMACD (more)
  • Collision Detection
  • Algorithm (cont)
  • Binary Exponential Backoff
  • Ethernet MAC Sublayer Protocol (2)
  • CSMACD efficiency
  • Ethernet Performance
  • 8023 Ethernet Standards Link amp Physical Layers
  • Manchester encoding
  • Ethernet Cabling
  • Ethernet Cabling (2)
  • Ethernet Cabling (3)
  • 10BaseT and 100BaseT
  • 100Mbps Fast Ethernet
  • Fast Ethernet
  • Gbit Ethernet
  • Gigabit Ethernet
  • Wireless Link Characteristics
  • Wireless network characteristics
  • IEEE 80211 Wireless LAN
  • Slide 31
  • 80211 LAN architecture
  • 80211 Channels association
  • IEEE 80211 multiple access
  • IEEE 80211 MAC Protocol CSMACA
  • Avoiding collisions (more)
  • Collision Avoidance RTS-CTS exchange
  • Slide 38
  • Slide 39
  • Hubs
  • Interconnecting with hubs
  • Inter - Networking
  • Learning Bridges
  • Spanning Tree Algorithm
  • Algorithm Overview
  • Algorithm Details
  • Algorithm Detail (cont)
  • Broadcast and Multicast
  • Limitations of Bridges
  • Switch
  • Switch allows multiple simultaneous transmissions
  • Switch Table
  • Switch self-learning
  • Forwarding
  • Self learning
  • Self-learning forwarding example
  • FilteringForwarding
  • Switch example
  • Slide 59
  • Switch traffic isolation
  • Switches dedicated access
  • More on Switches
  • Institutional network
  • Switches vs Routers
  • Summary comparison
  • IEEE 802 Standards
Page 15: Chapter 5B

5 DataLink Layer 5-15

Ethernet MAC Sublayer Protocol (2)

Collision detection can take as long as 2

5 DataLink Layer 5-16

CSMACD efficiency Tprop = max prop between 2 nodes in LAN

ttrans = time to transmit max-size frame

Efficiency goes to 1 as tprop goes to 0

Goes to 1 as ttrans goes to infinity Much better than ALOHA but still decentralized simple and cheap

transprop tt 51

1efficiency

5 DataLink Layer 5-17

Ethernet Performance

Efficiency of Ethernet at 10 Mbps with 512-bit slot times

5 DataLink Layer 5-18

8023 Ethernet Standards Link amp Physical Layers

many different Ethernet standards common MAC protocol and frame format different speeds 2 Mbps 10 Mbps 100

Mbps 1Gbps 10G bps different physical layer media fiber cable

applicationtransportnetwork

linkphysical

MAC protocoland frame format

100BASE-TX

100BASE-T4

100BASE-FX100BASE-T2

100BASE-SX 100BASE-BX

fiber physical layercopper (twisterpair) physical layer

5 DataLink Layer 5-19

Manchester encoding

used in 10BaseT each bit has a transition allows clocks in sending and receiving nodes to

synchronize to each other no need for a centralized global clock among nodes

Hey this is physical-layer stuff

5 DataLink Layer 5-20

Ethernet Cabling

The most common kinds of Ethernet cabling

5 DataLink Layer 5-21

Ethernet Cabling (2)

Three kinds of Ethernet cabling (a) 10Base5 (b) 10Base2 (c) 10Base-T

5 DataLink Layer 5-22

Ethernet Cabling (3)

Cable topologies (a) Linear (b) Spine (c) Tree (d) Segmented

5 DataLink Layer 5-23

10BaseT and 100BaseT 10100 Mbps rate latter called ldquofast ethernetrdquo T stands for Twisted Pair Nodes connect to a hub ldquostar topologyrdquo 100

m max distance between nodes and hub

twisted pair

hub

5 DataLink Layer 5-24

100Mbps Fast Ethernet

Use IEEE 8023 MAC protocol and frame format 100BASE-X use physical medium specifications

from FDDI Two physical links between nodes

bull Transmission and reception 100BASE-TX uses STP or Cat 5 UTP

bull May require new cable 100BASE-FX uses optical fiber 100BASE-T4 can use Cat 3 voice-grade UTP

bull Uses four twisted-pair lines between nodesbull Data transmission uses three pairs in one direction at a

time

Star-wire topology Similar to 10BASE-T

5 DataLink Layer 5-25

Fast Ethernet

The original fast Ethernet cabling

5 DataLink Layer 5-26

Gbit Ethernet

uses standard Ethernet frame format allows for point-to-point links and shared

broadcast channels in shared mode CSMACD is used short

distances between nodes required for efficiency

uses hubs called here ldquoBuffered Distributorsrdquo Full-Duplex at 1 Gbps for point-to-point links 10 Gbps now

5 DataLink Layer 5-27

Gigabit Ethernet

Gigabit Ethernet cabling

5 DataLink Layer 5-28

Wireless Link CharacteristicsDifferences from wired link hellip

decreased signal strength radio signal attenuates as it propagates through matter (path loss)

interference from other sources standardized wireless network frequencies (eg 24 GHz) shared by other devices (eg phone) devices (motors) interfere as well

multipath propagation radio signal reflects off objects ground arriving ad destination at slightly different times

hellip make communication across (even a point to point) wireless link much more ldquodifficultrdquo

5 DataLink Layer 5-29

Wireless network characteristicsMultiple wireless senders and receivers create

additional problems (beyond multiple access)

AB

C

Hidden terminal problem B A hear each other B C hear each other A C can not hear each

othermeans A C unaware of their

interference at B

A B C

Arsquos signalstrength

space

Crsquos signalstrength

Signal fading B A hear each other B C hear each other A C can not hear each other

interferring at B

5 DataLink Layer 5-30

IEEE 80211 Wireless LAN

80211b 24-5 GHz unlicensed

radio spectrum up to 11 Mbps direct sequence

spread spectrum (DSSS) in physical layer

bull all hosts use same chipping code

widely deployed using base stations

80211a 5-6 GHz range up to 54 Mbps

80211g 24-5 GHz range up to 54 Mbps

All use CSMACA for multiple access

All have base-station and ad-hoc network versions

5 DataLink Layer 5-31

Figure 3-12

ISM bands

5 DataLink Layer 5-32

80211 LAN architecture

wireless host communicates with base station base station = access

point (AP) Basic Service Set (BSS)

(aka ldquocellrdquo) in infrastructure mode contains wireless hosts access point (AP) base

station ad hoc mode hosts

only

BSS 1

BSS 2

Internet

hub switchor routerAP

AP

5 DataLink Layer 5-33

80211 Channels association 80211b 24GHz-2485GHz spectrum divided

into 11 channels at different frequencies AP admin chooses frequency for AP interference possible channel can be same as

that chosen by neighboring AP host must associate with an AP

scans channels listening for beacon frames containing APrsquos name (SSID) and MAC address

selects AP to associate with may perform authentication [Chapter 8] will typically run DHCP to get IP address in

APrsquos subnet

5 DataLink Layer 5-34

IEEE 80211 multiple access avoid collisions 2+ nodes transmitting at same

time 80211 CSMA - sense before transmitting

donrsquot collide with ongoing transmission by other node

80211 no collision detection difficult to receive (sense collisions) when transmitting

due to weak received signals (fading) canrsquot sense all collisions in any case hidden terminal

fading goal avoid collisions CSMAC(ollision)A(voidance)

AB

CA B C

Arsquos signalstrength

space

Crsquos signalstrength

5 DataLink Layer 5-35

IEEE 80211 MAC Protocol CSMACA

80211 sender1 if sense channel idle for DIFS then

transmit entire frame (no CD)2 if sense channel busy then

start random backoff timetimer counts down while channel idletransmit when timer expiresif no ACK increase random backoff

interval repeat 2

80211 receiver- if frame received OK

return ACK after SIFS (ACK needed due to hidden terminal problem)

sender receiver

DIFS

data

SIFS

ACK

5 DataLink Layer 5-36

Avoiding collisions (more)

idea allow sender to ldquoreserverdquo channel rather than random access of data frames avoid collisions of long data frames

sender first transmits small request-to-send (RTS) packets to BS using CSMA RTSs may still collide with each other (but theyrsquore

short) BS broadcasts clear-to-send CTS in response to RTS RTS heard by all nodes

sender transmits data frame other stations defer transmissions

Avoid data frame collisions completely using small reservation packets

5 DataLink Layer 5-37

Collision Avoidance RTS-CTS exchange

APA B

time

RTS(A)RTS(B)

RTS(A)

CTS(A) CTS(A)

DATA (A)

ACK(A) ACK(A)

reservation collision

defer

5 DataLink Layer 5-38

Manchester encoding

Used in 10BaseT Each bit has a transition Allows clocks in sending and receiving nodes to

synchronize to each other no need for a centralized global clock among nodes

Hey this is physical-layer stuff

5 DataLink Layer 5-39

Link Layer

51 Introduction and services

52 Error detection and correction

53Multiple access protocols

54 Link-Layer Addressing

55 Ethernet

56 Interconnections Hubs and switches

57 PPP 58 Link Virtualization

ATM

5 DataLink Layer 5-40

HubsHubs are essentially physical-layer repeaters

bits coming from one link go out all other links at the same rate no frame buffering no CSMACD at hub adapters detect collisions provides net management functionality

twisted pair

hub

5 DataLink Layer 5-41

Interconnecting with hubs Backbone hub interconnects LAN segments Extends max distance between nodes But individual segment collision domains become one large

collision domain Canrsquot interconnect 10BaseT amp 100BaseT

hub

hubhub

hub

5 DataLink Layer 5-42

Inter - Networking

Hubs Bridges Switches Routers

5 DataLink Layer 5-43

Learning Bridges Do not forward when unnecessary Maintain forwarding table

HostPort

A 1 B 1 C 1 X 2 Y 2 Z 2

Learn table entries based on source address Table is an optimization need not be complete Always forward broadcast frames

A

Bridge

B C

X Y Z

Port 1

Port 2

5 DataLink Layer 5-44

Spanning Tree Algorithm Problem loops

Bridges run a distributed spanning tree algorithm select which bridges actively forward developed by Radia Perlman now IEEE 8021 specification

A

C

E

D

B

K

F

H

J

G

I

B3

B7

B4

B2

B5

B1

B6

(a) (b)

5 DataLink Layer 5-45

Algorithm Overview Each bridge has unique id (eg B1 B2

B3) Select bridge with smallest id as root Select bridge on each LAN closest to root

as designated bridge (use id to break ties) Each bridge forwards frames over each LAN for which it is the designated bridge

A

C

E

D

B

K

F

H

J

G

I

B5

B2

B3

B7

B4

B1

B6

5 DataLink Layer 5-46

Algorithm Details

Bridges exchange configuration messages id for bridge sending the message id for what the sending bridge believes to be

root bridge distance (hops) from sending bridge to root

bridge Each bridge records current best

configuration message for each port Initially each bridge believes it is the root

5 DataLink Layer 5-47

Algorithm Detail (cont) When learn not root stop generating config

messages in steady state only root generates configuration messages

When learn not designated bridge stop forwarding config messages in steady state only designated bridges forward config

messages

Root continues to periodically send config messages If any bridge does not receive config message after

a period of time it starts generating config messages claiming to be the root

5 DataLink Layer 5-48

Broadcast and Multicast Forward all broadcastmulticast frames

current practice Learn when no group members

downstream Accomplished by having each member of

group G send a frame to bridge multicast address with G in source field

5 DataLink Layer 5-49

Limitations of Bridges

Do not scale spanning tree algorithm does not scale broadcast does not scale

Do not accommodate heterogeneity

Caution beware of transparency

5 DataLink Layer 5-50

Switch link-layer device smarter than hubs take active

role store forward Ethernet frames examine incoming framersquos MAC address selectively

forward frame to one-or-more outgoing links when frame is to be forwarded on segment uses CSMACD to access segment

transparent hosts are unaware of presence of switches

plug-and-play self-learning switches do not need to be configured

5 DataLink Layer 5-51

Switch allows multiple simultaneous transmissions

hosts have dedicated direct connection to switch

switches buffer packets Ethernet protocol used on

each incoming link but no collisions full duplex each link is its own collision

domain switching A-to-Arsquo and B-

to-Brsquo simultaneously without collisions not possible with dumb hub

A

Arsquo

B

Brsquo

C

Crsquo

switch with six interfaces(123456)

1 23

45

6

5 DataLink Layer 5-52

Switch Table

Q how does switch know that Arsquo reachable via interface 4 Brsquo reachable via interface 5

A each switch has a switch table each entry (MAC address of host interface

to reach host time stamp)

looks like a routing table Q how are entries created

maintained in switch table something like a routing

protocol

A

Arsquo

B

Brsquo

C

Crsquo

switch with six interfaces(123456)

1 23

45

6

5 DataLink Layer 5-53

Switch self-learning

switch learns which hosts can be reached through which interfaces when frame received

switch ldquolearnsrdquo location of sender incoming LAN segment

records senderlocation pair in switch table

A

Arsquo

B

Brsquo

C

Crsquo

1 23

45

6

A Arsquo

Source ADest Arsquo

MAC addr interface TTL

Switch table (initially empty)

A 1 60

5 DataLink Layer 5-54

Forwarding

bull How do determine onto which LAN segment to forward framebull Looks like a routing problem

hub

hubhub

switch1

2 3

5 DataLink Layer 5-55

Self learning

A switch has a switch table entry in switch table

(MAC Address Interface Time Stamp) stale entries in table dropped (TTL can be 60

min) switch learns which hosts can be reached through

which interfaces when frame received switch ldquolearnsrdquo location

of sender incoming LAN segment records senderlocation pair in switch table

5 DataLink Layer 5-56

Self-learning forwarding example

A

Arsquo

B

Brsquo

C

Crsquo

1 23

45

6

A Arsquo

Source ADest Arsquo

MAC addr interface TTL

Switch table (initially empty)

A 1 60

A ArsquoA ArsquoA ArsquoA ArsquoA Arsquo

frame destination unknownflood

Arsquo A

destination A location known

Arsquo 4 60

selective send

5 DataLink Layer 5-57

FilteringForwardingWhen switch receives a frame

index switch table using MAC dest addressif entry found for destination

then if dest on segment from which frame arrived

then drop the frame else forward the frame on interface indicated else flood

forward on all but the interface on which the frame arrived

5 DataLink Layer 5-58

Switch example

Suppose C sends frame to D

Switch receives frame from from C notes in bridge table that C is on interface 1 because D is not in table switch forwards frame into

interfaces 2 and 3

frame received by D

hub

hub hub

switch

A

B CD

EF

G H

I

address interface

ABEG

1123

12 3

5 DataLink Layer 5-59

Switch example

Suppose D replies back with frame to C

Switch receives frame from from D notes in bridge table that D is on interface 2 because C is in table switch forwards frame only to

interface 1

frame received by C

hub

hub hub

switch

A

B CD

EF

G H

I

address interface

ABEGC

11231

5 DataLink Layer 5-60

Switch traffic isolation switch installation breaks subnet into LAN

segments switch filters packets

same-LAN-segment frames not usually forwarded onto other LAN segments

segments become separate collision domains

hub hub hub

switch

collision domain collision domain

collision domain

5 DataLink Layer 5-61

Switches dedicated access Switch with many

interfaces Hosts have direct

connection to switch No collisions full duplex

Switching A-to-Arsquo and B-to-Brsquo simultaneously no collisions

switch

A

Arsquo

B

Brsquo

C

Crsquo

5 DataLink Layer 5-62

More on Switches

cut-through switching frame forwarded from input to output port without first collecting entire frameslight reduction in latency

combinations of shareddedicated 101001000 Mbps interfaces

5 DataLink Layer 5-63

Institutional network

hub

hubhub

switch

to externalnetwork

router

IP subnet

mail server

web server

5 DataLink Layer 5-64

Switches vs Routers both store-and-forward devices

routers network layer devices (examine network layer headers) switches are link layer devices

routers maintain routing tables implement routing algorithms

switches maintain switch tables implement filtering learning algorithms

5 DataLink Layer 5-65

Summary comparison

hubs routers switches

traffi c isolation

no yes yes

plug amp play yes no yes

optimal routing

no yes no

cut through

yes no yes

5 DataLink Layer 5-66

IEEE 802 Standards

The 802 working groups The important ones are marked with The ones marked with are hibernating The one marked with dagger gave up

  • Slide 1
  • Link Layer
  • Ethernet
  • Slide 4
  • Star topology
  • Ethernet Frame Structure
  • Ethernet Frame Structure (more)
  • Unreliable connectionless service
  • Ethernet uses CSMACD
  • Ethernet CSMACD algorithm
  • Ethernetrsquos CSMACD (more)
  • Collision Detection
  • Algorithm (cont)
  • Binary Exponential Backoff
  • Ethernet MAC Sublayer Protocol (2)
  • CSMACD efficiency
  • Ethernet Performance
  • 8023 Ethernet Standards Link amp Physical Layers
  • Manchester encoding
  • Ethernet Cabling
  • Ethernet Cabling (2)
  • Ethernet Cabling (3)
  • 10BaseT and 100BaseT
  • 100Mbps Fast Ethernet
  • Fast Ethernet
  • Gbit Ethernet
  • Gigabit Ethernet
  • Wireless Link Characteristics
  • Wireless network characteristics
  • IEEE 80211 Wireless LAN
  • Slide 31
  • 80211 LAN architecture
  • 80211 Channels association
  • IEEE 80211 multiple access
  • IEEE 80211 MAC Protocol CSMACA
  • Avoiding collisions (more)
  • Collision Avoidance RTS-CTS exchange
  • Slide 38
  • Slide 39
  • Hubs
  • Interconnecting with hubs
  • Inter - Networking
  • Learning Bridges
  • Spanning Tree Algorithm
  • Algorithm Overview
  • Algorithm Details
  • Algorithm Detail (cont)
  • Broadcast and Multicast
  • Limitations of Bridges
  • Switch
  • Switch allows multiple simultaneous transmissions
  • Switch Table
  • Switch self-learning
  • Forwarding
  • Self learning
  • Self-learning forwarding example
  • FilteringForwarding
  • Switch example
  • Slide 59
  • Switch traffic isolation
  • Switches dedicated access
  • More on Switches
  • Institutional network
  • Switches vs Routers
  • Summary comparison
  • IEEE 802 Standards
Page 16: Chapter 5B

5 DataLink Layer 5-16

CSMACD efficiency Tprop = max prop between 2 nodes in LAN

ttrans = time to transmit max-size frame

Efficiency goes to 1 as tprop goes to 0

Goes to 1 as ttrans goes to infinity Much better than ALOHA but still decentralized simple and cheap

transprop tt 51

1efficiency

5 DataLink Layer 5-17

Ethernet Performance

Efficiency of Ethernet at 10 Mbps with 512-bit slot times

5 DataLink Layer 5-18

8023 Ethernet Standards Link amp Physical Layers

many different Ethernet standards common MAC protocol and frame format different speeds 2 Mbps 10 Mbps 100

Mbps 1Gbps 10G bps different physical layer media fiber cable

applicationtransportnetwork

linkphysical

MAC protocoland frame format

100BASE-TX

100BASE-T4

100BASE-FX100BASE-T2

100BASE-SX 100BASE-BX

fiber physical layercopper (twisterpair) physical layer

5 DataLink Layer 5-19

Manchester encoding

used in 10BaseT each bit has a transition allows clocks in sending and receiving nodes to

synchronize to each other no need for a centralized global clock among nodes

Hey this is physical-layer stuff

5 DataLink Layer 5-20

Ethernet Cabling

The most common kinds of Ethernet cabling

5 DataLink Layer 5-21

Ethernet Cabling (2)

Three kinds of Ethernet cabling (a) 10Base5 (b) 10Base2 (c) 10Base-T

5 DataLink Layer 5-22

Ethernet Cabling (3)

Cable topologies (a) Linear (b) Spine (c) Tree (d) Segmented

5 DataLink Layer 5-23

10BaseT and 100BaseT 10100 Mbps rate latter called ldquofast ethernetrdquo T stands for Twisted Pair Nodes connect to a hub ldquostar topologyrdquo 100

m max distance between nodes and hub

twisted pair

hub

5 DataLink Layer 5-24

100Mbps Fast Ethernet

Use IEEE 8023 MAC protocol and frame format 100BASE-X use physical medium specifications

from FDDI Two physical links between nodes

bull Transmission and reception 100BASE-TX uses STP or Cat 5 UTP

bull May require new cable 100BASE-FX uses optical fiber 100BASE-T4 can use Cat 3 voice-grade UTP

bull Uses four twisted-pair lines between nodesbull Data transmission uses three pairs in one direction at a

time

Star-wire topology Similar to 10BASE-T

5 DataLink Layer 5-25

Fast Ethernet

The original fast Ethernet cabling

5 DataLink Layer 5-26

Gbit Ethernet

uses standard Ethernet frame format allows for point-to-point links and shared

broadcast channels in shared mode CSMACD is used short

distances between nodes required for efficiency

uses hubs called here ldquoBuffered Distributorsrdquo Full-Duplex at 1 Gbps for point-to-point links 10 Gbps now

5 DataLink Layer 5-27

Gigabit Ethernet

Gigabit Ethernet cabling

5 DataLink Layer 5-28

Wireless Link CharacteristicsDifferences from wired link hellip

decreased signal strength radio signal attenuates as it propagates through matter (path loss)

interference from other sources standardized wireless network frequencies (eg 24 GHz) shared by other devices (eg phone) devices (motors) interfere as well

multipath propagation radio signal reflects off objects ground arriving ad destination at slightly different times

hellip make communication across (even a point to point) wireless link much more ldquodifficultrdquo

5 DataLink Layer 5-29

Wireless network characteristicsMultiple wireless senders and receivers create

additional problems (beyond multiple access)

AB

C

Hidden terminal problem B A hear each other B C hear each other A C can not hear each

othermeans A C unaware of their

interference at B

A B C

Arsquos signalstrength

space

Crsquos signalstrength

Signal fading B A hear each other B C hear each other A C can not hear each other

interferring at B

5 DataLink Layer 5-30

IEEE 80211 Wireless LAN

80211b 24-5 GHz unlicensed

radio spectrum up to 11 Mbps direct sequence

spread spectrum (DSSS) in physical layer

bull all hosts use same chipping code

widely deployed using base stations

80211a 5-6 GHz range up to 54 Mbps

80211g 24-5 GHz range up to 54 Mbps

All use CSMACA for multiple access

All have base-station and ad-hoc network versions

5 DataLink Layer 5-31

Figure 3-12

ISM bands

5 DataLink Layer 5-32

80211 LAN architecture

wireless host communicates with base station base station = access

point (AP) Basic Service Set (BSS)

(aka ldquocellrdquo) in infrastructure mode contains wireless hosts access point (AP) base

station ad hoc mode hosts

only

BSS 1

BSS 2

Internet

hub switchor routerAP

AP

5 DataLink Layer 5-33

80211 Channels association 80211b 24GHz-2485GHz spectrum divided

into 11 channels at different frequencies AP admin chooses frequency for AP interference possible channel can be same as

that chosen by neighboring AP host must associate with an AP

scans channels listening for beacon frames containing APrsquos name (SSID) and MAC address

selects AP to associate with may perform authentication [Chapter 8] will typically run DHCP to get IP address in

APrsquos subnet

5 DataLink Layer 5-34

IEEE 80211 multiple access avoid collisions 2+ nodes transmitting at same

time 80211 CSMA - sense before transmitting

donrsquot collide with ongoing transmission by other node

80211 no collision detection difficult to receive (sense collisions) when transmitting

due to weak received signals (fading) canrsquot sense all collisions in any case hidden terminal

fading goal avoid collisions CSMAC(ollision)A(voidance)

AB

CA B C

Arsquos signalstrength

space

Crsquos signalstrength

5 DataLink Layer 5-35

IEEE 80211 MAC Protocol CSMACA

80211 sender1 if sense channel idle for DIFS then

transmit entire frame (no CD)2 if sense channel busy then

start random backoff timetimer counts down while channel idletransmit when timer expiresif no ACK increase random backoff

interval repeat 2

80211 receiver- if frame received OK

return ACK after SIFS (ACK needed due to hidden terminal problem)

sender receiver

DIFS

data

SIFS

ACK

5 DataLink Layer 5-36

Avoiding collisions (more)

idea allow sender to ldquoreserverdquo channel rather than random access of data frames avoid collisions of long data frames

sender first transmits small request-to-send (RTS) packets to BS using CSMA RTSs may still collide with each other (but theyrsquore

short) BS broadcasts clear-to-send CTS in response to RTS RTS heard by all nodes

sender transmits data frame other stations defer transmissions

Avoid data frame collisions completely using small reservation packets

5 DataLink Layer 5-37

Collision Avoidance RTS-CTS exchange

APA B

time

RTS(A)RTS(B)

RTS(A)

CTS(A) CTS(A)

DATA (A)

ACK(A) ACK(A)

reservation collision

defer

5 DataLink Layer 5-38

Manchester encoding

Used in 10BaseT Each bit has a transition Allows clocks in sending and receiving nodes to

synchronize to each other no need for a centralized global clock among nodes

Hey this is physical-layer stuff

5 DataLink Layer 5-39

Link Layer

51 Introduction and services

52 Error detection and correction

53Multiple access protocols

54 Link-Layer Addressing

55 Ethernet

56 Interconnections Hubs and switches

57 PPP 58 Link Virtualization

ATM

5 DataLink Layer 5-40

HubsHubs are essentially physical-layer repeaters

bits coming from one link go out all other links at the same rate no frame buffering no CSMACD at hub adapters detect collisions provides net management functionality

twisted pair

hub

5 DataLink Layer 5-41

Interconnecting with hubs Backbone hub interconnects LAN segments Extends max distance between nodes But individual segment collision domains become one large

collision domain Canrsquot interconnect 10BaseT amp 100BaseT

hub

hubhub

hub

5 DataLink Layer 5-42

Inter - Networking

Hubs Bridges Switches Routers

5 DataLink Layer 5-43

Learning Bridges Do not forward when unnecessary Maintain forwarding table

HostPort

A 1 B 1 C 1 X 2 Y 2 Z 2

Learn table entries based on source address Table is an optimization need not be complete Always forward broadcast frames

A

Bridge

B C

X Y Z

Port 1

Port 2

5 DataLink Layer 5-44

Spanning Tree Algorithm Problem loops

Bridges run a distributed spanning tree algorithm select which bridges actively forward developed by Radia Perlman now IEEE 8021 specification

A

C

E

D

B

K

F

H

J

G

I

B3

B7

B4

B2

B5

B1

B6

(a) (b)

5 DataLink Layer 5-45

Algorithm Overview Each bridge has unique id (eg B1 B2

B3) Select bridge with smallest id as root Select bridge on each LAN closest to root

as designated bridge (use id to break ties) Each bridge forwards frames over each LAN for which it is the designated bridge

A

C

E

D

B

K

F

H

J

G

I

B5

B2

B3

B7

B4

B1

B6

5 DataLink Layer 5-46

Algorithm Details

Bridges exchange configuration messages id for bridge sending the message id for what the sending bridge believes to be

root bridge distance (hops) from sending bridge to root

bridge Each bridge records current best

configuration message for each port Initially each bridge believes it is the root

5 DataLink Layer 5-47

Algorithm Detail (cont) When learn not root stop generating config

messages in steady state only root generates configuration messages

When learn not designated bridge stop forwarding config messages in steady state only designated bridges forward config

messages

Root continues to periodically send config messages If any bridge does not receive config message after

a period of time it starts generating config messages claiming to be the root

5 DataLink Layer 5-48

Broadcast and Multicast Forward all broadcastmulticast frames

current practice Learn when no group members

downstream Accomplished by having each member of

group G send a frame to bridge multicast address with G in source field

5 DataLink Layer 5-49

Limitations of Bridges

Do not scale spanning tree algorithm does not scale broadcast does not scale

Do not accommodate heterogeneity

Caution beware of transparency

5 DataLink Layer 5-50

Switch link-layer device smarter than hubs take active

role store forward Ethernet frames examine incoming framersquos MAC address selectively

forward frame to one-or-more outgoing links when frame is to be forwarded on segment uses CSMACD to access segment

transparent hosts are unaware of presence of switches

plug-and-play self-learning switches do not need to be configured

5 DataLink Layer 5-51

Switch allows multiple simultaneous transmissions

hosts have dedicated direct connection to switch

switches buffer packets Ethernet protocol used on

each incoming link but no collisions full duplex each link is its own collision

domain switching A-to-Arsquo and B-

to-Brsquo simultaneously without collisions not possible with dumb hub

A

Arsquo

B

Brsquo

C

Crsquo

switch with six interfaces(123456)

1 23

45

6

5 DataLink Layer 5-52

Switch Table

Q how does switch know that Arsquo reachable via interface 4 Brsquo reachable via interface 5

A each switch has a switch table each entry (MAC address of host interface

to reach host time stamp)

looks like a routing table Q how are entries created

maintained in switch table something like a routing

protocol

A

Arsquo

B

Brsquo

C

Crsquo

switch with six interfaces(123456)

1 23

45

6

5 DataLink Layer 5-53

Switch self-learning

switch learns which hosts can be reached through which interfaces when frame received

switch ldquolearnsrdquo location of sender incoming LAN segment

records senderlocation pair in switch table

A

Arsquo

B

Brsquo

C

Crsquo

1 23

45

6

A Arsquo

Source ADest Arsquo

MAC addr interface TTL

Switch table (initially empty)

A 1 60

5 DataLink Layer 5-54

Forwarding

bull How do determine onto which LAN segment to forward framebull Looks like a routing problem

hub

hubhub

switch1

2 3

5 DataLink Layer 5-55

Self learning

A switch has a switch table entry in switch table

(MAC Address Interface Time Stamp) stale entries in table dropped (TTL can be 60

min) switch learns which hosts can be reached through

which interfaces when frame received switch ldquolearnsrdquo location

of sender incoming LAN segment records senderlocation pair in switch table

5 DataLink Layer 5-56

Self-learning forwarding example

A

Arsquo

B

Brsquo

C

Crsquo

1 23

45

6

A Arsquo

Source ADest Arsquo

MAC addr interface TTL

Switch table (initially empty)

A 1 60

A ArsquoA ArsquoA ArsquoA ArsquoA Arsquo

frame destination unknownflood

Arsquo A

destination A location known

Arsquo 4 60

selective send

5 DataLink Layer 5-57

FilteringForwardingWhen switch receives a frame

index switch table using MAC dest addressif entry found for destination

then if dest on segment from which frame arrived

then drop the frame else forward the frame on interface indicated else flood

forward on all but the interface on which the frame arrived

5 DataLink Layer 5-58

Switch example

Suppose C sends frame to D

Switch receives frame from from C notes in bridge table that C is on interface 1 because D is not in table switch forwards frame into

interfaces 2 and 3

frame received by D

hub

hub hub

switch

A

B CD

EF

G H

I

address interface

ABEG

1123

12 3

5 DataLink Layer 5-59

Switch example

Suppose D replies back with frame to C

Switch receives frame from from D notes in bridge table that D is on interface 2 because C is in table switch forwards frame only to

interface 1

frame received by C

hub

hub hub

switch

A

B CD

EF

G H

I

address interface

ABEGC

11231

5 DataLink Layer 5-60

Switch traffic isolation switch installation breaks subnet into LAN

segments switch filters packets

same-LAN-segment frames not usually forwarded onto other LAN segments

segments become separate collision domains

hub hub hub

switch

collision domain collision domain

collision domain

5 DataLink Layer 5-61

Switches dedicated access Switch with many

interfaces Hosts have direct

connection to switch No collisions full duplex

Switching A-to-Arsquo and B-to-Brsquo simultaneously no collisions

switch

A

Arsquo

B

Brsquo

C

Crsquo

5 DataLink Layer 5-62

More on Switches

cut-through switching frame forwarded from input to output port without first collecting entire frameslight reduction in latency

combinations of shareddedicated 101001000 Mbps interfaces

5 DataLink Layer 5-63

Institutional network

hub

hubhub

switch

to externalnetwork

router

IP subnet

mail server

web server

5 DataLink Layer 5-64

Switches vs Routers both store-and-forward devices

routers network layer devices (examine network layer headers) switches are link layer devices

routers maintain routing tables implement routing algorithms

switches maintain switch tables implement filtering learning algorithms

5 DataLink Layer 5-65

Summary comparison

hubs routers switches

traffi c isolation

no yes yes

plug amp play yes no yes

optimal routing

no yes no

cut through

yes no yes

5 DataLink Layer 5-66

IEEE 802 Standards

The 802 working groups The important ones are marked with The ones marked with are hibernating The one marked with dagger gave up

  • Slide 1
  • Link Layer
  • Ethernet
  • Slide 4
  • Star topology
  • Ethernet Frame Structure
  • Ethernet Frame Structure (more)
  • Unreliable connectionless service
  • Ethernet uses CSMACD
  • Ethernet CSMACD algorithm
  • Ethernetrsquos CSMACD (more)
  • Collision Detection
  • Algorithm (cont)
  • Binary Exponential Backoff
  • Ethernet MAC Sublayer Protocol (2)
  • CSMACD efficiency
  • Ethernet Performance
  • 8023 Ethernet Standards Link amp Physical Layers
  • Manchester encoding
  • Ethernet Cabling
  • Ethernet Cabling (2)
  • Ethernet Cabling (3)
  • 10BaseT and 100BaseT
  • 100Mbps Fast Ethernet
  • Fast Ethernet
  • Gbit Ethernet
  • Gigabit Ethernet
  • Wireless Link Characteristics
  • Wireless network characteristics
  • IEEE 80211 Wireless LAN
  • Slide 31
  • 80211 LAN architecture
  • 80211 Channels association
  • IEEE 80211 multiple access
  • IEEE 80211 MAC Protocol CSMACA
  • Avoiding collisions (more)
  • Collision Avoidance RTS-CTS exchange
  • Slide 38
  • Slide 39
  • Hubs
  • Interconnecting with hubs
  • Inter - Networking
  • Learning Bridges
  • Spanning Tree Algorithm
  • Algorithm Overview
  • Algorithm Details
  • Algorithm Detail (cont)
  • Broadcast and Multicast
  • Limitations of Bridges
  • Switch
  • Switch allows multiple simultaneous transmissions
  • Switch Table
  • Switch self-learning
  • Forwarding
  • Self learning
  • Self-learning forwarding example
  • FilteringForwarding
  • Switch example
  • Slide 59
  • Switch traffic isolation
  • Switches dedicated access
  • More on Switches
  • Institutional network
  • Switches vs Routers
  • Summary comparison
  • IEEE 802 Standards
Page 17: Chapter 5B

5 DataLink Layer 5-17

Ethernet Performance

Efficiency of Ethernet at 10 Mbps with 512-bit slot times

5 DataLink Layer 5-18

8023 Ethernet Standards Link amp Physical Layers

many different Ethernet standards common MAC protocol and frame format different speeds 2 Mbps 10 Mbps 100

Mbps 1Gbps 10G bps different physical layer media fiber cable

applicationtransportnetwork

linkphysical

MAC protocoland frame format

100BASE-TX

100BASE-T4

100BASE-FX100BASE-T2

100BASE-SX 100BASE-BX

fiber physical layercopper (twisterpair) physical layer

5 DataLink Layer 5-19

Manchester encoding

used in 10BaseT each bit has a transition allows clocks in sending and receiving nodes to

synchronize to each other no need for a centralized global clock among nodes

Hey this is physical-layer stuff

5 DataLink Layer 5-20

Ethernet Cabling

The most common kinds of Ethernet cabling

5 DataLink Layer 5-21

Ethernet Cabling (2)

Three kinds of Ethernet cabling (a) 10Base5 (b) 10Base2 (c) 10Base-T

5 DataLink Layer 5-22

Ethernet Cabling (3)

Cable topologies (a) Linear (b) Spine (c) Tree (d) Segmented

5 DataLink Layer 5-23

10BaseT and 100BaseT 10100 Mbps rate latter called ldquofast ethernetrdquo T stands for Twisted Pair Nodes connect to a hub ldquostar topologyrdquo 100

m max distance between nodes and hub

twisted pair

hub

5 DataLink Layer 5-24

100Mbps Fast Ethernet

Use IEEE 8023 MAC protocol and frame format 100BASE-X use physical medium specifications

from FDDI Two physical links between nodes

bull Transmission and reception 100BASE-TX uses STP or Cat 5 UTP

bull May require new cable 100BASE-FX uses optical fiber 100BASE-T4 can use Cat 3 voice-grade UTP

bull Uses four twisted-pair lines between nodesbull Data transmission uses three pairs in one direction at a

time

Star-wire topology Similar to 10BASE-T

5 DataLink Layer 5-25

Fast Ethernet

The original fast Ethernet cabling

5 DataLink Layer 5-26

Gbit Ethernet

uses standard Ethernet frame format allows for point-to-point links and shared

broadcast channels in shared mode CSMACD is used short

distances between nodes required for efficiency

uses hubs called here ldquoBuffered Distributorsrdquo Full-Duplex at 1 Gbps for point-to-point links 10 Gbps now

5 DataLink Layer 5-27

Gigabit Ethernet

Gigabit Ethernet cabling

5 DataLink Layer 5-28

Wireless Link CharacteristicsDifferences from wired link hellip

decreased signal strength radio signal attenuates as it propagates through matter (path loss)

interference from other sources standardized wireless network frequencies (eg 24 GHz) shared by other devices (eg phone) devices (motors) interfere as well

multipath propagation radio signal reflects off objects ground arriving ad destination at slightly different times

hellip make communication across (even a point to point) wireless link much more ldquodifficultrdquo

5 DataLink Layer 5-29

Wireless network characteristicsMultiple wireless senders and receivers create

additional problems (beyond multiple access)

AB

C

Hidden terminal problem B A hear each other B C hear each other A C can not hear each

othermeans A C unaware of their

interference at B

A B C

Arsquos signalstrength

space

Crsquos signalstrength

Signal fading B A hear each other B C hear each other A C can not hear each other

interferring at B

5 DataLink Layer 5-30

IEEE 80211 Wireless LAN

80211b 24-5 GHz unlicensed

radio spectrum up to 11 Mbps direct sequence

spread spectrum (DSSS) in physical layer

bull all hosts use same chipping code

widely deployed using base stations

80211a 5-6 GHz range up to 54 Mbps

80211g 24-5 GHz range up to 54 Mbps

All use CSMACA for multiple access

All have base-station and ad-hoc network versions

5 DataLink Layer 5-31

Figure 3-12

ISM bands

5 DataLink Layer 5-32

80211 LAN architecture

wireless host communicates with base station base station = access

point (AP) Basic Service Set (BSS)

(aka ldquocellrdquo) in infrastructure mode contains wireless hosts access point (AP) base

station ad hoc mode hosts

only

BSS 1

BSS 2

Internet

hub switchor routerAP

AP

5 DataLink Layer 5-33

80211 Channels association 80211b 24GHz-2485GHz spectrum divided

into 11 channels at different frequencies AP admin chooses frequency for AP interference possible channel can be same as

that chosen by neighboring AP host must associate with an AP

scans channels listening for beacon frames containing APrsquos name (SSID) and MAC address

selects AP to associate with may perform authentication [Chapter 8] will typically run DHCP to get IP address in

APrsquos subnet

5 DataLink Layer 5-34

IEEE 80211 multiple access avoid collisions 2+ nodes transmitting at same

time 80211 CSMA - sense before transmitting

donrsquot collide with ongoing transmission by other node

80211 no collision detection difficult to receive (sense collisions) when transmitting

due to weak received signals (fading) canrsquot sense all collisions in any case hidden terminal

fading goal avoid collisions CSMAC(ollision)A(voidance)

AB

CA B C

Arsquos signalstrength

space

Crsquos signalstrength

5 DataLink Layer 5-35

IEEE 80211 MAC Protocol CSMACA

80211 sender1 if sense channel idle for DIFS then

transmit entire frame (no CD)2 if sense channel busy then

start random backoff timetimer counts down while channel idletransmit when timer expiresif no ACK increase random backoff

interval repeat 2

80211 receiver- if frame received OK

return ACK after SIFS (ACK needed due to hidden terminal problem)

sender receiver

DIFS

data

SIFS

ACK

5 DataLink Layer 5-36

Avoiding collisions (more)

idea allow sender to ldquoreserverdquo channel rather than random access of data frames avoid collisions of long data frames

sender first transmits small request-to-send (RTS) packets to BS using CSMA RTSs may still collide with each other (but theyrsquore

short) BS broadcasts clear-to-send CTS in response to RTS RTS heard by all nodes

sender transmits data frame other stations defer transmissions

Avoid data frame collisions completely using small reservation packets

5 DataLink Layer 5-37

Collision Avoidance RTS-CTS exchange

APA B

time

RTS(A)RTS(B)

RTS(A)

CTS(A) CTS(A)

DATA (A)

ACK(A) ACK(A)

reservation collision

defer

5 DataLink Layer 5-38

Manchester encoding

Used in 10BaseT Each bit has a transition Allows clocks in sending and receiving nodes to

synchronize to each other no need for a centralized global clock among nodes

Hey this is physical-layer stuff

5 DataLink Layer 5-39

Link Layer

51 Introduction and services

52 Error detection and correction

53Multiple access protocols

54 Link-Layer Addressing

55 Ethernet

56 Interconnections Hubs and switches

57 PPP 58 Link Virtualization

ATM

5 DataLink Layer 5-40

HubsHubs are essentially physical-layer repeaters

bits coming from one link go out all other links at the same rate no frame buffering no CSMACD at hub adapters detect collisions provides net management functionality

twisted pair

hub

5 DataLink Layer 5-41

Interconnecting with hubs Backbone hub interconnects LAN segments Extends max distance between nodes But individual segment collision domains become one large

collision domain Canrsquot interconnect 10BaseT amp 100BaseT

hub

hubhub

hub

5 DataLink Layer 5-42

Inter - Networking

Hubs Bridges Switches Routers

5 DataLink Layer 5-43

Learning Bridges Do not forward when unnecessary Maintain forwarding table

HostPort

A 1 B 1 C 1 X 2 Y 2 Z 2

Learn table entries based on source address Table is an optimization need not be complete Always forward broadcast frames

A

Bridge

B C

X Y Z

Port 1

Port 2

5 DataLink Layer 5-44

Spanning Tree Algorithm Problem loops

Bridges run a distributed spanning tree algorithm select which bridges actively forward developed by Radia Perlman now IEEE 8021 specification

A

C

E

D

B

K

F

H

J

G

I

B3

B7

B4

B2

B5

B1

B6

(a) (b)

5 DataLink Layer 5-45

Algorithm Overview Each bridge has unique id (eg B1 B2

B3) Select bridge with smallest id as root Select bridge on each LAN closest to root

as designated bridge (use id to break ties) Each bridge forwards frames over each LAN for which it is the designated bridge

A

C

E

D

B

K

F

H

J

G

I

B5

B2

B3

B7

B4

B1

B6

5 DataLink Layer 5-46

Algorithm Details

Bridges exchange configuration messages id for bridge sending the message id for what the sending bridge believes to be

root bridge distance (hops) from sending bridge to root

bridge Each bridge records current best

configuration message for each port Initially each bridge believes it is the root

5 DataLink Layer 5-47

Algorithm Detail (cont) When learn not root stop generating config

messages in steady state only root generates configuration messages

When learn not designated bridge stop forwarding config messages in steady state only designated bridges forward config

messages

Root continues to periodically send config messages If any bridge does not receive config message after

a period of time it starts generating config messages claiming to be the root

5 DataLink Layer 5-48

Broadcast and Multicast Forward all broadcastmulticast frames

current practice Learn when no group members

downstream Accomplished by having each member of

group G send a frame to bridge multicast address with G in source field

5 DataLink Layer 5-49

Limitations of Bridges

Do not scale spanning tree algorithm does not scale broadcast does not scale

Do not accommodate heterogeneity

Caution beware of transparency

5 DataLink Layer 5-50

Switch link-layer device smarter than hubs take active

role store forward Ethernet frames examine incoming framersquos MAC address selectively

forward frame to one-or-more outgoing links when frame is to be forwarded on segment uses CSMACD to access segment

transparent hosts are unaware of presence of switches

plug-and-play self-learning switches do not need to be configured

5 DataLink Layer 5-51

Switch allows multiple simultaneous transmissions

hosts have dedicated direct connection to switch

switches buffer packets Ethernet protocol used on

each incoming link but no collisions full duplex each link is its own collision

domain switching A-to-Arsquo and B-

to-Brsquo simultaneously without collisions not possible with dumb hub

A

Arsquo

B

Brsquo

C

Crsquo

switch with six interfaces(123456)

1 23

45

6

5 DataLink Layer 5-52

Switch Table

Q how does switch know that Arsquo reachable via interface 4 Brsquo reachable via interface 5

A each switch has a switch table each entry (MAC address of host interface

to reach host time stamp)

looks like a routing table Q how are entries created

maintained in switch table something like a routing

protocol

A

Arsquo

B

Brsquo

C

Crsquo

switch with six interfaces(123456)

1 23

45

6

5 DataLink Layer 5-53

Switch self-learning

switch learns which hosts can be reached through which interfaces when frame received

switch ldquolearnsrdquo location of sender incoming LAN segment

records senderlocation pair in switch table

A

Arsquo

B

Brsquo

C

Crsquo

1 23

45

6

A Arsquo

Source ADest Arsquo

MAC addr interface TTL

Switch table (initially empty)

A 1 60

5 DataLink Layer 5-54

Forwarding

bull How do determine onto which LAN segment to forward framebull Looks like a routing problem

hub

hubhub

switch1

2 3

5 DataLink Layer 5-55

Self learning

A switch has a switch table entry in switch table

(MAC Address Interface Time Stamp) stale entries in table dropped (TTL can be 60

min) switch learns which hosts can be reached through

which interfaces when frame received switch ldquolearnsrdquo location

of sender incoming LAN segment records senderlocation pair in switch table

5 DataLink Layer 5-56

Self-learning forwarding example

A

Arsquo

B

Brsquo

C

Crsquo

1 23

45

6

A Arsquo

Source ADest Arsquo

MAC addr interface TTL

Switch table (initially empty)

A 1 60

A ArsquoA ArsquoA ArsquoA ArsquoA Arsquo

frame destination unknownflood

Arsquo A

destination A location known

Arsquo 4 60

selective send

5 DataLink Layer 5-57

FilteringForwardingWhen switch receives a frame

index switch table using MAC dest addressif entry found for destination

then if dest on segment from which frame arrived

then drop the frame else forward the frame on interface indicated else flood

forward on all but the interface on which the frame arrived

5 DataLink Layer 5-58

Switch example

Suppose C sends frame to D

Switch receives frame from from C notes in bridge table that C is on interface 1 because D is not in table switch forwards frame into

interfaces 2 and 3

frame received by D

hub

hub hub

switch

A

B CD

EF

G H

I

address interface

ABEG

1123

12 3

5 DataLink Layer 5-59

Switch example

Suppose D replies back with frame to C

Switch receives frame from from D notes in bridge table that D is on interface 2 because C is in table switch forwards frame only to

interface 1

frame received by C

hub

hub hub

switch

A

B CD

EF

G H

I

address interface

ABEGC

11231

5 DataLink Layer 5-60

Switch traffic isolation switch installation breaks subnet into LAN

segments switch filters packets

same-LAN-segment frames not usually forwarded onto other LAN segments

segments become separate collision domains

hub hub hub

switch

collision domain collision domain

collision domain

5 DataLink Layer 5-61

Switches dedicated access Switch with many

interfaces Hosts have direct

connection to switch No collisions full duplex

Switching A-to-Arsquo and B-to-Brsquo simultaneously no collisions

switch

A

Arsquo

B

Brsquo

C

Crsquo

5 DataLink Layer 5-62

More on Switches

cut-through switching frame forwarded from input to output port without first collecting entire frameslight reduction in latency

combinations of shareddedicated 101001000 Mbps interfaces

5 DataLink Layer 5-63

Institutional network

hub

hubhub

switch

to externalnetwork

router

IP subnet

mail server

web server

5 DataLink Layer 5-64

Switches vs Routers both store-and-forward devices

routers network layer devices (examine network layer headers) switches are link layer devices

routers maintain routing tables implement routing algorithms

switches maintain switch tables implement filtering learning algorithms

5 DataLink Layer 5-65

Summary comparison

hubs routers switches

traffi c isolation

no yes yes

plug amp play yes no yes

optimal routing

no yes no

cut through

yes no yes

5 DataLink Layer 5-66

IEEE 802 Standards

The 802 working groups The important ones are marked with The ones marked with are hibernating The one marked with dagger gave up

  • Slide 1
  • Link Layer
  • Ethernet
  • Slide 4
  • Star topology
  • Ethernet Frame Structure
  • Ethernet Frame Structure (more)
  • Unreliable connectionless service
  • Ethernet uses CSMACD
  • Ethernet CSMACD algorithm
  • Ethernetrsquos CSMACD (more)
  • Collision Detection
  • Algorithm (cont)
  • Binary Exponential Backoff
  • Ethernet MAC Sublayer Protocol (2)
  • CSMACD efficiency
  • Ethernet Performance
  • 8023 Ethernet Standards Link amp Physical Layers
  • Manchester encoding
  • Ethernet Cabling
  • Ethernet Cabling (2)
  • Ethernet Cabling (3)
  • 10BaseT and 100BaseT
  • 100Mbps Fast Ethernet
  • Fast Ethernet
  • Gbit Ethernet
  • Gigabit Ethernet
  • Wireless Link Characteristics
  • Wireless network characteristics
  • IEEE 80211 Wireless LAN
  • Slide 31
  • 80211 LAN architecture
  • 80211 Channels association
  • IEEE 80211 multiple access
  • IEEE 80211 MAC Protocol CSMACA
  • Avoiding collisions (more)
  • Collision Avoidance RTS-CTS exchange
  • Slide 38
  • Slide 39
  • Hubs
  • Interconnecting with hubs
  • Inter - Networking
  • Learning Bridges
  • Spanning Tree Algorithm
  • Algorithm Overview
  • Algorithm Details
  • Algorithm Detail (cont)
  • Broadcast and Multicast
  • Limitations of Bridges
  • Switch
  • Switch allows multiple simultaneous transmissions
  • Switch Table
  • Switch self-learning
  • Forwarding
  • Self learning
  • Self-learning forwarding example
  • FilteringForwarding
  • Switch example
  • Slide 59
  • Switch traffic isolation
  • Switches dedicated access
  • More on Switches
  • Institutional network
  • Switches vs Routers
  • Summary comparison
  • IEEE 802 Standards
Page 18: Chapter 5B

5 DataLink Layer 5-18

8023 Ethernet Standards Link amp Physical Layers

many different Ethernet standards common MAC protocol and frame format different speeds 2 Mbps 10 Mbps 100

Mbps 1Gbps 10G bps different physical layer media fiber cable

applicationtransportnetwork

linkphysical

MAC protocoland frame format

100BASE-TX

100BASE-T4

100BASE-FX100BASE-T2

100BASE-SX 100BASE-BX

fiber physical layercopper (twisterpair) physical layer

5 DataLink Layer 5-19

Manchester encoding

used in 10BaseT each bit has a transition allows clocks in sending and receiving nodes to

synchronize to each other no need for a centralized global clock among nodes

Hey this is physical-layer stuff

5 DataLink Layer 5-20

Ethernet Cabling

The most common kinds of Ethernet cabling

5 DataLink Layer 5-21

Ethernet Cabling (2)

Three kinds of Ethernet cabling (a) 10Base5 (b) 10Base2 (c) 10Base-T

5 DataLink Layer 5-22

Ethernet Cabling (3)

Cable topologies (a) Linear (b) Spine (c) Tree (d) Segmented

5 DataLink Layer 5-23

10BaseT and 100BaseT 10100 Mbps rate latter called ldquofast ethernetrdquo T stands for Twisted Pair Nodes connect to a hub ldquostar topologyrdquo 100

m max distance between nodes and hub

twisted pair

hub

5 DataLink Layer 5-24

100Mbps Fast Ethernet

Use IEEE 8023 MAC protocol and frame format 100BASE-X use physical medium specifications

from FDDI Two physical links between nodes

bull Transmission and reception 100BASE-TX uses STP or Cat 5 UTP

bull May require new cable 100BASE-FX uses optical fiber 100BASE-T4 can use Cat 3 voice-grade UTP

bull Uses four twisted-pair lines between nodesbull Data transmission uses three pairs in one direction at a

time

Star-wire topology Similar to 10BASE-T

5 DataLink Layer 5-25

Fast Ethernet

The original fast Ethernet cabling

5 DataLink Layer 5-26

Gbit Ethernet

uses standard Ethernet frame format allows for point-to-point links and shared

broadcast channels in shared mode CSMACD is used short

distances between nodes required for efficiency

uses hubs called here ldquoBuffered Distributorsrdquo Full-Duplex at 1 Gbps for point-to-point links 10 Gbps now

5 DataLink Layer 5-27

Gigabit Ethernet

Gigabit Ethernet cabling

5 DataLink Layer 5-28

Wireless Link CharacteristicsDifferences from wired link hellip

decreased signal strength radio signal attenuates as it propagates through matter (path loss)

interference from other sources standardized wireless network frequencies (eg 24 GHz) shared by other devices (eg phone) devices (motors) interfere as well

multipath propagation radio signal reflects off objects ground arriving ad destination at slightly different times

hellip make communication across (even a point to point) wireless link much more ldquodifficultrdquo

5 DataLink Layer 5-29

Wireless network characteristicsMultiple wireless senders and receivers create

additional problems (beyond multiple access)

AB

C

Hidden terminal problem B A hear each other B C hear each other A C can not hear each

othermeans A C unaware of their

interference at B

A B C

Arsquos signalstrength

space

Crsquos signalstrength

Signal fading B A hear each other B C hear each other A C can not hear each other

interferring at B

5 DataLink Layer 5-30

IEEE 80211 Wireless LAN

80211b 24-5 GHz unlicensed

radio spectrum up to 11 Mbps direct sequence

spread spectrum (DSSS) in physical layer

bull all hosts use same chipping code

widely deployed using base stations

80211a 5-6 GHz range up to 54 Mbps

80211g 24-5 GHz range up to 54 Mbps

All use CSMACA for multiple access

All have base-station and ad-hoc network versions

5 DataLink Layer 5-31

Figure 3-12

ISM bands

5 DataLink Layer 5-32

80211 LAN architecture

wireless host communicates with base station base station = access

point (AP) Basic Service Set (BSS)

(aka ldquocellrdquo) in infrastructure mode contains wireless hosts access point (AP) base

station ad hoc mode hosts

only

BSS 1

BSS 2

Internet

hub switchor routerAP

AP

5 DataLink Layer 5-33

80211 Channels association 80211b 24GHz-2485GHz spectrum divided

into 11 channels at different frequencies AP admin chooses frequency for AP interference possible channel can be same as

that chosen by neighboring AP host must associate with an AP

scans channels listening for beacon frames containing APrsquos name (SSID) and MAC address

selects AP to associate with may perform authentication [Chapter 8] will typically run DHCP to get IP address in

APrsquos subnet

5 DataLink Layer 5-34

IEEE 80211 multiple access avoid collisions 2+ nodes transmitting at same

time 80211 CSMA - sense before transmitting

donrsquot collide with ongoing transmission by other node

80211 no collision detection difficult to receive (sense collisions) when transmitting

due to weak received signals (fading) canrsquot sense all collisions in any case hidden terminal

fading goal avoid collisions CSMAC(ollision)A(voidance)

AB

CA B C

Arsquos signalstrength

space

Crsquos signalstrength

5 DataLink Layer 5-35

IEEE 80211 MAC Protocol CSMACA

80211 sender1 if sense channel idle for DIFS then

transmit entire frame (no CD)2 if sense channel busy then

start random backoff timetimer counts down while channel idletransmit when timer expiresif no ACK increase random backoff

interval repeat 2

80211 receiver- if frame received OK

return ACK after SIFS (ACK needed due to hidden terminal problem)

sender receiver

DIFS

data

SIFS

ACK

5 DataLink Layer 5-36

Avoiding collisions (more)

idea allow sender to ldquoreserverdquo channel rather than random access of data frames avoid collisions of long data frames

sender first transmits small request-to-send (RTS) packets to BS using CSMA RTSs may still collide with each other (but theyrsquore

short) BS broadcasts clear-to-send CTS in response to RTS RTS heard by all nodes

sender transmits data frame other stations defer transmissions

Avoid data frame collisions completely using small reservation packets

5 DataLink Layer 5-37

Collision Avoidance RTS-CTS exchange

APA B

time

RTS(A)RTS(B)

RTS(A)

CTS(A) CTS(A)

DATA (A)

ACK(A) ACK(A)

reservation collision

defer

5 DataLink Layer 5-38

Manchester encoding

Used in 10BaseT Each bit has a transition Allows clocks in sending and receiving nodes to

synchronize to each other no need for a centralized global clock among nodes

Hey this is physical-layer stuff

5 DataLink Layer 5-39

Link Layer

51 Introduction and services

52 Error detection and correction

53Multiple access protocols

54 Link-Layer Addressing

55 Ethernet

56 Interconnections Hubs and switches

57 PPP 58 Link Virtualization

ATM

5 DataLink Layer 5-40

HubsHubs are essentially physical-layer repeaters

bits coming from one link go out all other links at the same rate no frame buffering no CSMACD at hub adapters detect collisions provides net management functionality

twisted pair

hub

5 DataLink Layer 5-41

Interconnecting with hubs Backbone hub interconnects LAN segments Extends max distance between nodes But individual segment collision domains become one large

collision domain Canrsquot interconnect 10BaseT amp 100BaseT

hub

hubhub

hub

5 DataLink Layer 5-42

Inter - Networking

Hubs Bridges Switches Routers

5 DataLink Layer 5-43

Learning Bridges Do not forward when unnecessary Maintain forwarding table

HostPort

A 1 B 1 C 1 X 2 Y 2 Z 2

Learn table entries based on source address Table is an optimization need not be complete Always forward broadcast frames

A

Bridge

B C

X Y Z

Port 1

Port 2

5 DataLink Layer 5-44

Spanning Tree Algorithm Problem loops

Bridges run a distributed spanning tree algorithm select which bridges actively forward developed by Radia Perlman now IEEE 8021 specification

A

C

E

D

B

K

F

H

J

G

I

B3

B7

B4

B2

B5

B1

B6

(a) (b)

5 DataLink Layer 5-45

Algorithm Overview Each bridge has unique id (eg B1 B2

B3) Select bridge with smallest id as root Select bridge on each LAN closest to root

as designated bridge (use id to break ties) Each bridge forwards frames over each LAN for which it is the designated bridge

A

C

E

D

B

K

F

H

J

G

I

B5

B2

B3

B7

B4

B1

B6

5 DataLink Layer 5-46

Algorithm Details

Bridges exchange configuration messages id for bridge sending the message id for what the sending bridge believes to be

root bridge distance (hops) from sending bridge to root

bridge Each bridge records current best

configuration message for each port Initially each bridge believes it is the root

5 DataLink Layer 5-47

Algorithm Detail (cont) When learn not root stop generating config

messages in steady state only root generates configuration messages

When learn not designated bridge stop forwarding config messages in steady state only designated bridges forward config

messages

Root continues to periodically send config messages If any bridge does not receive config message after

a period of time it starts generating config messages claiming to be the root

5 DataLink Layer 5-48

Broadcast and Multicast Forward all broadcastmulticast frames

current practice Learn when no group members

downstream Accomplished by having each member of

group G send a frame to bridge multicast address with G in source field

5 DataLink Layer 5-49

Limitations of Bridges

Do not scale spanning tree algorithm does not scale broadcast does not scale

Do not accommodate heterogeneity

Caution beware of transparency

5 DataLink Layer 5-50

Switch link-layer device smarter than hubs take active

role store forward Ethernet frames examine incoming framersquos MAC address selectively

forward frame to one-or-more outgoing links when frame is to be forwarded on segment uses CSMACD to access segment

transparent hosts are unaware of presence of switches

plug-and-play self-learning switches do not need to be configured

5 DataLink Layer 5-51

Switch allows multiple simultaneous transmissions

hosts have dedicated direct connection to switch

switches buffer packets Ethernet protocol used on

each incoming link but no collisions full duplex each link is its own collision

domain switching A-to-Arsquo and B-

to-Brsquo simultaneously without collisions not possible with dumb hub

A

Arsquo

B

Brsquo

C

Crsquo

switch with six interfaces(123456)

1 23

45

6

5 DataLink Layer 5-52

Switch Table

Q how does switch know that Arsquo reachable via interface 4 Brsquo reachable via interface 5

A each switch has a switch table each entry (MAC address of host interface

to reach host time stamp)

looks like a routing table Q how are entries created

maintained in switch table something like a routing

protocol

A

Arsquo

B

Brsquo

C

Crsquo

switch with six interfaces(123456)

1 23

45

6

5 DataLink Layer 5-53

Switch self-learning

switch learns which hosts can be reached through which interfaces when frame received

switch ldquolearnsrdquo location of sender incoming LAN segment

records senderlocation pair in switch table

A

Arsquo

B

Brsquo

C

Crsquo

1 23

45

6

A Arsquo

Source ADest Arsquo

MAC addr interface TTL

Switch table (initially empty)

A 1 60

5 DataLink Layer 5-54

Forwarding

bull How do determine onto which LAN segment to forward framebull Looks like a routing problem

hub

hubhub

switch1

2 3

5 DataLink Layer 5-55

Self learning

A switch has a switch table entry in switch table

(MAC Address Interface Time Stamp) stale entries in table dropped (TTL can be 60

min) switch learns which hosts can be reached through

which interfaces when frame received switch ldquolearnsrdquo location

of sender incoming LAN segment records senderlocation pair in switch table

5 DataLink Layer 5-56

Self-learning forwarding example

A

Arsquo

B

Brsquo

C

Crsquo

1 23

45

6

A Arsquo

Source ADest Arsquo

MAC addr interface TTL

Switch table (initially empty)

A 1 60

A ArsquoA ArsquoA ArsquoA ArsquoA Arsquo

frame destination unknownflood

Arsquo A

destination A location known

Arsquo 4 60

selective send

5 DataLink Layer 5-57

FilteringForwardingWhen switch receives a frame

index switch table using MAC dest addressif entry found for destination

then if dest on segment from which frame arrived

then drop the frame else forward the frame on interface indicated else flood

forward on all but the interface on which the frame arrived

5 DataLink Layer 5-58

Switch example

Suppose C sends frame to D

Switch receives frame from from C notes in bridge table that C is on interface 1 because D is not in table switch forwards frame into

interfaces 2 and 3

frame received by D

hub

hub hub

switch

A

B CD

EF

G H

I

address interface

ABEG

1123

12 3

5 DataLink Layer 5-59

Switch example

Suppose D replies back with frame to C

Switch receives frame from from D notes in bridge table that D is on interface 2 because C is in table switch forwards frame only to

interface 1

frame received by C

hub

hub hub

switch

A

B CD

EF

G H

I

address interface

ABEGC

11231

5 DataLink Layer 5-60

Switch traffic isolation switch installation breaks subnet into LAN

segments switch filters packets

same-LAN-segment frames not usually forwarded onto other LAN segments

segments become separate collision domains

hub hub hub

switch

collision domain collision domain

collision domain

5 DataLink Layer 5-61

Switches dedicated access Switch with many

interfaces Hosts have direct

connection to switch No collisions full duplex

Switching A-to-Arsquo and B-to-Brsquo simultaneously no collisions

switch

A

Arsquo

B

Brsquo

C

Crsquo

5 DataLink Layer 5-62

More on Switches

cut-through switching frame forwarded from input to output port without first collecting entire frameslight reduction in latency

combinations of shareddedicated 101001000 Mbps interfaces

5 DataLink Layer 5-63

Institutional network

hub

hubhub

switch

to externalnetwork

router

IP subnet

mail server

web server

5 DataLink Layer 5-64

Switches vs Routers both store-and-forward devices

routers network layer devices (examine network layer headers) switches are link layer devices

routers maintain routing tables implement routing algorithms

switches maintain switch tables implement filtering learning algorithms

5 DataLink Layer 5-65

Summary comparison

hubs routers switches

traffi c isolation

no yes yes

plug amp play yes no yes

optimal routing

no yes no

cut through

yes no yes

5 DataLink Layer 5-66

IEEE 802 Standards

The 802 working groups The important ones are marked with The ones marked with are hibernating The one marked with dagger gave up

  • Slide 1
  • Link Layer
  • Ethernet
  • Slide 4
  • Star topology
  • Ethernet Frame Structure
  • Ethernet Frame Structure (more)
  • Unreliable connectionless service
  • Ethernet uses CSMACD
  • Ethernet CSMACD algorithm
  • Ethernetrsquos CSMACD (more)
  • Collision Detection
  • Algorithm (cont)
  • Binary Exponential Backoff
  • Ethernet MAC Sublayer Protocol (2)
  • CSMACD efficiency
  • Ethernet Performance
  • 8023 Ethernet Standards Link amp Physical Layers
  • Manchester encoding
  • Ethernet Cabling
  • Ethernet Cabling (2)
  • Ethernet Cabling (3)
  • 10BaseT and 100BaseT
  • 100Mbps Fast Ethernet
  • Fast Ethernet
  • Gbit Ethernet
  • Gigabit Ethernet
  • Wireless Link Characteristics
  • Wireless network characteristics
  • IEEE 80211 Wireless LAN
  • Slide 31
  • 80211 LAN architecture
  • 80211 Channels association
  • IEEE 80211 multiple access
  • IEEE 80211 MAC Protocol CSMACA
  • Avoiding collisions (more)
  • Collision Avoidance RTS-CTS exchange
  • Slide 38
  • Slide 39
  • Hubs
  • Interconnecting with hubs
  • Inter - Networking
  • Learning Bridges
  • Spanning Tree Algorithm
  • Algorithm Overview
  • Algorithm Details
  • Algorithm Detail (cont)
  • Broadcast and Multicast
  • Limitations of Bridges
  • Switch
  • Switch allows multiple simultaneous transmissions
  • Switch Table
  • Switch self-learning
  • Forwarding
  • Self learning
  • Self-learning forwarding example
  • FilteringForwarding
  • Switch example
  • Slide 59
  • Switch traffic isolation
  • Switches dedicated access
  • More on Switches
  • Institutional network
  • Switches vs Routers
  • Summary comparison
  • IEEE 802 Standards
Page 19: Chapter 5B

5 DataLink Layer 5-19

Manchester encoding

used in 10BaseT each bit has a transition allows clocks in sending and receiving nodes to

synchronize to each other no need for a centralized global clock among nodes

Hey this is physical-layer stuff

5 DataLink Layer 5-20

Ethernet Cabling

The most common kinds of Ethernet cabling

5 DataLink Layer 5-21

Ethernet Cabling (2)

Three kinds of Ethernet cabling (a) 10Base5 (b) 10Base2 (c) 10Base-T

5 DataLink Layer 5-22

Ethernet Cabling (3)

Cable topologies (a) Linear (b) Spine (c) Tree (d) Segmented

5 DataLink Layer 5-23

10BaseT and 100BaseT 10100 Mbps rate latter called ldquofast ethernetrdquo T stands for Twisted Pair Nodes connect to a hub ldquostar topologyrdquo 100

m max distance between nodes and hub

twisted pair

hub

5 DataLink Layer 5-24

100Mbps Fast Ethernet

Use IEEE 8023 MAC protocol and frame format 100BASE-X use physical medium specifications

from FDDI Two physical links between nodes

bull Transmission and reception 100BASE-TX uses STP or Cat 5 UTP

bull May require new cable 100BASE-FX uses optical fiber 100BASE-T4 can use Cat 3 voice-grade UTP

bull Uses four twisted-pair lines between nodesbull Data transmission uses three pairs in one direction at a

time

Star-wire topology Similar to 10BASE-T

5 DataLink Layer 5-25

Fast Ethernet

The original fast Ethernet cabling

5 DataLink Layer 5-26

Gbit Ethernet

uses standard Ethernet frame format allows for point-to-point links and shared

broadcast channels in shared mode CSMACD is used short

distances between nodes required for efficiency

uses hubs called here ldquoBuffered Distributorsrdquo Full-Duplex at 1 Gbps for point-to-point links 10 Gbps now

5 DataLink Layer 5-27

Gigabit Ethernet

Gigabit Ethernet cabling

5 DataLink Layer 5-28

Wireless Link CharacteristicsDifferences from wired link hellip

decreased signal strength radio signal attenuates as it propagates through matter (path loss)

interference from other sources standardized wireless network frequencies (eg 24 GHz) shared by other devices (eg phone) devices (motors) interfere as well

multipath propagation radio signal reflects off objects ground arriving ad destination at slightly different times

hellip make communication across (even a point to point) wireless link much more ldquodifficultrdquo

5 DataLink Layer 5-29

Wireless network characteristicsMultiple wireless senders and receivers create

additional problems (beyond multiple access)

AB

C

Hidden terminal problem B A hear each other B C hear each other A C can not hear each

othermeans A C unaware of their

interference at B

A B C

Arsquos signalstrength

space

Crsquos signalstrength

Signal fading B A hear each other B C hear each other A C can not hear each other

interferring at B

5 DataLink Layer 5-30

IEEE 80211 Wireless LAN

80211b 24-5 GHz unlicensed

radio spectrum up to 11 Mbps direct sequence

spread spectrum (DSSS) in physical layer

bull all hosts use same chipping code

widely deployed using base stations

80211a 5-6 GHz range up to 54 Mbps

80211g 24-5 GHz range up to 54 Mbps

All use CSMACA for multiple access

All have base-station and ad-hoc network versions

5 DataLink Layer 5-31

Figure 3-12

ISM bands

5 DataLink Layer 5-32

80211 LAN architecture

wireless host communicates with base station base station = access

point (AP) Basic Service Set (BSS)

(aka ldquocellrdquo) in infrastructure mode contains wireless hosts access point (AP) base

station ad hoc mode hosts

only

BSS 1

BSS 2

Internet

hub switchor routerAP

AP

5 DataLink Layer 5-33

80211 Channels association 80211b 24GHz-2485GHz spectrum divided

into 11 channels at different frequencies AP admin chooses frequency for AP interference possible channel can be same as

that chosen by neighboring AP host must associate with an AP

scans channels listening for beacon frames containing APrsquos name (SSID) and MAC address

selects AP to associate with may perform authentication [Chapter 8] will typically run DHCP to get IP address in

APrsquos subnet

5 DataLink Layer 5-34

IEEE 80211 multiple access avoid collisions 2+ nodes transmitting at same

time 80211 CSMA - sense before transmitting

donrsquot collide with ongoing transmission by other node

80211 no collision detection difficult to receive (sense collisions) when transmitting

due to weak received signals (fading) canrsquot sense all collisions in any case hidden terminal

fading goal avoid collisions CSMAC(ollision)A(voidance)

AB

CA B C

Arsquos signalstrength

space

Crsquos signalstrength

5 DataLink Layer 5-35

IEEE 80211 MAC Protocol CSMACA

80211 sender1 if sense channel idle for DIFS then

transmit entire frame (no CD)2 if sense channel busy then

start random backoff timetimer counts down while channel idletransmit when timer expiresif no ACK increase random backoff

interval repeat 2

80211 receiver- if frame received OK

return ACK after SIFS (ACK needed due to hidden terminal problem)

sender receiver

DIFS

data

SIFS

ACK

5 DataLink Layer 5-36

Avoiding collisions (more)

idea allow sender to ldquoreserverdquo channel rather than random access of data frames avoid collisions of long data frames

sender first transmits small request-to-send (RTS) packets to BS using CSMA RTSs may still collide with each other (but theyrsquore

short) BS broadcasts clear-to-send CTS in response to RTS RTS heard by all nodes

sender transmits data frame other stations defer transmissions

Avoid data frame collisions completely using small reservation packets

5 DataLink Layer 5-37

Collision Avoidance RTS-CTS exchange

APA B

time

RTS(A)RTS(B)

RTS(A)

CTS(A) CTS(A)

DATA (A)

ACK(A) ACK(A)

reservation collision

defer

5 DataLink Layer 5-38

Manchester encoding

Used in 10BaseT Each bit has a transition Allows clocks in sending and receiving nodes to

synchronize to each other no need for a centralized global clock among nodes

Hey this is physical-layer stuff

5 DataLink Layer 5-39

Link Layer

51 Introduction and services

52 Error detection and correction

53Multiple access protocols

54 Link-Layer Addressing

55 Ethernet

56 Interconnections Hubs and switches

57 PPP 58 Link Virtualization

ATM

5 DataLink Layer 5-40

HubsHubs are essentially physical-layer repeaters

bits coming from one link go out all other links at the same rate no frame buffering no CSMACD at hub adapters detect collisions provides net management functionality

twisted pair

hub

5 DataLink Layer 5-41

Interconnecting with hubs Backbone hub interconnects LAN segments Extends max distance between nodes But individual segment collision domains become one large

collision domain Canrsquot interconnect 10BaseT amp 100BaseT

hub

hubhub

hub

5 DataLink Layer 5-42

Inter - Networking

Hubs Bridges Switches Routers

5 DataLink Layer 5-43

Learning Bridges Do not forward when unnecessary Maintain forwarding table

HostPort

A 1 B 1 C 1 X 2 Y 2 Z 2

Learn table entries based on source address Table is an optimization need not be complete Always forward broadcast frames

A

Bridge

B C

X Y Z

Port 1

Port 2

5 DataLink Layer 5-44

Spanning Tree Algorithm Problem loops

Bridges run a distributed spanning tree algorithm select which bridges actively forward developed by Radia Perlman now IEEE 8021 specification

A

C

E

D

B

K

F

H

J

G

I

B3

B7

B4

B2

B5

B1

B6

(a) (b)

5 DataLink Layer 5-45

Algorithm Overview Each bridge has unique id (eg B1 B2

B3) Select bridge with smallest id as root Select bridge on each LAN closest to root

as designated bridge (use id to break ties) Each bridge forwards frames over each LAN for which it is the designated bridge

A

C

E

D

B

K

F

H

J

G

I

B5

B2

B3

B7

B4

B1

B6

5 DataLink Layer 5-46

Algorithm Details

Bridges exchange configuration messages id for bridge sending the message id for what the sending bridge believes to be

root bridge distance (hops) from sending bridge to root

bridge Each bridge records current best

configuration message for each port Initially each bridge believes it is the root

5 DataLink Layer 5-47

Algorithm Detail (cont) When learn not root stop generating config

messages in steady state only root generates configuration messages

When learn not designated bridge stop forwarding config messages in steady state only designated bridges forward config

messages

Root continues to periodically send config messages If any bridge does not receive config message after

a period of time it starts generating config messages claiming to be the root

5 DataLink Layer 5-48

Broadcast and Multicast Forward all broadcastmulticast frames

current practice Learn when no group members

downstream Accomplished by having each member of

group G send a frame to bridge multicast address with G in source field

5 DataLink Layer 5-49

Limitations of Bridges

Do not scale spanning tree algorithm does not scale broadcast does not scale

Do not accommodate heterogeneity

Caution beware of transparency

5 DataLink Layer 5-50

Switch link-layer device smarter than hubs take active

role store forward Ethernet frames examine incoming framersquos MAC address selectively

forward frame to one-or-more outgoing links when frame is to be forwarded on segment uses CSMACD to access segment

transparent hosts are unaware of presence of switches

plug-and-play self-learning switches do not need to be configured

5 DataLink Layer 5-51

Switch allows multiple simultaneous transmissions

hosts have dedicated direct connection to switch

switches buffer packets Ethernet protocol used on

each incoming link but no collisions full duplex each link is its own collision

domain switching A-to-Arsquo and B-

to-Brsquo simultaneously without collisions not possible with dumb hub

A

Arsquo

B

Brsquo

C

Crsquo

switch with six interfaces(123456)

1 23

45

6

5 DataLink Layer 5-52

Switch Table

Q how does switch know that Arsquo reachable via interface 4 Brsquo reachable via interface 5

A each switch has a switch table each entry (MAC address of host interface

to reach host time stamp)

looks like a routing table Q how are entries created

maintained in switch table something like a routing

protocol

A

Arsquo

B

Brsquo

C

Crsquo

switch with six interfaces(123456)

1 23

45

6

5 DataLink Layer 5-53

Switch self-learning

switch learns which hosts can be reached through which interfaces when frame received

switch ldquolearnsrdquo location of sender incoming LAN segment

records senderlocation pair in switch table

A

Arsquo

B

Brsquo

C

Crsquo

1 23

45

6

A Arsquo

Source ADest Arsquo

MAC addr interface TTL

Switch table (initially empty)

A 1 60

5 DataLink Layer 5-54

Forwarding

bull How do determine onto which LAN segment to forward framebull Looks like a routing problem

hub

hubhub

switch1

2 3

5 DataLink Layer 5-55

Self learning

A switch has a switch table entry in switch table

(MAC Address Interface Time Stamp) stale entries in table dropped (TTL can be 60

min) switch learns which hosts can be reached through

which interfaces when frame received switch ldquolearnsrdquo location

of sender incoming LAN segment records senderlocation pair in switch table

5 DataLink Layer 5-56

Self-learning forwarding example

A

Arsquo

B

Brsquo

C

Crsquo

1 23

45

6

A Arsquo

Source ADest Arsquo

MAC addr interface TTL

Switch table (initially empty)

A 1 60

A ArsquoA ArsquoA ArsquoA ArsquoA Arsquo

frame destination unknownflood

Arsquo A

destination A location known

Arsquo 4 60

selective send

5 DataLink Layer 5-57

FilteringForwardingWhen switch receives a frame

index switch table using MAC dest addressif entry found for destination

then if dest on segment from which frame arrived

then drop the frame else forward the frame on interface indicated else flood

forward on all but the interface on which the frame arrived

5 DataLink Layer 5-58

Switch example

Suppose C sends frame to D

Switch receives frame from from C notes in bridge table that C is on interface 1 because D is not in table switch forwards frame into

interfaces 2 and 3

frame received by D

hub

hub hub

switch

A

B CD

EF

G H

I

address interface

ABEG

1123

12 3

5 DataLink Layer 5-59

Switch example

Suppose D replies back with frame to C

Switch receives frame from from D notes in bridge table that D is on interface 2 because C is in table switch forwards frame only to

interface 1

frame received by C

hub

hub hub

switch

A

B CD

EF

G H

I

address interface

ABEGC

11231

5 DataLink Layer 5-60

Switch traffic isolation switch installation breaks subnet into LAN

segments switch filters packets

same-LAN-segment frames not usually forwarded onto other LAN segments

segments become separate collision domains

hub hub hub

switch

collision domain collision domain

collision domain

5 DataLink Layer 5-61

Switches dedicated access Switch with many

interfaces Hosts have direct

connection to switch No collisions full duplex

Switching A-to-Arsquo and B-to-Brsquo simultaneously no collisions

switch

A

Arsquo

B

Brsquo

C

Crsquo

5 DataLink Layer 5-62

More on Switches

cut-through switching frame forwarded from input to output port without first collecting entire frameslight reduction in latency

combinations of shareddedicated 101001000 Mbps interfaces

5 DataLink Layer 5-63

Institutional network

hub

hubhub

switch

to externalnetwork

router

IP subnet

mail server

web server

5 DataLink Layer 5-64

Switches vs Routers both store-and-forward devices

routers network layer devices (examine network layer headers) switches are link layer devices

routers maintain routing tables implement routing algorithms

switches maintain switch tables implement filtering learning algorithms

5 DataLink Layer 5-65

Summary comparison

hubs routers switches

traffi c isolation

no yes yes

plug amp play yes no yes

optimal routing

no yes no

cut through

yes no yes

5 DataLink Layer 5-66

IEEE 802 Standards

The 802 working groups The important ones are marked with The ones marked with are hibernating The one marked with dagger gave up

  • Slide 1
  • Link Layer
  • Ethernet
  • Slide 4
  • Star topology
  • Ethernet Frame Structure
  • Ethernet Frame Structure (more)
  • Unreliable connectionless service
  • Ethernet uses CSMACD
  • Ethernet CSMACD algorithm
  • Ethernetrsquos CSMACD (more)
  • Collision Detection
  • Algorithm (cont)
  • Binary Exponential Backoff
  • Ethernet MAC Sublayer Protocol (2)
  • CSMACD efficiency
  • Ethernet Performance
  • 8023 Ethernet Standards Link amp Physical Layers
  • Manchester encoding
  • Ethernet Cabling
  • Ethernet Cabling (2)
  • Ethernet Cabling (3)
  • 10BaseT and 100BaseT
  • 100Mbps Fast Ethernet
  • Fast Ethernet
  • Gbit Ethernet
  • Gigabit Ethernet
  • Wireless Link Characteristics
  • Wireless network characteristics
  • IEEE 80211 Wireless LAN
  • Slide 31
  • 80211 LAN architecture
  • 80211 Channels association
  • IEEE 80211 multiple access
  • IEEE 80211 MAC Protocol CSMACA
  • Avoiding collisions (more)
  • Collision Avoidance RTS-CTS exchange
  • Slide 38
  • Slide 39
  • Hubs
  • Interconnecting with hubs
  • Inter - Networking
  • Learning Bridges
  • Spanning Tree Algorithm
  • Algorithm Overview
  • Algorithm Details
  • Algorithm Detail (cont)
  • Broadcast and Multicast
  • Limitations of Bridges
  • Switch
  • Switch allows multiple simultaneous transmissions
  • Switch Table
  • Switch self-learning
  • Forwarding
  • Self learning
  • Self-learning forwarding example
  • FilteringForwarding
  • Switch example
  • Slide 59
  • Switch traffic isolation
  • Switches dedicated access
  • More on Switches
  • Institutional network
  • Switches vs Routers
  • Summary comparison
  • IEEE 802 Standards
Page 20: Chapter 5B

5 DataLink Layer 5-20

Ethernet Cabling

The most common kinds of Ethernet cabling

5 DataLink Layer 5-21

Ethernet Cabling (2)

Three kinds of Ethernet cabling (a) 10Base5 (b) 10Base2 (c) 10Base-T

5 DataLink Layer 5-22

Ethernet Cabling (3)

Cable topologies (a) Linear (b) Spine (c) Tree (d) Segmented

5 DataLink Layer 5-23

10BaseT and 100BaseT 10100 Mbps rate latter called ldquofast ethernetrdquo T stands for Twisted Pair Nodes connect to a hub ldquostar topologyrdquo 100

m max distance between nodes and hub

twisted pair

hub

5 DataLink Layer 5-24

100Mbps Fast Ethernet

Use IEEE 8023 MAC protocol and frame format 100BASE-X use physical medium specifications

from FDDI Two physical links between nodes

bull Transmission and reception 100BASE-TX uses STP or Cat 5 UTP

bull May require new cable 100BASE-FX uses optical fiber 100BASE-T4 can use Cat 3 voice-grade UTP

bull Uses four twisted-pair lines between nodesbull Data transmission uses three pairs in one direction at a

time

Star-wire topology Similar to 10BASE-T

5 DataLink Layer 5-25

Fast Ethernet

The original fast Ethernet cabling

5 DataLink Layer 5-26

Gbit Ethernet

uses standard Ethernet frame format allows for point-to-point links and shared

broadcast channels in shared mode CSMACD is used short

distances between nodes required for efficiency

uses hubs called here ldquoBuffered Distributorsrdquo Full-Duplex at 1 Gbps for point-to-point links 10 Gbps now

5 DataLink Layer 5-27

Gigabit Ethernet

Gigabit Ethernet cabling

5 DataLink Layer 5-28

Wireless Link CharacteristicsDifferences from wired link hellip

decreased signal strength radio signal attenuates as it propagates through matter (path loss)

interference from other sources standardized wireless network frequencies (eg 24 GHz) shared by other devices (eg phone) devices (motors) interfere as well

multipath propagation radio signal reflects off objects ground arriving ad destination at slightly different times

hellip make communication across (even a point to point) wireless link much more ldquodifficultrdquo

5 DataLink Layer 5-29

Wireless network characteristicsMultiple wireless senders and receivers create

additional problems (beyond multiple access)

AB

C

Hidden terminal problem B A hear each other B C hear each other A C can not hear each

othermeans A C unaware of their

interference at B

A B C

Arsquos signalstrength

space

Crsquos signalstrength

Signal fading B A hear each other B C hear each other A C can not hear each other

interferring at B

5 DataLink Layer 5-30

IEEE 80211 Wireless LAN

80211b 24-5 GHz unlicensed

radio spectrum up to 11 Mbps direct sequence

spread spectrum (DSSS) in physical layer

bull all hosts use same chipping code

widely deployed using base stations

80211a 5-6 GHz range up to 54 Mbps

80211g 24-5 GHz range up to 54 Mbps

All use CSMACA for multiple access

All have base-station and ad-hoc network versions

5 DataLink Layer 5-31

Figure 3-12

ISM bands

5 DataLink Layer 5-32

80211 LAN architecture

wireless host communicates with base station base station = access

point (AP) Basic Service Set (BSS)

(aka ldquocellrdquo) in infrastructure mode contains wireless hosts access point (AP) base

station ad hoc mode hosts

only

BSS 1

BSS 2

Internet

hub switchor routerAP

AP

5 DataLink Layer 5-33

80211 Channels association 80211b 24GHz-2485GHz spectrum divided

into 11 channels at different frequencies AP admin chooses frequency for AP interference possible channel can be same as

that chosen by neighboring AP host must associate with an AP

scans channels listening for beacon frames containing APrsquos name (SSID) and MAC address

selects AP to associate with may perform authentication [Chapter 8] will typically run DHCP to get IP address in

APrsquos subnet

5 DataLink Layer 5-34

IEEE 80211 multiple access avoid collisions 2+ nodes transmitting at same

time 80211 CSMA - sense before transmitting

donrsquot collide with ongoing transmission by other node

80211 no collision detection difficult to receive (sense collisions) when transmitting

due to weak received signals (fading) canrsquot sense all collisions in any case hidden terminal

fading goal avoid collisions CSMAC(ollision)A(voidance)

AB

CA B C

Arsquos signalstrength

space

Crsquos signalstrength

5 DataLink Layer 5-35

IEEE 80211 MAC Protocol CSMACA

80211 sender1 if sense channel idle for DIFS then

transmit entire frame (no CD)2 if sense channel busy then

start random backoff timetimer counts down while channel idletransmit when timer expiresif no ACK increase random backoff

interval repeat 2

80211 receiver- if frame received OK

return ACK after SIFS (ACK needed due to hidden terminal problem)

sender receiver

DIFS

data

SIFS

ACK

5 DataLink Layer 5-36

Avoiding collisions (more)

idea allow sender to ldquoreserverdquo channel rather than random access of data frames avoid collisions of long data frames

sender first transmits small request-to-send (RTS) packets to BS using CSMA RTSs may still collide with each other (but theyrsquore

short) BS broadcasts clear-to-send CTS in response to RTS RTS heard by all nodes

sender transmits data frame other stations defer transmissions

Avoid data frame collisions completely using small reservation packets

5 DataLink Layer 5-37

Collision Avoidance RTS-CTS exchange

APA B

time

RTS(A)RTS(B)

RTS(A)

CTS(A) CTS(A)

DATA (A)

ACK(A) ACK(A)

reservation collision

defer

5 DataLink Layer 5-38

Manchester encoding

Used in 10BaseT Each bit has a transition Allows clocks in sending and receiving nodes to

synchronize to each other no need for a centralized global clock among nodes

Hey this is physical-layer stuff

5 DataLink Layer 5-39

Link Layer

51 Introduction and services

52 Error detection and correction

53Multiple access protocols

54 Link-Layer Addressing

55 Ethernet

56 Interconnections Hubs and switches

57 PPP 58 Link Virtualization

ATM

5 DataLink Layer 5-40

HubsHubs are essentially physical-layer repeaters

bits coming from one link go out all other links at the same rate no frame buffering no CSMACD at hub adapters detect collisions provides net management functionality

twisted pair

hub

5 DataLink Layer 5-41

Interconnecting with hubs Backbone hub interconnects LAN segments Extends max distance between nodes But individual segment collision domains become one large

collision domain Canrsquot interconnect 10BaseT amp 100BaseT

hub

hubhub

hub

5 DataLink Layer 5-42

Inter - Networking

Hubs Bridges Switches Routers

5 DataLink Layer 5-43

Learning Bridges Do not forward when unnecessary Maintain forwarding table

HostPort

A 1 B 1 C 1 X 2 Y 2 Z 2

Learn table entries based on source address Table is an optimization need not be complete Always forward broadcast frames

A

Bridge

B C

X Y Z

Port 1

Port 2

5 DataLink Layer 5-44

Spanning Tree Algorithm Problem loops

Bridges run a distributed spanning tree algorithm select which bridges actively forward developed by Radia Perlman now IEEE 8021 specification

A

C

E

D

B

K

F

H

J

G

I

B3

B7

B4

B2

B5

B1

B6

(a) (b)

5 DataLink Layer 5-45

Algorithm Overview Each bridge has unique id (eg B1 B2

B3) Select bridge with smallest id as root Select bridge on each LAN closest to root

as designated bridge (use id to break ties) Each bridge forwards frames over each LAN for which it is the designated bridge

A

C

E

D

B

K

F

H

J

G

I

B5

B2

B3

B7

B4

B1

B6

5 DataLink Layer 5-46

Algorithm Details

Bridges exchange configuration messages id for bridge sending the message id for what the sending bridge believes to be

root bridge distance (hops) from sending bridge to root

bridge Each bridge records current best

configuration message for each port Initially each bridge believes it is the root

5 DataLink Layer 5-47

Algorithm Detail (cont) When learn not root stop generating config

messages in steady state only root generates configuration messages

When learn not designated bridge stop forwarding config messages in steady state only designated bridges forward config

messages

Root continues to periodically send config messages If any bridge does not receive config message after

a period of time it starts generating config messages claiming to be the root

5 DataLink Layer 5-48

Broadcast and Multicast Forward all broadcastmulticast frames

current practice Learn when no group members

downstream Accomplished by having each member of

group G send a frame to bridge multicast address with G in source field

5 DataLink Layer 5-49

Limitations of Bridges

Do not scale spanning tree algorithm does not scale broadcast does not scale

Do not accommodate heterogeneity

Caution beware of transparency

5 DataLink Layer 5-50

Switch link-layer device smarter than hubs take active

role store forward Ethernet frames examine incoming framersquos MAC address selectively

forward frame to one-or-more outgoing links when frame is to be forwarded on segment uses CSMACD to access segment

transparent hosts are unaware of presence of switches

plug-and-play self-learning switches do not need to be configured

5 DataLink Layer 5-51

Switch allows multiple simultaneous transmissions

hosts have dedicated direct connection to switch

switches buffer packets Ethernet protocol used on

each incoming link but no collisions full duplex each link is its own collision

domain switching A-to-Arsquo and B-

to-Brsquo simultaneously without collisions not possible with dumb hub

A

Arsquo

B

Brsquo

C

Crsquo

switch with six interfaces(123456)

1 23

45

6

5 DataLink Layer 5-52

Switch Table

Q how does switch know that Arsquo reachable via interface 4 Brsquo reachable via interface 5

A each switch has a switch table each entry (MAC address of host interface

to reach host time stamp)

looks like a routing table Q how are entries created

maintained in switch table something like a routing

protocol

A

Arsquo

B

Brsquo

C

Crsquo

switch with six interfaces(123456)

1 23

45

6

5 DataLink Layer 5-53

Switch self-learning

switch learns which hosts can be reached through which interfaces when frame received

switch ldquolearnsrdquo location of sender incoming LAN segment

records senderlocation pair in switch table

A

Arsquo

B

Brsquo

C

Crsquo

1 23

45

6

A Arsquo

Source ADest Arsquo

MAC addr interface TTL

Switch table (initially empty)

A 1 60

5 DataLink Layer 5-54

Forwarding

bull How do determine onto which LAN segment to forward framebull Looks like a routing problem

hub

hubhub

switch1

2 3

5 DataLink Layer 5-55

Self learning

A switch has a switch table entry in switch table

(MAC Address Interface Time Stamp) stale entries in table dropped (TTL can be 60

min) switch learns which hosts can be reached through

which interfaces when frame received switch ldquolearnsrdquo location

of sender incoming LAN segment records senderlocation pair in switch table

5 DataLink Layer 5-56

Self-learning forwarding example

A

Arsquo

B

Brsquo

C

Crsquo

1 23

45

6

A Arsquo

Source ADest Arsquo

MAC addr interface TTL

Switch table (initially empty)

A 1 60

A ArsquoA ArsquoA ArsquoA ArsquoA Arsquo

frame destination unknownflood

Arsquo A

destination A location known

Arsquo 4 60

selective send

5 DataLink Layer 5-57

FilteringForwardingWhen switch receives a frame

index switch table using MAC dest addressif entry found for destination

then if dest on segment from which frame arrived

then drop the frame else forward the frame on interface indicated else flood

forward on all but the interface on which the frame arrived

5 DataLink Layer 5-58

Switch example

Suppose C sends frame to D

Switch receives frame from from C notes in bridge table that C is on interface 1 because D is not in table switch forwards frame into

interfaces 2 and 3

frame received by D

hub

hub hub

switch

A

B CD

EF

G H

I

address interface

ABEG

1123

12 3

5 DataLink Layer 5-59

Switch example

Suppose D replies back with frame to C

Switch receives frame from from D notes in bridge table that D is on interface 2 because C is in table switch forwards frame only to

interface 1

frame received by C

hub

hub hub

switch

A

B CD

EF

G H

I

address interface

ABEGC

11231

5 DataLink Layer 5-60

Switch traffic isolation switch installation breaks subnet into LAN

segments switch filters packets

same-LAN-segment frames not usually forwarded onto other LAN segments

segments become separate collision domains

hub hub hub

switch

collision domain collision domain

collision domain

5 DataLink Layer 5-61

Switches dedicated access Switch with many

interfaces Hosts have direct

connection to switch No collisions full duplex

Switching A-to-Arsquo and B-to-Brsquo simultaneously no collisions

switch

A

Arsquo

B

Brsquo

C

Crsquo

5 DataLink Layer 5-62

More on Switches

cut-through switching frame forwarded from input to output port without first collecting entire frameslight reduction in latency

combinations of shareddedicated 101001000 Mbps interfaces

5 DataLink Layer 5-63

Institutional network

hub

hubhub

switch

to externalnetwork

router

IP subnet

mail server

web server

5 DataLink Layer 5-64

Switches vs Routers both store-and-forward devices

routers network layer devices (examine network layer headers) switches are link layer devices

routers maintain routing tables implement routing algorithms

switches maintain switch tables implement filtering learning algorithms

5 DataLink Layer 5-65

Summary comparison

hubs routers switches

traffi c isolation

no yes yes

plug amp play yes no yes

optimal routing

no yes no

cut through

yes no yes

5 DataLink Layer 5-66

IEEE 802 Standards

The 802 working groups The important ones are marked with The ones marked with are hibernating The one marked with dagger gave up

  • Slide 1
  • Link Layer
  • Ethernet
  • Slide 4
  • Star topology
  • Ethernet Frame Structure
  • Ethernet Frame Structure (more)
  • Unreliable connectionless service
  • Ethernet uses CSMACD
  • Ethernet CSMACD algorithm
  • Ethernetrsquos CSMACD (more)
  • Collision Detection
  • Algorithm (cont)
  • Binary Exponential Backoff
  • Ethernet MAC Sublayer Protocol (2)
  • CSMACD efficiency
  • Ethernet Performance
  • 8023 Ethernet Standards Link amp Physical Layers
  • Manchester encoding
  • Ethernet Cabling
  • Ethernet Cabling (2)
  • Ethernet Cabling (3)
  • 10BaseT and 100BaseT
  • 100Mbps Fast Ethernet
  • Fast Ethernet
  • Gbit Ethernet
  • Gigabit Ethernet
  • Wireless Link Characteristics
  • Wireless network characteristics
  • IEEE 80211 Wireless LAN
  • Slide 31
  • 80211 LAN architecture
  • 80211 Channels association
  • IEEE 80211 multiple access
  • IEEE 80211 MAC Protocol CSMACA
  • Avoiding collisions (more)
  • Collision Avoidance RTS-CTS exchange
  • Slide 38
  • Slide 39
  • Hubs
  • Interconnecting with hubs
  • Inter - Networking
  • Learning Bridges
  • Spanning Tree Algorithm
  • Algorithm Overview
  • Algorithm Details
  • Algorithm Detail (cont)
  • Broadcast and Multicast
  • Limitations of Bridges
  • Switch
  • Switch allows multiple simultaneous transmissions
  • Switch Table
  • Switch self-learning
  • Forwarding
  • Self learning
  • Self-learning forwarding example
  • FilteringForwarding
  • Switch example
  • Slide 59
  • Switch traffic isolation
  • Switches dedicated access
  • More on Switches
  • Institutional network
  • Switches vs Routers
  • Summary comparison
  • IEEE 802 Standards
Page 21: Chapter 5B

5 DataLink Layer 5-21

Ethernet Cabling (2)

Three kinds of Ethernet cabling (a) 10Base5 (b) 10Base2 (c) 10Base-T

5 DataLink Layer 5-22

Ethernet Cabling (3)

Cable topologies (a) Linear (b) Spine (c) Tree (d) Segmented

5 DataLink Layer 5-23

10BaseT and 100BaseT 10100 Mbps rate latter called ldquofast ethernetrdquo T stands for Twisted Pair Nodes connect to a hub ldquostar topologyrdquo 100

m max distance between nodes and hub

twisted pair

hub

5 DataLink Layer 5-24

100Mbps Fast Ethernet

Use IEEE 8023 MAC protocol and frame format 100BASE-X use physical medium specifications

from FDDI Two physical links between nodes

bull Transmission and reception 100BASE-TX uses STP or Cat 5 UTP

bull May require new cable 100BASE-FX uses optical fiber 100BASE-T4 can use Cat 3 voice-grade UTP

bull Uses four twisted-pair lines between nodesbull Data transmission uses three pairs in one direction at a

time

Star-wire topology Similar to 10BASE-T

5 DataLink Layer 5-25

Fast Ethernet

The original fast Ethernet cabling

5 DataLink Layer 5-26

Gbit Ethernet

uses standard Ethernet frame format allows for point-to-point links and shared

broadcast channels in shared mode CSMACD is used short

distances between nodes required for efficiency

uses hubs called here ldquoBuffered Distributorsrdquo Full-Duplex at 1 Gbps for point-to-point links 10 Gbps now

5 DataLink Layer 5-27

Gigabit Ethernet

Gigabit Ethernet cabling

5 DataLink Layer 5-28

Wireless Link CharacteristicsDifferences from wired link hellip

decreased signal strength radio signal attenuates as it propagates through matter (path loss)

interference from other sources standardized wireless network frequencies (eg 24 GHz) shared by other devices (eg phone) devices (motors) interfere as well

multipath propagation radio signal reflects off objects ground arriving ad destination at slightly different times

hellip make communication across (even a point to point) wireless link much more ldquodifficultrdquo

5 DataLink Layer 5-29

Wireless network characteristicsMultiple wireless senders and receivers create

additional problems (beyond multiple access)

AB

C

Hidden terminal problem B A hear each other B C hear each other A C can not hear each

othermeans A C unaware of their

interference at B

A B C

Arsquos signalstrength

space

Crsquos signalstrength

Signal fading B A hear each other B C hear each other A C can not hear each other

interferring at B

5 DataLink Layer 5-30

IEEE 80211 Wireless LAN

80211b 24-5 GHz unlicensed

radio spectrum up to 11 Mbps direct sequence

spread spectrum (DSSS) in physical layer

bull all hosts use same chipping code

widely deployed using base stations

80211a 5-6 GHz range up to 54 Mbps

80211g 24-5 GHz range up to 54 Mbps

All use CSMACA for multiple access

All have base-station and ad-hoc network versions

5 DataLink Layer 5-31

Figure 3-12

ISM bands

5 DataLink Layer 5-32

80211 LAN architecture

wireless host communicates with base station base station = access

point (AP) Basic Service Set (BSS)

(aka ldquocellrdquo) in infrastructure mode contains wireless hosts access point (AP) base

station ad hoc mode hosts

only

BSS 1

BSS 2

Internet

hub switchor routerAP

AP

5 DataLink Layer 5-33

80211 Channels association 80211b 24GHz-2485GHz spectrum divided

into 11 channels at different frequencies AP admin chooses frequency for AP interference possible channel can be same as

that chosen by neighboring AP host must associate with an AP

scans channels listening for beacon frames containing APrsquos name (SSID) and MAC address

selects AP to associate with may perform authentication [Chapter 8] will typically run DHCP to get IP address in

APrsquos subnet

5 DataLink Layer 5-34

IEEE 80211 multiple access avoid collisions 2+ nodes transmitting at same

time 80211 CSMA - sense before transmitting

donrsquot collide with ongoing transmission by other node

80211 no collision detection difficult to receive (sense collisions) when transmitting

due to weak received signals (fading) canrsquot sense all collisions in any case hidden terminal

fading goal avoid collisions CSMAC(ollision)A(voidance)

AB

CA B C

Arsquos signalstrength

space

Crsquos signalstrength

5 DataLink Layer 5-35

IEEE 80211 MAC Protocol CSMACA

80211 sender1 if sense channel idle for DIFS then

transmit entire frame (no CD)2 if sense channel busy then

start random backoff timetimer counts down while channel idletransmit when timer expiresif no ACK increase random backoff

interval repeat 2

80211 receiver- if frame received OK

return ACK after SIFS (ACK needed due to hidden terminal problem)

sender receiver

DIFS

data

SIFS

ACK

5 DataLink Layer 5-36

Avoiding collisions (more)

idea allow sender to ldquoreserverdquo channel rather than random access of data frames avoid collisions of long data frames

sender first transmits small request-to-send (RTS) packets to BS using CSMA RTSs may still collide with each other (but theyrsquore

short) BS broadcasts clear-to-send CTS in response to RTS RTS heard by all nodes

sender transmits data frame other stations defer transmissions

Avoid data frame collisions completely using small reservation packets

5 DataLink Layer 5-37

Collision Avoidance RTS-CTS exchange

APA B

time

RTS(A)RTS(B)

RTS(A)

CTS(A) CTS(A)

DATA (A)

ACK(A) ACK(A)

reservation collision

defer

5 DataLink Layer 5-38

Manchester encoding

Used in 10BaseT Each bit has a transition Allows clocks in sending and receiving nodes to

synchronize to each other no need for a centralized global clock among nodes

Hey this is physical-layer stuff

5 DataLink Layer 5-39

Link Layer

51 Introduction and services

52 Error detection and correction

53Multiple access protocols

54 Link-Layer Addressing

55 Ethernet

56 Interconnections Hubs and switches

57 PPP 58 Link Virtualization

ATM

5 DataLink Layer 5-40

HubsHubs are essentially physical-layer repeaters

bits coming from one link go out all other links at the same rate no frame buffering no CSMACD at hub adapters detect collisions provides net management functionality

twisted pair

hub

5 DataLink Layer 5-41

Interconnecting with hubs Backbone hub interconnects LAN segments Extends max distance between nodes But individual segment collision domains become one large

collision domain Canrsquot interconnect 10BaseT amp 100BaseT

hub

hubhub

hub

5 DataLink Layer 5-42

Inter - Networking

Hubs Bridges Switches Routers

5 DataLink Layer 5-43

Learning Bridges Do not forward when unnecessary Maintain forwarding table

HostPort

A 1 B 1 C 1 X 2 Y 2 Z 2

Learn table entries based on source address Table is an optimization need not be complete Always forward broadcast frames

A

Bridge

B C

X Y Z

Port 1

Port 2

5 DataLink Layer 5-44

Spanning Tree Algorithm Problem loops

Bridges run a distributed spanning tree algorithm select which bridges actively forward developed by Radia Perlman now IEEE 8021 specification

A

C

E

D

B

K

F

H

J

G

I

B3

B7

B4

B2

B5

B1

B6

(a) (b)

5 DataLink Layer 5-45

Algorithm Overview Each bridge has unique id (eg B1 B2

B3) Select bridge with smallest id as root Select bridge on each LAN closest to root

as designated bridge (use id to break ties) Each bridge forwards frames over each LAN for which it is the designated bridge

A

C

E

D

B

K

F

H

J

G

I

B5

B2

B3

B7

B4

B1

B6

5 DataLink Layer 5-46

Algorithm Details

Bridges exchange configuration messages id for bridge sending the message id for what the sending bridge believes to be

root bridge distance (hops) from sending bridge to root

bridge Each bridge records current best

configuration message for each port Initially each bridge believes it is the root

5 DataLink Layer 5-47

Algorithm Detail (cont) When learn not root stop generating config

messages in steady state only root generates configuration messages

When learn not designated bridge stop forwarding config messages in steady state only designated bridges forward config

messages

Root continues to periodically send config messages If any bridge does not receive config message after

a period of time it starts generating config messages claiming to be the root

5 DataLink Layer 5-48

Broadcast and Multicast Forward all broadcastmulticast frames

current practice Learn when no group members

downstream Accomplished by having each member of

group G send a frame to bridge multicast address with G in source field

5 DataLink Layer 5-49

Limitations of Bridges

Do not scale spanning tree algorithm does not scale broadcast does not scale

Do not accommodate heterogeneity

Caution beware of transparency

5 DataLink Layer 5-50

Switch link-layer device smarter than hubs take active

role store forward Ethernet frames examine incoming framersquos MAC address selectively

forward frame to one-or-more outgoing links when frame is to be forwarded on segment uses CSMACD to access segment

transparent hosts are unaware of presence of switches

plug-and-play self-learning switches do not need to be configured

5 DataLink Layer 5-51

Switch allows multiple simultaneous transmissions

hosts have dedicated direct connection to switch

switches buffer packets Ethernet protocol used on

each incoming link but no collisions full duplex each link is its own collision

domain switching A-to-Arsquo and B-

to-Brsquo simultaneously without collisions not possible with dumb hub

A

Arsquo

B

Brsquo

C

Crsquo

switch with six interfaces(123456)

1 23

45

6

5 DataLink Layer 5-52

Switch Table

Q how does switch know that Arsquo reachable via interface 4 Brsquo reachable via interface 5

A each switch has a switch table each entry (MAC address of host interface

to reach host time stamp)

looks like a routing table Q how are entries created

maintained in switch table something like a routing

protocol

A

Arsquo

B

Brsquo

C

Crsquo

switch with six interfaces(123456)

1 23

45

6

5 DataLink Layer 5-53

Switch self-learning

switch learns which hosts can be reached through which interfaces when frame received

switch ldquolearnsrdquo location of sender incoming LAN segment

records senderlocation pair in switch table

A

Arsquo

B

Brsquo

C

Crsquo

1 23

45

6

A Arsquo

Source ADest Arsquo

MAC addr interface TTL

Switch table (initially empty)

A 1 60

5 DataLink Layer 5-54

Forwarding

bull How do determine onto which LAN segment to forward framebull Looks like a routing problem

hub

hubhub

switch1

2 3

5 DataLink Layer 5-55

Self learning

A switch has a switch table entry in switch table

(MAC Address Interface Time Stamp) stale entries in table dropped (TTL can be 60

min) switch learns which hosts can be reached through

which interfaces when frame received switch ldquolearnsrdquo location

of sender incoming LAN segment records senderlocation pair in switch table

5 DataLink Layer 5-56

Self-learning forwarding example

A

Arsquo

B

Brsquo

C

Crsquo

1 23

45

6

A Arsquo

Source ADest Arsquo

MAC addr interface TTL

Switch table (initially empty)

A 1 60

A ArsquoA ArsquoA ArsquoA ArsquoA Arsquo

frame destination unknownflood

Arsquo A

destination A location known

Arsquo 4 60

selective send

5 DataLink Layer 5-57

FilteringForwardingWhen switch receives a frame

index switch table using MAC dest addressif entry found for destination

then if dest on segment from which frame arrived

then drop the frame else forward the frame on interface indicated else flood

forward on all but the interface on which the frame arrived

5 DataLink Layer 5-58

Switch example

Suppose C sends frame to D

Switch receives frame from from C notes in bridge table that C is on interface 1 because D is not in table switch forwards frame into

interfaces 2 and 3

frame received by D

hub

hub hub

switch

A

B CD

EF

G H

I

address interface

ABEG

1123

12 3

5 DataLink Layer 5-59

Switch example

Suppose D replies back with frame to C

Switch receives frame from from D notes in bridge table that D is on interface 2 because C is in table switch forwards frame only to

interface 1

frame received by C

hub

hub hub

switch

A

B CD

EF

G H

I

address interface

ABEGC

11231

5 DataLink Layer 5-60

Switch traffic isolation switch installation breaks subnet into LAN

segments switch filters packets

same-LAN-segment frames not usually forwarded onto other LAN segments

segments become separate collision domains

hub hub hub

switch

collision domain collision domain

collision domain

5 DataLink Layer 5-61

Switches dedicated access Switch with many

interfaces Hosts have direct

connection to switch No collisions full duplex

Switching A-to-Arsquo and B-to-Brsquo simultaneously no collisions

switch

A

Arsquo

B

Brsquo

C

Crsquo

5 DataLink Layer 5-62

More on Switches

cut-through switching frame forwarded from input to output port without first collecting entire frameslight reduction in latency

combinations of shareddedicated 101001000 Mbps interfaces

5 DataLink Layer 5-63

Institutional network

hub

hubhub

switch

to externalnetwork

router

IP subnet

mail server

web server

5 DataLink Layer 5-64

Switches vs Routers both store-and-forward devices

routers network layer devices (examine network layer headers) switches are link layer devices

routers maintain routing tables implement routing algorithms

switches maintain switch tables implement filtering learning algorithms

5 DataLink Layer 5-65

Summary comparison

hubs routers switches

traffi c isolation

no yes yes

plug amp play yes no yes

optimal routing

no yes no

cut through

yes no yes

5 DataLink Layer 5-66

IEEE 802 Standards

The 802 working groups The important ones are marked with The ones marked with are hibernating The one marked with dagger gave up

  • Slide 1
  • Link Layer
  • Ethernet
  • Slide 4
  • Star topology
  • Ethernet Frame Structure
  • Ethernet Frame Structure (more)
  • Unreliable connectionless service
  • Ethernet uses CSMACD
  • Ethernet CSMACD algorithm
  • Ethernetrsquos CSMACD (more)
  • Collision Detection
  • Algorithm (cont)
  • Binary Exponential Backoff
  • Ethernet MAC Sublayer Protocol (2)
  • CSMACD efficiency
  • Ethernet Performance
  • 8023 Ethernet Standards Link amp Physical Layers
  • Manchester encoding
  • Ethernet Cabling
  • Ethernet Cabling (2)
  • Ethernet Cabling (3)
  • 10BaseT and 100BaseT
  • 100Mbps Fast Ethernet
  • Fast Ethernet
  • Gbit Ethernet
  • Gigabit Ethernet
  • Wireless Link Characteristics
  • Wireless network characteristics
  • IEEE 80211 Wireless LAN
  • Slide 31
  • 80211 LAN architecture
  • 80211 Channels association
  • IEEE 80211 multiple access
  • IEEE 80211 MAC Protocol CSMACA
  • Avoiding collisions (more)
  • Collision Avoidance RTS-CTS exchange
  • Slide 38
  • Slide 39
  • Hubs
  • Interconnecting with hubs
  • Inter - Networking
  • Learning Bridges
  • Spanning Tree Algorithm
  • Algorithm Overview
  • Algorithm Details
  • Algorithm Detail (cont)
  • Broadcast and Multicast
  • Limitations of Bridges
  • Switch
  • Switch allows multiple simultaneous transmissions
  • Switch Table
  • Switch self-learning
  • Forwarding
  • Self learning
  • Self-learning forwarding example
  • FilteringForwarding
  • Switch example
  • Slide 59
  • Switch traffic isolation
  • Switches dedicated access
  • More on Switches
  • Institutional network
  • Switches vs Routers
  • Summary comparison
  • IEEE 802 Standards
Page 22: Chapter 5B

5 DataLink Layer 5-22

Ethernet Cabling (3)

Cable topologies (a) Linear (b) Spine (c) Tree (d) Segmented

5 DataLink Layer 5-23

10BaseT and 100BaseT 10100 Mbps rate latter called ldquofast ethernetrdquo T stands for Twisted Pair Nodes connect to a hub ldquostar topologyrdquo 100

m max distance between nodes and hub

twisted pair

hub

5 DataLink Layer 5-24

100Mbps Fast Ethernet

Use IEEE 8023 MAC protocol and frame format 100BASE-X use physical medium specifications

from FDDI Two physical links between nodes

bull Transmission and reception 100BASE-TX uses STP or Cat 5 UTP

bull May require new cable 100BASE-FX uses optical fiber 100BASE-T4 can use Cat 3 voice-grade UTP

bull Uses four twisted-pair lines between nodesbull Data transmission uses three pairs in one direction at a

time

Star-wire topology Similar to 10BASE-T

5 DataLink Layer 5-25

Fast Ethernet

The original fast Ethernet cabling

5 DataLink Layer 5-26

Gbit Ethernet

uses standard Ethernet frame format allows for point-to-point links and shared

broadcast channels in shared mode CSMACD is used short

distances between nodes required for efficiency

uses hubs called here ldquoBuffered Distributorsrdquo Full-Duplex at 1 Gbps for point-to-point links 10 Gbps now

5 DataLink Layer 5-27

Gigabit Ethernet

Gigabit Ethernet cabling

5 DataLink Layer 5-28

Wireless Link CharacteristicsDifferences from wired link hellip

decreased signal strength radio signal attenuates as it propagates through matter (path loss)

interference from other sources standardized wireless network frequencies (eg 24 GHz) shared by other devices (eg phone) devices (motors) interfere as well

multipath propagation radio signal reflects off objects ground arriving ad destination at slightly different times

hellip make communication across (even a point to point) wireless link much more ldquodifficultrdquo

5 DataLink Layer 5-29

Wireless network characteristicsMultiple wireless senders and receivers create

additional problems (beyond multiple access)

AB

C

Hidden terminal problem B A hear each other B C hear each other A C can not hear each

othermeans A C unaware of their

interference at B

A B C

Arsquos signalstrength

space

Crsquos signalstrength

Signal fading B A hear each other B C hear each other A C can not hear each other

interferring at B

5 DataLink Layer 5-30

IEEE 80211 Wireless LAN

80211b 24-5 GHz unlicensed

radio spectrum up to 11 Mbps direct sequence

spread spectrum (DSSS) in physical layer

bull all hosts use same chipping code

widely deployed using base stations

80211a 5-6 GHz range up to 54 Mbps

80211g 24-5 GHz range up to 54 Mbps

All use CSMACA for multiple access

All have base-station and ad-hoc network versions

5 DataLink Layer 5-31

Figure 3-12

ISM bands

5 DataLink Layer 5-32

80211 LAN architecture

wireless host communicates with base station base station = access

point (AP) Basic Service Set (BSS)

(aka ldquocellrdquo) in infrastructure mode contains wireless hosts access point (AP) base

station ad hoc mode hosts

only

BSS 1

BSS 2

Internet

hub switchor routerAP

AP

5 DataLink Layer 5-33

80211 Channels association 80211b 24GHz-2485GHz spectrum divided

into 11 channels at different frequencies AP admin chooses frequency for AP interference possible channel can be same as

that chosen by neighboring AP host must associate with an AP

scans channels listening for beacon frames containing APrsquos name (SSID) and MAC address

selects AP to associate with may perform authentication [Chapter 8] will typically run DHCP to get IP address in

APrsquos subnet

5 DataLink Layer 5-34

IEEE 80211 multiple access avoid collisions 2+ nodes transmitting at same

time 80211 CSMA - sense before transmitting

donrsquot collide with ongoing transmission by other node

80211 no collision detection difficult to receive (sense collisions) when transmitting

due to weak received signals (fading) canrsquot sense all collisions in any case hidden terminal

fading goal avoid collisions CSMAC(ollision)A(voidance)

AB

CA B C

Arsquos signalstrength

space

Crsquos signalstrength

5 DataLink Layer 5-35

IEEE 80211 MAC Protocol CSMACA

80211 sender1 if sense channel idle for DIFS then

transmit entire frame (no CD)2 if sense channel busy then

start random backoff timetimer counts down while channel idletransmit when timer expiresif no ACK increase random backoff

interval repeat 2

80211 receiver- if frame received OK

return ACK after SIFS (ACK needed due to hidden terminal problem)

sender receiver

DIFS

data

SIFS

ACK

5 DataLink Layer 5-36

Avoiding collisions (more)

idea allow sender to ldquoreserverdquo channel rather than random access of data frames avoid collisions of long data frames

sender first transmits small request-to-send (RTS) packets to BS using CSMA RTSs may still collide with each other (but theyrsquore

short) BS broadcasts clear-to-send CTS in response to RTS RTS heard by all nodes

sender transmits data frame other stations defer transmissions

Avoid data frame collisions completely using small reservation packets

5 DataLink Layer 5-37

Collision Avoidance RTS-CTS exchange

APA B

time

RTS(A)RTS(B)

RTS(A)

CTS(A) CTS(A)

DATA (A)

ACK(A) ACK(A)

reservation collision

defer

5 DataLink Layer 5-38

Manchester encoding

Used in 10BaseT Each bit has a transition Allows clocks in sending and receiving nodes to

synchronize to each other no need for a centralized global clock among nodes

Hey this is physical-layer stuff

5 DataLink Layer 5-39

Link Layer

51 Introduction and services

52 Error detection and correction

53Multiple access protocols

54 Link-Layer Addressing

55 Ethernet

56 Interconnections Hubs and switches

57 PPP 58 Link Virtualization

ATM

5 DataLink Layer 5-40

HubsHubs are essentially physical-layer repeaters

bits coming from one link go out all other links at the same rate no frame buffering no CSMACD at hub adapters detect collisions provides net management functionality

twisted pair

hub

5 DataLink Layer 5-41

Interconnecting with hubs Backbone hub interconnects LAN segments Extends max distance between nodes But individual segment collision domains become one large

collision domain Canrsquot interconnect 10BaseT amp 100BaseT

hub

hubhub

hub

5 DataLink Layer 5-42

Inter - Networking

Hubs Bridges Switches Routers

5 DataLink Layer 5-43

Learning Bridges Do not forward when unnecessary Maintain forwarding table

HostPort

A 1 B 1 C 1 X 2 Y 2 Z 2

Learn table entries based on source address Table is an optimization need not be complete Always forward broadcast frames

A

Bridge

B C

X Y Z

Port 1

Port 2

5 DataLink Layer 5-44

Spanning Tree Algorithm Problem loops

Bridges run a distributed spanning tree algorithm select which bridges actively forward developed by Radia Perlman now IEEE 8021 specification

A

C

E

D

B

K

F

H

J

G

I

B3

B7

B4

B2

B5

B1

B6

(a) (b)

5 DataLink Layer 5-45

Algorithm Overview Each bridge has unique id (eg B1 B2

B3) Select bridge with smallest id as root Select bridge on each LAN closest to root

as designated bridge (use id to break ties) Each bridge forwards frames over each LAN for which it is the designated bridge

A

C

E

D

B

K

F

H

J

G

I

B5

B2

B3

B7

B4

B1

B6

5 DataLink Layer 5-46

Algorithm Details

Bridges exchange configuration messages id for bridge sending the message id for what the sending bridge believes to be

root bridge distance (hops) from sending bridge to root

bridge Each bridge records current best

configuration message for each port Initially each bridge believes it is the root

5 DataLink Layer 5-47

Algorithm Detail (cont) When learn not root stop generating config

messages in steady state only root generates configuration messages

When learn not designated bridge stop forwarding config messages in steady state only designated bridges forward config

messages

Root continues to periodically send config messages If any bridge does not receive config message after

a period of time it starts generating config messages claiming to be the root

5 DataLink Layer 5-48

Broadcast and Multicast Forward all broadcastmulticast frames

current practice Learn when no group members

downstream Accomplished by having each member of

group G send a frame to bridge multicast address with G in source field

5 DataLink Layer 5-49

Limitations of Bridges

Do not scale spanning tree algorithm does not scale broadcast does not scale

Do not accommodate heterogeneity

Caution beware of transparency

5 DataLink Layer 5-50

Switch link-layer device smarter than hubs take active

role store forward Ethernet frames examine incoming framersquos MAC address selectively

forward frame to one-or-more outgoing links when frame is to be forwarded on segment uses CSMACD to access segment

transparent hosts are unaware of presence of switches

plug-and-play self-learning switches do not need to be configured

5 DataLink Layer 5-51

Switch allows multiple simultaneous transmissions

hosts have dedicated direct connection to switch

switches buffer packets Ethernet protocol used on

each incoming link but no collisions full duplex each link is its own collision

domain switching A-to-Arsquo and B-

to-Brsquo simultaneously without collisions not possible with dumb hub

A

Arsquo

B

Brsquo

C

Crsquo

switch with six interfaces(123456)

1 23

45

6

5 DataLink Layer 5-52

Switch Table

Q how does switch know that Arsquo reachable via interface 4 Brsquo reachable via interface 5

A each switch has a switch table each entry (MAC address of host interface

to reach host time stamp)

looks like a routing table Q how are entries created

maintained in switch table something like a routing

protocol

A

Arsquo

B

Brsquo

C

Crsquo

switch with six interfaces(123456)

1 23

45

6

5 DataLink Layer 5-53

Switch self-learning

switch learns which hosts can be reached through which interfaces when frame received

switch ldquolearnsrdquo location of sender incoming LAN segment

records senderlocation pair in switch table

A

Arsquo

B

Brsquo

C

Crsquo

1 23

45

6

A Arsquo

Source ADest Arsquo

MAC addr interface TTL

Switch table (initially empty)

A 1 60

5 DataLink Layer 5-54

Forwarding

bull How do determine onto which LAN segment to forward framebull Looks like a routing problem

hub

hubhub

switch1

2 3

5 DataLink Layer 5-55

Self learning

A switch has a switch table entry in switch table

(MAC Address Interface Time Stamp) stale entries in table dropped (TTL can be 60

min) switch learns which hosts can be reached through

which interfaces when frame received switch ldquolearnsrdquo location

of sender incoming LAN segment records senderlocation pair in switch table

5 DataLink Layer 5-56

Self-learning forwarding example

A

Arsquo

B

Brsquo

C

Crsquo

1 23

45

6

A Arsquo

Source ADest Arsquo

MAC addr interface TTL

Switch table (initially empty)

A 1 60

A ArsquoA ArsquoA ArsquoA ArsquoA Arsquo

frame destination unknownflood

Arsquo A

destination A location known

Arsquo 4 60

selective send

5 DataLink Layer 5-57

FilteringForwardingWhen switch receives a frame

index switch table using MAC dest addressif entry found for destination

then if dest on segment from which frame arrived

then drop the frame else forward the frame on interface indicated else flood

forward on all but the interface on which the frame arrived

5 DataLink Layer 5-58

Switch example

Suppose C sends frame to D

Switch receives frame from from C notes in bridge table that C is on interface 1 because D is not in table switch forwards frame into

interfaces 2 and 3

frame received by D

hub

hub hub

switch

A

B CD

EF

G H

I

address interface

ABEG

1123

12 3

5 DataLink Layer 5-59

Switch example

Suppose D replies back with frame to C

Switch receives frame from from D notes in bridge table that D is on interface 2 because C is in table switch forwards frame only to

interface 1

frame received by C

hub

hub hub

switch

A

B CD

EF

G H

I

address interface

ABEGC

11231

5 DataLink Layer 5-60

Switch traffic isolation switch installation breaks subnet into LAN

segments switch filters packets

same-LAN-segment frames not usually forwarded onto other LAN segments

segments become separate collision domains

hub hub hub

switch

collision domain collision domain

collision domain

5 DataLink Layer 5-61

Switches dedicated access Switch with many

interfaces Hosts have direct

connection to switch No collisions full duplex

Switching A-to-Arsquo and B-to-Brsquo simultaneously no collisions

switch

A

Arsquo

B

Brsquo

C

Crsquo

5 DataLink Layer 5-62

More on Switches

cut-through switching frame forwarded from input to output port without first collecting entire frameslight reduction in latency

combinations of shareddedicated 101001000 Mbps interfaces

5 DataLink Layer 5-63

Institutional network

hub

hubhub

switch

to externalnetwork

router

IP subnet

mail server

web server

5 DataLink Layer 5-64

Switches vs Routers both store-and-forward devices

routers network layer devices (examine network layer headers) switches are link layer devices

routers maintain routing tables implement routing algorithms

switches maintain switch tables implement filtering learning algorithms

5 DataLink Layer 5-65

Summary comparison

hubs routers switches

traffi c isolation

no yes yes

plug amp play yes no yes

optimal routing

no yes no

cut through

yes no yes

5 DataLink Layer 5-66

IEEE 802 Standards

The 802 working groups The important ones are marked with The ones marked with are hibernating The one marked with dagger gave up

  • Slide 1
  • Link Layer
  • Ethernet
  • Slide 4
  • Star topology
  • Ethernet Frame Structure
  • Ethernet Frame Structure (more)
  • Unreliable connectionless service
  • Ethernet uses CSMACD
  • Ethernet CSMACD algorithm
  • Ethernetrsquos CSMACD (more)
  • Collision Detection
  • Algorithm (cont)
  • Binary Exponential Backoff
  • Ethernet MAC Sublayer Protocol (2)
  • CSMACD efficiency
  • Ethernet Performance
  • 8023 Ethernet Standards Link amp Physical Layers
  • Manchester encoding
  • Ethernet Cabling
  • Ethernet Cabling (2)
  • Ethernet Cabling (3)
  • 10BaseT and 100BaseT
  • 100Mbps Fast Ethernet
  • Fast Ethernet
  • Gbit Ethernet
  • Gigabit Ethernet
  • Wireless Link Characteristics
  • Wireless network characteristics
  • IEEE 80211 Wireless LAN
  • Slide 31
  • 80211 LAN architecture
  • 80211 Channels association
  • IEEE 80211 multiple access
  • IEEE 80211 MAC Protocol CSMACA
  • Avoiding collisions (more)
  • Collision Avoidance RTS-CTS exchange
  • Slide 38
  • Slide 39
  • Hubs
  • Interconnecting with hubs
  • Inter - Networking
  • Learning Bridges
  • Spanning Tree Algorithm
  • Algorithm Overview
  • Algorithm Details
  • Algorithm Detail (cont)
  • Broadcast and Multicast
  • Limitations of Bridges
  • Switch
  • Switch allows multiple simultaneous transmissions
  • Switch Table
  • Switch self-learning
  • Forwarding
  • Self learning
  • Self-learning forwarding example
  • FilteringForwarding
  • Switch example
  • Slide 59
  • Switch traffic isolation
  • Switches dedicated access
  • More on Switches
  • Institutional network
  • Switches vs Routers
  • Summary comparison
  • IEEE 802 Standards
Page 23: Chapter 5B

5 DataLink Layer 5-23

10BaseT and 100BaseT 10100 Mbps rate latter called ldquofast ethernetrdquo T stands for Twisted Pair Nodes connect to a hub ldquostar topologyrdquo 100

m max distance between nodes and hub

twisted pair

hub

5 DataLink Layer 5-24

100Mbps Fast Ethernet

Use IEEE 8023 MAC protocol and frame format 100BASE-X use physical medium specifications

from FDDI Two physical links between nodes

bull Transmission and reception 100BASE-TX uses STP or Cat 5 UTP

bull May require new cable 100BASE-FX uses optical fiber 100BASE-T4 can use Cat 3 voice-grade UTP

bull Uses four twisted-pair lines between nodesbull Data transmission uses three pairs in one direction at a

time

Star-wire topology Similar to 10BASE-T

5 DataLink Layer 5-25

Fast Ethernet

The original fast Ethernet cabling

5 DataLink Layer 5-26

Gbit Ethernet

uses standard Ethernet frame format allows for point-to-point links and shared

broadcast channels in shared mode CSMACD is used short

distances between nodes required for efficiency

uses hubs called here ldquoBuffered Distributorsrdquo Full-Duplex at 1 Gbps for point-to-point links 10 Gbps now

5 DataLink Layer 5-27

Gigabit Ethernet

Gigabit Ethernet cabling

5 DataLink Layer 5-28

Wireless Link CharacteristicsDifferences from wired link hellip

decreased signal strength radio signal attenuates as it propagates through matter (path loss)

interference from other sources standardized wireless network frequencies (eg 24 GHz) shared by other devices (eg phone) devices (motors) interfere as well

multipath propagation radio signal reflects off objects ground arriving ad destination at slightly different times

hellip make communication across (even a point to point) wireless link much more ldquodifficultrdquo

5 DataLink Layer 5-29

Wireless network characteristicsMultiple wireless senders and receivers create

additional problems (beyond multiple access)

AB

C

Hidden terminal problem B A hear each other B C hear each other A C can not hear each

othermeans A C unaware of their

interference at B

A B C

Arsquos signalstrength

space

Crsquos signalstrength

Signal fading B A hear each other B C hear each other A C can not hear each other

interferring at B

5 DataLink Layer 5-30

IEEE 80211 Wireless LAN

80211b 24-5 GHz unlicensed

radio spectrum up to 11 Mbps direct sequence

spread spectrum (DSSS) in physical layer

bull all hosts use same chipping code

widely deployed using base stations

80211a 5-6 GHz range up to 54 Mbps

80211g 24-5 GHz range up to 54 Mbps

All use CSMACA for multiple access

All have base-station and ad-hoc network versions

5 DataLink Layer 5-31

Figure 3-12

ISM bands

5 DataLink Layer 5-32

80211 LAN architecture

wireless host communicates with base station base station = access

point (AP) Basic Service Set (BSS)

(aka ldquocellrdquo) in infrastructure mode contains wireless hosts access point (AP) base

station ad hoc mode hosts

only

BSS 1

BSS 2

Internet

hub switchor routerAP

AP

5 DataLink Layer 5-33

80211 Channels association 80211b 24GHz-2485GHz spectrum divided

into 11 channels at different frequencies AP admin chooses frequency for AP interference possible channel can be same as

that chosen by neighboring AP host must associate with an AP

scans channels listening for beacon frames containing APrsquos name (SSID) and MAC address

selects AP to associate with may perform authentication [Chapter 8] will typically run DHCP to get IP address in

APrsquos subnet

5 DataLink Layer 5-34

IEEE 80211 multiple access avoid collisions 2+ nodes transmitting at same

time 80211 CSMA - sense before transmitting

donrsquot collide with ongoing transmission by other node

80211 no collision detection difficult to receive (sense collisions) when transmitting

due to weak received signals (fading) canrsquot sense all collisions in any case hidden terminal

fading goal avoid collisions CSMAC(ollision)A(voidance)

AB

CA B C

Arsquos signalstrength

space

Crsquos signalstrength

5 DataLink Layer 5-35

IEEE 80211 MAC Protocol CSMACA

80211 sender1 if sense channel idle for DIFS then

transmit entire frame (no CD)2 if sense channel busy then

start random backoff timetimer counts down while channel idletransmit when timer expiresif no ACK increase random backoff

interval repeat 2

80211 receiver- if frame received OK

return ACK after SIFS (ACK needed due to hidden terminal problem)

sender receiver

DIFS

data

SIFS

ACK

5 DataLink Layer 5-36

Avoiding collisions (more)

idea allow sender to ldquoreserverdquo channel rather than random access of data frames avoid collisions of long data frames

sender first transmits small request-to-send (RTS) packets to BS using CSMA RTSs may still collide with each other (but theyrsquore

short) BS broadcasts clear-to-send CTS in response to RTS RTS heard by all nodes

sender transmits data frame other stations defer transmissions

Avoid data frame collisions completely using small reservation packets

5 DataLink Layer 5-37

Collision Avoidance RTS-CTS exchange

APA B

time

RTS(A)RTS(B)

RTS(A)

CTS(A) CTS(A)

DATA (A)

ACK(A) ACK(A)

reservation collision

defer

5 DataLink Layer 5-38

Manchester encoding

Used in 10BaseT Each bit has a transition Allows clocks in sending and receiving nodes to

synchronize to each other no need for a centralized global clock among nodes

Hey this is physical-layer stuff

5 DataLink Layer 5-39

Link Layer

51 Introduction and services

52 Error detection and correction

53Multiple access protocols

54 Link-Layer Addressing

55 Ethernet

56 Interconnections Hubs and switches

57 PPP 58 Link Virtualization

ATM

5 DataLink Layer 5-40

HubsHubs are essentially physical-layer repeaters

bits coming from one link go out all other links at the same rate no frame buffering no CSMACD at hub adapters detect collisions provides net management functionality

twisted pair

hub

5 DataLink Layer 5-41

Interconnecting with hubs Backbone hub interconnects LAN segments Extends max distance between nodes But individual segment collision domains become one large

collision domain Canrsquot interconnect 10BaseT amp 100BaseT

hub

hubhub

hub

5 DataLink Layer 5-42

Inter - Networking

Hubs Bridges Switches Routers

5 DataLink Layer 5-43

Learning Bridges Do not forward when unnecessary Maintain forwarding table

HostPort

A 1 B 1 C 1 X 2 Y 2 Z 2

Learn table entries based on source address Table is an optimization need not be complete Always forward broadcast frames

A

Bridge

B C

X Y Z

Port 1

Port 2

5 DataLink Layer 5-44

Spanning Tree Algorithm Problem loops

Bridges run a distributed spanning tree algorithm select which bridges actively forward developed by Radia Perlman now IEEE 8021 specification

A

C

E

D

B

K

F

H

J

G

I

B3

B7

B4

B2

B5

B1

B6

(a) (b)

5 DataLink Layer 5-45

Algorithm Overview Each bridge has unique id (eg B1 B2

B3) Select bridge with smallest id as root Select bridge on each LAN closest to root

as designated bridge (use id to break ties) Each bridge forwards frames over each LAN for which it is the designated bridge

A

C

E

D

B

K

F

H

J

G

I

B5

B2

B3

B7

B4

B1

B6

5 DataLink Layer 5-46

Algorithm Details

Bridges exchange configuration messages id for bridge sending the message id for what the sending bridge believes to be

root bridge distance (hops) from sending bridge to root

bridge Each bridge records current best

configuration message for each port Initially each bridge believes it is the root

5 DataLink Layer 5-47

Algorithm Detail (cont) When learn not root stop generating config

messages in steady state only root generates configuration messages

When learn not designated bridge stop forwarding config messages in steady state only designated bridges forward config

messages

Root continues to periodically send config messages If any bridge does not receive config message after

a period of time it starts generating config messages claiming to be the root

5 DataLink Layer 5-48

Broadcast and Multicast Forward all broadcastmulticast frames

current practice Learn when no group members

downstream Accomplished by having each member of

group G send a frame to bridge multicast address with G in source field

5 DataLink Layer 5-49

Limitations of Bridges

Do not scale spanning tree algorithm does not scale broadcast does not scale

Do not accommodate heterogeneity

Caution beware of transparency

5 DataLink Layer 5-50

Switch link-layer device smarter than hubs take active

role store forward Ethernet frames examine incoming framersquos MAC address selectively

forward frame to one-or-more outgoing links when frame is to be forwarded on segment uses CSMACD to access segment

transparent hosts are unaware of presence of switches

plug-and-play self-learning switches do not need to be configured

5 DataLink Layer 5-51

Switch allows multiple simultaneous transmissions

hosts have dedicated direct connection to switch

switches buffer packets Ethernet protocol used on

each incoming link but no collisions full duplex each link is its own collision

domain switching A-to-Arsquo and B-

to-Brsquo simultaneously without collisions not possible with dumb hub

A

Arsquo

B

Brsquo

C

Crsquo

switch with six interfaces(123456)

1 23

45

6

5 DataLink Layer 5-52

Switch Table

Q how does switch know that Arsquo reachable via interface 4 Brsquo reachable via interface 5

A each switch has a switch table each entry (MAC address of host interface

to reach host time stamp)

looks like a routing table Q how are entries created

maintained in switch table something like a routing

protocol

A

Arsquo

B

Brsquo

C

Crsquo

switch with six interfaces(123456)

1 23

45

6

5 DataLink Layer 5-53

Switch self-learning

switch learns which hosts can be reached through which interfaces when frame received

switch ldquolearnsrdquo location of sender incoming LAN segment

records senderlocation pair in switch table

A

Arsquo

B

Brsquo

C

Crsquo

1 23

45

6

A Arsquo

Source ADest Arsquo

MAC addr interface TTL

Switch table (initially empty)

A 1 60

5 DataLink Layer 5-54

Forwarding

bull How do determine onto which LAN segment to forward framebull Looks like a routing problem

hub

hubhub

switch1

2 3

5 DataLink Layer 5-55

Self learning

A switch has a switch table entry in switch table

(MAC Address Interface Time Stamp) stale entries in table dropped (TTL can be 60

min) switch learns which hosts can be reached through

which interfaces when frame received switch ldquolearnsrdquo location

of sender incoming LAN segment records senderlocation pair in switch table

5 DataLink Layer 5-56

Self-learning forwarding example

A

Arsquo

B

Brsquo

C

Crsquo

1 23

45

6

A Arsquo

Source ADest Arsquo

MAC addr interface TTL

Switch table (initially empty)

A 1 60

A ArsquoA ArsquoA ArsquoA ArsquoA Arsquo

frame destination unknownflood

Arsquo A

destination A location known

Arsquo 4 60

selective send

5 DataLink Layer 5-57

FilteringForwardingWhen switch receives a frame

index switch table using MAC dest addressif entry found for destination

then if dest on segment from which frame arrived

then drop the frame else forward the frame on interface indicated else flood

forward on all but the interface on which the frame arrived

5 DataLink Layer 5-58

Switch example

Suppose C sends frame to D

Switch receives frame from from C notes in bridge table that C is on interface 1 because D is not in table switch forwards frame into

interfaces 2 and 3

frame received by D

hub

hub hub

switch

A

B CD

EF

G H

I

address interface

ABEG

1123

12 3

5 DataLink Layer 5-59

Switch example

Suppose D replies back with frame to C

Switch receives frame from from D notes in bridge table that D is on interface 2 because C is in table switch forwards frame only to

interface 1

frame received by C

hub

hub hub

switch

A

B CD

EF

G H

I

address interface

ABEGC

11231

5 DataLink Layer 5-60

Switch traffic isolation switch installation breaks subnet into LAN

segments switch filters packets

same-LAN-segment frames not usually forwarded onto other LAN segments

segments become separate collision domains

hub hub hub

switch

collision domain collision domain

collision domain

5 DataLink Layer 5-61

Switches dedicated access Switch with many

interfaces Hosts have direct

connection to switch No collisions full duplex

Switching A-to-Arsquo and B-to-Brsquo simultaneously no collisions

switch

A

Arsquo

B

Brsquo

C

Crsquo

5 DataLink Layer 5-62

More on Switches

cut-through switching frame forwarded from input to output port without first collecting entire frameslight reduction in latency

combinations of shareddedicated 101001000 Mbps interfaces

5 DataLink Layer 5-63

Institutional network

hub

hubhub

switch

to externalnetwork

router

IP subnet

mail server

web server

5 DataLink Layer 5-64

Switches vs Routers both store-and-forward devices

routers network layer devices (examine network layer headers) switches are link layer devices

routers maintain routing tables implement routing algorithms

switches maintain switch tables implement filtering learning algorithms

5 DataLink Layer 5-65

Summary comparison

hubs routers switches

traffi c isolation

no yes yes

plug amp play yes no yes

optimal routing

no yes no

cut through

yes no yes

5 DataLink Layer 5-66

IEEE 802 Standards

The 802 working groups The important ones are marked with The ones marked with are hibernating The one marked with dagger gave up

  • Slide 1
  • Link Layer
  • Ethernet
  • Slide 4
  • Star topology
  • Ethernet Frame Structure
  • Ethernet Frame Structure (more)
  • Unreliable connectionless service
  • Ethernet uses CSMACD
  • Ethernet CSMACD algorithm
  • Ethernetrsquos CSMACD (more)
  • Collision Detection
  • Algorithm (cont)
  • Binary Exponential Backoff
  • Ethernet MAC Sublayer Protocol (2)
  • CSMACD efficiency
  • Ethernet Performance
  • 8023 Ethernet Standards Link amp Physical Layers
  • Manchester encoding
  • Ethernet Cabling
  • Ethernet Cabling (2)
  • Ethernet Cabling (3)
  • 10BaseT and 100BaseT
  • 100Mbps Fast Ethernet
  • Fast Ethernet
  • Gbit Ethernet
  • Gigabit Ethernet
  • Wireless Link Characteristics
  • Wireless network characteristics
  • IEEE 80211 Wireless LAN
  • Slide 31
  • 80211 LAN architecture
  • 80211 Channels association
  • IEEE 80211 multiple access
  • IEEE 80211 MAC Protocol CSMACA
  • Avoiding collisions (more)
  • Collision Avoidance RTS-CTS exchange
  • Slide 38
  • Slide 39
  • Hubs
  • Interconnecting with hubs
  • Inter - Networking
  • Learning Bridges
  • Spanning Tree Algorithm
  • Algorithm Overview
  • Algorithm Details
  • Algorithm Detail (cont)
  • Broadcast and Multicast
  • Limitations of Bridges
  • Switch
  • Switch allows multiple simultaneous transmissions
  • Switch Table
  • Switch self-learning
  • Forwarding
  • Self learning
  • Self-learning forwarding example
  • FilteringForwarding
  • Switch example
  • Slide 59
  • Switch traffic isolation
  • Switches dedicated access
  • More on Switches
  • Institutional network
  • Switches vs Routers
  • Summary comparison
  • IEEE 802 Standards
Page 24: Chapter 5B

5 DataLink Layer 5-24

100Mbps Fast Ethernet

Use IEEE 8023 MAC protocol and frame format 100BASE-X use physical medium specifications

from FDDI Two physical links between nodes

bull Transmission and reception 100BASE-TX uses STP or Cat 5 UTP

bull May require new cable 100BASE-FX uses optical fiber 100BASE-T4 can use Cat 3 voice-grade UTP

bull Uses four twisted-pair lines between nodesbull Data transmission uses three pairs in one direction at a

time

Star-wire topology Similar to 10BASE-T

5 DataLink Layer 5-25

Fast Ethernet

The original fast Ethernet cabling

5 DataLink Layer 5-26

Gbit Ethernet

uses standard Ethernet frame format allows for point-to-point links and shared

broadcast channels in shared mode CSMACD is used short

distances between nodes required for efficiency

uses hubs called here ldquoBuffered Distributorsrdquo Full-Duplex at 1 Gbps for point-to-point links 10 Gbps now

5 DataLink Layer 5-27

Gigabit Ethernet

Gigabit Ethernet cabling

5 DataLink Layer 5-28

Wireless Link CharacteristicsDifferences from wired link hellip

decreased signal strength radio signal attenuates as it propagates through matter (path loss)

interference from other sources standardized wireless network frequencies (eg 24 GHz) shared by other devices (eg phone) devices (motors) interfere as well

multipath propagation radio signal reflects off objects ground arriving ad destination at slightly different times

hellip make communication across (even a point to point) wireless link much more ldquodifficultrdquo

5 DataLink Layer 5-29

Wireless network characteristicsMultiple wireless senders and receivers create

additional problems (beyond multiple access)

AB

C

Hidden terminal problem B A hear each other B C hear each other A C can not hear each

othermeans A C unaware of their

interference at B

A B C

Arsquos signalstrength

space

Crsquos signalstrength

Signal fading B A hear each other B C hear each other A C can not hear each other

interferring at B

5 DataLink Layer 5-30

IEEE 80211 Wireless LAN

80211b 24-5 GHz unlicensed

radio spectrum up to 11 Mbps direct sequence

spread spectrum (DSSS) in physical layer

bull all hosts use same chipping code

widely deployed using base stations

80211a 5-6 GHz range up to 54 Mbps

80211g 24-5 GHz range up to 54 Mbps

All use CSMACA for multiple access

All have base-station and ad-hoc network versions

5 DataLink Layer 5-31

Figure 3-12

ISM bands

5 DataLink Layer 5-32

80211 LAN architecture

wireless host communicates with base station base station = access

point (AP) Basic Service Set (BSS)

(aka ldquocellrdquo) in infrastructure mode contains wireless hosts access point (AP) base

station ad hoc mode hosts

only

BSS 1

BSS 2

Internet

hub switchor routerAP

AP

5 DataLink Layer 5-33

80211 Channels association 80211b 24GHz-2485GHz spectrum divided

into 11 channels at different frequencies AP admin chooses frequency for AP interference possible channel can be same as

that chosen by neighboring AP host must associate with an AP

scans channels listening for beacon frames containing APrsquos name (SSID) and MAC address

selects AP to associate with may perform authentication [Chapter 8] will typically run DHCP to get IP address in

APrsquos subnet

5 DataLink Layer 5-34

IEEE 80211 multiple access avoid collisions 2+ nodes transmitting at same

time 80211 CSMA - sense before transmitting

donrsquot collide with ongoing transmission by other node

80211 no collision detection difficult to receive (sense collisions) when transmitting

due to weak received signals (fading) canrsquot sense all collisions in any case hidden terminal

fading goal avoid collisions CSMAC(ollision)A(voidance)

AB

CA B C

Arsquos signalstrength

space

Crsquos signalstrength

5 DataLink Layer 5-35

IEEE 80211 MAC Protocol CSMACA

80211 sender1 if sense channel idle for DIFS then

transmit entire frame (no CD)2 if sense channel busy then

start random backoff timetimer counts down while channel idletransmit when timer expiresif no ACK increase random backoff

interval repeat 2

80211 receiver- if frame received OK

return ACK after SIFS (ACK needed due to hidden terminal problem)

sender receiver

DIFS

data

SIFS

ACK

5 DataLink Layer 5-36

Avoiding collisions (more)

idea allow sender to ldquoreserverdquo channel rather than random access of data frames avoid collisions of long data frames

sender first transmits small request-to-send (RTS) packets to BS using CSMA RTSs may still collide with each other (but theyrsquore

short) BS broadcasts clear-to-send CTS in response to RTS RTS heard by all nodes

sender transmits data frame other stations defer transmissions

Avoid data frame collisions completely using small reservation packets

5 DataLink Layer 5-37

Collision Avoidance RTS-CTS exchange

APA B

time

RTS(A)RTS(B)

RTS(A)

CTS(A) CTS(A)

DATA (A)

ACK(A) ACK(A)

reservation collision

defer

5 DataLink Layer 5-38

Manchester encoding

Used in 10BaseT Each bit has a transition Allows clocks in sending and receiving nodes to

synchronize to each other no need for a centralized global clock among nodes

Hey this is physical-layer stuff

5 DataLink Layer 5-39

Link Layer

51 Introduction and services

52 Error detection and correction

53Multiple access protocols

54 Link-Layer Addressing

55 Ethernet

56 Interconnections Hubs and switches

57 PPP 58 Link Virtualization

ATM

5 DataLink Layer 5-40

HubsHubs are essentially physical-layer repeaters

bits coming from one link go out all other links at the same rate no frame buffering no CSMACD at hub adapters detect collisions provides net management functionality

twisted pair

hub

5 DataLink Layer 5-41

Interconnecting with hubs Backbone hub interconnects LAN segments Extends max distance between nodes But individual segment collision domains become one large

collision domain Canrsquot interconnect 10BaseT amp 100BaseT

hub

hubhub

hub

5 DataLink Layer 5-42

Inter - Networking

Hubs Bridges Switches Routers

5 DataLink Layer 5-43

Learning Bridges Do not forward when unnecessary Maintain forwarding table

HostPort

A 1 B 1 C 1 X 2 Y 2 Z 2

Learn table entries based on source address Table is an optimization need not be complete Always forward broadcast frames

A

Bridge

B C

X Y Z

Port 1

Port 2

5 DataLink Layer 5-44

Spanning Tree Algorithm Problem loops

Bridges run a distributed spanning tree algorithm select which bridges actively forward developed by Radia Perlman now IEEE 8021 specification

A

C

E

D

B

K

F

H

J

G

I

B3

B7

B4

B2

B5

B1

B6

(a) (b)

5 DataLink Layer 5-45

Algorithm Overview Each bridge has unique id (eg B1 B2

B3) Select bridge with smallest id as root Select bridge on each LAN closest to root

as designated bridge (use id to break ties) Each bridge forwards frames over each LAN for which it is the designated bridge

A

C

E

D

B

K

F

H

J

G

I

B5

B2

B3

B7

B4

B1

B6

5 DataLink Layer 5-46

Algorithm Details

Bridges exchange configuration messages id for bridge sending the message id for what the sending bridge believes to be

root bridge distance (hops) from sending bridge to root

bridge Each bridge records current best

configuration message for each port Initially each bridge believes it is the root

5 DataLink Layer 5-47

Algorithm Detail (cont) When learn not root stop generating config

messages in steady state only root generates configuration messages

When learn not designated bridge stop forwarding config messages in steady state only designated bridges forward config

messages

Root continues to periodically send config messages If any bridge does not receive config message after

a period of time it starts generating config messages claiming to be the root

5 DataLink Layer 5-48

Broadcast and Multicast Forward all broadcastmulticast frames

current practice Learn when no group members

downstream Accomplished by having each member of

group G send a frame to bridge multicast address with G in source field

5 DataLink Layer 5-49

Limitations of Bridges

Do not scale spanning tree algorithm does not scale broadcast does not scale

Do not accommodate heterogeneity

Caution beware of transparency

5 DataLink Layer 5-50

Switch link-layer device smarter than hubs take active

role store forward Ethernet frames examine incoming framersquos MAC address selectively

forward frame to one-or-more outgoing links when frame is to be forwarded on segment uses CSMACD to access segment

transparent hosts are unaware of presence of switches

plug-and-play self-learning switches do not need to be configured

5 DataLink Layer 5-51

Switch allows multiple simultaneous transmissions

hosts have dedicated direct connection to switch

switches buffer packets Ethernet protocol used on

each incoming link but no collisions full duplex each link is its own collision

domain switching A-to-Arsquo and B-

to-Brsquo simultaneously without collisions not possible with dumb hub

A

Arsquo

B

Brsquo

C

Crsquo

switch with six interfaces(123456)

1 23

45

6

5 DataLink Layer 5-52

Switch Table

Q how does switch know that Arsquo reachable via interface 4 Brsquo reachable via interface 5

A each switch has a switch table each entry (MAC address of host interface

to reach host time stamp)

looks like a routing table Q how are entries created

maintained in switch table something like a routing

protocol

A

Arsquo

B

Brsquo

C

Crsquo

switch with six interfaces(123456)

1 23

45

6

5 DataLink Layer 5-53

Switch self-learning

switch learns which hosts can be reached through which interfaces when frame received

switch ldquolearnsrdquo location of sender incoming LAN segment

records senderlocation pair in switch table

A

Arsquo

B

Brsquo

C

Crsquo

1 23

45

6

A Arsquo

Source ADest Arsquo

MAC addr interface TTL

Switch table (initially empty)

A 1 60

5 DataLink Layer 5-54

Forwarding

bull How do determine onto which LAN segment to forward framebull Looks like a routing problem

hub

hubhub

switch1

2 3

5 DataLink Layer 5-55

Self learning

A switch has a switch table entry in switch table

(MAC Address Interface Time Stamp) stale entries in table dropped (TTL can be 60

min) switch learns which hosts can be reached through

which interfaces when frame received switch ldquolearnsrdquo location

of sender incoming LAN segment records senderlocation pair in switch table

5 DataLink Layer 5-56

Self-learning forwarding example

A

Arsquo

B

Brsquo

C

Crsquo

1 23

45

6

A Arsquo

Source ADest Arsquo

MAC addr interface TTL

Switch table (initially empty)

A 1 60

A ArsquoA ArsquoA ArsquoA ArsquoA Arsquo

frame destination unknownflood

Arsquo A

destination A location known

Arsquo 4 60

selective send

5 DataLink Layer 5-57

FilteringForwardingWhen switch receives a frame

index switch table using MAC dest addressif entry found for destination

then if dest on segment from which frame arrived

then drop the frame else forward the frame on interface indicated else flood

forward on all but the interface on which the frame arrived

5 DataLink Layer 5-58

Switch example

Suppose C sends frame to D

Switch receives frame from from C notes in bridge table that C is on interface 1 because D is not in table switch forwards frame into

interfaces 2 and 3

frame received by D

hub

hub hub

switch

A

B CD

EF

G H

I

address interface

ABEG

1123

12 3

5 DataLink Layer 5-59

Switch example

Suppose D replies back with frame to C

Switch receives frame from from D notes in bridge table that D is on interface 2 because C is in table switch forwards frame only to

interface 1

frame received by C

hub

hub hub

switch

A

B CD

EF

G H

I

address interface

ABEGC

11231

5 DataLink Layer 5-60

Switch traffic isolation switch installation breaks subnet into LAN

segments switch filters packets

same-LAN-segment frames not usually forwarded onto other LAN segments

segments become separate collision domains

hub hub hub

switch

collision domain collision domain

collision domain

5 DataLink Layer 5-61

Switches dedicated access Switch with many

interfaces Hosts have direct

connection to switch No collisions full duplex

Switching A-to-Arsquo and B-to-Brsquo simultaneously no collisions

switch

A

Arsquo

B

Brsquo

C

Crsquo

5 DataLink Layer 5-62

More on Switches

cut-through switching frame forwarded from input to output port without first collecting entire frameslight reduction in latency

combinations of shareddedicated 101001000 Mbps interfaces

5 DataLink Layer 5-63

Institutional network

hub

hubhub

switch

to externalnetwork

router

IP subnet

mail server

web server

5 DataLink Layer 5-64

Switches vs Routers both store-and-forward devices

routers network layer devices (examine network layer headers) switches are link layer devices

routers maintain routing tables implement routing algorithms

switches maintain switch tables implement filtering learning algorithms

5 DataLink Layer 5-65

Summary comparison

hubs routers switches

traffi c isolation

no yes yes

plug amp play yes no yes

optimal routing

no yes no

cut through

yes no yes

5 DataLink Layer 5-66

IEEE 802 Standards

The 802 working groups The important ones are marked with The ones marked with are hibernating The one marked with dagger gave up

  • Slide 1
  • Link Layer
  • Ethernet
  • Slide 4
  • Star topology
  • Ethernet Frame Structure
  • Ethernet Frame Structure (more)
  • Unreliable connectionless service
  • Ethernet uses CSMACD
  • Ethernet CSMACD algorithm
  • Ethernetrsquos CSMACD (more)
  • Collision Detection
  • Algorithm (cont)
  • Binary Exponential Backoff
  • Ethernet MAC Sublayer Protocol (2)
  • CSMACD efficiency
  • Ethernet Performance
  • 8023 Ethernet Standards Link amp Physical Layers
  • Manchester encoding
  • Ethernet Cabling
  • Ethernet Cabling (2)
  • Ethernet Cabling (3)
  • 10BaseT and 100BaseT
  • 100Mbps Fast Ethernet
  • Fast Ethernet
  • Gbit Ethernet
  • Gigabit Ethernet
  • Wireless Link Characteristics
  • Wireless network characteristics
  • IEEE 80211 Wireless LAN
  • Slide 31
  • 80211 LAN architecture
  • 80211 Channels association
  • IEEE 80211 multiple access
  • IEEE 80211 MAC Protocol CSMACA
  • Avoiding collisions (more)
  • Collision Avoidance RTS-CTS exchange
  • Slide 38
  • Slide 39
  • Hubs
  • Interconnecting with hubs
  • Inter - Networking
  • Learning Bridges
  • Spanning Tree Algorithm
  • Algorithm Overview
  • Algorithm Details
  • Algorithm Detail (cont)
  • Broadcast and Multicast
  • Limitations of Bridges
  • Switch
  • Switch allows multiple simultaneous transmissions
  • Switch Table
  • Switch self-learning
  • Forwarding
  • Self learning
  • Self-learning forwarding example
  • FilteringForwarding
  • Switch example
  • Slide 59
  • Switch traffic isolation
  • Switches dedicated access
  • More on Switches
  • Institutional network
  • Switches vs Routers
  • Summary comparison
  • IEEE 802 Standards
Page 25: Chapter 5B

5 DataLink Layer 5-25

Fast Ethernet

The original fast Ethernet cabling

5 DataLink Layer 5-26

Gbit Ethernet

uses standard Ethernet frame format allows for point-to-point links and shared

broadcast channels in shared mode CSMACD is used short

distances between nodes required for efficiency

uses hubs called here ldquoBuffered Distributorsrdquo Full-Duplex at 1 Gbps for point-to-point links 10 Gbps now

5 DataLink Layer 5-27

Gigabit Ethernet

Gigabit Ethernet cabling

5 DataLink Layer 5-28

Wireless Link CharacteristicsDifferences from wired link hellip

decreased signal strength radio signal attenuates as it propagates through matter (path loss)

interference from other sources standardized wireless network frequencies (eg 24 GHz) shared by other devices (eg phone) devices (motors) interfere as well

multipath propagation radio signal reflects off objects ground arriving ad destination at slightly different times

hellip make communication across (even a point to point) wireless link much more ldquodifficultrdquo

5 DataLink Layer 5-29

Wireless network characteristicsMultiple wireless senders and receivers create

additional problems (beyond multiple access)

AB

C

Hidden terminal problem B A hear each other B C hear each other A C can not hear each

othermeans A C unaware of their

interference at B

A B C

Arsquos signalstrength

space

Crsquos signalstrength

Signal fading B A hear each other B C hear each other A C can not hear each other

interferring at B

5 DataLink Layer 5-30

IEEE 80211 Wireless LAN

80211b 24-5 GHz unlicensed

radio spectrum up to 11 Mbps direct sequence

spread spectrum (DSSS) in physical layer

bull all hosts use same chipping code

widely deployed using base stations

80211a 5-6 GHz range up to 54 Mbps

80211g 24-5 GHz range up to 54 Mbps

All use CSMACA for multiple access

All have base-station and ad-hoc network versions

5 DataLink Layer 5-31

Figure 3-12

ISM bands

5 DataLink Layer 5-32

80211 LAN architecture

wireless host communicates with base station base station = access

point (AP) Basic Service Set (BSS)

(aka ldquocellrdquo) in infrastructure mode contains wireless hosts access point (AP) base

station ad hoc mode hosts

only

BSS 1

BSS 2

Internet

hub switchor routerAP

AP

5 DataLink Layer 5-33

80211 Channels association 80211b 24GHz-2485GHz spectrum divided

into 11 channels at different frequencies AP admin chooses frequency for AP interference possible channel can be same as

that chosen by neighboring AP host must associate with an AP

scans channels listening for beacon frames containing APrsquos name (SSID) and MAC address

selects AP to associate with may perform authentication [Chapter 8] will typically run DHCP to get IP address in

APrsquos subnet

5 DataLink Layer 5-34

IEEE 80211 multiple access avoid collisions 2+ nodes transmitting at same

time 80211 CSMA - sense before transmitting

donrsquot collide with ongoing transmission by other node

80211 no collision detection difficult to receive (sense collisions) when transmitting

due to weak received signals (fading) canrsquot sense all collisions in any case hidden terminal

fading goal avoid collisions CSMAC(ollision)A(voidance)

AB

CA B C

Arsquos signalstrength

space

Crsquos signalstrength

5 DataLink Layer 5-35

IEEE 80211 MAC Protocol CSMACA

80211 sender1 if sense channel idle for DIFS then

transmit entire frame (no CD)2 if sense channel busy then

start random backoff timetimer counts down while channel idletransmit when timer expiresif no ACK increase random backoff

interval repeat 2

80211 receiver- if frame received OK

return ACK after SIFS (ACK needed due to hidden terminal problem)

sender receiver

DIFS

data

SIFS

ACK

5 DataLink Layer 5-36

Avoiding collisions (more)

idea allow sender to ldquoreserverdquo channel rather than random access of data frames avoid collisions of long data frames

sender first transmits small request-to-send (RTS) packets to BS using CSMA RTSs may still collide with each other (but theyrsquore

short) BS broadcasts clear-to-send CTS in response to RTS RTS heard by all nodes

sender transmits data frame other stations defer transmissions

Avoid data frame collisions completely using small reservation packets

5 DataLink Layer 5-37

Collision Avoidance RTS-CTS exchange

APA B

time

RTS(A)RTS(B)

RTS(A)

CTS(A) CTS(A)

DATA (A)

ACK(A) ACK(A)

reservation collision

defer

5 DataLink Layer 5-38

Manchester encoding

Used in 10BaseT Each bit has a transition Allows clocks in sending and receiving nodes to

synchronize to each other no need for a centralized global clock among nodes

Hey this is physical-layer stuff

5 DataLink Layer 5-39

Link Layer

51 Introduction and services

52 Error detection and correction

53Multiple access protocols

54 Link-Layer Addressing

55 Ethernet

56 Interconnections Hubs and switches

57 PPP 58 Link Virtualization

ATM

5 DataLink Layer 5-40

HubsHubs are essentially physical-layer repeaters

bits coming from one link go out all other links at the same rate no frame buffering no CSMACD at hub adapters detect collisions provides net management functionality

twisted pair

hub

5 DataLink Layer 5-41

Interconnecting with hubs Backbone hub interconnects LAN segments Extends max distance between nodes But individual segment collision domains become one large

collision domain Canrsquot interconnect 10BaseT amp 100BaseT

hub

hubhub

hub

5 DataLink Layer 5-42

Inter - Networking

Hubs Bridges Switches Routers

5 DataLink Layer 5-43

Learning Bridges Do not forward when unnecessary Maintain forwarding table

HostPort

A 1 B 1 C 1 X 2 Y 2 Z 2

Learn table entries based on source address Table is an optimization need not be complete Always forward broadcast frames

A

Bridge

B C

X Y Z

Port 1

Port 2

5 DataLink Layer 5-44

Spanning Tree Algorithm Problem loops

Bridges run a distributed spanning tree algorithm select which bridges actively forward developed by Radia Perlman now IEEE 8021 specification

A

C

E

D

B

K

F

H

J

G

I

B3

B7

B4

B2

B5

B1

B6

(a) (b)

5 DataLink Layer 5-45

Algorithm Overview Each bridge has unique id (eg B1 B2

B3) Select bridge with smallest id as root Select bridge on each LAN closest to root

as designated bridge (use id to break ties) Each bridge forwards frames over each LAN for which it is the designated bridge

A

C

E

D

B

K

F

H

J

G

I

B5

B2

B3

B7

B4

B1

B6

5 DataLink Layer 5-46

Algorithm Details

Bridges exchange configuration messages id for bridge sending the message id for what the sending bridge believes to be

root bridge distance (hops) from sending bridge to root

bridge Each bridge records current best

configuration message for each port Initially each bridge believes it is the root

5 DataLink Layer 5-47

Algorithm Detail (cont) When learn not root stop generating config

messages in steady state only root generates configuration messages

When learn not designated bridge stop forwarding config messages in steady state only designated bridges forward config

messages

Root continues to periodically send config messages If any bridge does not receive config message after

a period of time it starts generating config messages claiming to be the root

5 DataLink Layer 5-48

Broadcast and Multicast Forward all broadcastmulticast frames

current practice Learn when no group members

downstream Accomplished by having each member of

group G send a frame to bridge multicast address with G in source field

5 DataLink Layer 5-49

Limitations of Bridges

Do not scale spanning tree algorithm does not scale broadcast does not scale

Do not accommodate heterogeneity

Caution beware of transparency

5 DataLink Layer 5-50

Switch link-layer device smarter than hubs take active

role store forward Ethernet frames examine incoming framersquos MAC address selectively

forward frame to one-or-more outgoing links when frame is to be forwarded on segment uses CSMACD to access segment

transparent hosts are unaware of presence of switches

plug-and-play self-learning switches do not need to be configured

5 DataLink Layer 5-51

Switch allows multiple simultaneous transmissions

hosts have dedicated direct connection to switch

switches buffer packets Ethernet protocol used on

each incoming link but no collisions full duplex each link is its own collision

domain switching A-to-Arsquo and B-

to-Brsquo simultaneously without collisions not possible with dumb hub

A

Arsquo

B

Brsquo

C

Crsquo

switch with six interfaces(123456)

1 23

45

6

5 DataLink Layer 5-52

Switch Table

Q how does switch know that Arsquo reachable via interface 4 Brsquo reachable via interface 5

A each switch has a switch table each entry (MAC address of host interface

to reach host time stamp)

looks like a routing table Q how are entries created

maintained in switch table something like a routing

protocol

A

Arsquo

B

Brsquo

C

Crsquo

switch with six interfaces(123456)

1 23

45

6

5 DataLink Layer 5-53

Switch self-learning

switch learns which hosts can be reached through which interfaces when frame received

switch ldquolearnsrdquo location of sender incoming LAN segment

records senderlocation pair in switch table

A

Arsquo

B

Brsquo

C

Crsquo

1 23

45

6

A Arsquo

Source ADest Arsquo

MAC addr interface TTL

Switch table (initially empty)

A 1 60

5 DataLink Layer 5-54

Forwarding

bull How do determine onto which LAN segment to forward framebull Looks like a routing problem

hub

hubhub

switch1

2 3

5 DataLink Layer 5-55

Self learning

A switch has a switch table entry in switch table

(MAC Address Interface Time Stamp) stale entries in table dropped (TTL can be 60

min) switch learns which hosts can be reached through

which interfaces when frame received switch ldquolearnsrdquo location

of sender incoming LAN segment records senderlocation pair in switch table

5 DataLink Layer 5-56

Self-learning forwarding example

A

Arsquo

B

Brsquo

C

Crsquo

1 23

45

6

A Arsquo

Source ADest Arsquo

MAC addr interface TTL

Switch table (initially empty)

A 1 60

A ArsquoA ArsquoA ArsquoA ArsquoA Arsquo

frame destination unknownflood

Arsquo A

destination A location known

Arsquo 4 60

selective send

5 DataLink Layer 5-57

FilteringForwardingWhen switch receives a frame

index switch table using MAC dest addressif entry found for destination

then if dest on segment from which frame arrived

then drop the frame else forward the frame on interface indicated else flood

forward on all but the interface on which the frame arrived

5 DataLink Layer 5-58

Switch example

Suppose C sends frame to D

Switch receives frame from from C notes in bridge table that C is on interface 1 because D is not in table switch forwards frame into

interfaces 2 and 3

frame received by D

hub

hub hub

switch

A

B CD

EF

G H

I

address interface

ABEG

1123

12 3

5 DataLink Layer 5-59

Switch example

Suppose D replies back with frame to C

Switch receives frame from from D notes in bridge table that D is on interface 2 because C is in table switch forwards frame only to

interface 1

frame received by C

hub

hub hub

switch

A

B CD

EF

G H

I

address interface

ABEGC

11231

5 DataLink Layer 5-60

Switch traffic isolation switch installation breaks subnet into LAN

segments switch filters packets

same-LAN-segment frames not usually forwarded onto other LAN segments

segments become separate collision domains

hub hub hub

switch

collision domain collision domain

collision domain

5 DataLink Layer 5-61

Switches dedicated access Switch with many

interfaces Hosts have direct

connection to switch No collisions full duplex

Switching A-to-Arsquo and B-to-Brsquo simultaneously no collisions

switch

A

Arsquo

B

Brsquo

C

Crsquo

5 DataLink Layer 5-62

More on Switches

cut-through switching frame forwarded from input to output port without first collecting entire frameslight reduction in latency

combinations of shareddedicated 101001000 Mbps interfaces

5 DataLink Layer 5-63

Institutional network

hub

hubhub

switch

to externalnetwork

router

IP subnet

mail server

web server

5 DataLink Layer 5-64

Switches vs Routers both store-and-forward devices

routers network layer devices (examine network layer headers) switches are link layer devices

routers maintain routing tables implement routing algorithms

switches maintain switch tables implement filtering learning algorithms

5 DataLink Layer 5-65

Summary comparison

hubs routers switches

traffi c isolation

no yes yes

plug amp play yes no yes

optimal routing

no yes no

cut through

yes no yes

5 DataLink Layer 5-66

IEEE 802 Standards

The 802 working groups The important ones are marked with The ones marked with are hibernating The one marked with dagger gave up

  • Slide 1
  • Link Layer
  • Ethernet
  • Slide 4
  • Star topology
  • Ethernet Frame Structure
  • Ethernet Frame Structure (more)
  • Unreliable connectionless service
  • Ethernet uses CSMACD
  • Ethernet CSMACD algorithm
  • Ethernetrsquos CSMACD (more)
  • Collision Detection
  • Algorithm (cont)
  • Binary Exponential Backoff
  • Ethernet MAC Sublayer Protocol (2)
  • CSMACD efficiency
  • Ethernet Performance
  • 8023 Ethernet Standards Link amp Physical Layers
  • Manchester encoding
  • Ethernet Cabling
  • Ethernet Cabling (2)
  • Ethernet Cabling (3)
  • 10BaseT and 100BaseT
  • 100Mbps Fast Ethernet
  • Fast Ethernet
  • Gbit Ethernet
  • Gigabit Ethernet
  • Wireless Link Characteristics
  • Wireless network characteristics
  • IEEE 80211 Wireless LAN
  • Slide 31
  • 80211 LAN architecture
  • 80211 Channels association
  • IEEE 80211 multiple access
  • IEEE 80211 MAC Protocol CSMACA
  • Avoiding collisions (more)
  • Collision Avoidance RTS-CTS exchange
  • Slide 38
  • Slide 39
  • Hubs
  • Interconnecting with hubs
  • Inter - Networking
  • Learning Bridges
  • Spanning Tree Algorithm
  • Algorithm Overview
  • Algorithm Details
  • Algorithm Detail (cont)
  • Broadcast and Multicast
  • Limitations of Bridges
  • Switch
  • Switch allows multiple simultaneous transmissions
  • Switch Table
  • Switch self-learning
  • Forwarding
  • Self learning
  • Self-learning forwarding example
  • FilteringForwarding
  • Switch example
  • Slide 59
  • Switch traffic isolation
  • Switches dedicated access
  • More on Switches
  • Institutional network
  • Switches vs Routers
  • Summary comparison
  • IEEE 802 Standards
Page 26: Chapter 5B

5 DataLink Layer 5-26

Gbit Ethernet

uses standard Ethernet frame format allows for point-to-point links and shared

broadcast channels in shared mode CSMACD is used short

distances between nodes required for efficiency

uses hubs called here ldquoBuffered Distributorsrdquo Full-Duplex at 1 Gbps for point-to-point links 10 Gbps now

5 DataLink Layer 5-27

Gigabit Ethernet

Gigabit Ethernet cabling

5 DataLink Layer 5-28

Wireless Link CharacteristicsDifferences from wired link hellip

decreased signal strength radio signal attenuates as it propagates through matter (path loss)

interference from other sources standardized wireless network frequencies (eg 24 GHz) shared by other devices (eg phone) devices (motors) interfere as well

multipath propagation radio signal reflects off objects ground arriving ad destination at slightly different times

hellip make communication across (even a point to point) wireless link much more ldquodifficultrdquo

5 DataLink Layer 5-29

Wireless network characteristicsMultiple wireless senders and receivers create

additional problems (beyond multiple access)

AB

C

Hidden terminal problem B A hear each other B C hear each other A C can not hear each

othermeans A C unaware of their

interference at B

A B C

Arsquos signalstrength

space

Crsquos signalstrength

Signal fading B A hear each other B C hear each other A C can not hear each other

interferring at B

5 DataLink Layer 5-30

IEEE 80211 Wireless LAN

80211b 24-5 GHz unlicensed

radio spectrum up to 11 Mbps direct sequence

spread spectrum (DSSS) in physical layer

bull all hosts use same chipping code

widely deployed using base stations

80211a 5-6 GHz range up to 54 Mbps

80211g 24-5 GHz range up to 54 Mbps

All use CSMACA for multiple access

All have base-station and ad-hoc network versions

5 DataLink Layer 5-31

Figure 3-12

ISM bands

5 DataLink Layer 5-32

80211 LAN architecture

wireless host communicates with base station base station = access

point (AP) Basic Service Set (BSS)

(aka ldquocellrdquo) in infrastructure mode contains wireless hosts access point (AP) base

station ad hoc mode hosts

only

BSS 1

BSS 2

Internet

hub switchor routerAP

AP

5 DataLink Layer 5-33

80211 Channels association 80211b 24GHz-2485GHz spectrum divided

into 11 channels at different frequencies AP admin chooses frequency for AP interference possible channel can be same as

that chosen by neighboring AP host must associate with an AP

scans channels listening for beacon frames containing APrsquos name (SSID) and MAC address

selects AP to associate with may perform authentication [Chapter 8] will typically run DHCP to get IP address in

APrsquos subnet

5 DataLink Layer 5-34

IEEE 80211 multiple access avoid collisions 2+ nodes transmitting at same

time 80211 CSMA - sense before transmitting

donrsquot collide with ongoing transmission by other node

80211 no collision detection difficult to receive (sense collisions) when transmitting

due to weak received signals (fading) canrsquot sense all collisions in any case hidden terminal

fading goal avoid collisions CSMAC(ollision)A(voidance)

AB

CA B C

Arsquos signalstrength

space

Crsquos signalstrength

5 DataLink Layer 5-35

IEEE 80211 MAC Protocol CSMACA

80211 sender1 if sense channel idle for DIFS then

transmit entire frame (no CD)2 if sense channel busy then

start random backoff timetimer counts down while channel idletransmit when timer expiresif no ACK increase random backoff

interval repeat 2

80211 receiver- if frame received OK

return ACK after SIFS (ACK needed due to hidden terminal problem)

sender receiver

DIFS

data

SIFS

ACK

5 DataLink Layer 5-36

Avoiding collisions (more)

idea allow sender to ldquoreserverdquo channel rather than random access of data frames avoid collisions of long data frames

sender first transmits small request-to-send (RTS) packets to BS using CSMA RTSs may still collide with each other (but theyrsquore

short) BS broadcasts clear-to-send CTS in response to RTS RTS heard by all nodes

sender transmits data frame other stations defer transmissions

Avoid data frame collisions completely using small reservation packets

5 DataLink Layer 5-37

Collision Avoidance RTS-CTS exchange

APA B

time

RTS(A)RTS(B)

RTS(A)

CTS(A) CTS(A)

DATA (A)

ACK(A) ACK(A)

reservation collision

defer

5 DataLink Layer 5-38

Manchester encoding

Used in 10BaseT Each bit has a transition Allows clocks in sending and receiving nodes to

synchronize to each other no need for a centralized global clock among nodes

Hey this is physical-layer stuff

5 DataLink Layer 5-39

Link Layer

51 Introduction and services

52 Error detection and correction

53Multiple access protocols

54 Link-Layer Addressing

55 Ethernet

56 Interconnections Hubs and switches

57 PPP 58 Link Virtualization

ATM

5 DataLink Layer 5-40

HubsHubs are essentially physical-layer repeaters

bits coming from one link go out all other links at the same rate no frame buffering no CSMACD at hub adapters detect collisions provides net management functionality

twisted pair

hub

5 DataLink Layer 5-41

Interconnecting with hubs Backbone hub interconnects LAN segments Extends max distance between nodes But individual segment collision domains become one large

collision domain Canrsquot interconnect 10BaseT amp 100BaseT

hub

hubhub

hub

5 DataLink Layer 5-42

Inter - Networking

Hubs Bridges Switches Routers

5 DataLink Layer 5-43

Learning Bridges Do not forward when unnecessary Maintain forwarding table

HostPort

A 1 B 1 C 1 X 2 Y 2 Z 2

Learn table entries based on source address Table is an optimization need not be complete Always forward broadcast frames

A

Bridge

B C

X Y Z

Port 1

Port 2

5 DataLink Layer 5-44

Spanning Tree Algorithm Problem loops

Bridges run a distributed spanning tree algorithm select which bridges actively forward developed by Radia Perlman now IEEE 8021 specification

A

C

E

D

B

K

F

H

J

G

I

B3

B7

B4

B2

B5

B1

B6

(a) (b)

5 DataLink Layer 5-45

Algorithm Overview Each bridge has unique id (eg B1 B2

B3) Select bridge with smallest id as root Select bridge on each LAN closest to root

as designated bridge (use id to break ties) Each bridge forwards frames over each LAN for which it is the designated bridge

A

C

E

D

B

K

F

H

J

G

I

B5

B2

B3

B7

B4

B1

B6

5 DataLink Layer 5-46

Algorithm Details

Bridges exchange configuration messages id for bridge sending the message id for what the sending bridge believes to be

root bridge distance (hops) from sending bridge to root

bridge Each bridge records current best

configuration message for each port Initially each bridge believes it is the root

5 DataLink Layer 5-47

Algorithm Detail (cont) When learn not root stop generating config

messages in steady state only root generates configuration messages

When learn not designated bridge stop forwarding config messages in steady state only designated bridges forward config

messages

Root continues to periodically send config messages If any bridge does not receive config message after

a period of time it starts generating config messages claiming to be the root

5 DataLink Layer 5-48

Broadcast and Multicast Forward all broadcastmulticast frames

current practice Learn when no group members

downstream Accomplished by having each member of

group G send a frame to bridge multicast address with G in source field

5 DataLink Layer 5-49

Limitations of Bridges

Do not scale spanning tree algorithm does not scale broadcast does not scale

Do not accommodate heterogeneity

Caution beware of transparency

5 DataLink Layer 5-50

Switch link-layer device smarter than hubs take active

role store forward Ethernet frames examine incoming framersquos MAC address selectively

forward frame to one-or-more outgoing links when frame is to be forwarded on segment uses CSMACD to access segment

transparent hosts are unaware of presence of switches

plug-and-play self-learning switches do not need to be configured

5 DataLink Layer 5-51

Switch allows multiple simultaneous transmissions

hosts have dedicated direct connection to switch

switches buffer packets Ethernet protocol used on

each incoming link but no collisions full duplex each link is its own collision

domain switching A-to-Arsquo and B-

to-Brsquo simultaneously without collisions not possible with dumb hub

A

Arsquo

B

Brsquo

C

Crsquo

switch with six interfaces(123456)

1 23

45

6

5 DataLink Layer 5-52

Switch Table

Q how does switch know that Arsquo reachable via interface 4 Brsquo reachable via interface 5

A each switch has a switch table each entry (MAC address of host interface

to reach host time stamp)

looks like a routing table Q how are entries created

maintained in switch table something like a routing

protocol

A

Arsquo

B

Brsquo

C

Crsquo

switch with six interfaces(123456)

1 23

45

6

5 DataLink Layer 5-53

Switch self-learning

switch learns which hosts can be reached through which interfaces when frame received

switch ldquolearnsrdquo location of sender incoming LAN segment

records senderlocation pair in switch table

A

Arsquo

B

Brsquo

C

Crsquo

1 23

45

6

A Arsquo

Source ADest Arsquo

MAC addr interface TTL

Switch table (initially empty)

A 1 60

5 DataLink Layer 5-54

Forwarding

bull How do determine onto which LAN segment to forward framebull Looks like a routing problem

hub

hubhub

switch1

2 3

5 DataLink Layer 5-55

Self learning

A switch has a switch table entry in switch table

(MAC Address Interface Time Stamp) stale entries in table dropped (TTL can be 60

min) switch learns which hosts can be reached through

which interfaces when frame received switch ldquolearnsrdquo location

of sender incoming LAN segment records senderlocation pair in switch table

5 DataLink Layer 5-56

Self-learning forwarding example

A

Arsquo

B

Brsquo

C

Crsquo

1 23

45

6

A Arsquo

Source ADest Arsquo

MAC addr interface TTL

Switch table (initially empty)

A 1 60

A ArsquoA ArsquoA ArsquoA ArsquoA Arsquo

frame destination unknownflood

Arsquo A

destination A location known

Arsquo 4 60

selective send

5 DataLink Layer 5-57

FilteringForwardingWhen switch receives a frame

index switch table using MAC dest addressif entry found for destination

then if dest on segment from which frame arrived

then drop the frame else forward the frame on interface indicated else flood

forward on all but the interface on which the frame arrived

5 DataLink Layer 5-58

Switch example

Suppose C sends frame to D

Switch receives frame from from C notes in bridge table that C is on interface 1 because D is not in table switch forwards frame into

interfaces 2 and 3

frame received by D

hub

hub hub

switch

A

B CD

EF

G H

I

address interface

ABEG

1123

12 3

5 DataLink Layer 5-59

Switch example

Suppose D replies back with frame to C

Switch receives frame from from D notes in bridge table that D is on interface 2 because C is in table switch forwards frame only to

interface 1

frame received by C

hub

hub hub

switch

A

B CD

EF

G H

I

address interface

ABEGC

11231

5 DataLink Layer 5-60

Switch traffic isolation switch installation breaks subnet into LAN

segments switch filters packets

same-LAN-segment frames not usually forwarded onto other LAN segments

segments become separate collision domains

hub hub hub

switch

collision domain collision domain

collision domain

5 DataLink Layer 5-61

Switches dedicated access Switch with many

interfaces Hosts have direct

connection to switch No collisions full duplex

Switching A-to-Arsquo and B-to-Brsquo simultaneously no collisions

switch

A

Arsquo

B

Brsquo

C

Crsquo

5 DataLink Layer 5-62

More on Switches

cut-through switching frame forwarded from input to output port without first collecting entire frameslight reduction in latency

combinations of shareddedicated 101001000 Mbps interfaces

5 DataLink Layer 5-63

Institutional network

hub

hubhub

switch

to externalnetwork

router

IP subnet

mail server

web server

5 DataLink Layer 5-64

Switches vs Routers both store-and-forward devices

routers network layer devices (examine network layer headers) switches are link layer devices

routers maintain routing tables implement routing algorithms

switches maintain switch tables implement filtering learning algorithms

5 DataLink Layer 5-65

Summary comparison

hubs routers switches

traffi c isolation

no yes yes

plug amp play yes no yes

optimal routing

no yes no

cut through

yes no yes

5 DataLink Layer 5-66

IEEE 802 Standards

The 802 working groups The important ones are marked with The ones marked with are hibernating The one marked with dagger gave up

  • Slide 1
  • Link Layer
  • Ethernet
  • Slide 4
  • Star topology
  • Ethernet Frame Structure
  • Ethernet Frame Structure (more)
  • Unreliable connectionless service
  • Ethernet uses CSMACD
  • Ethernet CSMACD algorithm
  • Ethernetrsquos CSMACD (more)
  • Collision Detection
  • Algorithm (cont)
  • Binary Exponential Backoff
  • Ethernet MAC Sublayer Protocol (2)
  • CSMACD efficiency
  • Ethernet Performance
  • 8023 Ethernet Standards Link amp Physical Layers
  • Manchester encoding
  • Ethernet Cabling
  • Ethernet Cabling (2)
  • Ethernet Cabling (3)
  • 10BaseT and 100BaseT
  • 100Mbps Fast Ethernet
  • Fast Ethernet
  • Gbit Ethernet
  • Gigabit Ethernet
  • Wireless Link Characteristics
  • Wireless network characteristics
  • IEEE 80211 Wireless LAN
  • Slide 31
  • 80211 LAN architecture
  • 80211 Channels association
  • IEEE 80211 multiple access
  • IEEE 80211 MAC Protocol CSMACA
  • Avoiding collisions (more)
  • Collision Avoidance RTS-CTS exchange
  • Slide 38
  • Slide 39
  • Hubs
  • Interconnecting with hubs
  • Inter - Networking
  • Learning Bridges
  • Spanning Tree Algorithm
  • Algorithm Overview
  • Algorithm Details
  • Algorithm Detail (cont)
  • Broadcast and Multicast
  • Limitations of Bridges
  • Switch
  • Switch allows multiple simultaneous transmissions
  • Switch Table
  • Switch self-learning
  • Forwarding
  • Self learning
  • Self-learning forwarding example
  • FilteringForwarding
  • Switch example
  • Slide 59
  • Switch traffic isolation
  • Switches dedicated access
  • More on Switches
  • Institutional network
  • Switches vs Routers
  • Summary comparison
  • IEEE 802 Standards
Page 27: Chapter 5B

5 DataLink Layer 5-27

Gigabit Ethernet

Gigabit Ethernet cabling

5 DataLink Layer 5-28

Wireless Link CharacteristicsDifferences from wired link hellip

decreased signal strength radio signal attenuates as it propagates through matter (path loss)

interference from other sources standardized wireless network frequencies (eg 24 GHz) shared by other devices (eg phone) devices (motors) interfere as well

multipath propagation radio signal reflects off objects ground arriving ad destination at slightly different times

hellip make communication across (even a point to point) wireless link much more ldquodifficultrdquo

5 DataLink Layer 5-29

Wireless network characteristicsMultiple wireless senders and receivers create

additional problems (beyond multiple access)

AB

C

Hidden terminal problem B A hear each other B C hear each other A C can not hear each

othermeans A C unaware of their

interference at B

A B C

Arsquos signalstrength

space

Crsquos signalstrength

Signal fading B A hear each other B C hear each other A C can not hear each other

interferring at B

5 DataLink Layer 5-30

IEEE 80211 Wireless LAN

80211b 24-5 GHz unlicensed

radio spectrum up to 11 Mbps direct sequence

spread spectrum (DSSS) in physical layer

bull all hosts use same chipping code

widely deployed using base stations

80211a 5-6 GHz range up to 54 Mbps

80211g 24-5 GHz range up to 54 Mbps

All use CSMACA for multiple access

All have base-station and ad-hoc network versions

5 DataLink Layer 5-31

Figure 3-12

ISM bands

5 DataLink Layer 5-32

80211 LAN architecture

wireless host communicates with base station base station = access

point (AP) Basic Service Set (BSS)

(aka ldquocellrdquo) in infrastructure mode contains wireless hosts access point (AP) base

station ad hoc mode hosts

only

BSS 1

BSS 2

Internet

hub switchor routerAP

AP

5 DataLink Layer 5-33

80211 Channels association 80211b 24GHz-2485GHz spectrum divided

into 11 channels at different frequencies AP admin chooses frequency for AP interference possible channel can be same as

that chosen by neighboring AP host must associate with an AP

scans channels listening for beacon frames containing APrsquos name (SSID) and MAC address

selects AP to associate with may perform authentication [Chapter 8] will typically run DHCP to get IP address in

APrsquos subnet

5 DataLink Layer 5-34

IEEE 80211 multiple access avoid collisions 2+ nodes transmitting at same

time 80211 CSMA - sense before transmitting

donrsquot collide with ongoing transmission by other node

80211 no collision detection difficult to receive (sense collisions) when transmitting

due to weak received signals (fading) canrsquot sense all collisions in any case hidden terminal

fading goal avoid collisions CSMAC(ollision)A(voidance)

AB

CA B C

Arsquos signalstrength

space

Crsquos signalstrength

5 DataLink Layer 5-35

IEEE 80211 MAC Protocol CSMACA

80211 sender1 if sense channel idle for DIFS then

transmit entire frame (no CD)2 if sense channel busy then

start random backoff timetimer counts down while channel idletransmit when timer expiresif no ACK increase random backoff

interval repeat 2

80211 receiver- if frame received OK

return ACK after SIFS (ACK needed due to hidden terminal problem)

sender receiver

DIFS

data

SIFS

ACK

5 DataLink Layer 5-36

Avoiding collisions (more)

idea allow sender to ldquoreserverdquo channel rather than random access of data frames avoid collisions of long data frames

sender first transmits small request-to-send (RTS) packets to BS using CSMA RTSs may still collide with each other (but theyrsquore

short) BS broadcasts clear-to-send CTS in response to RTS RTS heard by all nodes

sender transmits data frame other stations defer transmissions

Avoid data frame collisions completely using small reservation packets

5 DataLink Layer 5-37

Collision Avoidance RTS-CTS exchange

APA B

time

RTS(A)RTS(B)

RTS(A)

CTS(A) CTS(A)

DATA (A)

ACK(A) ACK(A)

reservation collision

defer

5 DataLink Layer 5-38

Manchester encoding

Used in 10BaseT Each bit has a transition Allows clocks in sending and receiving nodes to

synchronize to each other no need for a centralized global clock among nodes

Hey this is physical-layer stuff

5 DataLink Layer 5-39

Link Layer

51 Introduction and services

52 Error detection and correction

53Multiple access protocols

54 Link-Layer Addressing

55 Ethernet

56 Interconnections Hubs and switches

57 PPP 58 Link Virtualization

ATM

5 DataLink Layer 5-40

HubsHubs are essentially physical-layer repeaters

bits coming from one link go out all other links at the same rate no frame buffering no CSMACD at hub adapters detect collisions provides net management functionality

twisted pair

hub

5 DataLink Layer 5-41

Interconnecting with hubs Backbone hub interconnects LAN segments Extends max distance between nodes But individual segment collision domains become one large

collision domain Canrsquot interconnect 10BaseT amp 100BaseT

hub

hubhub

hub

5 DataLink Layer 5-42

Inter - Networking

Hubs Bridges Switches Routers

5 DataLink Layer 5-43

Learning Bridges Do not forward when unnecessary Maintain forwarding table

HostPort

A 1 B 1 C 1 X 2 Y 2 Z 2

Learn table entries based on source address Table is an optimization need not be complete Always forward broadcast frames

A

Bridge

B C

X Y Z

Port 1

Port 2

5 DataLink Layer 5-44

Spanning Tree Algorithm Problem loops

Bridges run a distributed spanning tree algorithm select which bridges actively forward developed by Radia Perlman now IEEE 8021 specification

A

C

E

D

B

K

F

H

J

G

I

B3

B7

B4

B2

B5

B1

B6

(a) (b)

5 DataLink Layer 5-45

Algorithm Overview Each bridge has unique id (eg B1 B2

B3) Select bridge with smallest id as root Select bridge on each LAN closest to root

as designated bridge (use id to break ties) Each bridge forwards frames over each LAN for which it is the designated bridge

A

C

E

D

B

K

F

H

J

G

I

B5

B2

B3

B7

B4

B1

B6

5 DataLink Layer 5-46

Algorithm Details

Bridges exchange configuration messages id for bridge sending the message id for what the sending bridge believes to be

root bridge distance (hops) from sending bridge to root

bridge Each bridge records current best

configuration message for each port Initially each bridge believes it is the root

5 DataLink Layer 5-47

Algorithm Detail (cont) When learn not root stop generating config

messages in steady state only root generates configuration messages

When learn not designated bridge stop forwarding config messages in steady state only designated bridges forward config

messages

Root continues to periodically send config messages If any bridge does not receive config message after

a period of time it starts generating config messages claiming to be the root

5 DataLink Layer 5-48

Broadcast and Multicast Forward all broadcastmulticast frames

current practice Learn when no group members

downstream Accomplished by having each member of

group G send a frame to bridge multicast address with G in source field

5 DataLink Layer 5-49

Limitations of Bridges

Do not scale spanning tree algorithm does not scale broadcast does not scale

Do not accommodate heterogeneity

Caution beware of transparency

5 DataLink Layer 5-50

Switch link-layer device smarter than hubs take active

role store forward Ethernet frames examine incoming framersquos MAC address selectively

forward frame to one-or-more outgoing links when frame is to be forwarded on segment uses CSMACD to access segment

transparent hosts are unaware of presence of switches

plug-and-play self-learning switches do not need to be configured

5 DataLink Layer 5-51

Switch allows multiple simultaneous transmissions

hosts have dedicated direct connection to switch

switches buffer packets Ethernet protocol used on

each incoming link but no collisions full duplex each link is its own collision

domain switching A-to-Arsquo and B-

to-Brsquo simultaneously without collisions not possible with dumb hub

A

Arsquo

B

Brsquo

C

Crsquo

switch with six interfaces(123456)

1 23

45

6

5 DataLink Layer 5-52

Switch Table

Q how does switch know that Arsquo reachable via interface 4 Brsquo reachable via interface 5

A each switch has a switch table each entry (MAC address of host interface

to reach host time stamp)

looks like a routing table Q how are entries created

maintained in switch table something like a routing

protocol

A

Arsquo

B

Brsquo

C

Crsquo

switch with six interfaces(123456)

1 23

45

6

5 DataLink Layer 5-53

Switch self-learning

switch learns which hosts can be reached through which interfaces when frame received

switch ldquolearnsrdquo location of sender incoming LAN segment

records senderlocation pair in switch table

A

Arsquo

B

Brsquo

C

Crsquo

1 23

45

6

A Arsquo

Source ADest Arsquo

MAC addr interface TTL

Switch table (initially empty)

A 1 60

5 DataLink Layer 5-54

Forwarding

bull How do determine onto which LAN segment to forward framebull Looks like a routing problem

hub

hubhub

switch1

2 3

5 DataLink Layer 5-55

Self learning

A switch has a switch table entry in switch table

(MAC Address Interface Time Stamp) stale entries in table dropped (TTL can be 60

min) switch learns which hosts can be reached through

which interfaces when frame received switch ldquolearnsrdquo location

of sender incoming LAN segment records senderlocation pair in switch table

5 DataLink Layer 5-56

Self-learning forwarding example

A

Arsquo

B

Brsquo

C

Crsquo

1 23

45

6

A Arsquo

Source ADest Arsquo

MAC addr interface TTL

Switch table (initially empty)

A 1 60

A ArsquoA ArsquoA ArsquoA ArsquoA Arsquo

frame destination unknownflood

Arsquo A

destination A location known

Arsquo 4 60

selective send

5 DataLink Layer 5-57

FilteringForwardingWhen switch receives a frame

index switch table using MAC dest addressif entry found for destination

then if dest on segment from which frame arrived

then drop the frame else forward the frame on interface indicated else flood

forward on all but the interface on which the frame arrived

5 DataLink Layer 5-58

Switch example

Suppose C sends frame to D

Switch receives frame from from C notes in bridge table that C is on interface 1 because D is not in table switch forwards frame into

interfaces 2 and 3

frame received by D

hub

hub hub

switch

A

B CD

EF

G H

I

address interface

ABEG

1123

12 3

5 DataLink Layer 5-59

Switch example

Suppose D replies back with frame to C

Switch receives frame from from D notes in bridge table that D is on interface 2 because C is in table switch forwards frame only to

interface 1

frame received by C

hub

hub hub

switch

A

B CD

EF

G H

I

address interface

ABEGC

11231

5 DataLink Layer 5-60

Switch traffic isolation switch installation breaks subnet into LAN

segments switch filters packets

same-LAN-segment frames not usually forwarded onto other LAN segments

segments become separate collision domains

hub hub hub

switch

collision domain collision domain

collision domain

5 DataLink Layer 5-61

Switches dedicated access Switch with many

interfaces Hosts have direct

connection to switch No collisions full duplex

Switching A-to-Arsquo and B-to-Brsquo simultaneously no collisions

switch

A

Arsquo

B

Brsquo

C

Crsquo

5 DataLink Layer 5-62

More on Switches

cut-through switching frame forwarded from input to output port without first collecting entire frameslight reduction in latency

combinations of shareddedicated 101001000 Mbps interfaces

5 DataLink Layer 5-63

Institutional network

hub

hubhub

switch

to externalnetwork

router

IP subnet

mail server

web server

5 DataLink Layer 5-64

Switches vs Routers both store-and-forward devices

routers network layer devices (examine network layer headers) switches are link layer devices

routers maintain routing tables implement routing algorithms

switches maintain switch tables implement filtering learning algorithms

5 DataLink Layer 5-65

Summary comparison

hubs routers switches

traffi c isolation

no yes yes

plug amp play yes no yes

optimal routing

no yes no

cut through

yes no yes

5 DataLink Layer 5-66

IEEE 802 Standards

The 802 working groups The important ones are marked with The ones marked with are hibernating The one marked with dagger gave up

  • Slide 1
  • Link Layer
  • Ethernet
  • Slide 4
  • Star topology
  • Ethernet Frame Structure
  • Ethernet Frame Structure (more)
  • Unreliable connectionless service
  • Ethernet uses CSMACD
  • Ethernet CSMACD algorithm
  • Ethernetrsquos CSMACD (more)
  • Collision Detection
  • Algorithm (cont)
  • Binary Exponential Backoff
  • Ethernet MAC Sublayer Protocol (2)
  • CSMACD efficiency
  • Ethernet Performance
  • 8023 Ethernet Standards Link amp Physical Layers
  • Manchester encoding
  • Ethernet Cabling
  • Ethernet Cabling (2)
  • Ethernet Cabling (3)
  • 10BaseT and 100BaseT
  • 100Mbps Fast Ethernet
  • Fast Ethernet
  • Gbit Ethernet
  • Gigabit Ethernet
  • Wireless Link Characteristics
  • Wireless network characteristics
  • IEEE 80211 Wireless LAN
  • Slide 31
  • 80211 LAN architecture
  • 80211 Channels association
  • IEEE 80211 multiple access
  • IEEE 80211 MAC Protocol CSMACA
  • Avoiding collisions (more)
  • Collision Avoidance RTS-CTS exchange
  • Slide 38
  • Slide 39
  • Hubs
  • Interconnecting with hubs
  • Inter - Networking
  • Learning Bridges
  • Spanning Tree Algorithm
  • Algorithm Overview
  • Algorithm Details
  • Algorithm Detail (cont)
  • Broadcast and Multicast
  • Limitations of Bridges
  • Switch
  • Switch allows multiple simultaneous transmissions
  • Switch Table
  • Switch self-learning
  • Forwarding
  • Self learning
  • Self-learning forwarding example
  • FilteringForwarding
  • Switch example
  • Slide 59
  • Switch traffic isolation
  • Switches dedicated access
  • More on Switches
  • Institutional network
  • Switches vs Routers
  • Summary comparison
  • IEEE 802 Standards
Page 28: Chapter 5B

5 DataLink Layer 5-28

Wireless Link CharacteristicsDifferences from wired link hellip

decreased signal strength radio signal attenuates as it propagates through matter (path loss)

interference from other sources standardized wireless network frequencies (eg 24 GHz) shared by other devices (eg phone) devices (motors) interfere as well

multipath propagation radio signal reflects off objects ground arriving ad destination at slightly different times

hellip make communication across (even a point to point) wireless link much more ldquodifficultrdquo

5 DataLink Layer 5-29

Wireless network characteristicsMultiple wireless senders and receivers create

additional problems (beyond multiple access)

AB

C

Hidden terminal problem B A hear each other B C hear each other A C can not hear each

othermeans A C unaware of their

interference at B

A B C

Arsquos signalstrength

space

Crsquos signalstrength

Signal fading B A hear each other B C hear each other A C can not hear each other

interferring at B

5 DataLink Layer 5-30

IEEE 80211 Wireless LAN

80211b 24-5 GHz unlicensed

radio spectrum up to 11 Mbps direct sequence

spread spectrum (DSSS) in physical layer

bull all hosts use same chipping code

widely deployed using base stations

80211a 5-6 GHz range up to 54 Mbps

80211g 24-5 GHz range up to 54 Mbps

All use CSMACA for multiple access

All have base-station and ad-hoc network versions

5 DataLink Layer 5-31

Figure 3-12

ISM bands

5 DataLink Layer 5-32

80211 LAN architecture

wireless host communicates with base station base station = access

point (AP) Basic Service Set (BSS)

(aka ldquocellrdquo) in infrastructure mode contains wireless hosts access point (AP) base

station ad hoc mode hosts

only

BSS 1

BSS 2

Internet

hub switchor routerAP

AP

5 DataLink Layer 5-33

80211 Channels association 80211b 24GHz-2485GHz spectrum divided

into 11 channels at different frequencies AP admin chooses frequency for AP interference possible channel can be same as

that chosen by neighboring AP host must associate with an AP

scans channels listening for beacon frames containing APrsquos name (SSID) and MAC address

selects AP to associate with may perform authentication [Chapter 8] will typically run DHCP to get IP address in

APrsquos subnet

5 DataLink Layer 5-34

IEEE 80211 multiple access avoid collisions 2+ nodes transmitting at same

time 80211 CSMA - sense before transmitting

donrsquot collide with ongoing transmission by other node

80211 no collision detection difficult to receive (sense collisions) when transmitting

due to weak received signals (fading) canrsquot sense all collisions in any case hidden terminal

fading goal avoid collisions CSMAC(ollision)A(voidance)

AB

CA B C

Arsquos signalstrength

space

Crsquos signalstrength

5 DataLink Layer 5-35

IEEE 80211 MAC Protocol CSMACA

80211 sender1 if sense channel idle for DIFS then

transmit entire frame (no CD)2 if sense channel busy then

start random backoff timetimer counts down while channel idletransmit when timer expiresif no ACK increase random backoff

interval repeat 2

80211 receiver- if frame received OK

return ACK after SIFS (ACK needed due to hidden terminal problem)

sender receiver

DIFS

data

SIFS

ACK

5 DataLink Layer 5-36

Avoiding collisions (more)

idea allow sender to ldquoreserverdquo channel rather than random access of data frames avoid collisions of long data frames

sender first transmits small request-to-send (RTS) packets to BS using CSMA RTSs may still collide with each other (but theyrsquore

short) BS broadcasts clear-to-send CTS in response to RTS RTS heard by all nodes

sender transmits data frame other stations defer transmissions

Avoid data frame collisions completely using small reservation packets

5 DataLink Layer 5-37

Collision Avoidance RTS-CTS exchange

APA B

time

RTS(A)RTS(B)

RTS(A)

CTS(A) CTS(A)

DATA (A)

ACK(A) ACK(A)

reservation collision

defer

5 DataLink Layer 5-38

Manchester encoding

Used in 10BaseT Each bit has a transition Allows clocks in sending and receiving nodes to

synchronize to each other no need for a centralized global clock among nodes

Hey this is physical-layer stuff

5 DataLink Layer 5-39

Link Layer

51 Introduction and services

52 Error detection and correction

53Multiple access protocols

54 Link-Layer Addressing

55 Ethernet

56 Interconnections Hubs and switches

57 PPP 58 Link Virtualization

ATM

5 DataLink Layer 5-40

HubsHubs are essentially physical-layer repeaters

bits coming from one link go out all other links at the same rate no frame buffering no CSMACD at hub adapters detect collisions provides net management functionality

twisted pair

hub

5 DataLink Layer 5-41

Interconnecting with hubs Backbone hub interconnects LAN segments Extends max distance between nodes But individual segment collision domains become one large

collision domain Canrsquot interconnect 10BaseT amp 100BaseT

hub

hubhub

hub

5 DataLink Layer 5-42

Inter - Networking

Hubs Bridges Switches Routers

5 DataLink Layer 5-43

Learning Bridges Do not forward when unnecessary Maintain forwarding table

HostPort

A 1 B 1 C 1 X 2 Y 2 Z 2

Learn table entries based on source address Table is an optimization need not be complete Always forward broadcast frames

A

Bridge

B C

X Y Z

Port 1

Port 2

5 DataLink Layer 5-44

Spanning Tree Algorithm Problem loops

Bridges run a distributed spanning tree algorithm select which bridges actively forward developed by Radia Perlman now IEEE 8021 specification

A

C

E

D

B

K

F

H

J

G

I

B3

B7

B4

B2

B5

B1

B6

(a) (b)

5 DataLink Layer 5-45

Algorithm Overview Each bridge has unique id (eg B1 B2

B3) Select bridge with smallest id as root Select bridge on each LAN closest to root

as designated bridge (use id to break ties) Each bridge forwards frames over each LAN for which it is the designated bridge

A

C

E

D

B

K

F

H

J

G

I

B5

B2

B3

B7

B4

B1

B6

5 DataLink Layer 5-46

Algorithm Details

Bridges exchange configuration messages id for bridge sending the message id for what the sending bridge believes to be

root bridge distance (hops) from sending bridge to root

bridge Each bridge records current best

configuration message for each port Initially each bridge believes it is the root

5 DataLink Layer 5-47

Algorithm Detail (cont) When learn not root stop generating config

messages in steady state only root generates configuration messages

When learn not designated bridge stop forwarding config messages in steady state only designated bridges forward config

messages

Root continues to periodically send config messages If any bridge does not receive config message after

a period of time it starts generating config messages claiming to be the root

5 DataLink Layer 5-48

Broadcast and Multicast Forward all broadcastmulticast frames

current practice Learn when no group members

downstream Accomplished by having each member of

group G send a frame to bridge multicast address with G in source field

5 DataLink Layer 5-49

Limitations of Bridges

Do not scale spanning tree algorithm does not scale broadcast does not scale

Do not accommodate heterogeneity

Caution beware of transparency

5 DataLink Layer 5-50

Switch link-layer device smarter than hubs take active

role store forward Ethernet frames examine incoming framersquos MAC address selectively

forward frame to one-or-more outgoing links when frame is to be forwarded on segment uses CSMACD to access segment

transparent hosts are unaware of presence of switches

plug-and-play self-learning switches do not need to be configured

5 DataLink Layer 5-51

Switch allows multiple simultaneous transmissions

hosts have dedicated direct connection to switch

switches buffer packets Ethernet protocol used on

each incoming link but no collisions full duplex each link is its own collision

domain switching A-to-Arsquo and B-

to-Brsquo simultaneously without collisions not possible with dumb hub

A

Arsquo

B

Brsquo

C

Crsquo

switch with six interfaces(123456)

1 23

45

6

5 DataLink Layer 5-52

Switch Table

Q how does switch know that Arsquo reachable via interface 4 Brsquo reachable via interface 5

A each switch has a switch table each entry (MAC address of host interface

to reach host time stamp)

looks like a routing table Q how are entries created

maintained in switch table something like a routing

protocol

A

Arsquo

B

Brsquo

C

Crsquo

switch with six interfaces(123456)

1 23

45

6

5 DataLink Layer 5-53

Switch self-learning

switch learns which hosts can be reached through which interfaces when frame received

switch ldquolearnsrdquo location of sender incoming LAN segment

records senderlocation pair in switch table

A

Arsquo

B

Brsquo

C

Crsquo

1 23

45

6

A Arsquo

Source ADest Arsquo

MAC addr interface TTL

Switch table (initially empty)

A 1 60

5 DataLink Layer 5-54

Forwarding

bull How do determine onto which LAN segment to forward framebull Looks like a routing problem

hub

hubhub

switch1

2 3

5 DataLink Layer 5-55

Self learning

A switch has a switch table entry in switch table

(MAC Address Interface Time Stamp) stale entries in table dropped (TTL can be 60

min) switch learns which hosts can be reached through

which interfaces when frame received switch ldquolearnsrdquo location

of sender incoming LAN segment records senderlocation pair in switch table

5 DataLink Layer 5-56

Self-learning forwarding example

A

Arsquo

B

Brsquo

C

Crsquo

1 23

45

6

A Arsquo

Source ADest Arsquo

MAC addr interface TTL

Switch table (initially empty)

A 1 60

A ArsquoA ArsquoA ArsquoA ArsquoA Arsquo

frame destination unknownflood

Arsquo A

destination A location known

Arsquo 4 60

selective send

5 DataLink Layer 5-57

FilteringForwardingWhen switch receives a frame

index switch table using MAC dest addressif entry found for destination

then if dest on segment from which frame arrived

then drop the frame else forward the frame on interface indicated else flood

forward on all but the interface on which the frame arrived

5 DataLink Layer 5-58

Switch example

Suppose C sends frame to D

Switch receives frame from from C notes in bridge table that C is on interface 1 because D is not in table switch forwards frame into

interfaces 2 and 3

frame received by D

hub

hub hub

switch

A

B CD

EF

G H

I

address interface

ABEG

1123

12 3

5 DataLink Layer 5-59

Switch example

Suppose D replies back with frame to C

Switch receives frame from from D notes in bridge table that D is on interface 2 because C is in table switch forwards frame only to

interface 1

frame received by C

hub

hub hub

switch

A

B CD

EF

G H

I

address interface

ABEGC

11231

5 DataLink Layer 5-60

Switch traffic isolation switch installation breaks subnet into LAN

segments switch filters packets

same-LAN-segment frames not usually forwarded onto other LAN segments

segments become separate collision domains

hub hub hub

switch

collision domain collision domain

collision domain

5 DataLink Layer 5-61

Switches dedicated access Switch with many

interfaces Hosts have direct

connection to switch No collisions full duplex

Switching A-to-Arsquo and B-to-Brsquo simultaneously no collisions

switch

A

Arsquo

B

Brsquo

C

Crsquo

5 DataLink Layer 5-62

More on Switches

cut-through switching frame forwarded from input to output port without first collecting entire frameslight reduction in latency

combinations of shareddedicated 101001000 Mbps interfaces

5 DataLink Layer 5-63

Institutional network

hub

hubhub

switch

to externalnetwork

router

IP subnet

mail server

web server

5 DataLink Layer 5-64

Switches vs Routers both store-and-forward devices

routers network layer devices (examine network layer headers) switches are link layer devices

routers maintain routing tables implement routing algorithms

switches maintain switch tables implement filtering learning algorithms

5 DataLink Layer 5-65

Summary comparison

hubs routers switches

traffi c isolation

no yes yes

plug amp play yes no yes

optimal routing

no yes no

cut through

yes no yes

5 DataLink Layer 5-66

IEEE 802 Standards

The 802 working groups The important ones are marked with The ones marked with are hibernating The one marked with dagger gave up

  • Slide 1
  • Link Layer
  • Ethernet
  • Slide 4
  • Star topology
  • Ethernet Frame Structure
  • Ethernet Frame Structure (more)
  • Unreliable connectionless service
  • Ethernet uses CSMACD
  • Ethernet CSMACD algorithm
  • Ethernetrsquos CSMACD (more)
  • Collision Detection
  • Algorithm (cont)
  • Binary Exponential Backoff
  • Ethernet MAC Sublayer Protocol (2)
  • CSMACD efficiency
  • Ethernet Performance
  • 8023 Ethernet Standards Link amp Physical Layers
  • Manchester encoding
  • Ethernet Cabling
  • Ethernet Cabling (2)
  • Ethernet Cabling (3)
  • 10BaseT and 100BaseT
  • 100Mbps Fast Ethernet
  • Fast Ethernet
  • Gbit Ethernet
  • Gigabit Ethernet
  • Wireless Link Characteristics
  • Wireless network characteristics
  • IEEE 80211 Wireless LAN
  • Slide 31
  • 80211 LAN architecture
  • 80211 Channels association
  • IEEE 80211 multiple access
  • IEEE 80211 MAC Protocol CSMACA
  • Avoiding collisions (more)
  • Collision Avoidance RTS-CTS exchange
  • Slide 38
  • Slide 39
  • Hubs
  • Interconnecting with hubs
  • Inter - Networking
  • Learning Bridges
  • Spanning Tree Algorithm
  • Algorithm Overview
  • Algorithm Details
  • Algorithm Detail (cont)
  • Broadcast and Multicast
  • Limitations of Bridges
  • Switch
  • Switch allows multiple simultaneous transmissions
  • Switch Table
  • Switch self-learning
  • Forwarding
  • Self learning
  • Self-learning forwarding example
  • FilteringForwarding
  • Switch example
  • Slide 59
  • Switch traffic isolation
  • Switches dedicated access
  • More on Switches
  • Institutional network
  • Switches vs Routers
  • Summary comparison
  • IEEE 802 Standards
Page 29: Chapter 5B

5 DataLink Layer 5-29

Wireless network characteristicsMultiple wireless senders and receivers create

additional problems (beyond multiple access)

AB

C

Hidden terminal problem B A hear each other B C hear each other A C can not hear each

othermeans A C unaware of their

interference at B

A B C

Arsquos signalstrength

space

Crsquos signalstrength

Signal fading B A hear each other B C hear each other A C can not hear each other

interferring at B

5 DataLink Layer 5-30

IEEE 80211 Wireless LAN

80211b 24-5 GHz unlicensed

radio spectrum up to 11 Mbps direct sequence

spread spectrum (DSSS) in physical layer

bull all hosts use same chipping code

widely deployed using base stations

80211a 5-6 GHz range up to 54 Mbps

80211g 24-5 GHz range up to 54 Mbps

All use CSMACA for multiple access

All have base-station and ad-hoc network versions

5 DataLink Layer 5-31

Figure 3-12

ISM bands

5 DataLink Layer 5-32

80211 LAN architecture

wireless host communicates with base station base station = access

point (AP) Basic Service Set (BSS)

(aka ldquocellrdquo) in infrastructure mode contains wireless hosts access point (AP) base

station ad hoc mode hosts

only

BSS 1

BSS 2

Internet

hub switchor routerAP

AP

5 DataLink Layer 5-33

80211 Channels association 80211b 24GHz-2485GHz spectrum divided

into 11 channels at different frequencies AP admin chooses frequency for AP interference possible channel can be same as

that chosen by neighboring AP host must associate with an AP

scans channels listening for beacon frames containing APrsquos name (SSID) and MAC address

selects AP to associate with may perform authentication [Chapter 8] will typically run DHCP to get IP address in

APrsquos subnet

5 DataLink Layer 5-34

IEEE 80211 multiple access avoid collisions 2+ nodes transmitting at same

time 80211 CSMA - sense before transmitting

donrsquot collide with ongoing transmission by other node

80211 no collision detection difficult to receive (sense collisions) when transmitting

due to weak received signals (fading) canrsquot sense all collisions in any case hidden terminal

fading goal avoid collisions CSMAC(ollision)A(voidance)

AB

CA B C

Arsquos signalstrength

space

Crsquos signalstrength

5 DataLink Layer 5-35

IEEE 80211 MAC Protocol CSMACA

80211 sender1 if sense channel idle for DIFS then

transmit entire frame (no CD)2 if sense channel busy then

start random backoff timetimer counts down while channel idletransmit when timer expiresif no ACK increase random backoff

interval repeat 2

80211 receiver- if frame received OK

return ACK after SIFS (ACK needed due to hidden terminal problem)

sender receiver

DIFS

data

SIFS

ACK

5 DataLink Layer 5-36

Avoiding collisions (more)

idea allow sender to ldquoreserverdquo channel rather than random access of data frames avoid collisions of long data frames

sender first transmits small request-to-send (RTS) packets to BS using CSMA RTSs may still collide with each other (but theyrsquore

short) BS broadcasts clear-to-send CTS in response to RTS RTS heard by all nodes

sender transmits data frame other stations defer transmissions

Avoid data frame collisions completely using small reservation packets

5 DataLink Layer 5-37

Collision Avoidance RTS-CTS exchange

APA B

time

RTS(A)RTS(B)

RTS(A)

CTS(A) CTS(A)

DATA (A)

ACK(A) ACK(A)

reservation collision

defer

5 DataLink Layer 5-38

Manchester encoding

Used in 10BaseT Each bit has a transition Allows clocks in sending and receiving nodes to

synchronize to each other no need for a centralized global clock among nodes

Hey this is physical-layer stuff

5 DataLink Layer 5-39

Link Layer

51 Introduction and services

52 Error detection and correction

53Multiple access protocols

54 Link-Layer Addressing

55 Ethernet

56 Interconnections Hubs and switches

57 PPP 58 Link Virtualization

ATM

5 DataLink Layer 5-40

HubsHubs are essentially physical-layer repeaters

bits coming from one link go out all other links at the same rate no frame buffering no CSMACD at hub adapters detect collisions provides net management functionality

twisted pair

hub

5 DataLink Layer 5-41

Interconnecting with hubs Backbone hub interconnects LAN segments Extends max distance between nodes But individual segment collision domains become one large

collision domain Canrsquot interconnect 10BaseT amp 100BaseT

hub

hubhub

hub

5 DataLink Layer 5-42

Inter - Networking

Hubs Bridges Switches Routers

5 DataLink Layer 5-43

Learning Bridges Do not forward when unnecessary Maintain forwarding table

HostPort

A 1 B 1 C 1 X 2 Y 2 Z 2

Learn table entries based on source address Table is an optimization need not be complete Always forward broadcast frames

A

Bridge

B C

X Y Z

Port 1

Port 2

5 DataLink Layer 5-44

Spanning Tree Algorithm Problem loops

Bridges run a distributed spanning tree algorithm select which bridges actively forward developed by Radia Perlman now IEEE 8021 specification

A

C

E

D

B

K

F

H

J

G

I

B3

B7

B4

B2

B5

B1

B6

(a) (b)

5 DataLink Layer 5-45

Algorithm Overview Each bridge has unique id (eg B1 B2

B3) Select bridge with smallest id as root Select bridge on each LAN closest to root

as designated bridge (use id to break ties) Each bridge forwards frames over each LAN for which it is the designated bridge

A

C

E

D

B

K

F

H

J

G

I

B5

B2

B3

B7

B4

B1

B6

5 DataLink Layer 5-46

Algorithm Details

Bridges exchange configuration messages id for bridge sending the message id for what the sending bridge believes to be

root bridge distance (hops) from sending bridge to root

bridge Each bridge records current best

configuration message for each port Initially each bridge believes it is the root

5 DataLink Layer 5-47

Algorithm Detail (cont) When learn not root stop generating config

messages in steady state only root generates configuration messages

When learn not designated bridge stop forwarding config messages in steady state only designated bridges forward config

messages

Root continues to periodically send config messages If any bridge does not receive config message after

a period of time it starts generating config messages claiming to be the root

5 DataLink Layer 5-48

Broadcast and Multicast Forward all broadcastmulticast frames

current practice Learn when no group members

downstream Accomplished by having each member of

group G send a frame to bridge multicast address with G in source field

5 DataLink Layer 5-49

Limitations of Bridges

Do not scale spanning tree algorithm does not scale broadcast does not scale

Do not accommodate heterogeneity

Caution beware of transparency

5 DataLink Layer 5-50

Switch link-layer device smarter than hubs take active

role store forward Ethernet frames examine incoming framersquos MAC address selectively

forward frame to one-or-more outgoing links when frame is to be forwarded on segment uses CSMACD to access segment

transparent hosts are unaware of presence of switches

plug-and-play self-learning switches do not need to be configured

5 DataLink Layer 5-51

Switch allows multiple simultaneous transmissions

hosts have dedicated direct connection to switch

switches buffer packets Ethernet protocol used on

each incoming link but no collisions full duplex each link is its own collision

domain switching A-to-Arsquo and B-

to-Brsquo simultaneously without collisions not possible with dumb hub

A

Arsquo

B

Brsquo

C

Crsquo

switch with six interfaces(123456)

1 23

45

6

5 DataLink Layer 5-52

Switch Table

Q how does switch know that Arsquo reachable via interface 4 Brsquo reachable via interface 5

A each switch has a switch table each entry (MAC address of host interface

to reach host time stamp)

looks like a routing table Q how are entries created

maintained in switch table something like a routing

protocol

A

Arsquo

B

Brsquo

C

Crsquo

switch with six interfaces(123456)

1 23

45

6

5 DataLink Layer 5-53

Switch self-learning

switch learns which hosts can be reached through which interfaces when frame received

switch ldquolearnsrdquo location of sender incoming LAN segment

records senderlocation pair in switch table

A

Arsquo

B

Brsquo

C

Crsquo

1 23

45

6

A Arsquo

Source ADest Arsquo

MAC addr interface TTL

Switch table (initially empty)

A 1 60

5 DataLink Layer 5-54

Forwarding

bull How do determine onto which LAN segment to forward framebull Looks like a routing problem

hub

hubhub

switch1

2 3

5 DataLink Layer 5-55

Self learning

A switch has a switch table entry in switch table

(MAC Address Interface Time Stamp) stale entries in table dropped (TTL can be 60

min) switch learns which hosts can be reached through

which interfaces when frame received switch ldquolearnsrdquo location

of sender incoming LAN segment records senderlocation pair in switch table

5 DataLink Layer 5-56

Self-learning forwarding example

A

Arsquo

B

Brsquo

C

Crsquo

1 23

45

6

A Arsquo

Source ADest Arsquo

MAC addr interface TTL

Switch table (initially empty)

A 1 60

A ArsquoA ArsquoA ArsquoA ArsquoA Arsquo

frame destination unknownflood

Arsquo A

destination A location known

Arsquo 4 60

selective send

5 DataLink Layer 5-57

FilteringForwardingWhen switch receives a frame

index switch table using MAC dest addressif entry found for destination

then if dest on segment from which frame arrived

then drop the frame else forward the frame on interface indicated else flood

forward on all but the interface on which the frame arrived

5 DataLink Layer 5-58

Switch example

Suppose C sends frame to D

Switch receives frame from from C notes in bridge table that C is on interface 1 because D is not in table switch forwards frame into

interfaces 2 and 3

frame received by D

hub

hub hub

switch

A

B CD

EF

G H

I

address interface

ABEG

1123

12 3

5 DataLink Layer 5-59

Switch example

Suppose D replies back with frame to C

Switch receives frame from from D notes in bridge table that D is on interface 2 because C is in table switch forwards frame only to

interface 1

frame received by C

hub

hub hub

switch

A

B CD

EF

G H

I

address interface

ABEGC

11231

5 DataLink Layer 5-60

Switch traffic isolation switch installation breaks subnet into LAN

segments switch filters packets

same-LAN-segment frames not usually forwarded onto other LAN segments

segments become separate collision domains

hub hub hub

switch

collision domain collision domain

collision domain

5 DataLink Layer 5-61

Switches dedicated access Switch with many

interfaces Hosts have direct

connection to switch No collisions full duplex

Switching A-to-Arsquo and B-to-Brsquo simultaneously no collisions

switch

A

Arsquo

B

Brsquo

C

Crsquo

5 DataLink Layer 5-62

More on Switches

cut-through switching frame forwarded from input to output port without first collecting entire frameslight reduction in latency

combinations of shareddedicated 101001000 Mbps interfaces

5 DataLink Layer 5-63

Institutional network

hub

hubhub

switch

to externalnetwork

router

IP subnet

mail server

web server

5 DataLink Layer 5-64

Switches vs Routers both store-and-forward devices

routers network layer devices (examine network layer headers) switches are link layer devices

routers maintain routing tables implement routing algorithms

switches maintain switch tables implement filtering learning algorithms

5 DataLink Layer 5-65

Summary comparison

hubs routers switches

traffi c isolation

no yes yes

plug amp play yes no yes

optimal routing

no yes no

cut through

yes no yes

5 DataLink Layer 5-66

IEEE 802 Standards

The 802 working groups The important ones are marked with The ones marked with are hibernating The one marked with dagger gave up

  • Slide 1
  • Link Layer
  • Ethernet
  • Slide 4
  • Star topology
  • Ethernet Frame Structure
  • Ethernet Frame Structure (more)
  • Unreliable connectionless service
  • Ethernet uses CSMACD
  • Ethernet CSMACD algorithm
  • Ethernetrsquos CSMACD (more)
  • Collision Detection
  • Algorithm (cont)
  • Binary Exponential Backoff
  • Ethernet MAC Sublayer Protocol (2)
  • CSMACD efficiency
  • Ethernet Performance
  • 8023 Ethernet Standards Link amp Physical Layers
  • Manchester encoding
  • Ethernet Cabling
  • Ethernet Cabling (2)
  • Ethernet Cabling (3)
  • 10BaseT and 100BaseT
  • 100Mbps Fast Ethernet
  • Fast Ethernet
  • Gbit Ethernet
  • Gigabit Ethernet
  • Wireless Link Characteristics
  • Wireless network characteristics
  • IEEE 80211 Wireless LAN
  • Slide 31
  • 80211 LAN architecture
  • 80211 Channels association
  • IEEE 80211 multiple access
  • IEEE 80211 MAC Protocol CSMACA
  • Avoiding collisions (more)
  • Collision Avoidance RTS-CTS exchange
  • Slide 38
  • Slide 39
  • Hubs
  • Interconnecting with hubs
  • Inter - Networking
  • Learning Bridges
  • Spanning Tree Algorithm
  • Algorithm Overview
  • Algorithm Details
  • Algorithm Detail (cont)
  • Broadcast and Multicast
  • Limitations of Bridges
  • Switch
  • Switch allows multiple simultaneous transmissions
  • Switch Table
  • Switch self-learning
  • Forwarding
  • Self learning
  • Self-learning forwarding example
  • FilteringForwarding
  • Switch example
  • Slide 59
  • Switch traffic isolation
  • Switches dedicated access
  • More on Switches
  • Institutional network
  • Switches vs Routers
  • Summary comparison
  • IEEE 802 Standards
Page 30: Chapter 5B

5 DataLink Layer 5-30

IEEE 80211 Wireless LAN

80211b 24-5 GHz unlicensed

radio spectrum up to 11 Mbps direct sequence

spread spectrum (DSSS) in physical layer

bull all hosts use same chipping code

widely deployed using base stations

80211a 5-6 GHz range up to 54 Mbps

80211g 24-5 GHz range up to 54 Mbps

All use CSMACA for multiple access

All have base-station and ad-hoc network versions

5 DataLink Layer 5-31

Figure 3-12

ISM bands

5 DataLink Layer 5-32

80211 LAN architecture

wireless host communicates with base station base station = access

point (AP) Basic Service Set (BSS)

(aka ldquocellrdquo) in infrastructure mode contains wireless hosts access point (AP) base

station ad hoc mode hosts

only

BSS 1

BSS 2

Internet

hub switchor routerAP

AP

5 DataLink Layer 5-33

80211 Channels association 80211b 24GHz-2485GHz spectrum divided

into 11 channels at different frequencies AP admin chooses frequency for AP interference possible channel can be same as

that chosen by neighboring AP host must associate with an AP

scans channels listening for beacon frames containing APrsquos name (SSID) and MAC address

selects AP to associate with may perform authentication [Chapter 8] will typically run DHCP to get IP address in

APrsquos subnet

5 DataLink Layer 5-34

IEEE 80211 multiple access avoid collisions 2+ nodes transmitting at same

time 80211 CSMA - sense before transmitting

donrsquot collide with ongoing transmission by other node

80211 no collision detection difficult to receive (sense collisions) when transmitting

due to weak received signals (fading) canrsquot sense all collisions in any case hidden terminal

fading goal avoid collisions CSMAC(ollision)A(voidance)

AB

CA B C

Arsquos signalstrength

space

Crsquos signalstrength

5 DataLink Layer 5-35

IEEE 80211 MAC Protocol CSMACA

80211 sender1 if sense channel idle for DIFS then

transmit entire frame (no CD)2 if sense channel busy then

start random backoff timetimer counts down while channel idletransmit when timer expiresif no ACK increase random backoff

interval repeat 2

80211 receiver- if frame received OK

return ACK after SIFS (ACK needed due to hidden terminal problem)

sender receiver

DIFS

data

SIFS

ACK

5 DataLink Layer 5-36

Avoiding collisions (more)

idea allow sender to ldquoreserverdquo channel rather than random access of data frames avoid collisions of long data frames

sender first transmits small request-to-send (RTS) packets to BS using CSMA RTSs may still collide with each other (but theyrsquore

short) BS broadcasts clear-to-send CTS in response to RTS RTS heard by all nodes

sender transmits data frame other stations defer transmissions

Avoid data frame collisions completely using small reservation packets

5 DataLink Layer 5-37

Collision Avoidance RTS-CTS exchange

APA B

time

RTS(A)RTS(B)

RTS(A)

CTS(A) CTS(A)

DATA (A)

ACK(A) ACK(A)

reservation collision

defer

5 DataLink Layer 5-38

Manchester encoding

Used in 10BaseT Each bit has a transition Allows clocks in sending and receiving nodes to

synchronize to each other no need for a centralized global clock among nodes

Hey this is physical-layer stuff

5 DataLink Layer 5-39

Link Layer

51 Introduction and services

52 Error detection and correction

53Multiple access protocols

54 Link-Layer Addressing

55 Ethernet

56 Interconnections Hubs and switches

57 PPP 58 Link Virtualization

ATM

5 DataLink Layer 5-40

HubsHubs are essentially physical-layer repeaters

bits coming from one link go out all other links at the same rate no frame buffering no CSMACD at hub adapters detect collisions provides net management functionality

twisted pair

hub

5 DataLink Layer 5-41

Interconnecting with hubs Backbone hub interconnects LAN segments Extends max distance between nodes But individual segment collision domains become one large

collision domain Canrsquot interconnect 10BaseT amp 100BaseT

hub

hubhub

hub

5 DataLink Layer 5-42

Inter - Networking

Hubs Bridges Switches Routers

5 DataLink Layer 5-43

Learning Bridges Do not forward when unnecessary Maintain forwarding table

HostPort

A 1 B 1 C 1 X 2 Y 2 Z 2

Learn table entries based on source address Table is an optimization need not be complete Always forward broadcast frames

A

Bridge

B C

X Y Z

Port 1

Port 2

5 DataLink Layer 5-44

Spanning Tree Algorithm Problem loops

Bridges run a distributed spanning tree algorithm select which bridges actively forward developed by Radia Perlman now IEEE 8021 specification

A

C

E

D

B

K

F

H

J

G

I

B3

B7

B4

B2

B5

B1

B6

(a) (b)

5 DataLink Layer 5-45

Algorithm Overview Each bridge has unique id (eg B1 B2

B3) Select bridge with smallest id as root Select bridge on each LAN closest to root

as designated bridge (use id to break ties) Each bridge forwards frames over each LAN for which it is the designated bridge

A

C

E

D

B

K

F

H

J

G

I

B5

B2

B3

B7

B4

B1

B6

5 DataLink Layer 5-46

Algorithm Details

Bridges exchange configuration messages id for bridge sending the message id for what the sending bridge believes to be

root bridge distance (hops) from sending bridge to root

bridge Each bridge records current best

configuration message for each port Initially each bridge believes it is the root

5 DataLink Layer 5-47

Algorithm Detail (cont) When learn not root stop generating config

messages in steady state only root generates configuration messages

When learn not designated bridge stop forwarding config messages in steady state only designated bridges forward config

messages

Root continues to periodically send config messages If any bridge does not receive config message after

a period of time it starts generating config messages claiming to be the root

5 DataLink Layer 5-48

Broadcast and Multicast Forward all broadcastmulticast frames

current practice Learn when no group members

downstream Accomplished by having each member of

group G send a frame to bridge multicast address with G in source field

5 DataLink Layer 5-49

Limitations of Bridges

Do not scale spanning tree algorithm does not scale broadcast does not scale

Do not accommodate heterogeneity

Caution beware of transparency

5 DataLink Layer 5-50

Switch link-layer device smarter than hubs take active

role store forward Ethernet frames examine incoming framersquos MAC address selectively

forward frame to one-or-more outgoing links when frame is to be forwarded on segment uses CSMACD to access segment

transparent hosts are unaware of presence of switches

plug-and-play self-learning switches do not need to be configured

5 DataLink Layer 5-51

Switch allows multiple simultaneous transmissions

hosts have dedicated direct connection to switch

switches buffer packets Ethernet protocol used on

each incoming link but no collisions full duplex each link is its own collision

domain switching A-to-Arsquo and B-

to-Brsquo simultaneously without collisions not possible with dumb hub

A

Arsquo

B

Brsquo

C

Crsquo

switch with six interfaces(123456)

1 23

45

6

5 DataLink Layer 5-52

Switch Table

Q how does switch know that Arsquo reachable via interface 4 Brsquo reachable via interface 5

A each switch has a switch table each entry (MAC address of host interface

to reach host time stamp)

looks like a routing table Q how are entries created

maintained in switch table something like a routing

protocol

A

Arsquo

B

Brsquo

C

Crsquo

switch with six interfaces(123456)

1 23

45

6

5 DataLink Layer 5-53

Switch self-learning

switch learns which hosts can be reached through which interfaces when frame received

switch ldquolearnsrdquo location of sender incoming LAN segment

records senderlocation pair in switch table

A

Arsquo

B

Brsquo

C

Crsquo

1 23

45

6

A Arsquo

Source ADest Arsquo

MAC addr interface TTL

Switch table (initially empty)

A 1 60

5 DataLink Layer 5-54

Forwarding

bull How do determine onto which LAN segment to forward framebull Looks like a routing problem

hub

hubhub

switch1

2 3

5 DataLink Layer 5-55

Self learning

A switch has a switch table entry in switch table

(MAC Address Interface Time Stamp) stale entries in table dropped (TTL can be 60

min) switch learns which hosts can be reached through

which interfaces when frame received switch ldquolearnsrdquo location

of sender incoming LAN segment records senderlocation pair in switch table

5 DataLink Layer 5-56

Self-learning forwarding example

A

Arsquo

B

Brsquo

C

Crsquo

1 23

45

6

A Arsquo

Source ADest Arsquo

MAC addr interface TTL

Switch table (initially empty)

A 1 60

A ArsquoA ArsquoA ArsquoA ArsquoA Arsquo

frame destination unknownflood

Arsquo A

destination A location known

Arsquo 4 60

selective send

5 DataLink Layer 5-57

FilteringForwardingWhen switch receives a frame

index switch table using MAC dest addressif entry found for destination

then if dest on segment from which frame arrived

then drop the frame else forward the frame on interface indicated else flood

forward on all but the interface on which the frame arrived

5 DataLink Layer 5-58

Switch example

Suppose C sends frame to D

Switch receives frame from from C notes in bridge table that C is on interface 1 because D is not in table switch forwards frame into

interfaces 2 and 3

frame received by D

hub

hub hub

switch

A

B CD

EF

G H

I

address interface

ABEG

1123

12 3

5 DataLink Layer 5-59

Switch example

Suppose D replies back with frame to C

Switch receives frame from from D notes in bridge table that D is on interface 2 because C is in table switch forwards frame only to

interface 1

frame received by C

hub

hub hub

switch

A

B CD

EF

G H

I

address interface

ABEGC

11231

5 DataLink Layer 5-60

Switch traffic isolation switch installation breaks subnet into LAN

segments switch filters packets

same-LAN-segment frames not usually forwarded onto other LAN segments

segments become separate collision domains

hub hub hub

switch

collision domain collision domain

collision domain

5 DataLink Layer 5-61

Switches dedicated access Switch with many

interfaces Hosts have direct

connection to switch No collisions full duplex

Switching A-to-Arsquo and B-to-Brsquo simultaneously no collisions

switch

A

Arsquo

B

Brsquo

C

Crsquo

5 DataLink Layer 5-62

More on Switches

cut-through switching frame forwarded from input to output port without first collecting entire frameslight reduction in latency

combinations of shareddedicated 101001000 Mbps interfaces

5 DataLink Layer 5-63

Institutional network

hub

hubhub

switch

to externalnetwork

router

IP subnet

mail server

web server

5 DataLink Layer 5-64

Switches vs Routers both store-and-forward devices

routers network layer devices (examine network layer headers) switches are link layer devices

routers maintain routing tables implement routing algorithms

switches maintain switch tables implement filtering learning algorithms

5 DataLink Layer 5-65

Summary comparison

hubs routers switches

traffi c isolation

no yes yes

plug amp play yes no yes

optimal routing

no yes no

cut through

yes no yes

5 DataLink Layer 5-66

IEEE 802 Standards

The 802 working groups The important ones are marked with The ones marked with are hibernating The one marked with dagger gave up

  • Slide 1
  • Link Layer
  • Ethernet
  • Slide 4
  • Star topology
  • Ethernet Frame Structure
  • Ethernet Frame Structure (more)
  • Unreliable connectionless service
  • Ethernet uses CSMACD
  • Ethernet CSMACD algorithm
  • Ethernetrsquos CSMACD (more)
  • Collision Detection
  • Algorithm (cont)
  • Binary Exponential Backoff
  • Ethernet MAC Sublayer Protocol (2)
  • CSMACD efficiency
  • Ethernet Performance
  • 8023 Ethernet Standards Link amp Physical Layers
  • Manchester encoding
  • Ethernet Cabling
  • Ethernet Cabling (2)
  • Ethernet Cabling (3)
  • 10BaseT and 100BaseT
  • 100Mbps Fast Ethernet
  • Fast Ethernet
  • Gbit Ethernet
  • Gigabit Ethernet
  • Wireless Link Characteristics
  • Wireless network characteristics
  • IEEE 80211 Wireless LAN
  • Slide 31
  • 80211 LAN architecture
  • 80211 Channels association
  • IEEE 80211 multiple access
  • IEEE 80211 MAC Protocol CSMACA
  • Avoiding collisions (more)
  • Collision Avoidance RTS-CTS exchange
  • Slide 38
  • Slide 39
  • Hubs
  • Interconnecting with hubs
  • Inter - Networking
  • Learning Bridges
  • Spanning Tree Algorithm
  • Algorithm Overview
  • Algorithm Details
  • Algorithm Detail (cont)
  • Broadcast and Multicast
  • Limitations of Bridges
  • Switch
  • Switch allows multiple simultaneous transmissions
  • Switch Table
  • Switch self-learning
  • Forwarding
  • Self learning
  • Self-learning forwarding example
  • FilteringForwarding
  • Switch example
  • Slide 59
  • Switch traffic isolation
  • Switches dedicated access
  • More on Switches
  • Institutional network
  • Switches vs Routers
  • Summary comparison
  • IEEE 802 Standards
Page 31: Chapter 5B

5 DataLink Layer 5-31

Figure 3-12

ISM bands

5 DataLink Layer 5-32

80211 LAN architecture

wireless host communicates with base station base station = access

point (AP) Basic Service Set (BSS)

(aka ldquocellrdquo) in infrastructure mode contains wireless hosts access point (AP) base

station ad hoc mode hosts

only

BSS 1

BSS 2

Internet

hub switchor routerAP

AP

5 DataLink Layer 5-33

80211 Channels association 80211b 24GHz-2485GHz spectrum divided

into 11 channels at different frequencies AP admin chooses frequency for AP interference possible channel can be same as

that chosen by neighboring AP host must associate with an AP

scans channels listening for beacon frames containing APrsquos name (SSID) and MAC address

selects AP to associate with may perform authentication [Chapter 8] will typically run DHCP to get IP address in

APrsquos subnet

5 DataLink Layer 5-34

IEEE 80211 multiple access avoid collisions 2+ nodes transmitting at same

time 80211 CSMA - sense before transmitting

donrsquot collide with ongoing transmission by other node

80211 no collision detection difficult to receive (sense collisions) when transmitting

due to weak received signals (fading) canrsquot sense all collisions in any case hidden terminal

fading goal avoid collisions CSMAC(ollision)A(voidance)

AB

CA B C

Arsquos signalstrength

space

Crsquos signalstrength

5 DataLink Layer 5-35

IEEE 80211 MAC Protocol CSMACA

80211 sender1 if sense channel idle for DIFS then

transmit entire frame (no CD)2 if sense channel busy then

start random backoff timetimer counts down while channel idletransmit when timer expiresif no ACK increase random backoff

interval repeat 2

80211 receiver- if frame received OK

return ACK after SIFS (ACK needed due to hidden terminal problem)

sender receiver

DIFS

data

SIFS

ACK

5 DataLink Layer 5-36

Avoiding collisions (more)

idea allow sender to ldquoreserverdquo channel rather than random access of data frames avoid collisions of long data frames

sender first transmits small request-to-send (RTS) packets to BS using CSMA RTSs may still collide with each other (but theyrsquore

short) BS broadcasts clear-to-send CTS in response to RTS RTS heard by all nodes

sender transmits data frame other stations defer transmissions

Avoid data frame collisions completely using small reservation packets

5 DataLink Layer 5-37

Collision Avoidance RTS-CTS exchange

APA B

time

RTS(A)RTS(B)

RTS(A)

CTS(A) CTS(A)

DATA (A)

ACK(A) ACK(A)

reservation collision

defer

5 DataLink Layer 5-38

Manchester encoding

Used in 10BaseT Each bit has a transition Allows clocks in sending and receiving nodes to

synchronize to each other no need for a centralized global clock among nodes

Hey this is physical-layer stuff

5 DataLink Layer 5-39

Link Layer

51 Introduction and services

52 Error detection and correction

53Multiple access protocols

54 Link-Layer Addressing

55 Ethernet

56 Interconnections Hubs and switches

57 PPP 58 Link Virtualization

ATM

5 DataLink Layer 5-40

HubsHubs are essentially physical-layer repeaters

bits coming from one link go out all other links at the same rate no frame buffering no CSMACD at hub adapters detect collisions provides net management functionality

twisted pair

hub

5 DataLink Layer 5-41

Interconnecting with hubs Backbone hub interconnects LAN segments Extends max distance between nodes But individual segment collision domains become one large

collision domain Canrsquot interconnect 10BaseT amp 100BaseT

hub

hubhub

hub

5 DataLink Layer 5-42

Inter - Networking

Hubs Bridges Switches Routers

5 DataLink Layer 5-43

Learning Bridges Do not forward when unnecessary Maintain forwarding table

HostPort

A 1 B 1 C 1 X 2 Y 2 Z 2

Learn table entries based on source address Table is an optimization need not be complete Always forward broadcast frames

A

Bridge

B C

X Y Z

Port 1

Port 2

5 DataLink Layer 5-44

Spanning Tree Algorithm Problem loops

Bridges run a distributed spanning tree algorithm select which bridges actively forward developed by Radia Perlman now IEEE 8021 specification

A

C

E

D

B

K

F

H

J

G

I

B3

B7

B4

B2

B5

B1

B6

(a) (b)

5 DataLink Layer 5-45

Algorithm Overview Each bridge has unique id (eg B1 B2

B3) Select bridge with smallest id as root Select bridge on each LAN closest to root

as designated bridge (use id to break ties) Each bridge forwards frames over each LAN for which it is the designated bridge

A

C

E

D

B

K

F

H

J

G

I

B5

B2

B3

B7

B4

B1

B6

5 DataLink Layer 5-46

Algorithm Details

Bridges exchange configuration messages id for bridge sending the message id for what the sending bridge believes to be

root bridge distance (hops) from sending bridge to root

bridge Each bridge records current best

configuration message for each port Initially each bridge believes it is the root

5 DataLink Layer 5-47

Algorithm Detail (cont) When learn not root stop generating config

messages in steady state only root generates configuration messages

When learn not designated bridge stop forwarding config messages in steady state only designated bridges forward config

messages

Root continues to periodically send config messages If any bridge does not receive config message after

a period of time it starts generating config messages claiming to be the root

5 DataLink Layer 5-48

Broadcast and Multicast Forward all broadcastmulticast frames

current practice Learn when no group members

downstream Accomplished by having each member of

group G send a frame to bridge multicast address with G in source field

5 DataLink Layer 5-49

Limitations of Bridges

Do not scale spanning tree algorithm does not scale broadcast does not scale

Do not accommodate heterogeneity

Caution beware of transparency

5 DataLink Layer 5-50

Switch link-layer device smarter than hubs take active

role store forward Ethernet frames examine incoming framersquos MAC address selectively

forward frame to one-or-more outgoing links when frame is to be forwarded on segment uses CSMACD to access segment

transparent hosts are unaware of presence of switches

plug-and-play self-learning switches do not need to be configured

5 DataLink Layer 5-51

Switch allows multiple simultaneous transmissions

hosts have dedicated direct connection to switch

switches buffer packets Ethernet protocol used on

each incoming link but no collisions full duplex each link is its own collision

domain switching A-to-Arsquo and B-

to-Brsquo simultaneously without collisions not possible with dumb hub

A

Arsquo

B

Brsquo

C

Crsquo

switch with six interfaces(123456)

1 23

45

6

5 DataLink Layer 5-52

Switch Table

Q how does switch know that Arsquo reachable via interface 4 Brsquo reachable via interface 5

A each switch has a switch table each entry (MAC address of host interface

to reach host time stamp)

looks like a routing table Q how are entries created

maintained in switch table something like a routing

protocol

A

Arsquo

B

Brsquo

C

Crsquo

switch with six interfaces(123456)

1 23

45

6

5 DataLink Layer 5-53

Switch self-learning

switch learns which hosts can be reached through which interfaces when frame received

switch ldquolearnsrdquo location of sender incoming LAN segment

records senderlocation pair in switch table

A

Arsquo

B

Brsquo

C

Crsquo

1 23

45

6

A Arsquo

Source ADest Arsquo

MAC addr interface TTL

Switch table (initially empty)

A 1 60

5 DataLink Layer 5-54

Forwarding

bull How do determine onto which LAN segment to forward framebull Looks like a routing problem

hub

hubhub

switch1

2 3

5 DataLink Layer 5-55

Self learning

A switch has a switch table entry in switch table

(MAC Address Interface Time Stamp) stale entries in table dropped (TTL can be 60

min) switch learns which hosts can be reached through

which interfaces when frame received switch ldquolearnsrdquo location

of sender incoming LAN segment records senderlocation pair in switch table

5 DataLink Layer 5-56

Self-learning forwarding example

A

Arsquo

B

Brsquo

C

Crsquo

1 23

45

6

A Arsquo

Source ADest Arsquo

MAC addr interface TTL

Switch table (initially empty)

A 1 60

A ArsquoA ArsquoA ArsquoA ArsquoA Arsquo

frame destination unknownflood

Arsquo A

destination A location known

Arsquo 4 60

selective send

5 DataLink Layer 5-57

FilteringForwardingWhen switch receives a frame

index switch table using MAC dest addressif entry found for destination

then if dest on segment from which frame arrived

then drop the frame else forward the frame on interface indicated else flood

forward on all but the interface on which the frame arrived

5 DataLink Layer 5-58

Switch example

Suppose C sends frame to D

Switch receives frame from from C notes in bridge table that C is on interface 1 because D is not in table switch forwards frame into

interfaces 2 and 3

frame received by D

hub

hub hub

switch

A

B CD

EF

G H

I

address interface

ABEG

1123

12 3

5 DataLink Layer 5-59

Switch example

Suppose D replies back with frame to C

Switch receives frame from from D notes in bridge table that D is on interface 2 because C is in table switch forwards frame only to

interface 1

frame received by C

hub

hub hub

switch

A

B CD

EF

G H

I

address interface

ABEGC

11231

5 DataLink Layer 5-60

Switch traffic isolation switch installation breaks subnet into LAN

segments switch filters packets

same-LAN-segment frames not usually forwarded onto other LAN segments

segments become separate collision domains

hub hub hub

switch

collision domain collision domain

collision domain

5 DataLink Layer 5-61

Switches dedicated access Switch with many

interfaces Hosts have direct

connection to switch No collisions full duplex

Switching A-to-Arsquo and B-to-Brsquo simultaneously no collisions

switch

A

Arsquo

B

Brsquo

C

Crsquo

5 DataLink Layer 5-62

More on Switches

cut-through switching frame forwarded from input to output port without first collecting entire frameslight reduction in latency

combinations of shareddedicated 101001000 Mbps interfaces

5 DataLink Layer 5-63

Institutional network

hub

hubhub

switch

to externalnetwork

router

IP subnet

mail server

web server

5 DataLink Layer 5-64

Switches vs Routers both store-and-forward devices

routers network layer devices (examine network layer headers) switches are link layer devices

routers maintain routing tables implement routing algorithms

switches maintain switch tables implement filtering learning algorithms

5 DataLink Layer 5-65

Summary comparison

hubs routers switches

traffi c isolation

no yes yes

plug amp play yes no yes

optimal routing

no yes no

cut through

yes no yes

5 DataLink Layer 5-66

IEEE 802 Standards

The 802 working groups The important ones are marked with The ones marked with are hibernating The one marked with dagger gave up

  • Slide 1
  • Link Layer
  • Ethernet
  • Slide 4
  • Star topology
  • Ethernet Frame Structure
  • Ethernet Frame Structure (more)
  • Unreliable connectionless service
  • Ethernet uses CSMACD
  • Ethernet CSMACD algorithm
  • Ethernetrsquos CSMACD (more)
  • Collision Detection
  • Algorithm (cont)
  • Binary Exponential Backoff
  • Ethernet MAC Sublayer Protocol (2)
  • CSMACD efficiency
  • Ethernet Performance
  • 8023 Ethernet Standards Link amp Physical Layers
  • Manchester encoding
  • Ethernet Cabling
  • Ethernet Cabling (2)
  • Ethernet Cabling (3)
  • 10BaseT and 100BaseT
  • 100Mbps Fast Ethernet
  • Fast Ethernet
  • Gbit Ethernet
  • Gigabit Ethernet
  • Wireless Link Characteristics
  • Wireless network characteristics
  • IEEE 80211 Wireless LAN
  • Slide 31
  • 80211 LAN architecture
  • 80211 Channels association
  • IEEE 80211 multiple access
  • IEEE 80211 MAC Protocol CSMACA
  • Avoiding collisions (more)
  • Collision Avoidance RTS-CTS exchange
  • Slide 38
  • Slide 39
  • Hubs
  • Interconnecting with hubs
  • Inter - Networking
  • Learning Bridges
  • Spanning Tree Algorithm
  • Algorithm Overview
  • Algorithm Details
  • Algorithm Detail (cont)
  • Broadcast and Multicast
  • Limitations of Bridges
  • Switch
  • Switch allows multiple simultaneous transmissions
  • Switch Table
  • Switch self-learning
  • Forwarding
  • Self learning
  • Self-learning forwarding example
  • FilteringForwarding
  • Switch example
  • Slide 59
  • Switch traffic isolation
  • Switches dedicated access
  • More on Switches
  • Institutional network
  • Switches vs Routers
  • Summary comparison
  • IEEE 802 Standards
Page 32: Chapter 5B

5 DataLink Layer 5-32

80211 LAN architecture

wireless host communicates with base station base station = access

point (AP) Basic Service Set (BSS)

(aka ldquocellrdquo) in infrastructure mode contains wireless hosts access point (AP) base

station ad hoc mode hosts

only

BSS 1

BSS 2

Internet

hub switchor routerAP

AP

5 DataLink Layer 5-33

80211 Channels association 80211b 24GHz-2485GHz spectrum divided

into 11 channels at different frequencies AP admin chooses frequency for AP interference possible channel can be same as

that chosen by neighboring AP host must associate with an AP

scans channels listening for beacon frames containing APrsquos name (SSID) and MAC address

selects AP to associate with may perform authentication [Chapter 8] will typically run DHCP to get IP address in

APrsquos subnet

5 DataLink Layer 5-34

IEEE 80211 multiple access avoid collisions 2+ nodes transmitting at same

time 80211 CSMA - sense before transmitting

donrsquot collide with ongoing transmission by other node

80211 no collision detection difficult to receive (sense collisions) when transmitting

due to weak received signals (fading) canrsquot sense all collisions in any case hidden terminal

fading goal avoid collisions CSMAC(ollision)A(voidance)

AB

CA B C

Arsquos signalstrength

space

Crsquos signalstrength

5 DataLink Layer 5-35

IEEE 80211 MAC Protocol CSMACA

80211 sender1 if sense channel idle for DIFS then

transmit entire frame (no CD)2 if sense channel busy then

start random backoff timetimer counts down while channel idletransmit when timer expiresif no ACK increase random backoff

interval repeat 2

80211 receiver- if frame received OK

return ACK after SIFS (ACK needed due to hidden terminal problem)

sender receiver

DIFS

data

SIFS

ACK

5 DataLink Layer 5-36

Avoiding collisions (more)

idea allow sender to ldquoreserverdquo channel rather than random access of data frames avoid collisions of long data frames

sender first transmits small request-to-send (RTS) packets to BS using CSMA RTSs may still collide with each other (but theyrsquore

short) BS broadcasts clear-to-send CTS in response to RTS RTS heard by all nodes

sender transmits data frame other stations defer transmissions

Avoid data frame collisions completely using small reservation packets

5 DataLink Layer 5-37

Collision Avoidance RTS-CTS exchange

APA B

time

RTS(A)RTS(B)

RTS(A)

CTS(A) CTS(A)

DATA (A)

ACK(A) ACK(A)

reservation collision

defer

5 DataLink Layer 5-38

Manchester encoding

Used in 10BaseT Each bit has a transition Allows clocks in sending and receiving nodes to

synchronize to each other no need for a centralized global clock among nodes

Hey this is physical-layer stuff

5 DataLink Layer 5-39

Link Layer

51 Introduction and services

52 Error detection and correction

53Multiple access protocols

54 Link-Layer Addressing

55 Ethernet

56 Interconnections Hubs and switches

57 PPP 58 Link Virtualization

ATM

5 DataLink Layer 5-40

HubsHubs are essentially physical-layer repeaters

bits coming from one link go out all other links at the same rate no frame buffering no CSMACD at hub adapters detect collisions provides net management functionality

twisted pair

hub

5 DataLink Layer 5-41

Interconnecting with hubs Backbone hub interconnects LAN segments Extends max distance between nodes But individual segment collision domains become one large

collision domain Canrsquot interconnect 10BaseT amp 100BaseT

hub

hubhub

hub

5 DataLink Layer 5-42

Inter - Networking

Hubs Bridges Switches Routers

5 DataLink Layer 5-43

Learning Bridges Do not forward when unnecessary Maintain forwarding table

HostPort

A 1 B 1 C 1 X 2 Y 2 Z 2

Learn table entries based on source address Table is an optimization need not be complete Always forward broadcast frames

A

Bridge

B C

X Y Z

Port 1

Port 2

5 DataLink Layer 5-44

Spanning Tree Algorithm Problem loops

Bridges run a distributed spanning tree algorithm select which bridges actively forward developed by Radia Perlman now IEEE 8021 specification

A

C

E

D

B

K

F

H

J

G

I

B3

B7

B4

B2

B5

B1

B6

(a) (b)

5 DataLink Layer 5-45

Algorithm Overview Each bridge has unique id (eg B1 B2

B3) Select bridge with smallest id as root Select bridge on each LAN closest to root

as designated bridge (use id to break ties) Each bridge forwards frames over each LAN for which it is the designated bridge

A

C

E

D

B

K

F

H

J

G

I

B5

B2

B3

B7

B4

B1

B6

5 DataLink Layer 5-46

Algorithm Details

Bridges exchange configuration messages id for bridge sending the message id for what the sending bridge believes to be

root bridge distance (hops) from sending bridge to root

bridge Each bridge records current best

configuration message for each port Initially each bridge believes it is the root

5 DataLink Layer 5-47

Algorithm Detail (cont) When learn not root stop generating config

messages in steady state only root generates configuration messages

When learn not designated bridge stop forwarding config messages in steady state only designated bridges forward config

messages

Root continues to periodically send config messages If any bridge does not receive config message after

a period of time it starts generating config messages claiming to be the root

5 DataLink Layer 5-48

Broadcast and Multicast Forward all broadcastmulticast frames

current practice Learn when no group members

downstream Accomplished by having each member of

group G send a frame to bridge multicast address with G in source field

5 DataLink Layer 5-49

Limitations of Bridges

Do not scale spanning tree algorithm does not scale broadcast does not scale

Do not accommodate heterogeneity

Caution beware of transparency

5 DataLink Layer 5-50

Switch link-layer device smarter than hubs take active

role store forward Ethernet frames examine incoming framersquos MAC address selectively

forward frame to one-or-more outgoing links when frame is to be forwarded on segment uses CSMACD to access segment

transparent hosts are unaware of presence of switches

plug-and-play self-learning switches do not need to be configured

5 DataLink Layer 5-51

Switch allows multiple simultaneous transmissions

hosts have dedicated direct connection to switch

switches buffer packets Ethernet protocol used on

each incoming link but no collisions full duplex each link is its own collision

domain switching A-to-Arsquo and B-

to-Brsquo simultaneously without collisions not possible with dumb hub

A

Arsquo

B

Brsquo

C

Crsquo

switch with six interfaces(123456)

1 23

45

6

5 DataLink Layer 5-52

Switch Table

Q how does switch know that Arsquo reachable via interface 4 Brsquo reachable via interface 5

A each switch has a switch table each entry (MAC address of host interface

to reach host time stamp)

looks like a routing table Q how are entries created

maintained in switch table something like a routing

protocol

A

Arsquo

B

Brsquo

C

Crsquo

switch with six interfaces(123456)

1 23

45

6

5 DataLink Layer 5-53

Switch self-learning

switch learns which hosts can be reached through which interfaces when frame received

switch ldquolearnsrdquo location of sender incoming LAN segment

records senderlocation pair in switch table

A

Arsquo

B

Brsquo

C

Crsquo

1 23

45

6

A Arsquo

Source ADest Arsquo

MAC addr interface TTL

Switch table (initially empty)

A 1 60

5 DataLink Layer 5-54

Forwarding

bull How do determine onto which LAN segment to forward framebull Looks like a routing problem

hub

hubhub

switch1

2 3

5 DataLink Layer 5-55

Self learning

A switch has a switch table entry in switch table

(MAC Address Interface Time Stamp) stale entries in table dropped (TTL can be 60

min) switch learns which hosts can be reached through

which interfaces when frame received switch ldquolearnsrdquo location

of sender incoming LAN segment records senderlocation pair in switch table

5 DataLink Layer 5-56

Self-learning forwarding example

A

Arsquo

B

Brsquo

C

Crsquo

1 23

45

6

A Arsquo

Source ADest Arsquo

MAC addr interface TTL

Switch table (initially empty)

A 1 60

A ArsquoA ArsquoA ArsquoA ArsquoA Arsquo

frame destination unknownflood

Arsquo A

destination A location known

Arsquo 4 60

selective send

5 DataLink Layer 5-57

FilteringForwardingWhen switch receives a frame

index switch table using MAC dest addressif entry found for destination

then if dest on segment from which frame arrived

then drop the frame else forward the frame on interface indicated else flood

forward on all but the interface on which the frame arrived

5 DataLink Layer 5-58

Switch example

Suppose C sends frame to D

Switch receives frame from from C notes in bridge table that C is on interface 1 because D is not in table switch forwards frame into

interfaces 2 and 3

frame received by D

hub

hub hub

switch

A

B CD

EF

G H

I

address interface

ABEG

1123

12 3

5 DataLink Layer 5-59

Switch example

Suppose D replies back with frame to C

Switch receives frame from from D notes in bridge table that D is on interface 2 because C is in table switch forwards frame only to

interface 1

frame received by C

hub

hub hub

switch

A

B CD

EF

G H

I

address interface

ABEGC

11231

5 DataLink Layer 5-60

Switch traffic isolation switch installation breaks subnet into LAN

segments switch filters packets

same-LAN-segment frames not usually forwarded onto other LAN segments

segments become separate collision domains

hub hub hub

switch

collision domain collision domain

collision domain

5 DataLink Layer 5-61

Switches dedicated access Switch with many

interfaces Hosts have direct

connection to switch No collisions full duplex

Switching A-to-Arsquo and B-to-Brsquo simultaneously no collisions

switch

A

Arsquo

B

Brsquo

C

Crsquo

5 DataLink Layer 5-62

More on Switches

cut-through switching frame forwarded from input to output port without first collecting entire frameslight reduction in latency

combinations of shareddedicated 101001000 Mbps interfaces

5 DataLink Layer 5-63

Institutional network

hub

hubhub

switch

to externalnetwork

router

IP subnet

mail server

web server

5 DataLink Layer 5-64

Switches vs Routers both store-and-forward devices

routers network layer devices (examine network layer headers) switches are link layer devices

routers maintain routing tables implement routing algorithms

switches maintain switch tables implement filtering learning algorithms

5 DataLink Layer 5-65

Summary comparison

hubs routers switches

traffi c isolation

no yes yes

plug amp play yes no yes

optimal routing

no yes no

cut through

yes no yes

5 DataLink Layer 5-66

IEEE 802 Standards

The 802 working groups The important ones are marked with The ones marked with are hibernating The one marked with dagger gave up

  • Slide 1
  • Link Layer
  • Ethernet
  • Slide 4
  • Star topology
  • Ethernet Frame Structure
  • Ethernet Frame Structure (more)
  • Unreliable connectionless service
  • Ethernet uses CSMACD
  • Ethernet CSMACD algorithm
  • Ethernetrsquos CSMACD (more)
  • Collision Detection
  • Algorithm (cont)
  • Binary Exponential Backoff
  • Ethernet MAC Sublayer Protocol (2)
  • CSMACD efficiency
  • Ethernet Performance
  • 8023 Ethernet Standards Link amp Physical Layers
  • Manchester encoding
  • Ethernet Cabling
  • Ethernet Cabling (2)
  • Ethernet Cabling (3)
  • 10BaseT and 100BaseT
  • 100Mbps Fast Ethernet
  • Fast Ethernet
  • Gbit Ethernet
  • Gigabit Ethernet
  • Wireless Link Characteristics
  • Wireless network characteristics
  • IEEE 80211 Wireless LAN
  • Slide 31
  • 80211 LAN architecture
  • 80211 Channels association
  • IEEE 80211 multiple access
  • IEEE 80211 MAC Protocol CSMACA
  • Avoiding collisions (more)
  • Collision Avoidance RTS-CTS exchange
  • Slide 38
  • Slide 39
  • Hubs
  • Interconnecting with hubs
  • Inter - Networking
  • Learning Bridges
  • Spanning Tree Algorithm
  • Algorithm Overview
  • Algorithm Details
  • Algorithm Detail (cont)
  • Broadcast and Multicast
  • Limitations of Bridges
  • Switch
  • Switch allows multiple simultaneous transmissions
  • Switch Table
  • Switch self-learning
  • Forwarding
  • Self learning
  • Self-learning forwarding example
  • FilteringForwarding
  • Switch example
  • Slide 59
  • Switch traffic isolation
  • Switches dedicated access
  • More on Switches
  • Institutional network
  • Switches vs Routers
  • Summary comparison
  • IEEE 802 Standards
Page 33: Chapter 5B

5 DataLink Layer 5-33

80211 Channels association 80211b 24GHz-2485GHz spectrum divided

into 11 channels at different frequencies AP admin chooses frequency for AP interference possible channel can be same as

that chosen by neighboring AP host must associate with an AP

scans channels listening for beacon frames containing APrsquos name (SSID) and MAC address

selects AP to associate with may perform authentication [Chapter 8] will typically run DHCP to get IP address in

APrsquos subnet

5 DataLink Layer 5-34

IEEE 80211 multiple access avoid collisions 2+ nodes transmitting at same

time 80211 CSMA - sense before transmitting

donrsquot collide with ongoing transmission by other node

80211 no collision detection difficult to receive (sense collisions) when transmitting

due to weak received signals (fading) canrsquot sense all collisions in any case hidden terminal

fading goal avoid collisions CSMAC(ollision)A(voidance)

AB

CA B C

Arsquos signalstrength

space

Crsquos signalstrength

5 DataLink Layer 5-35

IEEE 80211 MAC Protocol CSMACA

80211 sender1 if sense channel idle for DIFS then

transmit entire frame (no CD)2 if sense channel busy then

start random backoff timetimer counts down while channel idletransmit when timer expiresif no ACK increase random backoff

interval repeat 2

80211 receiver- if frame received OK

return ACK after SIFS (ACK needed due to hidden terminal problem)

sender receiver

DIFS

data

SIFS

ACK

5 DataLink Layer 5-36

Avoiding collisions (more)

idea allow sender to ldquoreserverdquo channel rather than random access of data frames avoid collisions of long data frames

sender first transmits small request-to-send (RTS) packets to BS using CSMA RTSs may still collide with each other (but theyrsquore

short) BS broadcasts clear-to-send CTS in response to RTS RTS heard by all nodes

sender transmits data frame other stations defer transmissions

Avoid data frame collisions completely using small reservation packets

5 DataLink Layer 5-37

Collision Avoidance RTS-CTS exchange

APA B

time

RTS(A)RTS(B)

RTS(A)

CTS(A) CTS(A)

DATA (A)

ACK(A) ACK(A)

reservation collision

defer

5 DataLink Layer 5-38

Manchester encoding

Used in 10BaseT Each bit has a transition Allows clocks in sending and receiving nodes to

synchronize to each other no need for a centralized global clock among nodes

Hey this is physical-layer stuff

5 DataLink Layer 5-39

Link Layer

51 Introduction and services

52 Error detection and correction

53Multiple access protocols

54 Link-Layer Addressing

55 Ethernet

56 Interconnections Hubs and switches

57 PPP 58 Link Virtualization

ATM

5 DataLink Layer 5-40

HubsHubs are essentially physical-layer repeaters

bits coming from one link go out all other links at the same rate no frame buffering no CSMACD at hub adapters detect collisions provides net management functionality

twisted pair

hub

5 DataLink Layer 5-41

Interconnecting with hubs Backbone hub interconnects LAN segments Extends max distance between nodes But individual segment collision domains become one large

collision domain Canrsquot interconnect 10BaseT amp 100BaseT

hub

hubhub

hub

5 DataLink Layer 5-42

Inter - Networking

Hubs Bridges Switches Routers

5 DataLink Layer 5-43

Learning Bridges Do not forward when unnecessary Maintain forwarding table

HostPort

A 1 B 1 C 1 X 2 Y 2 Z 2

Learn table entries based on source address Table is an optimization need not be complete Always forward broadcast frames

A

Bridge

B C

X Y Z

Port 1

Port 2

5 DataLink Layer 5-44

Spanning Tree Algorithm Problem loops

Bridges run a distributed spanning tree algorithm select which bridges actively forward developed by Radia Perlman now IEEE 8021 specification

A

C

E

D

B

K

F

H

J

G

I

B3

B7

B4

B2

B5

B1

B6

(a) (b)

5 DataLink Layer 5-45

Algorithm Overview Each bridge has unique id (eg B1 B2

B3) Select bridge with smallest id as root Select bridge on each LAN closest to root

as designated bridge (use id to break ties) Each bridge forwards frames over each LAN for which it is the designated bridge

A

C

E

D

B

K

F

H

J

G

I

B5

B2

B3

B7

B4

B1

B6

5 DataLink Layer 5-46

Algorithm Details

Bridges exchange configuration messages id for bridge sending the message id for what the sending bridge believes to be

root bridge distance (hops) from sending bridge to root

bridge Each bridge records current best

configuration message for each port Initially each bridge believes it is the root

5 DataLink Layer 5-47

Algorithm Detail (cont) When learn not root stop generating config

messages in steady state only root generates configuration messages

When learn not designated bridge stop forwarding config messages in steady state only designated bridges forward config

messages

Root continues to periodically send config messages If any bridge does not receive config message after

a period of time it starts generating config messages claiming to be the root

5 DataLink Layer 5-48

Broadcast and Multicast Forward all broadcastmulticast frames

current practice Learn when no group members

downstream Accomplished by having each member of

group G send a frame to bridge multicast address with G in source field

5 DataLink Layer 5-49

Limitations of Bridges

Do not scale spanning tree algorithm does not scale broadcast does not scale

Do not accommodate heterogeneity

Caution beware of transparency

5 DataLink Layer 5-50

Switch link-layer device smarter than hubs take active

role store forward Ethernet frames examine incoming framersquos MAC address selectively

forward frame to one-or-more outgoing links when frame is to be forwarded on segment uses CSMACD to access segment

transparent hosts are unaware of presence of switches

plug-and-play self-learning switches do not need to be configured

5 DataLink Layer 5-51

Switch allows multiple simultaneous transmissions

hosts have dedicated direct connection to switch

switches buffer packets Ethernet protocol used on

each incoming link but no collisions full duplex each link is its own collision

domain switching A-to-Arsquo and B-

to-Brsquo simultaneously without collisions not possible with dumb hub

A

Arsquo

B

Brsquo

C

Crsquo

switch with six interfaces(123456)

1 23

45

6

5 DataLink Layer 5-52

Switch Table

Q how does switch know that Arsquo reachable via interface 4 Brsquo reachable via interface 5

A each switch has a switch table each entry (MAC address of host interface

to reach host time stamp)

looks like a routing table Q how are entries created

maintained in switch table something like a routing

protocol

A

Arsquo

B

Brsquo

C

Crsquo

switch with six interfaces(123456)

1 23

45

6

5 DataLink Layer 5-53

Switch self-learning

switch learns which hosts can be reached through which interfaces when frame received

switch ldquolearnsrdquo location of sender incoming LAN segment

records senderlocation pair in switch table

A

Arsquo

B

Brsquo

C

Crsquo

1 23

45

6

A Arsquo

Source ADest Arsquo

MAC addr interface TTL

Switch table (initially empty)

A 1 60

5 DataLink Layer 5-54

Forwarding

bull How do determine onto which LAN segment to forward framebull Looks like a routing problem

hub

hubhub

switch1

2 3

5 DataLink Layer 5-55

Self learning

A switch has a switch table entry in switch table

(MAC Address Interface Time Stamp) stale entries in table dropped (TTL can be 60

min) switch learns which hosts can be reached through

which interfaces when frame received switch ldquolearnsrdquo location

of sender incoming LAN segment records senderlocation pair in switch table

5 DataLink Layer 5-56

Self-learning forwarding example

A

Arsquo

B

Brsquo

C

Crsquo

1 23

45

6

A Arsquo

Source ADest Arsquo

MAC addr interface TTL

Switch table (initially empty)

A 1 60

A ArsquoA ArsquoA ArsquoA ArsquoA Arsquo

frame destination unknownflood

Arsquo A

destination A location known

Arsquo 4 60

selective send

5 DataLink Layer 5-57

FilteringForwardingWhen switch receives a frame

index switch table using MAC dest addressif entry found for destination

then if dest on segment from which frame arrived

then drop the frame else forward the frame on interface indicated else flood

forward on all but the interface on which the frame arrived

5 DataLink Layer 5-58

Switch example

Suppose C sends frame to D

Switch receives frame from from C notes in bridge table that C is on interface 1 because D is not in table switch forwards frame into

interfaces 2 and 3

frame received by D

hub

hub hub

switch

A

B CD

EF

G H

I

address interface

ABEG

1123

12 3

5 DataLink Layer 5-59

Switch example

Suppose D replies back with frame to C

Switch receives frame from from D notes in bridge table that D is on interface 2 because C is in table switch forwards frame only to

interface 1

frame received by C

hub

hub hub

switch

A

B CD

EF

G H

I

address interface

ABEGC

11231

5 DataLink Layer 5-60

Switch traffic isolation switch installation breaks subnet into LAN

segments switch filters packets

same-LAN-segment frames not usually forwarded onto other LAN segments

segments become separate collision domains

hub hub hub

switch

collision domain collision domain

collision domain

5 DataLink Layer 5-61

Switches dedicated access Switch with many

interfaces Hosts have direct

connection to switch No collisions full duplex

Switching A-to-Arsquo and B-to-Brsquo simultaneously no collisions

switch

A

Arsquo

B

Brsquo

C

Crsquo

5 DataLink Layer 5-62

More on Switches

cut-through switching frame forwarded from input to output port without first collecting entire frameslight reduction in latency

combinations of shareddedicated 101001000 Mbps interfaces

5 DataLink Layer 5-63

Institutional network

hub

hubhub

switch

to externalnetwork

router

IP subnet

mail server

web server

5 DataLink Layer 5-64

Switches vs Routers both store-and-forward devices

routers network layer devices (examine network layer headers) switches are link layer devices

routers maintain routing tables implement routing algorithms

switches maintain switch tables implement filtering learning algorithms

5 DataLink Layer 5-65

Summary comparison

hubs routers switches

traffi c isolation

no yes yes

plug amp play yes no yes

optimal routing

no yes no

cut through

yes no yes

5 DataLink Layer 5-66

IEEE 802 Standards

The 802 working groups The important ones are marked with The ones marked with are hibernating The one marked with dagger gave up

  • Slide 1
  • Link Layer
  • Ethernet
  • Slide 4
  • Star topology
  • Ethernet Frame Structure
  • Ethernet Frame Structure (more)
  • Unreliable connectionless service
  • Ethernet uses CSMACD
  • Ethernet CSMACD algorithm
  • Ethernetrsquos CSMACD (more)
  • Collision Detection
  • Algorithm (cont)
  • Binary Exponential Backoff
  • Ethernet MAC Sublayer Protocol (2)
  • CSMACD efficiency
  • Ethernet Performance
  • 8023 Ethernet Standards Link amp Physical Layers
  • Manchester encoding
  • Ethernet Cabling
  • Ethernet Cabling (2)
  • Ethernet Cabling (3)
  • 10BaseT and 100BaseT
  • 100Mbps Fast Ethernet
  • Fast Ethernet
  • Gbit Ethernet
  • Gigabit Ethernet
  • Wireless Link Characteristics
  • Wireless network characteristics
  • IEEE 80211 Wireless LAN
  • Slide 31
  • 80211 LAN architecture
  • 80211 Channels association
  • IEEE 80211 multiple access
  • IEEE 80211 MAC Protocol CSMACA
  • Avoiding collisions (more)
  • Collision Avoidance RTS-CTS exchange
  • Slide 38
  • Slide 39
  • Hubs
  • Interconnecting with hubs
  • Inter - Networking
  • Learning Bridges
  • Spanning Tree Algorithm
  • Algorithm Overview
  • Algorithm Details
  • Algorithm Detail (cont)
  • Broadcast and Multicast
  • Limitations of Bridges
  • Switch
  • Switch allows multiple simultaneous transmissions
  • Switch Table
  • Switch self-learning
  • Forwarding
  • Self learning
  • Self-learning forwarding example
  • FilteringForwarding
  • Switch example
  • Slide 59
  • Switch traffic isolation
  • Switches dedicated access
  • More on Switches
  • Institutional network
  • Switches vs Routers
  • Summary comparison
  • IEEE 802 Standards
Page 34: Chapter 5B

5 DataLink Layer 5-34

IEEE 80211 multiple access avoid collisions 2+ nodes transmitting at same

time 80211 CSMA - sense before transmitting

donrsquot collide with ongoing transmission by other node

80211 no collision detection difficult to receive (sense collisions) when transmitting

due to weak received signals (fading) canrsquot sense all collisions in any case hidden terminal

fading goal avoid collisions CSMAC(ollision)A(voidance)

AB

CA B C

Arsquos signalstrength

space

Crsquos signalstrength

5 DataLink Layer 5-35

IEEE 80211 MAC Protocol CSMACA

80211 sender1 if sense channel idle for DIFS then

transmit entire frame (no CD)2 if sense channel busy then

start random backoff timetimer counts down while channel idletransmit when timer expiresif no ACK increase random backoff

interval repeat 2

80211 receiver- if frame received OK

return ACK after SIFS (ACK needed due to hidden terminal problem)

sender receiver

DIFS

data

SIFS

ACK

5 DataLink Layer 5-36

Avoiding collisions (more)

idea allow sender to ldquoreserverdquo channel rather than random access of data frames avoid collisions of long data frames

sender first transmits small request-to-send (RTS) packets to BS using CSMA RTSs may still collide with each other (but theyrsquore

short) BS broadcasts clear-to-send CTS in response to RTS RTS heard by all nodes

sender transmits data frame other stations defer transmissions

Avoid data frame collisions completely using small reservation packets

5 DataLink Layer 5-37

Collision Avoidance RTS-CTS exchange

APA B

time

RTS(A)RTS(B)

RTS(A)

CTS(A) CTS(A)

DATA (A)

ACK(A) ACK(A)

reservation collision

defer

5 DataLink Layer 5-38

Manchester encoding

Used in 10BaseT Each bit has a transition Allows clocks in sending and receiving nodes to

synchronize to each other no need for a centralized global clock among nodes

Hey this is physical-layer stuff

5 DataLink Layer 5-39

Link Layer

51 Introduction and services

52 Error detection and correction

53Multiple access protocols

54 Link-Layer Addressing

55 Ethernet

56 Interconnections Hubs and switches

57 PPP 58 Link Virtualization

ATM

5 DataLink Layer 5-40

HubsHubs are essentially physical-layer repeaters

bits coming from one link go out all other links at the same rate no frame buffering no CSMACD at hub adapters detect collisions provides net management functionality

twisted pair

hub

5 DataLink Layer 5-41

Interconnecting with hubs Backbone hub interconnects LAN segments Extends max distance between nodes But individual segment collision domains become one large

collision domain Canrsquot interconnect 10BaseT amp 100BaseT

hub

hubhub

hub

5 DataLink Layer 5-42

Inter - Networking

Hubs Bridges Switches Routers

5 DataLink Layer 5-43

Learning Bridges Do not forward when unnecessary Maintain forwarding table

HostPort

A 1 B 1 C 1 X 2 Y 2 Z 2

Learn table entries based on source address Table is an optimization need not be complete Always forward broadcast frames

A

Bridge

B C

X Y Z

Port 1

Port 2

5 DataLink Layer 5-44

Spanning Tree Algorithm Problem loops

Bridges run a distributed spanning tree algorithm select which bridges actively forward developed by Radia Perlman now IEEE 8021 specification

A

C

E

D

B

K

F

H

J

G

I

B3

B7

B4

B2

B5

B1

B6

(a) (b)

5 DataLink Layer 5-45

Algorithm Overview Each bridge has unique id (eg B1 B2

B3) Select bridge with smallest id as root Select bridge on each LAN closest to root

as designated bridge (use id to break ties) Each bridge forwards frames over each LAN for which it is the designated bridge

A

C

E

D

B

K

F

H

J

G

I

B5

B2

B3

B7

B4

B1

B6

5 DataLink Layer 5-46

Algorithm Details

Bridges exchange configuration messages id for bridge sending the message id for what the sending bridge believes to be

root bridge distance (hops) from sending bridge to root

bridge Each bridge records current best

configuration message for each port Initially each bridge believes it is the root

5 DataLink Layer 5-47

Algorithm Detail (cont) When learn not root stop generating config

messages in steady state only root generates configuration messages

When learn not designated bridge stop forwarding config messages in steady state only designated bridges forward config

messages

Root continues to periodically send config messages If any bridge does not receive config message after

a period of time it starts generating config messages claiming to be the root

5 DataLink Layer 5-48

Broadcast and Multicast Forward all broadcastmulticast frames

current practice Learn when no group members

downstream Accomplished by having each member of

group G send a frame to bridge multicast address with G in source field

5 DataLink Layer 5-49

Limitations of Bridges

Do not scale spanning tree algorithm does not scale broadcast does not scale

Do not accommodate heterogeneity

Caution beware of transparency

5 DataLink Layer 5-50

Switch link-layer device smarter than hubs take active

role store forward Ethernet frames examine incoming framersquos MAC address selectively

forward frame to one-or-more outgoing links when frame is to be forwarded on segment uses CSMACD to access segment

transparent hosts are unaware of presence of switches

plug-and-play self-learning switches do not need to be configured

5 DataLink Layer 5-51

Switch allows multiple simultaneous transmissions

hosts have dedicated direct connection to switch

switches buffer packets Ethernet protocol used on

each incoming link but no collisions full duplex each link is its own collision

domain switching A-to-Arsquo and B-

to-Brsquo simultaneously without collisions not possible with dumb hub

A

Arsquo

B

Brsquo

C

Crsquo

switch with six interfaces(123456)

1 23

45

6

5 DataLink Layer 5-52

Switch Table

Q how does switch know that Arsquo reachable via interface 4 Brsquo reachable via interface 5

A each switch has a switch table each entry (MAC address of host interface

to reach host time stamp)

looks like a routing table Q how are entries created

maintained in switch table something like a routing

protocol

A

Arsquo

B

Brsquo

C

Crsquo

switch with six interfaces(123456)

1 23

45

6

5 DataLink Layer 5-53

Switch self-learning

switch learns which hosts can be reached through which interfaces when frame received

switch ldquolearnsrdquo location of sender incoming LAN segment

records senderlocation pair in switch table

A

Arsquo

B

Brsquo

C

Crsquo

1 23

45

6

A Arsquo

Source ADest Arsquo

MAC addr interface TTL

Switch table (initially empty)

A 1 60

5 DataLink Layer 5-54

Forwarding

bull How do determine onto which LAN segment to forward framebull Looks like a routing problem

hub

hubhub

switch1

2 3

5 DataLink Layer 5-55

Self learning

A switch has a switch table entry in switch table

(MAC Address Interface Time Stamp) stale entries in table dropped (TTL can be 60

min) switch learns which hosts can be reached through

which interfaces when frame received switch ldquolearnsrdquo location

of sender incoming LAN segment records senderlocation pair in switch table

5 DataLink Layer 5-56

Self-learning forwarding example

A

Arsquo

B

Brsquo

C

Crsquo

1 23

45

6

A Arsquo

Source ADest Arsquo

MAC addr interface TTL

Switch table (initially empty)

A 1 60

A ArsquoA ArsquoA ArsquoA ArsquoA Arsquo

frame destination unknownflood

Arsquo A

destination A location known

Arsquo 4 60

selective send

5 DataLink Layer 5-57

FilteringForwardingWhen switch receives a frame

index switch table using MAC dest addressif entry found for destination

then if dest on segment from which frame arrived

then drop the frame else forward the frame on interface indicated else flood

forward on all but the interface on which the frame arrived

5 DataLink Layer 5-58

Switch example

Suppose C sends frame to D

Switch receives frame from from C notes in bridge table that C is on interface 1 because D is not in table switch forwards frame into

interfaces 2 and 3

frame received by D

hub

hub hub

switch

A

B CD

EF

G H

I

address interface

ABEG

1123

12 3

5 DataLink Layer 5-59

Switch example

Suppose D replies back with frame to C

Switch receives frame from from D notes in bridge table that D is on interface 2 because C is in table switch forwards frame only to

interface 1

frame received by C

hub

hub hub

switch

A

B CD

EF

G H

I

address interface

ABEGC

11231

5 DataLink Layer 5-60

Switch traffic isolation switch installation breaks subnet into LAN

segments switch filters packets

same-LAN-segment frames not usually forwarded onto other LAN segments

segments become separate collision domains

hub hub hub

switch

collision domain collision domain

collision domain

5 DataLink Layer 5-61

Switches dedicated access Switch with many

interfaces Hosts have direct

connection to switch No collisions full duplex

Switching A-to-Arsquo and B-to-Brsquo simultaneously no collisions

switch

A

Arsquo

B

Brsquo

C

Crsquo

5 DataLink Layer 5-62

More on Switches

cut-through switching frame forwarded from input to output port without first collecting entire frameslight reduction in latency

combinations of shareddedicated 101001000 Mbps interfaces

5 DataLink Layer 5-63

Institutional network

hub

hubhub

switch

to externalnetwork

router

IP subnet

mail server

web server

5 DataLink Layer 5-64

Switches vs Routers both store-and-forward devices

routers network layer devices (examine network layer headers) switches are link layer devices

routers maintain routing tables implement routing algorithms

switches maintain switch tables implement filtering learning algorithms

5 DataLink Layer 5-65

Summary comparison

hubs routers switches

traffi c isolation

no yes yes

plug amp play yes no yes

optimal routing

no yes no

cut through

yes no yes

5 DataLink Layer 5-66

IEEE 802 Standards

The 802 working groups The important ones are marked with The ones marked with are hibernating The one marked with dagger gave up

  • Slide 1
  • Link Layer
  • Ethernet
  • Slide 4
  • Star topology
  • Ethernet Frame Structure
  • Ethernet Frame Structure (more)
  • Unreliable connectionless service
  • Ethernet uses CSMACD
  • Ethernet CSMACD algorithm
  • Ethernetrsquos CSMACD (more)
  • Collision Detection
  • Algorithm (cont)
  • Binary Exponential Backoff
  • Ethernet MAC Sublayer Protocol (2)
  • CSMACD efficiency
  • Ethernet Performance
  • 8023 Ethernet Standards Link amp Physical Layers
  • Manchester encoding
  • Ethernet Cabling
  • Ethernet Cabling (2)
  • Ethernet Cabling (3)
  • 10BaseT and 100BaseT
  • 100Mbps Fast Ethernet
  • Fast Ethernet
  • Gbit Ethernet
  • Gigabit Ethernet
  • Wireless Link Characteristics
  • Wireless network characteristics
  • IEEE 80211 Wireless LAN
  • Slide 31
  • 80211 LAN architecture
  • 80211 Channels association
  • IEEE 80211 multiple access
  • IEEE 80211 MAC Protocol CSMACA
  • Avoiding collisions (more)
  • Collision Avoidance RTS-CTS exchange
  • Slide 38
  • Slide 39
  • Hubs
  • Interconnecting with hubs
  • Inter - Networking
  • Learning Bridges
  • Spanning Tree Algorithm
  • Algorithm Overview
  • Algorithm Details
  • Algorithm Detail (cont)
  • Broadcast and Multicast
  • Limitations of Bridges
  • Switch
  • Switch allows multiple simultaneous transmissions
  • Switch Table
  • Switch self-learning
  • Forwarding
  • Self learning
  • Self-learning forwarding example
  • FilteringForwarding
  • Switch example
  • Slide 59
  • Switch traffic isolation
  • Switches dedicated access
  • More on Switches
  • Institutional network
  • Switches vs Routers
  • Summary comparison
  • IEEE 802 Standards
Page 35: Chapter 5B

5 DataLink Layer 5-35

IEEE 80211 MAC Protocol CSMACA

80211 sender1 if sense channel idle for DIFS then

transmit entire frame (no CD)2 if sense channel busy then

start random backoff timetimer counts down while channel idletransmit when timer expiresif no ACK increase random backoff

interval repeat 2

80211 receiver- if frame received OK

return ACK after SIFS (ACK needed due to hidden terminal problem)

sender receiver

DIFS

data

SIFS

ACK

5 DataLink Layer 5-36

Avoiding collisions (more)

idea allow sender to ldquoreserverdquo channel rather than random access of data frames avoid collisions of long data frames

sender first transmits small request-to-send (RTS) packets to BS using CSMA RTSs may still collide with each other (but theyrsquore

short) BS broadcasts clear-to-send CTS in response to RTS RTS heard by all nodes

sender transmits data frame other stations defer transmissions

Avoid data frame collisions completely using small reservation packets

5 DataLink Layer 5-37

Collision Avoidance RTS-CTS exchange

APA B

time

RTS(A)RTS(B)

RTS(A)

CTS(A) CTS(A)

DATA (A)

ACK(A) ACK(A)

reservation collision

defer

5 DataLink Layer 5-38

Manchester encoding

Used in 10BaseT Each bit has a transition Allows clocks in sending and receiving nodes to

synchronize to each other no need for a centralized global clock among nodes

Hey this is physical-layer stuff

5 DataLink Layer 5-39

Link Layer

51 Introduction and services

52 Error detection and correction

53Multiple access protocols

54 Link-Layer Addressing

55 Ethernet

56 Interconnections Hubs and switches

57 PPP 58 Link Virtualization

ATM

5 DataLink Layer 5-40

HubsHubs are essentially physical-layer repeaters

bits coming from one link go out all other links at the same rate no frame buffering no CSMACD at hub adapters detect collisions provides net management functionality

twisted pair

hub

5 DataLink Layer 5-41

Interconnecting with hubs Backbone hub interconnects LAN segments Extends max distance between nodes But individual segment collision domains become one large

collision domain Canrsquot interconnect 10BaseT amp 100BaseT

hub

hubhub

hub

5 DataLink Layer 5-42

Inter - Networking

Hubs Bridges Switches Routers

5 DataLink Layer 5-43

Learning Bridges Do not forward when unnecessary Maintain forwarding table

HostPort

A 1 B 1 C 1 X 2 Y 2 Z 2

Learn table entries based on source address Table is an optimization need not be complete Always forward broadcast frames

A

Bridge

B C

X Y Z

Port 1

Port 2

5 DataLink Layer 5-44

Spanning Tree Algorithm Problem loops

Bridges run a distributed spanning tree algorithm select which bridges actively forward developed by Radia Perlman now IEEE 8021 specification

A

C

E

D

B

K

F

H

J

G

I

B3

B7

B4

B2

B5

B1

B6

(a) (b)

5 DataLink Layer 5-45

Algorithm Overview Each bridge has unique id (eg B1 B2

B3) Select bridge with smallest id as root Select bridge on each LAN closest to root

as designated bridge (use id to break ties) Each bridge forwards frames over each LAN for which it is the designated bridge

A

C

E

D

B

K

F

H

J

G

I

B5

B2

B3

B7

B4

B1

B6

5 DataLink Layer 5-46

Algorithm Details

Bridges exchange configuration messages id for bridge sending the message id for what the sending bridge believes to be

root bridge distance (hops) from sending bridge to root

bridge Each bridge records current best

configuration message for each port Initially each bridge believes it is the root

5 DataLink Layer 5-47

Algorithm Detail (cont) When learn not root stop generating config

messages in steady state only root generates configuration messages

When learn not designated bridge stop forwarding config messages in steady state only designated bridges forward config

messages

Root continues to periodically send config messages If any bridge does not receive config message after

a period of time it starts generating config messages claiming to be the root

5 DataLink Layer 5-48

Broadcast and Multicast Forward all broadcastmulticast frames

current practice Learn when no group members

downstream Accomplished by having each member of

group G send a frame to bridge multicast address with G in source field

5 DataLink Layer 5-49

Limitations of Bridges

Do not scale spanning tree algorithm does not scale broadcast does not scale

Do not accommodate heterogeneity

Caution beware of transparency

5 DataLink Layer 5-50

Switch link-layer device smarter than hubs take active

role store forward Ethernet frames examine incoming framersquos MAC address selectively

forward frame to one-or-more outgoing links when frame is to be forwarded on segment uses CSMACD to access segment

transparent hosts are unaware of presence of switches

plug-and-play self-learning switches do not need to be configured

5 DataLink Layer 5-51

Switch allows multiple simultaneous transmissions

hosts have dedicated direct connection to switch

switches buffer packets Ethernet protocol used on

each incoming link but no collisions full duplex each link is its own collision

domain switching A-to-Arsquo and B-

to-Brsquo simultaneously without collisions not possible with dumb hub

A

Arsquo

B

Brsquo

C

Crsquo

switch with six interfaces(123456)

1 23

45

6

5 DataLink Layer 5-52

Switch Table

Q how does switch know that Arsquo reachable via interface 4 Brsquo reachable via interface 5

A each switch has a switch table each entry (MAC address of host interface

to reach host time stamp)

looks like a routing table Q how are entries created

maintained in switch table something like a routing

protocol

A

Arsquo

B

Brsquo

C

Crsquo

switch with six interfaces(123456)

1 23

45

6

5 DataLink Layer 5-53

Switch self-learning

switch learns which hosts can be reached through which interfaces when frame received

switch ldquolearnsrdquo location of sender incoming LAN segment

records senderlocation pair in switch table

A

Arsquo

B

Brsquo

C

Crsquo

1 23

45

6

A Arsquo

Source ADest Arsquo

MAC addr interface TTL

Switch table (initially empty)

A 1 60

5 DataLink Layer 5-54

Forwarding

bull How do determine onto which LAN segment to forward framebull Looks like a routing problem

hub

hubhub

switch1

2 3

5 DataLink Layer 5-55

Self learning

A switch has a switch table entry in switch table

(MAC Address Interface Time Stamp) stale entries in table dropped (TTL can be 60

min) switch learns which hosts can be reached through

which interfaces when frame received switch ldquolearnsrdquo location

of sender incoming LAN segment records senderlocation pair in switch table

5 DataLink Layer 5-56

Self-learning forwarding example

A

Arsquo

B

Brsquo

C

Crsquo

1 23

45

6

A Arsquo

Source ADest Arsquo

MAC addr interface TTL

Switch table (initially empty)

A 1 60

A ArsquoA ArsquoA ArsquoA ArsquoA Arsquo

frame destination unknownflood

Arsquo A

destination A location known

Arsquo 4 60

selective send

5 DataLink Layer 5-57

FilteringForwardingWhen switch receives a frame

index switch table using MAC dest addressif entry found for destination

then if dest on segment from which frame arrived

then drop the frame else forward the frame on interface indicated else flood

forward on all but the interface on which the frame arrived

5 DataLink Layer 5-58

Switch example

Suppose C sends frame to D

Switch receives frame from from C notes in bridge table that C is on interface 1 because D is not in table switch forwards frame into

interfaces 2 and 3

frame received by D

hub

hub hub

switch

A

B CD

EF

G H

I

address interface

ABEG

1123

12 3

5 DataLink Layer 5-59

Switch example

Suppose D replies back with frame to C

Switch receives frame from from D notes in bridge table that D is on interface 2 because C is in table switch forwards frame only to

interface 1

frame received by C

hub

hub hub

switch

A

B CD

EF

G H

I

address interface

ABEGC

11231

5 DataLink Layer 5-60

Switch traffic isolation switch installation breaks subnet into LAN

segments switch filters packets

same-LAN-segment frames not usually forwarded onto other LAN segments

segments become separate collision domains

hub hub hub

switch

collision domain collision domain

collision domain

5 DataLink Layer 5-61

Switches dedicated access Switch with many

interfaces Hosts have direct

connection to switch No collisions full duplex

Switching A-to-Arsquo and B-to-Brsquo simultaneously no collisions

switch

A

Arsquo

B

Brsquo

C

Crsquo

5 DataLink Layer 5-62

More on Switches

cut-through switching frame forwarded from input to output port without first collecting entire frameslight reduction in latency

combinations of shareddedicated 101001000 Mbps interfaces

5 DataLink Layer 5-63

Institutional network

hub

hubhub

switch

to externalnetwork

router

IP subnet

mail server

web server

5 DataLink Layer 5-64

Switches vs Routers both store-and-forward devices

routers network layer devices (examine network layer headers) switches are link layer devices

routers maintain routing tables implement routing algorithms

switches maintain switch tables implement filtering learning algorithms

5 DataLink Layer 5-65

Summary comparison

hubs routers switches

traffi c isolation

no yes yes

plug amp play yes no yes

optimal routing

no yes no

cut through

yes no yes

5 DataLink Layer 5-66

IEEE 802 Standards

The 802 working groups The important ones are marked with The ones marked with are hibernating The one marked with dagger gave up

  • Slide 1
  • Link Layer
  • Ethernet
  • Slide 4
  • Star topology
  • Ethernet Frame Structure
  • Ethernet Frame Structure (more)
  • Unreliable connectionless service
  • Ethernet uses CSMACD
  • Ethernet CSMACD algorithm
  • Ethernetrsquos CSMACD (more)
  • Collision Detection
  • Algorithm (cont)
  • Binary Exponential Backoff
  • Ethernet MAC Sublayer Protocol (2)
  • CSMACD efficiency
  • Ethernet Performance
  • 8023 Ethernet Standards Link amp Physical Layers
  • Manchester encoding
  • Ethernet Cabling
  • Ethernet Cabling (2)
  • Ethernet Cabling (3)
  • 10BaseT and 100BaseT
  • 100Mbps Fast Ethernet
  • Fast Ethernet
  • Gbit Ethernet
  • Gigabit Ethernet
  • Wireless Link Characteristics
  • Wireless network characteristics
  • IEEE 80211 Wireless LAN
  • Slide 31
  • 80211 LAN architecture
  • 80211 Channels association
  • IEEE 80211 multiple access
  • IEEE 80211 MAC Protocol CSMACA
  • Avoiding collisions (more)
  • Collision Avoidance RTS-CTS exchange
  • Slide 38
  • Slide 39
  • Hubs
  • Interconnecting with hubs
  • Inter - Networking
  • Learning Bridges
  • Spanning Tree Algorithm
  • Algorithm Overview
  • Algorithm Details
  • Algorithm Detail (cont)
  • Broadcast and Multicast
  • Limitations of Bridges
  • Switch
  • Switch allows multiple simultaneous transmissions
  • Switch Table
  • Switch self-learning
  • Forwarding
  • Self learning
  • Self-learning forwarding example
  • FilteringForwarding
  • Switch example
  • Slide 59
  • Switch traffic isolation
  • Switches dedicated access
  • More on Switches
  • Institutional network
  • Switches vs Routers
  • Summary comparison
  • IEEE 802 Standards
Page 36: Chapter 5B

5 DataLink Layer 5-36

Avoiding collisions (more)

idea allow sender to ldquoreserverdquo channel rather than random access of data frames avoid collisions of long data frames

sender first transmits small request-to-send (RTS) packets to BS using CSMA RTSs may still collide with each other (but theyrsquore

short) BS broadcasts clear-to-send CTS in response to RTS RTS heard by all nodes

sender transmits data frame other stations defer transmissions

Avoid data frame collisions completely using small reservation packets

5 DataLink Layer 5-37

Collision Avoidance RTS-CTS exchange

APA B

time

RTS(A)RTS(B)

RTS(A)

CTS(A) CTS(A)

DATA (A)

ACK(A) ACK(A)

reservation collision

defer

5 DataLink Layer 5-38

Manchester encoding

Used in 10BaseT Each bit has a transition Allows clocks in sending and receiving nodes to

synchronize to each other no need for a centralized global clock among nodes

Hey this is physical-layer stuff

5 DataLink Layer 5-39

Link Layer

51 Introduction and services

52 Error detection and correction

53Multiple access protocols

54 Link-Layer Addressing

55 Ethernet

56 Interconnections Hubs and switches

57 PPP 58 Link Virtualization

ATM

5 DataLink Layer 5-40

HubsHubs are essentially physical-layer repeaters

bits coming from one link go out all other links at the same rate no frame buffering no CSMACD at hub adapters detect collisions provides net management functionality

twisted pair

hub

5 DataLink Layer 5-41

Interconnecting with hubs Backbone hub interconnects LAN segments Extends max distance between nodes But individual segment collision domains become one large

collision domain Canrsquot interconnect 10BaseT amp 100BaseT

hub

hubhub

hub

5 DataLink Layer 5-42

Inter - Networking

Hubs Bridges Switches Routers

5 DataLink Layer 5-43

Learning Bridges Do not forward when unnecessary Maintain forwarding table

HostPort

A 1 B 1 C 1 X 2 Y 2 Z 2

Learn table entries based on source address Table is an optimization need not be complete Always forward broadcast frames

A

Bridge

B C

X Y Z

Port 1

Port 2

5 DataLink Layer 5-44

Spanning Tree Algorithm Problem loops

Bridges run a distributed spanning tree algorithm select which bridges actively forward developed by Radia Perlman now IEEE 8021 specification

A

C

E

D

B

K

F

H

J

G

I

B3

B7

B4

B2

B5

B1

B6

(a) (b)

5 DataLink Layer 5-45

Algorithm Overview Each bridge has unique id (eg B1 B2

B3) Select bridge with smallest id as root Select bridge on each LAN closest to root

as designated bridge (use id to break ties) Each bridge forwards frames over each LAN for which it is the designated bridge

A

C

E

D

B

K

F

H

J

G

I

B5

B2

B3

B7

B4

B1

B6

5 DataLink Layer 5-46

Algorithm Details

Bridges exchange configuration messages id for bridge sending the message id for what the sending bridge believes to be

root bridge distance (hops) from sending bridge to root

bridge Each bridge records current best

configuration message for each port Initially each bridge believes it is the root

5 DataLink Layer 5-47

Algorithm Detail (cont) When learn not root stop generating config

messages in steady state only root generates configuration messages

When learn not designated bridge stop forwarding config messages in steady state only designated bridges forward config

messages

Root continues to periodically send config messages If any bridge does not receive config message after

a period of time it starts generating config messages claiming to be the root

5 DataLink Layer 5-48

Broadcast and Multicast Forward all broadcastmulticast frames

current practice Learn when no group members

downstream Accomplished by having each member of

group G send a frame to bridge multicast address with G in source field

5 DataLink Layer 5-49

Limitations of Bridges

Do not scale spanning tree algorithm does not scale broadcast does not scale

Do not accommodate heterogeneity

Caution beware of transparency

5 DataLink Layer 5-50

Switch link-layer device smarter than hubs take active

role store forward Ethernet frames examine incoming framersquos MAC address selectively

forward frame to one-or-more outgoing links when frame is to be forwarded on segment uses CSMACD to access segment

transparent hosts are unaware of presence of switches

plug-and-play self-learning switches do not need to be configured

5 DataLink Layer 5-51

Switch allows multiple simultaneous transmissions

hosts have dedicated direct connection to switch

switches buffer packets Ethernet protocol used on

each incoming link but no collisions full duplex each link is its own collision

domain switching A-to-Arsquo and B-

to-Brsquo simultaneously without collisions not possible with dumb hub

A

Arsquo

B

Brsquo

C

Crsquo

switch with six interfaces(123456)

1 23

45

6

5 DataLink Layer 5-52

Switch Table

Q how does switch know that Arsquo reachable via interface 4 Brsquo reachable via interface 5

A each switch has a switch table each entry (MAC address of host interface

to reach host time stamp)

looks like a routing table Q how are entries created

maintained in switch table something like a routing

protocol

A

Arsquo

B

Brsquo

C

Crsquo

switch with six interfaces(123456)

1 23

45

6

5 DataLink Layer 5-53

Switch self-learning

switch learns which hosts can be reached through which interfaces when frame received

switch ldquolearnsrdquo location of sender incoming LAN segment

records senderlocation pair in switch table

A

Arsquo

B

Brsquo

C

Crsquo

1 23

45

6

A Arsquo

Source ADest Arsquo

MAC addr interface TTL

Switch table (initially empty)

A 1 60

5 DataLink Layer 5-54

Forwarding

bull How do determine onto which LAN segment to forward framebull Looks like a routing problem

hub

hubhub

switch1

2 3

5 DataLink Layer 5-55

Self learning

A switch has a switch table entry in switch table

(MAC Address Interface Time Stamp) stale entries in table dropped (TTL can be 60

min) switch learns which hosts can be reached through

which interfaces when frame received switch ldquolearnsrdquo location

of sender incoming LAN segment records senderlocation pair in switch table

5 DataLink Layer 5-56

Self-learning forwarding example

A

Arsquo

B

Brsquo

C

Crsquo

1 23

45

6

A Arsquo

Source ADest Arsquo

MAC addr interface TTL

Switch table (initially empty)

A 1 60

A ArsquoA ArsquoA ArsquoA ArsquoA Arsquo

frame destination unknownflood

Arsquo A

destination A location known

Arsquo 4 60

selective send

5 DataLink Layer 5-57

FilteringForwardingWhen switch receives a frame

index switch table using MAC dest addressif entry found for destination

then if dest on segment from which frame arrived

then drop the frame else forward the frame on interface indicated else flood

forward on all but the interface on which the frame arrived

5 DataLink Layer 5-58

Switch example

Suppose C sends frame to D

Switch receives frame from from C notes in bridge table that C is on interface 1 because D is not in table switch forwards frame into

interfaces 2 and 3

frame received by D

hub

hub hub

switch

A

B CD

EF

G H

I

address interface

ABEG

1123

12 3

5 DataLink Layer 5-59

Switch example

Suppose D replies back with frame to C

Switch receives frame from from D notes in bridge table that D is on interface 2 because C is in table switch forwards frame only to

interface 1

frame received by C

hub

hub hub

switch

A

B CD

EF

G H

I

address interface

ABEGC

11231

5 DataLink Layer 5-60

Switch traffic isolation switch installation breaks subnet into LAN

segments switch filters packets

same-LAN-segment frames not usually forwarded onto other LAN segments

segments become separate collision domains

hub hub hub

switch

collision domain collision domain

collision domain

5 DataLink Layer 5-61

Switches dedicated access Switch with many

interfaces Hosts have direct

connection to switch No collisions full duplex

Switching A-to-Arsquo and B-to-Brsquo simultaneously no collisions

switch

A

Arsquo

B

Brsquo

C

Crsquo

5 DataLink Layer 5-62

More on Switches

cut-through switching frame forwarded from input to output port without first collecting entire frameslight reduction in latency

combinations of shareddedicated 101001000 Mbps interfaces

5 DataLink Layer 5-63

Institutional network

hub

hubhub

switch

to externalnetwork

router

IP subnet

mail server

web server

5 DataLink Layer 5-64

Switches vs Routers both store-and-forward devices

routers network layer devices (examine network layer headers) switches are link layer devices

routers maintain routing tables implement routing algorithms

switches maintain switch tables implement filtering learning algorithms

5 DataLink Layer 5-65

Summary comparison

hubs routers switches

traffi c isolation

no yes yes

plug amp play yes no yes

optimal routing

no yes no

cut through

yes no yes

5 DataLink Layer 5-66

IEEE 802 Standards

The 802 working groups The important ones are marked with The ones marked with are hibernating The one marked with dagger gave up

  • Slide 1
  • Link Layer
  • Ethernet
  • Slide 4
  • Star topology
  • Ethernet Frame Structure
  • Ethernet Frame Structure (more)
  • Unreliable connectionless service
  • Ethernet uses CSMACD
  • Ethernet CSMACD algorithm
  • Ethernetrsquos CSMACD (more)
  • Collision Detection
  • Algorithm (cont)
  • Binary Exponential Backoff
  • Ethernet MAC Sublayer Protocol (2)
  • CSMACD efficiency
  • Ethernet Performance
  • 8023 Ethernet Standards Link amp Physical Layers
  • Manchester encoding
  • Ethernet Cabling
  • Ethernet Cabling (2)
  • Ethernet Cabling (3)
  • 10BaseT and 100BaseT
  • 100Mbps Fast Ethernet
  • Fast Ethernet
  • Gbit Ethernet
  • Gigabit Ethernet
  • Wireless Link Characteristics
  • Wireless network characteristics
  • IEEE 80211 Wireless LAN
  • Slide 31
  • 80211 LAN architecture
  • 80211 Channels association
  • IEEE 80211 multiple access
  • IEEE 80211 MAC Protocol CSMACA
  • Avoiding collisions (more)
  • Collision Avoidance RTS-CTS exchange
  • Slide 38
  • Slide 39
  • Hubs
  • Interconnecting with hubs
  • Inter - Networking
  • Learning Bridges
  • Spanning Tree Algorithm
  • Algorithm Overview
  • Algorithm Details
  • Algorithm Detail (cont)
  • Broadcast and Multicast
  • Limitations of Bridges
  • Switch
  • Switch allows multiple simultaneous transmissions
  • Switch Table
  • Switch self-learning
  • Forwarding
  • Self learning
  • Self-learning forwarding example
  • FilteringForwarding
  • Switch example
  • Slide 59
  • Switch traffic isolation
  • Switches dedicated access
  • More on Switches
  • Institutional network
  • Switches vs Routers
  • Summary comparison
  • IEEE 802 Standards
Page 37: Chapter 5B

5 DataLink Layer 5-37

Collision Avoidance RTS-CTS exchange

APA B

time

RTS(A)RTS(B)

RTS(A)

CTS(A) CTS(A)

DATA (A)

ACK(A) ACK(A)

reservation collision

defer

5 DataLink Layer 5-38

Manchester encoding

Used in 10BaseT Each bit has a transition Allows clocks in sending and receiving nodes to

synchronize to each other no need for a centralized global clock among nodes

Hey this is physical-layer stuff

5 DataLink Layer 5-39

Link Layer

51 Introduction and services

52 Error detection and correction

53Multiple access protocols

54 Link-Layer Addressing

55 Ethernet

56 Interconnections Hubs and switches

57 PPP 58 Link Virtualization

ATM

5 DataLink Layer 5-40

HubsHubs are essentially physical-layer repeaters

bits coming from one link go out all other links at the same rate no frame buffering no CSMACD at hub adapters detect collisions provides net management functionality

twisted pair

hub

5 DataLink Layer 5-41

Interconnecting with hubs Backbone hub interconnects LAN segments Extends max distance between nodes But individual segment collision domains become one large

collision domain Canrsquot interconnect 10BaseT amp 100BaseT

hub

hubhub

hub

5 DataLink Layer 5-42

Inter - Networking

Hubs Bridges Switches Routers

5 DataLink Layer 5-43

Learning Bridges Do not forward when unnecessary Maintain forwarding table

HostPort

A 1 B 1 C 1 X 2 Y 2 Z 2

Learn table entries based on source address Table is an optimization need not be complete Always forward broadcast frames

A

Bridge

B C

X Y Z

Port 1

Port 2

5 DataLink Layer 5-44

Spanning Tree Algorithm Problem loops

Bridges run a distributed spanning tree algorithm select which bridges actively forward developed by Radia Perlman now IEEE 8021 specification

A

C

E

D

B

K

F

H

J

G

I

B3

B7

B4

B2

B5

B1

B6

(a) (b)

5 DataLink Layer 5-45

Algorithm Overview Each bridge has unique id (eg B1 B2

B3) Select bridge with smallest id as root Select bridge on each LAN closest to root

as designated bridge (use id to break ties) Each bridge forwards frames over each LAN for which it is the designated bridge

A

C

E

D

B

K

F

H

J

G

I

B5

B2

B3

B7

B4

B1

B6

5 DataLink Layer 5-46

Algorithm Details

Bridges exchange configuration messages id for bridge sending the message id for what the sending bridge believes to be

root bridge distance (hops) from sending bridge to root

bridge Each bridge records current best

configuration message for each port Initially each bridge believes it is the root

5 DataLink Layer 5-47

Algorithm Detail (cont) When learn not root stop generating config

messages in steady state only root generates configuration messages

When learn not designated bridge stop forwarding config messages in steady state only designated bridges forward config

messages

Root continues to periodically send config messages If any bridge does not receive config message after

a period of time it starts generating config messages claiming to be the root

5 DataLink Layer 5-48

Broadcast and Multicast Forward all broadcastmulticast frames

current practice Learn when no group members

downstream Accomplished by having each member of

group G send a frame to bridge multicast address with G in source field

5 DataLink Layer 5-49

Limitations of Bridges

Do not scale spanning tree algorithm does not scale broadcast does not scale

Do not accommodate heterogeneity

Caution beware of transparency

5 DataLink Layer 5-50

Switch link-layer device smarter than hubs take active

role store forward Ethernet frames examine incoming framersquos MAC address selectively

forward frame to one-or-more outgoing links when frame is to be forwarded on segment uses CSMACD to access segment

transparent hosts are unaware of presence of switches

plug-and-play self-learning switches do not need to be configured

5 DataLink Layer 5-51

Switch allows multiple simultaneous transmissions

hosts have dedicated direct connection to switch

switches buffer packets Ethernet protocol used on

each incoming link but no collisions full duplex each link is its own collision

domain switching A-to-Arsquo and B-

to-Brsquo simultaneously without collisions not possible with dumb hub

A

Arsquo

B

Brsquo

C

Crsquo

switch with six interfaces(123456)

1 23

45

6

5 DataLink Layer 5-52

Switch Table

Q how does switch know that Arsquo reachable via interface 4 Brsquo reachable via interface 5

A each switch has a switch table each entry (MAC address of host interface

to reach host time stamp)

looks like a routing table Q how are entries created

maintained in switch table something like a routing

protocol

A

Arsquo

B

Brsquo

C

Crsquo

switch with six interfaces(123456)

1 23

45

6

5 DataLink Layer 5-53

Switch self-learning

switch learns which hosts can be reached through which interfaces when frame received

switch ldquolearnsrdquo location of sender incoming LAN segment

records senderlocation pair in switch table

A

Arsquo

B

Brsquo

C

Crsquo

1 23

45

6

A Arsquo

Source ADest Arsquo

MAC addr interface TTL

Switch table (initially empty)

A 1 60

5 DataLink Layer 5-54

Forwarding

bull How do determine onto which LAN segment to forward framebull Looks like a routing problem

hub

hubhub

switch1

2 3

5 DataLink Layer 5-55

Self learning

A switch has a switch table entry in switch table

(MAC Address Interface Time Stamp) stale entries in table dropped (TTL can be 60

min) switch learns which hosts can be reached through

which interfaces when frame received switch ldquolearnsrdquo location

of sender incoming LAN segment records senderlocation pair in switch table

5 DataLink Layer 5-56

Self-learning forwarding example

A

Arsquo

B

Brsquo

C

Crsquo

1 23

45

6

A Arsquo

Source ADest Arsquo

MAC addr interface TTL

Switch table (initially empty)

A 1 60

A ArsquoA ArsquoA ArsquoA ArsquoA Arsquo

frame destination unknownflood

Arsquo A

destination A location known

Arsquo 4 60

selective send

5 DataLink Layer 5-57

FilteringForwardingWhen switch receives a frame

index switch table using MAC dest addressif entry found for destination

then if dest on segment from which frame arrived

then drop the frame else forward the frame on interface indicated else flood

forward on all but the interface on which the frame arrived

5 DataLink Layer 5-58

Switch example

Suppose C sends frame to D

Switch receives frame from from C notes in bridge table that C is on interface 1 because D is not in table switch forwards frame into

interfaces 2 and 3

frame received by D

hub

hub hub

switch

A

B CD

EF

G H

I

address interface

ABEG

1123

12 3

5 DataLink Layer 5-59

Switch example

Suppose D replies back with frame to C

Switch receives frame from from D notes in bridge table that D is on interface 2 because C is in table switch forwards frame only to

interface 1

frame received by C

hub

hub hub

switch

A

B CD

EF

G H

I

address interface

ABEGC

11231

5 DataLink Layer 5-60

Switch traffic isolation switch installation breaks subnet into LAN

segments switch filters packets

same-LAN-segment frames not usually forwarded onto other LAN segments

segments become separate collision domains

hub hub hub

switch

collision domain collision domain

collision domain

5 DataLink Layer 5-61

Switches dedicated access Switch with many

interfaces Hosts have direct

connection to switch No collisions full duplex

Switching A-to-Arsquo and B-to-Brsquo simultaneously no collisions

switch

A

Arsquo

B

Brsquo

C

Crsquo

5 DataLink Layer 5-62

More on Switches

cut-through switching frame forwarded from input to output port without first collecting entire frameslight reduction in latency

combinations of shareddedicated 101001000 Mbps interfaces

5 DataLink Layer 5-63

Institutional network

hub

hubhub

switch

to externalnetwork

router

IP subnet

mail server

web server

5 DataLink Layer 5-64

Switches vs Routers both store-and-forward devices

routers network layer devices (examine network layer headers) switches are link layer devices

routers maintain routing tables implement routing algorithms

switches maintain switch tables implement filtering learning algorithms

5 DataLink Layer 5-65

Summary comparison

hubs routers switches

traffi c isolation

no yes yes

plug amp play yes no yes

optimal routing

no yes no

cut through

yes no yes

5 DataLink Layer 5-66

IEEE 802 Standards

The 802 working groups The important ones are marked with The ones marked with are hibernating The one marked with dagger gave up

  • Slide 1
  • Link Layer
  • Ethernet
  • Slide 4
  • Star topology
  • Ethernet Frame Structure
  • Ethernet Frame Structure (more)
  • Unreliable connectionless service
  • Ethernet uses CSMACD
  • Ethernet CSMACD algorithm
  • Ethernetrsquos CSMACD (more)
  • Collision Detection
  • Algorithm (cont)
  • Binary Exponential Backoff
  • Ethernet MAC Sublayer Protocol (2)
  • CSMACD efficiency
  • Ethernet Performance
  • 8023 Ethernet Standards Link amp Physical Layers
  • Manchester encoding
  • Ethernet Cabling
  • Ethernet Cabling (2)
  • Ethernet Cabling (3)
  • 10BaseT and 100BaseT
  • 100Mbps Fast Ethernet
  • Fast Ethernet
  • Gbit Ethernet
  • Gigabit Ethernet
  • Wireless Link Characteristics
  • Wireless network characteristics
  • IEEE 80211 Wireless LAN
  • Slide 31
  • 80211 LAN architecture
  • 80211 Channels association
  • IEEE 80211 multiple access
  • IEEE 80211 MAC Protocol CSMACA
  • Avoiding collisions (more)
  • Collision Avoidance RTS-CTS exchange
  • Slide 38
  • Slide 39
  • Hubs
  • Interconnecting with hubs
  • Inter - Networking
  • Learning Bridges
  • Spanning Tree Algorithm
  • Algorithm Overview
  • Algorithm Details
  • Algorithm Detail (cont)
  • Broadcast and Multicast
  • Limitations of Bridges
  • Switch
  • Switch allows multiple simultaneous transmissions
  • Switch Table
  • Switch self-learning
  • Forwarding
  • Self learning
  • Self-learning forwarding example
  • FilteringForwarding
  • Switch example
  • Slide 59
  • Switch traffic isolation
  • Switches dedicated access
  • More on Switches
  • Institutional network
  • Switches vs Routers
  • Summary comparison
  • IEEE 802 Standards
Page 38: Chapter 5B

5 DataLink Layer 5-38

Manchester encoding

Used in 10BaseT Each bit has a transition Allows clocks in sending and receiving nodes to

synchronize to each other no need for a centralized global clock among nodes

Hey this is physical-layer stuff

5 DataLink Layer 5-39

Link Layer

51 Introduction and services

52 Error detection and correction

53Multiple access protocols

54 Link-Layer Addressing

55 Ethernet

56 Interconnections Hubs and switches

57 PPP 58 Link Virtualization

ATM

5 DataLink Layer 5-40

HubsHubs are essentially physical-layer repeaters

bits coming from one link go out all other links at the same rate no frame buffering no CSMACD at hub adapters detect collisions provides net management functionality

twisted pair

hub

5 DataLink Layer 5-41

Interconnecting with hubs Backbone hub interconnects LAN segments Extends max distance between nodes But individual segment collision domains become one large

collision domain Canrsquot interconnect 10BaseT amp 100BaseT

hub

hubhub

hub

5 DataLink Layer 5-42

Inter - Networking

Hubs Bridges Switches Routers

5 DataLink Layer 5-43

Learning Bridges Do not forward when unnecessary Maintain forwarding table

HostPort

A 1 B 1 C 1 X 2 Y 2 Z 2

Learn table entries based on source address Table is an optimization need not be complete Always forward broadcast frames

A

Bridge

B C

X Y Z

Port 1

Port 2

5 DataLink Layer 5-44

Spanning Tree Algorithm Problem loops

Bridges run a distributed spanning tree algorithm select which bridges actively forward developed by Radia Perlman now IEEE 8021 specification

A

C

E

D

B

K

F

H

J

G

I

B3

B7

B4

B2

B5

B1

B6

(a) (b)

5 DataLink Layer 5-45

Algorithm Overview Each bridge has unique id (eg B1 B2

B3) Select bridge with smallest id as root Select bridge on each LAN closest to root

as designated bridge (use id to break ties) Each bridge forwards frames over each LAN for which it is the designated bridge

A

C

E

D

B

K

F

H

J

G

I

B5

B2

B3

B7

B4

B1

B6

5 DataLink Layer 5-46

Algorithm Details

Bridges exchange configuration messages id for bridge sending the message id for what the sending bridge believes to be

root bridge distance (hops) from sending bridge to root

bridge Each bridge records current best

configuration message for each port Initially each bridge believes it is the root

5 DataLink Layer 5-47

Algorithm Detail (cont) When learn not root stop generating config

messages in steady state only root generates configuration messages

When learn not designated bridge stop forwarding config messages in steady state only designated bridges forward config

messages

Root continues to periodically send config messages If any bridge does not receive config message after

a period of time it starts generating config messages claiming to be the root

5 DataLink Layer 5-48

Broadcast and Multicast Forward all broadcastmulticast frames

current practice Learn when no group members

downstream Accomplished by having each member of

group G send a frame to bridge multicast address with G in source field

5 DataLink Layer 5-49

Limitations of Bridges

Do not scale spanning tree algorithm does not scale broadcast does not scale

Do not accommodate heterogeneity

Caution beware of transparency

5 DataLink Layer 5-50

Switch link-layer device smarter than hubs take active

role store forward Ethernet frames examine incoming framersquos MAC address selectively

forward frame to one-or-more outgoing links when frame is to be forwarded on segment uses CSMACD to access segment

transparent hosts are unaware of presence of switches

plug-and-play self-learning switches do not need to be configured

5 DataLink Layer 5-51

Switch allows multiple simultaneous transmissions

hosts have dedicated direct connection to switch

switches buffer packets Ethernet protocol used on

each incoming link but no collisions full duplex each link is its own collision

domain switching A-to-Arsquo and B-

to-Brsquo simultaneously without collisions not possible with dumb hub

A

Arsquo

B

Brsquo

C

Crsquo

switch with six interfaces(123456)

1 23

45

6

5 DataLink Layer 5-52

Switch Table

Q how does switch know that Arsquo reachable via interface 4 Brsquo reachable via interface 5

A each switch has a switch table each entry (MAC address of host interface

to reach host time stamp)

looks like a routing table Q how are entries created

maintained in switch table something like a routing

protocol

A

Arsquo

B

Brsquo

C

Crsquo

switch with six interfaces(123456)

1 23

45

6

5 DataLink Layer 5-53

Switch self-learning

switch learns which hosts can be reached through which interfaces when frame received

switch ldquolearnsrdquo location of sender incoming LAN segment

records senderlocation pair in switch table

A

Arsquo

B

Brsquo

C

Crsquo

1 23

45

6

A Arsquo

Source ADest Arsquo

MAC addr interface TTL

Switch table (initially empty)

A 1 60

5 DataLink Layer 5-54

Forwarding

bull How do determine onto which LAN segment to forward framebull Looks like a routing problem

hub

hubhub

switch1

2 3

5 DataLink Layer 5-55

Self learning

A switch has a switch table entry in switch table

(MAC Address Interface Time Stamp) stale entries in table dropped (TTL can be 60

min) switch learns which hosts can be reached through

which interfaces when frame received switch ldquolearnsrdquo location

of sender incoming LAN segment records senderlocation pair in switch table

5 DataLink Layer 5-56

Self-learning forwarding example

A

Arsquo

B

Brsquo

C

Crsquo

1 23

45

6

A Arsquo

Source ADest Arsquo

MAC addr interface TTL

Switch table (initially empty)

A 1 60

A ArsquoA ArsquoA ArsquoA ArsquoA Arsquo

frame destination unknownflood

Arsquo A

destination A location known

Arsquo 4 60

selective send

5 DataLink Layer 5-57

FilteringForwardingWhen switch receives a frame

index switch table using MAC dest addressif entry found for destination

then if dest on segment from which frame arrived

then drop the frame else forward the frame on interface indicated else flood

forward on all but the interface on which the frame arrived

5 DataLink Layer 5-58

Switch example

Suppose C sends frame to D

Switch receives frame from from C notes in bridge table that C is on interface 1 because D is not in table switch forwards frame into

interfaces 2 and 3

frame received by D

hub

hub hub

switch

A

B CD

EF

G H

I

address interface

ABEG

1123

12 3

5 DataLink Layer 5-59

Switch example

Suppose D replies back with frame to C

Switch receives frame from from D notes in bridge table that D is on interface 2 because C is in table switch forwards frame only to

interface 1

frame received by C

hub

hub hub

switch

A

B CD

EF

G H

I

address interface

ABEGC

11231

5 DataLink Layer 5-60

Switch traffic isolation switch installation breaks subnet into LAN

segments switch filters packets

same-LAN-segment frames not usually forwarded onto other LAN segments

segments become separate collision domains

hub hub hub

switch

collision domain collision domain

collision domain

5 DataLink Layer 5-61

Switches dedicated access Switch with many

interfaces Hosts have direct

connection to switch No collisions full duplex

Switching A-to-Arsquo and B-to-Brsquo simultaneously no collisions

switch

A

Arsquo

B

Brsquo

C

Crsquo

5 DataLink Layer 5-62

More on Switches

cut-through switching frame forwarded from input to output port without first collecting entire frameslight reduction in latency

combinations of shareddedicated 101001000 Mbps interfaces

5 DataLink Layer 5-63

Institutional network

hub

hubhub

switch

to externalnetwork

router

IP subnet

mail server

web server

5 DataLink Layer 5-64

Switches vs Routers both store-and-forward devices

routers network layer devices (examine network layer headers) switches are link layer devices

routers maintain routing tables implement routing algorithms

switches maintain switch tables implement filtering learning algorithms

5 DataLink Layer 5-65

Summary comparison

hubs routers switches

traffi c isolation

no yes yes

plug amp play yes no yes

optimal routing

no yes no

cut through

yes no yes

5 DataLink Layer 5-66

IEEE 802 Standards

The 802 working groups The important ones are marked with The ones marked with are hibernating The one marked with dagger gave up

  • Slide 1
  • Link Layer
  • Ethernet
  • Slide 4
  • Star topology
  • Ethernet Frame Structure
  • Ethernet Frame Structure (more)
  • Unreliable connectionless service
  • Ethernet uses CSMACD
  • Ethernet CSMACD algorithm
  • Ethernetrsquos CSMACD (more)
  • Collision Detection
  • Algorithm (cont)
  • Binary Exponential Backoff
  • Ethernet MAC Sublayer Protocol (2)
  • CSMACD efficiency
  • Ethernet Performance
  • 8023 Ethernet Standards Link amp Physical Layers
  • Manchester encoding
  • Ethernet Cabling
  • Ethernet Cabling (2)
  • Ethernet Cabling (3)
  • 10BaseT and 100BaseT
  • 100Mbps Fast Ethernet
  • Fast Ethernet
  • Gbit Ethernet
  • Gigabit Ethernet
  • Wireless Link Characteristics
  • Wireless network characteristics
  • IEEE 80211 Wireless LAN
  • Slide 31
  • 80211 LAN architecture
  • 80211 Channels association
  • IEEE 80211 multiple access
  • IEEE 80211 MAC Protocol CSMACA
  • Avoiding collisions (more)
  • Collision Avoidance RTS-CTS exchange
  • Slide 38
  • Slide 39
  • Hubs
  • Interconnecting with hubs
  • Inter - Networking
  • Learning Bridges
  • Spanning Tree Algorithm
  • Algorithm Overview
  • Algorithm Details
  • Algorithm Detail (cont)
  • Broadcast and Multicast
  • Limitations of Bridges
  • Switch
  • Switch allows multiple simultaneous transmissions
  • Switch Table
  • Switch self-learning
  • Forwarding
  • Self learning
  • Self-learning forwarding example
  • FilteringForwarding
  • Switch example
  • Slide 59
  • Switch traffic isolation
  • Switches dedicated access
  • More on Switches
  • Institutional network
  • Switches vs Routers
  • Summary comparison
  • IEEE 802 Standards
Page 39: Chapter 5B

5 DataLink Layer 5-39

Link Layer

51 Introduction and services

52 Error detection and correction

53Multiple access protocols

54 Link-Layer Addressing

55 Ethernet

56 Interconnections Hubs and switches

57 PPP 58 Link Virtualization

ATM

5 DataLink Layer 5-40

HubsHubs are essentially physical-layer repeaters

bits coming from one link go out all other links at the same rate no frame buffering no CSMACD at hub adapters detect collisions provides net management functionality

twisted pair

hub

5 DataLink Layer 5-41

Interconnecting with hubs Backbone hub interconnects LAN segments Extends max distance between nodes But individual segment collision domains become one large

collision domain Canrsquot interconnect 10BaseT amp 100BaseT

hub

hubhub

hub

5 DataLink Layer 5-42

Inter - Networking

Hubs Bridges Switches Routers

5 DataLink Layer 5-43

Learning Bridges Do not forward when unnecessary Maintain forwarding table

HostPort

A 1 B 1 C 1 X 2 Y 2 Z 2

Learn table entries based on source address Table is an optimization need not be complete Always forward broadcast frames

A

Bridge

B C

X Y Z

Port 1

Port 2

5 DataLink Layer 5-44

Spanning Tree Algorithm Problem loops

Bridges run a distributed spanning tree algorithm select which bridges actively forward developed by Radia Perlman now IEEE 8021 specification

A

C

E

D

B

K

F

H

J

G

I

B3

B7

B4

B2

B5

B1

B6

(a) (b)

5 DataLink Layer 5-45

Algorithm Overview Each bridge has unique id (eg B1 B2

B3) Select bridge with smallest id as root Select bridge on each LAN closest to root

as designated bridge (use id to break ties) Each bridge forwards frames over each LAN for which it is the designated bridge

A

C

E

D

B

K

F

H

J

G

I

B5

B2

B3

B7

B4

B1

B6

5 DataLink Layer 5-46

Algorithm Details

Bridges exchange configuration messages id for bridge sending the message id for what the sending bridge believes to be

root bridge distance (hops) from sending bridge to root

bridge Each bridge records current best

configuration message for each port Initially each bridge believes it is the root

5 DataLink Layer 5-47

Algorithm Detail (cont) When learn not root stop generating config

messages in steady state only root generates configuration messages

When learn not designated bridge stop forwarding config messages in steady state only designated bridges forward config

messages

Root continues to periodically send config messages If any bridge does not receive config message after

a period of time it starts generating config messages claiming to be the root

5 DataLink Layer 5-48

Broadcast and Multicast Forward all broadcastmulticast frames

current practice Learn when no group members

downstream Accomplished by having each member of

group G send a frame to bridge multicast address with G in source field

5 DataLink Layer 5-49

Limitations of Bridges

Do not scale spanning tree algorithm does not scale broadcast does not scale

Do not accommodate heterogeneity

Caution beware of transparency

5 DataLink Layer 5-50

Switch link-layer device smarter than hubs take active

role store forward Ethernet frames examine incoming framersquos MAC address selectively

forward frame to one-or-more outgoing links when frame is to be forwarded on segment uses CSMACD to access segment

transparent hosts are unaware of presence of switches

plug-and-play self-learning switches do not need to be configured

5 DataLink Layer 5-51

Switch allows multiple simultaneous transmissions

hosts have dedicated direct connection to switch

switches buffer packets Ethernet protocol used on

each incoming link but no collisions full duplex each link is its own collision

domain switching A-to-Arsquo and B-

to-Brsquo simultaneously without collisions not possible with dumb hub

A

Arsquo

B

Brsquo

C

Crsquo

switch with six interfaces(123456)

1 23

45

6

5 DataLink Layer 5-52

Switch Table

Q how does switch know that Arsquo reachable via interface 4 Brsquo reachable via interface 5

A each switch has a switch table each entry (MAC address of host interface

to reach host time stamp)

looks like a routing table Q how are entries created

maintained in switch table something like a routing

protocol

A

Arsquo

B

Brsquo

C

Crsquo

switch with six interfaces(123456)

1 23

45

6

5 DataLink Layer 5-53

Switch self-learning

switch learns which hosts can be reached through which interfaces when frame received

switch ldquolearnsrdquo location of sender incoming LAN segment

records senderlocation pair in switch table

A

Arsquo

B

Brsquo

C

Crsquo

1 23

45

6

A Arsquo

Source ADest Arsquo

MAC addr interface TTL

Switch table (initially empty)

A 1 60

5 DataLink Layer 5-54

Forwarding

bull How do determine onto which LAN segment to forward framebull Looks like a routing problem

hub

hubhub

switch1

2 3

5 DataLink Layer 5-55

Self learning

A switch has a switch table entry in switch table

(MAC Address Interface Time Stamp) stale entries in table dropped (TTL can be 60

min) switch learns which hosts can be reached through

which interfaces when frame received switch ldquolearnsrdquo location

of sender incoming LAN segment records senderlocation pair in switch table

5 DataLink Layer 5-56

Self-learning forwarding example

A

Arsquo

B

Brsquo

C

Crsquo

1 23

45

6

A Arsquo

Source ADest Arsquo

MAC addr interface TTL

Switch table (initially empty)

A 1 60

A ArsquoA ArsquoA ArsquoA ArsquoA Arsquo

frame destination unknownflood

Arsquo A

destination A location known

Arsquo 4 60

selective send

5 DataLink Layer 5-57

FilteringForwardingWhen switch receives a frame

index switch table using MAC dest addressif entry found for destination

then if dest on segment from which frame arrived

then drop the frame else forward the frame on interface indicated else flood

forward on all but the interface on which the frame arrived

5 DataLink Layer 5-58

Switch example

Suppose C sends frame to D

Switch receives frame from from C notes in bridge table that C is on interface 1 because D is not in table switch forwards frame into

interfaces 2 and 3

frame received by D

hub

hub hub

switch

A

B CD

EF

G H

I

address interface

ABEG

1123

12 3

5 DataLink Layer 5-59

Switch example

Suppose D replies back with frame to C

Switch receives frame from from D notes in bridge table that D is on interface 2 because C is in table switch forwards frame only to

interface 1

frame received by C

hub

hub hub

switch

A

B CD

EF

G H

I

address interface

ABEGC

11231

5 DataLink Layer 5-60

Switch traffic isolation switch installation breaks subnet into LAN

segments switch filters packets

same-LAN-segment frames not usually forwarded onto other LAN segments

segments become separate collision domains

hub hub hub

switch

collision domain collision domain

collision domain

5 DataLink Layer 5-61

Switches dedicated access Switch with many

interfaces Hosts have direct

connection to switch No collisions full duplex

Switching A-to-Arsquo and B-to-Brsquo simultaneously no collisions

switch

A

Arsquo

B

Brsquo

C

Crsquo

5 DataLink Layer 5-62

More on Switches

cut-through switching frame forwarded from input to output port without first collecting entire frameslight reduction in latency

combinations of shareddedicated 101001000 Mbps interfaces

5 DataLink Layer 5-63

Institutional network

hub

hubhub

switch

to externalnetwork

router

IP subnet

mail server

web server

5 DataLink Layer 5-64

Switches vs Routers both store-and-forward devices

routers network layer devices (examine network layer headers) switches are link layer devices

routers maintain routing tables implement routing algorithms

switches maintain switch tables implement filtering learning algorithms

5 DataLink Layer 5-65

Summary comparison

hubs routers switches

traffi c isolation

no yes yes

plug amp play yes no yes

optimal routing

no yes no

cut through

yes no yes

5 DataLink Layer 5-66

IEEE 802 Standards

The 802 working groups The important ones are marked with The ones marked with are hibernating The one marked with dagger gave up

  • Slide 1
  • Link Layer
  • Ethernet
  • Slide 4
  • Star topology
  • Ethernet Frame Structure
  • Ethernet Frame Structure (more)
  • Unreliable connectionless service
  • Ethernet uses CSMACD
  • Ethernet CSMACD algorithm
  • Ethernetrsquos CSMACD (more)
  • Collision Detection
  • Algorithm (cont)
  • Binary Exponential Backoff
  • Ethernet MAC Sublayer Protocol (2)
  • CSMACD efficiency
  • Ethernet Performance
  • 8023 Ethernet Standards Link amp Physical Layers
  • Manchester encoding
  • Ethernet Cabling
  • Ethernet Cabling (2)
  • Ethernet Cabling (3)
  • 10BaseT and 100BaseT
  • 100Mbps Fast Ethernet
  • Fast Ethernet
  • Gbit Ethernet
  • Gigabit Ethernet
  • Wireless Link Characteristics
  • Wireless network characteristics
  • IEEE 80211 Wireless LAN
  • Slide 31
  • 80211 LAN architecture
  • 80211 Channels association
  • IEEE 80211 multiple access
  • IEEE 80211 MAC Protocol CSMACA
  • Avoiding collisions (more)
  • Collision Avoidance RTS-CTS exchange
  • Slide 38
  • Slide 39
  • Hubs
  • Interconnecting with hubs
  • Inter - Networking
  • Learning Bridges
  • Spanning Tree Algorithm
  • Algorithm Overview
  • Algorithm Details
  • Algorithm Detail (cont)
  • Broadcast and Multicast
  • Limitations of Bridges
  • Switch
  • Switch allows multiple simultaneous transmissions
  • Switch Table
  • Switch self-learning
  • Forwarding
  • Self learning
  • Self-learning forwarding example
  • FilteringForwarding
  • Switch example
  • Slide 59
  • Switch traffic isolation
  • Switches dedicated access
  • More on Switches
  • Institutional network
  • Switches vs Routers
  • Summary comparison
  • IEEE 802 Standards
Page 40: Chapter 5B

5 DataLink Layer 5-40

HubsHubs are essentially physical-layer repeaters

bits coming from one link go out all other links at the same rate no frame buffering no CSMACD at hub adapters detect collisions provides net management functionality

twisted pair

hub

5 DataLink Layer 5-41

Interconnecting with hubs Backbone hub interconnects LAN segments Extends max distance between nodes But individual segment collision domains become one large

collision domain Canrsquot interconnect 10BaseT amp 100BaseT

hub

hubhub

hub

5 DataLink Layer 5-42

Inter - Networking

Hubs Bridges Switches Routers

5 DataLink Layer 5-43

Learning Bridges Do not forward when unnecessary Maintain forwarding table

HostPort

A 1 B 1 C 1 X 2 Y 2 Z 2

Learn table entries based on source address Table is an optimization need not be complete Always forward broadcast frames

A

Bridge

B C

X Y Z

Port 1

Port 2

5 DataLink Layer 5-44

Spanning Tree Algorithm Problem loops

Bridges run a distributed spanning tree algorithm select which bridges actively forward developed by Radia Perlman now IEEE 8021 specification

A

C

E

D

B

K

F

H

J

G

I

B3

B7

B4

B2

B5

B1

B6

(a) (b)

5 DataLink Layer 5-45

Algorithm Overview Each bridge has unique id (eg B1 B2

B3) Select bridge with smallest id as root Select bridge on each LAN closest to root

as designated bridge (use id to break ties) Each bridge forwards frames over each LAN for which it is the designated bridge

A

C

E

D

B

K

F

H

J

G

I

B5

B2

B3

B7

B4

B1

B6

5 DataLink Layer 5-46

Algorithm Details

Bridges exchange configuration messages id for bridge sending the message id for what the sending bridge believes to be

root bridge distance (hops) from sending bridge to root

bridge Each bridge records current best

configuration message for each port Initially each bridge believes it is the root

5 DataLink Layer 5-47

Algorithm Detail (cont) When learn not root stop generating config

messages in steady state only root generates configuration messages

When learn not designated bridge stop forwarding config messages in steady state only designated bridges forward config

messages

Root continues to periodically send config messages If any bridge does not receive config message after

a period of time it starts generating config messages claiming to be the root

5 DataLink Layer 5-48

Broadcast and Multicast Forward all broadcastmulticast frames

current practice Learn when no group members

downstream Accomplished by having each member of

group G send a frame to bridge multicast address with G in source field

5 DataLink Layer 5-49

Limitations of Bridges

Do not scale spanning tree algorithm does not scale broadcast does not scale

Do not accommodate heterogeneity

Caution beware of transparency

5 DataLink Layer 5-50

Switch link-layer device smarter than hubs take active

role store forward Ethernet frames examine incoming framersquos MAC address selectively

forward frame to one-or-more outgoing links when frame is to be forwarded on segment uses CSMACD to access segment

transparent hosts are unaware of presence of switches

plug-and-play self-learning switches do not need to be configured

5 DataLink Layer 5-51

Switch allows multiple simultaneous transmissions

hosts have dedicated direct connection to switch

switches buffer packets Ethernet protocol used on

each incoming link but no collisions full duplex each link is its own collision

domain switching A-to-Arsquo and B-

to-Brsquo simultaneously without collisions not possible with dumb hub

A

Arsquo

B

Brsquo

C

Crsquo

switch with six interfaces(123456)

1 23

45

6

5 DataLink Layer 5-52

Switch Table

Q how does switch know that Arsquo reachable via interface 4 Brsquo reachable via interface 5

A each switch has a switch table each entry (MAC address of host interface

to reach host time stamp)

looks like a routing table Q how are entries created

maintained in switch table something like a routing

protocol

A

Arsquo

B

Brsquo

C

Crsquo

switch with six interfaces(123456)

1 23

45

6

5 DataLink Layer 5-53

Switch self-learning

switch learns which hosts can be reached through which interfaces when frame received

switch ldquolearnsrdquo location of sender incoming LAN segment

records senderlocation pair in switch table

A

Arsquo

B

Brsquo

C

Crsquo

1 23

45

6

A Arsquo

Source ADest Arsquo

MAC addr interface TTL

Switch table (initially empty)

A 1 60

5 DataLink Layer 5-54

Forwarding

bull How do determine onto which LAN segment to forward framebull Looks like a routing problem

hub

hubhub

switch1

2 3

5 DataLink Layer 5-55

Self learning

A switch has a switch table entry in switch table

(MAC Address Interface Time Stamp) stale entries in table dropped (TTL can be 60

min) switch learns which hosts can be reached through

which interfaces when frame received switch ldquolearnsrdquo location

of sender incoming LAN segment records senderlocation pair in switch table

5 DataLink Layer 5-56

Self-learning forwarding example

A

Arsquo

B

Brsquo

C

Crsquo

1 23

45

6

A Arsquo

Source ADest Arsquo

MAC addr interface TTL

Switch table (initially empty)

A 1 60

A ArsquoA ArsquoA ArsquoA ArsquoA Arsquo

frame destination unknownflood

Arsquo A

destination A location known

Arsquo 4 60

selective send

5 DataLink Layer 5-57

FilteringForwardingWhen switch receives a frame

index switch table using MAC dest addressif entry found for destination

then if dest on segment from which frame arrived

then drop the frame else forward the frame on interface indicated else flood

forward on all but the interface on which the frame arrived

5 DataLink Layer 5-58

Switch example

Suppose C sends frame to D

Switch receives frame from from C notes in bridge table that C is on interface 1 because D is not in table switch forwards frame into

interfaces 2 and 3

frame received by D

hub

hub hub

switch

A

B CD

EF

G H

I

address interface

ABEG

1123

12 3

5 DataLink Layer 5-59

Switch example

Suppose D replies back with frame to C

Switch receives frame from from D notes in bridge table that D is on interface 2 because C is in table switch forwards frame only to

interface 1

frame received by C

hub

hub hub

switch

A

B CD

EF

G H

I

address interface

ABEGC

11231

5 DataLink Layer 5-60

Switch traffic isolation switch installation breaks subnet into LAN

segments switch filters packets

same-LAN-segment frames not usually forwarded onto other LAN segments

segments become separate collision domains

hub hub hub

switch

collision domain collision domain

collision domain

5 DataLink Layer 5-61

Switches dedicated access Switch with many

interfaces Hosts have direct

connection to switch No collisions full duplex

Switching A-to-Arsquo and B-to-Brsquo simultaneously no collisions

switch

A

Arsquo

B

Brsquo

C

Crsquo

5 DataLink Layer 5-62

More on Switches

cut-through switching frame forwarded from input to output port without first collecting entire frameslight reduction in latency

combinations of shareddedicated 101001000 Mbps interfaces

5 DataLink Layer 5-63

Institutional network

hub

hubhub

switch

to externalnetwork

router

IP subnet

mail server

web server

5 DataLink Layer 5-64

Switches vs Routers both store-and-forward devices

routers network layer devices (examine network layer headers) switches are link layer devices

routers maintain routing tables implement routing algorithms

switches maintain switch tables implement filtering learning algorithms

5 DataLink Layer 5-65

Summary comparison

hubs routers switches

traffi c isolation

no yes yes

plug amp play yes no yes

optimal routing

no yes no

cut through

yes no yes

5 DataLink Layer 5-66

IEEE 802 Standards

The 802 working groups The important ones are marked with The ones marked with are hibernating The one marked with dagger gave up

  • Slide 1
  • Link Layer
  • Ethernet
  • Slide 4
  • Star topology
  • Ethernet Frame Structure
  • Ethernet Frame Structure (more)
  • Unreliable connectionless service
  • Ethernet uses CSMACD
  • Ethernet CSMACD algorithm
  • Ethernetrsquos CSMACD (more)
  • Collision Detection
  • Algorithm (cont)
  • Binary Exponential Backoff
  • Ethernet MAC Sublayer Protocol (2)
  • CSMACD efficiency
  • Ethernet Performance
  • 8023 Ethernet Standards Link amp Physical Layers
  • Manchester encoding
  • Ethernet Cabling
  • Ethernet Cabling (2)
  • Ethernet Cabling (3)
  • 10BaseT and 100BaseT
  • 100Mbps Fast Ethernet
  • Fast Ethernet
  • Gbit Ethernet
  • Gigabit Ethernet
  • Wireless Link Characteristics
  • Wireless network characteristics
  • IEEE 80211 Wireless LAN
  • Slide 31
  • 80211 LAN architecture
  • 80211 Channels association
  • IEEE 80211 multiple access
  • IEEE 80211 MAC Protocol CSMACA
  • Avoiding collisions (more)
  • Collision Avoidance RTS-CTS exchange
  • Slide 38
  • Slide 39
  • Hubs
  • Interconnecting with hubs
  • Inter - Networking
  • Learning Bridges
  • Spanning Tree Algorithm
  • Algorithm Overview
  • Algorithm Details
  • Algorithm Detail (cont)
  • Broadcast and Multicast
  • Limitations of Bridges
  • Switch
  • Switch allows multiple simultaneous transmissions
  • Switch Table
  • Switch self-learning
  • Forwarding
  • Self learning
  • Self-learning forwarding example
  • FilteringForwarding
  • Switch example
  • Slide 59
  • Switch traffic isolation
  • Switches dedicated access
  • More on Switches
  • Institutional network
  • Switches vs Routers
  • Summary comparison
  • IEEE 802 Standards
Page 41: Chapter 5B

5 DataLink Layer 5-41

Interconnecting with hubs Backbone hub interconnects LAN segments Extends max distance between nodes But individual segment collision domains become one large

collision domain Canrsquot interconnect 10BaseT amp 100BaseT

hub

hubhub

hub

5 DataLink Layer 5-42

Inter - Networking

Hubs Bridges Switches Routers

5 DataLink Layer 5-43

Learning Bridges Do not forward when unnecessary Maintain forwarding table

HostPort

A 1 B 1 C 1 X 2 Y 2 Z 2

Learn table entries based on source address Table is an optimization need not be complete Always forward broadcast frames

A

Bridge

B C

X Y Z

Port 1

Port 2

5 DataLink Layer 5-44

Spanning Tree Algorithm Problem loops

Bridges run a distributed spanning tree algorithm select which bridges actively forward developed by Radia Perlman now IEEE 8021 specification

A

C

E

D

B

K

F

H

J

G

I

B3

B7

B4

B2

B5

B1

B6

(a) (b)

5 DataLink Layer 5-45

Algorithm Overview Each bridge has unique id (eg B1 B2

B3) Select bridge with smallest id as root Select bridge on each LAN closest to root

as designated bridge (use id to break ties) Each bridge forwards frames over each LAN for which it is the designated bridge

A

C

E

D

B

K

F

H

J

G

I

B5

B2

B3

B7

B4

B1

B6

5 DataLink Layer 5-46

Algorithm Details

Bridges exchange configuration messages id for bridge sending the message id for what the sending bridge believes to be

root bridge distance (hops) from sending bridge to root

bridge Each bridge records current best

configuration message for each port Initially each bridge believes it is the root

5 DataLink Layer 5-47

Algorithm Detail (cont) When learn not root stop generating config

messages in steady state only root generates configuration messages

When learn not designated bridge stop forwarding config messages in steady state only designated bridges forward config

messages

Root continues to periodically send config messages If any bridge does not receive config message after

a period of time it starts generating config messages claiming to be the root

5 DataLink Layer 5-48

Broadcast and Multicast Forward all broadcastmulticast frames

current practice Learn when no group members

downstream Accomplished by having each member of

group G send a frame to bridge multicast address with G in source field

5 DataLink Layer 5-49

Limitations of Bridges

Do not scale spanning tree algorithm does not scale broadcast does not scale

Do not accommodate heterogeneity

Caution beware of transparency

5 DataLink Layer 5-50

Switch link-layer device smarter than hubs take active

role store forward Ethernet frames examine incoming framersquos MAC address selectively

forward frame to one-or-more outgoing links when frame is to be forwarded on segment uses CSMACD to access segment

transparent hosts are unaware of presence of switches

plug-and-play self-learning switches do not need to be configured

5 DataLink Layer 5-51

Switch allows multiple simultaneous transmissions

hosts have dedicated direct connection to switch

switches buffer packets Ethernet protocol used on

each incoming link but no collisions full duplex each link is its own collision

domain switching A-to-Arsquo and B-

to-Brsquo simultaneously without collisions not possible with dumb hub

A

Arsquo

B

Brsquo

C

Crsquo

switch with six interfaces(123456)

1 23

45

6

5 DataLink Layer 5-52

Switch Table

Q how does switch know that Arsquo reachable via interface 4 Brsquo reachable via interface 5

A each switch has a switch table each entry (MAC address of host interface

to reach host time stamp)

looks like a routing table Q how are entries created

maintained in switch table something like a routing

protocol

A

Arsquo

B

Brsquo

C

Crsquo

switch with six interfaces(123456)

1 23

45

6

5 DataLink Layer 5-53

Switch self-learning

switch learns which hosts can be reached through which interfaces when frame received

switch ldquolearnsrdquo location of sender incoming LAN segment

records senderlocation pair in switch table

A

Arsquo

B

Brsquo

C

Crsquo

1 23

45

6

A Arsquo

Source ADest Arsquo

MAC addr interface TTL

Switch table (initially empty)

A 1 60

5 DataLink Layer 5-54

Forwarding

bull How do determine onto which LAN segment to forward framebull Looks like a routing problem

hub

hubhub

switch1

2 3

5 DataLink Layer 5-55

Self learning

A switch has a switch table entry in switch table

(MAC Address Interface Time Stamp) stale entries in table dropped (TTL can be 60

min) switch learns which hosts can be reached through

which interfaces when frame received switch ldquolearnsrdquo location

of sender incoming LAN segment records senderlocation pair in switch table

5 DataLink Layer 5-56

Self-learning forwarding example

A

Arsquo

B

Brsquo

C

Crsquo

1 23

45

6

A Arsquo

Source ADest Arsquo

MAC addr interface TTL

Switch table (initially empty)

A 1 60

A ArsquoA ArsquoA ArsquoA ArsquoA Arsquo

frame destination unknownflood

Arsquo A

destination A location known

Arsquo 4 60

selective send

5 DataLink Layer 5-57

FilteringForwardingWhen switch receives a frame

index switch table using MAC dest addressif entry found for destination

then if dest on segment from which frame arrived

then drop the frame else forward the frame on interface indicated else flood

forward on all but the interface on which the frame arrived

5 DataLink Layer 5-58

Switch example

Suppose C sends frame to D

Switch receives frame from from C notes in bridge table that C is on interface 1 because D is not in table switch forwards frame into

interfaces 2 and 3

frame received by D

hub

hub hub

switch

A

B CD

EF

G H

I

address interface

ABEG

1123

12 3

5 DataLink Layer 5-59

Switch example

Suppose D replies back with frame to C

Switch receives frame from from D notes in bridge table that D is on interface 2 because C is in table switch forwards frame only to

interface 1

frame received by C

hub

hub hub

switch

A

B CD

EF

G H

I

address interface

ABEGC

11231

5 DataLink Layer 5-60

Switch traffic isolation switch installation breaks subnet into LAN

segments switch filters packets

same-LAN-segment frames not usually forwarded onto other LAN segments

segments become separate collision domains

hub hub hub

switch

collision domain collision domain

collision domain

5 DataLink Layer 5-61

Switches dedicated access Switch with many

interfaces Hosts have direct

connection to switch No collisions full duplex

Switching A-to-Arsquo and B-to-Brsquo simultaneously no collisions

switch

A

Arsquo

B

Brsquo

C

Crsquo

5 DataLink Layer 5-62

More on Switches

cut-through switching frame forwarded from input to output port without first collecting entire frameslight reduction in latency

combinations of shareddedicated 101001000 Mbps interfaces

5 DataLink Layer 5-63

Institutional network

hub

hubhub

switch

to externalnetwork

router

IP subnet

mail server

web server

5 DataLink Layer 5-64

Switches vs Routers both store-and-forward devices

routers network layer devices (examine network layer headers) switches are link layer devices

routers maintain routing tables implement routing algorithms

switches maintain switch tables implement filtering learning algorithms

5 DataLink Layer 5-65

Summary comparison

hubs routers switches

traffi c isolation

no yes yes

plug amp play yes no yes

optimal routing

no yes no

cut through

yes no yes

5 DataLink Layer 5-66

IEEE 802 Standards

The 802 working groups The important ones are marked with The ones marked with are hibernating The one marked with dagger gave up

  • Slide 1
  • Link Layer
  • Ethernet
  • Slide 4
  • Star topology
  • Ethernet Frame Structure
  • Ethernet Frame Structure (more)
  • Unreliable connectionless service
  • Ethernet uses CSMACD
  • Ethernet CSMACD algorithm
  • Ethernetrsquos CSMACD (more)
  • Collision Detection
  • Algorithm (cont)
  • Binary Exponential Backoff
  • Ethernet MAC Sublayer Protocol (2)
  • CSMACD efficiency
  • Ethernet Performance
  • 8023 Ethernet Standards Link amp Physical Layers
  • Manchester encoding
  • Ethernet Cabling
  • Ethernet Cabling (2)
  • Ethernet Cabling (3)
  • 10BaseT and 100BaseT
  • 100Mbps Fast Ethernet
  • Fast Ethernet
  • Gbit Ethernet
  • Gigabit Ethernet
  • Wireless Link Characteristics
  • Wireless network characteristics
  • IEEE 80211 Wireless LAN
  • Slide 31
  • 80211 LAN architecture
  • 80211 Channels association
  • IEEE 80211 multiple access
  • IEEE 80211 MAC Protocol CSMACA
  • Avoiding collisions (more)
  • Collision Avoidance RTS-CTS exchange
  • Slide 38
  • Slide 39
  • Hubs
  • Interconnecting with hubs
  • Inter - Networking
  • Learning Bridges
  • Spanning Tree Algorithm
  • Algorithm Overview
  • Algorithm Details
  • Algorithm Detail (cont)
  • Broadcast and Multicast
  • Limitations of Bridges
  • Switch
  • Switch allows multiple simultaneous transmissions
  • Switch Table
  • Switch self-learning
  • Forwarding
  • Self learning
  • Self-learning forwarding example
  • FilteringForwarding
  • Switch example
  • Slide 59
  • Switch traffic isolation
  • Switches dedicated access
  • More on Switches
  • Institutional network
  • Switches vs Routers
  • Summary comparison
  • IEEE 802 Standards
Page 42: Chapter 5B

5 DataLink Layer 5-42

Inter - Networking

Hubs Bridges Switches Routers

5 DataLink Layer 5-43

Learning Bridges Do not forward when unnecessary Maintain forwarding table

HostPort

A 1 B 1 C 1 X 2 Y 2 Z 2

Learn table entries based on source address Table is an optimization need not be complete Always forward broadcast frames

A

Bridge

B C

X Y Z

Port 1

Port 2

5 DataLink Layer 5-44

Spanning Tree Algorithm Problem loops

Bridges run a distributed spanning tree algorithm select which bridges actively forward developed by Radia Perlman now IEEE 8021 specification

A

C

E

D

B

K

F

H

J

G

I

B3

B7

B4

B2

B5

B1

B6

(a) (b)

5 DataLink Layer 5-45

Algorithm Overview Each bridge has unique id (eg B1 B2

B3) Select bridge with smallest id as root Select bridge on each LAN closest to root

as designated bridge (use id to break ties) Each bridge forwards frames over each LAN for which it is the designated bridge

A

C

E

D

B

K

F

H

J

G

I

B5

B2

B3

B7

B4

B1

B6

5 DataLink Layer 5-46

Algorithm Details

Bridges exchange configuration messages id for bridge sending the message id for what the sending bridge believes to be

root bridge distance (hops) from sending bridge to root

bridge Each bridge records current best

configuration message for each port Initially each bridge believes it is the root

5 DataLink Layer 5-47

Algorithm Detail (cont) When learn not root stop generating config

messages in steady state only root generates configuration messages

When learn not designated bridge stop forwarding config messages in steady state only designated bridges forward config

messages

Root continues to periodically send config messages If any bridge does not receive config message after

a period of time it starts generating config messages claiming to be the root

5 DataLink Layer 5-48

Broadcast and Multicast Forward all broadcastmulticast frames

current practice Learn when no group members

downstream Accomplished by having each member of

group G send a frame to bridge multicast address with G in source field

5 DataLink Layer 5-49

Limitations of Bridges

Do not scale spanning tree algorithm does not scale broadcast does not scale

Do not accommodate heterogeneity

Caution beware of transparency

5 DataLink Layer 5-50

Switch link-layer device smarter than hubs take active

role store forward Ethernet frames examine incoming framersquos MAC address selectively

forward frame to one-or-more outgoing links when frame is to be forwarded on segment uses CSMACD to access segment

transparent hosts are unaware of presence of switches

plug-and-play self-learning switches do not need to be configured

5 DataLink Layer 5-51

Switch allows multiple simultaneous transmissions

hosts have dedicated direct connection to switch

switches buffer packets Ethernet protocol used on

each incoming link but no collisions full duplex each link is its own collision

domain switching A-to-Arsquo and B-

to-Brsquo simultaneously without collisions not possible with dumb hub

A

Arsquo

B

Brsquo

C

Crsquo

switch with six interfaces(123456)

1 23

45

6

5 DataLink Layer 5-52

Switch Table

Q how does switch know that Arsquo reachable via interface 4 Brsquo reachable via interface 5

A each switch has a switch table each entry (MAC address of host interface

to reach host time stamp)

looks like a routing table Q how are entries created

maintained in switch table something like a routing

protocol

A

Arsquo

B

Brsquo

C

Crsquo

switch with six interfaces(123456)

1 23

45

6

5 DataLink Layer 5-53

Switch self-learning

switch learns which hosts can be reached through which interfaces when frame received

switch ldquolearnsrdquo location of sender incoming LAN segment

records senderlocation pair in switch table

A

Arsquo

B

Brsquo

C

Crsquo

1 23

45

6

A Arsquo

Source ADest Arsquo

MAC addr interface TTL

Switch table (initially empty)

A 1 60

5 DataLink Layer 5-54

Forwarding

bull How do determine onto which LAN segment to forward framebull Looks like a routing problem

hub

hubhub

switch1

2 3

5 DataLink Layer 5-55

Self learning

A switch has a switch table entry in switch table

(MAC Address Interface Time Stamp) stale entries in table dropped (TTL can be 60

min) switch learns which hosts can be reached through

which interfaces when frame received switch ldquolearnsrdquo location

of sender incoming LAN segment records senderlocation pair in switch table

5 DataLink Layer 5-56

Self-learning forwarding example

A

Arsquo

B

Brsquo

C

Crsquo

1 23

45

6

A Arsquo

Source ADest Arsquo

MAC addr interface TTL

Switch table (initially empty)

A 1 60

A ArsquoA ArsquoA ArsquoA ArsquoA Arsquo

frame destination unknownflood

Arsquo A

destination A location known

Arsquo 4 60

selective send

5 DataLink Layer 5-57

FilteringForwardingWhen switch receives a frame

index switch table using MAC dest addressif entry found for destination

then if dest on segment from which frame arrived

then drop the frame else forward the frame on interface indicated else flood

forward on all but the interface on which the frame arrived

5 DataLink Layer 5-58

Switch example

Suppose C sends frame to D

Switch receives frame from from C notes in bridge table that C is on interface 1 because D is not in table switch forwards frame into

interfaces 2 and 3

frame received by D

hub

hub hub

switch

A

B CD

EF

G H

I

address interface

ABEG

1123

12 3

5 DataLink Layer 5-59

Switch example

Suppose D replies back with frame to C

Switch receives frame from from D notes in bridge table that D is on interface 2 because C is in table switch forwards frame only to

interface 1

frame received by C

hub

hub hub

switch

A

B CD

EF

G H

I

address interface

ABEGC

11231

5 DataLink Layer 5-60

Switch traffic isolation switch installation breaks subnet into LAN

segments switch filters packets

same-LAN-segment frames not usually forwarded onto other LAN segments

segments become separate collision domains

hub hub hub

switch

collision domain collision domain

collision domain

5 DataLink Layer 5-61

Switches dedicated access Switch with many

interfaces Hosts have direct

connection to switch No collisions full duplex

Switching A-to-Arsquo and B-to-Brsquo simultaneously no collisions

switch

A

Arsquo

B

Brsquo

C

Crsquo

5 DataLink Layer 5-62

More on Switches

cut-through switching frame forwarded from input to output port without first collecting entire frameslight reduction in latency

combinations of shareddedicated 101001000 Mbps interfaces

5 DataLink Layer 5-63

Institutional network

hub

hubhub

switch

to externalnetwork

router

IP subnet

mail server

web server

5 DataLink Layer 5-64

Switches vs Routers both store-and-forward devices

routers network layer devices (examine network layer headers) switches are link layer devices

routers maintain routing tables implement routing algorithms

switches maintain switch tables implement filtering learning algorithms

5 DataLink Layer 5-65

Summary comparison

hubs routers switches

traffi c isolation

no yes yes

plug amp play yes no yes

optimal routing

no yes no

cut through

yes no yes

5 DataLink Layer 5-66

IEEE 802 Standards

The 802 working groups The important ones are marked with The ones marked with are hibernating The one marked with dagger gave up

  • Slide 1
  • Link Layer
  • Ethernet
  • Slide 4
  • Star topology
  • Ethernet Frame Structure
  • Ethernet Frame Structure (more)
  • Unreliable connectionless service
  • Ethernet uses CSMACD
  • Ethernet CSMACD algorithm
  • Ethernetrsquos CSMACD (more)
  • Collision Detection
  • Algorithm (cont)
  • Binary Exponential Backoff
  • Ethernet MAC Sublayer Protocol (2)
  • CSMACD efficiency
  • Ethernet Performance
  • 8023 Ethernet Standards Link amp Physical Layers
  • Manchester encoding
  • Ethernet Cabling
  • Ethernet Cabling (2)
  • Ethernet Cabling (3)
  • 10BaseT and 100BaseT
  • 100Mbps Fast Ethernet
  • Fast Ethernet
  • Gbit Ethernet
  • Gigabit Ethernet
  • Wireless Link Characteristics
  • Wireless network characteristics
  • IEEE 80211 Wireless LAN
  • Slide 31
  • 80211 LAN architecture
  • 80211 Channels association
  • IEEE 80211 multiple access
  • IEEE 80211 MAC Protocol CSMACA
  • Avoiding collisions (more)
  • Collision Avoidance RTS-CTS exchange
  • Slide 38
  • Slide 39
  • Hubs
  • Interconnecting with hubs
  • Inter - Networking
  • Learning Bridges
  • Spanning Tree Algorithm
  • Algorithm Overview
  • Algorithm Details
  • Algorithm Detail (cont)
  • Broadcast and Multicast
  • Limitations of Bridges
  • Switch
  • Switch allows multiple simultaneous transmissions
  • Switch Table
  • Switch self-learning
  • Forwarding
  • Self learning
  • Self-learning forwarding example
  • FilteringForwarding
  • Switch example
  • Slide 59
  • Switch traffic isolation
  • Switches dedicated access
  • More on Switches
  • Institutional network
  • Switches vs Routers
  • Summary comparison
  • IEEE 802 Standards
Page 43: Chapter 5B

5 DataLink Layer 5-43

Learning Bridges Do not forward when unnecessary Maintain forwarding table

HostPort

A 1 B 1 C 1 X 2 Y 2 Z 2

Learn table entries based on source address Table is an optimization need not be complete Always forward broadcast frames

A

Bridge

B C

X Y Z

Port 1

Port 2

5 DataLink Layer 5-44

Spanning Tree Algorithm Problem loops

Bridges run a distributed spanning tree algorithm select which bridges actively forward developed by Radia Perlman now IEEE 8021 specification

A

C

E

D

B

K

F

H

J

G

I

B3

B7

B4

B2

B5

B1

B6

(a) (b)

5 DataLink Layer 5-45

Algorithm Overview Each bridge has unique id (eg B1 B2

B3) Select bridge with smallest id as root Select bridge on each LAN closest to root

as designated bridge (use id to break ties) Each bridge forwards frames over each LAN for which it is the designated bridge

A

C

E

D

B

K

F

H

J

G

I

B5

B2

B3

B7

B4

B1

B6

5 DataLink Layer 5-46

Algorithm Details

Bridges exchange configuration messages id for bridge sending the message id for what the sending bridge believes to be

root bridge distance (hops) from sending bridge to root

bridge Each bridge records current best

configuration message for each port Initially each bridge believes it is the root

5 DataLink Layer 5-47

Algorithm Detail (cont) When learn not root stop generating config

messages in steady state only root generates configuration messages

When learn not designated bridge stop forwarding config messages in steady state only designated bridges forward config

messages

Root continues to periodically send config messages If any bridge does not receive config message after

a period of time it starts generating config messages claiming to be the root

5 DataLink Layer 5-48

Broadcast and Multicast Forward all broadcastmulticast frames

current practice Learn when no group members

downstream Accomplished by having each member of

group G send a frame to bridge multicast address with G in source field

5 DataLink Layer 5-49

Limitations of Bridges

Do not scale spanning tree algorithm does not scale broadcast does not scale

Do not accommodate heterogeneity

Caution beware of transparency

5 DataLink Layer 5-50

Switch link-layer device smarter than hubs take active

role store forward Ethernet frames examine incoming framersquos MAC address selectively

forward frame to one-or-more outgoing links when frame is to be forwarded on segment uses CSMACD to access segment

transparent hosts are unaware of presence of switches

plug-and-play self-learning switches do not need to be configured

5 DataLink Layer 5-51

Switch allows multiple simultaneous transmissions

hosts have dedicated direct connection to switch

switches buffer packets Ethernet protocol used on

each incoming link but no collisions full duplex each link is its own collision

domain switching A-to-Arsquo and B-

to-Brsquo simultaneously without collisions not possible with dumb hub

A

Arsquo

B

Brsquo

C

Crsquo

switch with six interfaces(123456)

1 23

45

6

5 DataLink Layer 5-52

Switch Table

Q how does switch know that Arsquo reachable via interface 4 Brsquo reachable via interface 5

A each switch has a switch table each entry (MAC address of host interface

to reach host time stamp)

looks like a routing table Q how are entries created

maintained in switch table something like a routing

protocol

A

Arsquo

B

Brsquo

C

Crsquo

switch with six interfaces(123456)

1 23

45

6

5 DataLink Layer 5-53

Switch self-learning

switch learns which hosts can be reached through which interfaces when frame received

switch ldquolearnsrdquo location of sender incoming LAN segment

records senderlocation pair in switch table

A

Arsquo

B

Brsquo

C

Crsquo

1 23

45

6

A Arsquo

Source ADest Arsquo

MAC addr interface TTL

Switch table (initially empty)

A 1 60

5 DataLink Layer 5-54

Forwarding

bull How do determine onto which LAN segment to forward framebull Looks like a routing problem

hub

hubhub

switch1

2 3

5 DataLink Layer 5-55

Self learning

A switch has a switch table entry in switch table

(MAC Address Interface Time Stamp) stale entries in table dropped (TTL can be 60

min) switch learns which hosts can be reached through

which interfaces when frame received switch ldquolearnsrdquo location

of sender incoming LAN segment records senderlocation pair in switch table

5 DataLink Layer 5-56

Self-learning forwarding example

A

Arsquo

B

Brsquo

C

Crsquo

1 23

45

6

A Arsquo

Source ADest Arsquo

MAC addr interface TTL

Switch table (initially empty)

A 1 60

A ArsquoA ArsquoA ArsquoA ArsquoA Arsquo

frame destination unknownflood

Arsquo A

destination A location known

Arsquo 4 60

selective send

5 DataLink Layer 5-57

FilteringForwardingWhen switch receives a frame

index switch table using MAC dest addressif entry found for destination

then if dest on segment from which frame arrived

then drop the frame else forward the frame on interface indicated else flood

forward on all but the interface on which the frame arrived

5 DataLink Layer 5-58

Switch example

Suppose C sends frame to D

Switch receives frame from from C notes in bridge table that C is on interface 1 because D is not in table switch forwards frame into

interfaces 2 and 3

frame received by D

hub

hub hub

switch

A

B CD

EF

G H

I

address interface

ABEG

1123

12 3

5 DataLink Layer 5-59

Switch example

Suppose D replies back with frame to C

Switch receives frame from from D notes in bridge table that D is on interface 2 because C is in table switch forwards frame only to

interface 1

frame received by C

hub

hub hub

switch

A

B CD

EF

G H

I

address interface

ABEGC

11231

5 DataLink Layer 5-60

Switch traffic isolation switch installation breaks subnet into LAN

segments switch filters packets

same-LAN-segment frames not usually forwarded onto other LAN segments

segments become separate collision domains

hub hub hub

switch

collision domain collision domain

collision domain

5 DataLink Layer 5-61

Switches dedicated access Switch with many

interfaces Hosts have direct

connection to switch No collisions full duplex

Switching A-to-Arsquo and B-to-Brsquo simultaneously no collisions

switch

A

Arsquo

B

Brsquo

C

Crsquo

5 DataLink Layer 5-62

More on Switches

cut-through switching frame forwarded from input to output port without first collecting entire frameslight reduction in latency

combinations of shareddedicated 101001000 Mbps interfaces

5 DataLink Layer 5-63

Institutional network

hub

hubhub

switch

to externalnetwork

router

IP subnet

mail server

web server

5 DataLink Layer 5-64

Switches vs Routers both store-and-forward devices

routers network layer devices (examine network layer headers) switches are link layer devices

routers maintain routing tables implement routing algorithms

switches maintain switch tables implement filtering learning algorithms

5 DataLink Layer 5-65

Summary comparison

hubs routers switches

traffi c isolation

no yes yes

plug amp play yes no yes

optimal routing

no yes no

cut through

yes no yes

5 DataLink Layer 5-66

IEEE 802 Standards

The 802 working groups The important ones are marked with The ones marked with are hibernating The one marked with dagger gave up

  • Slide 1
  • Link Layer
  • Ethernet
  • Slide 4
  • Star topology
  • Ethernet Frame Structure
  • Ethernet Frame Structure (more)
  • Unreliable connectionless service
  • Ethernet uses CSMACD
  • Ethernet CSMACD algorithm
  • Ethernetrsquos CSMACD (more)
  • Collision Detection
  • Algorithm (cont)
  • Binary Exponential Backoff
  • Ethernet MAC Sublayer Protocol (2)
  • CSMACD efficiency
  • Ethernet Performance
  • 8023 Ethernet Standards Link amp Physical Layers
  • Manchester encoding
  • Ethernet Cabling
  • Ethernet Cabling (2)
  • Ethernet Cabling (3)
  • 10BaseT and 100BaseT
  • 100Mbps Fast Ethernet
  • Fast Ethernet
  • Gbit Ethernet
  • Gigabit Ethernet
  • Wireless Link Characteristics
  • Wireless network characteristics
  • IEEE 80211 Wireless LAN
  • Slide 31
  • 80211 LAN architecture
  • 80211 Channels association
  • IEEE 80211 multiple access
  • IEEE 80211 MAC Protocol CSMACA
  • Avoiding collisions (more)
  • Collision Avoidance RTS-CTS exchange
  • Slide 38
  • Slide 39
  • Hubs
  • Interconnecting with hubs
  • Inter - Networking
  • Learning Bridges
  • Spanning Tree Algorithm
  • Algorithm Overview
  • Algorithm Details
  • Algorithm Detail (cont)
  • Broadcast and Multicast
  • Limitations of Bridges
  • Switch
  • Switch allows multiple simultaneous transmissions
  • Switch Table
  • Switch self-learning
  • Forwarding
  • Self learning
  • Self-learning forwarding example
  • FilteringForwarding
  • Switch example
  • Slide 59
  • Switch traffic isolation
  • Switches dedicated access
  • More on Switches
  • Institutional network
  • Switches vs Routers
  • Summary comparison
  • IEEE 802 Standards
Page 44: Chapter 5B

5 DataLink Layer 5-44

Spanning Tree Algorithm Problem loops

Bridges run a distributed spanning tree algorithm select which bridges actively forward developed by Radia Perlman now IEEE 8021 specification

A

C

E

D

B

K

F

H

J

G

I

B3

B7

B4

B2

B5

B1

B6

(a) (b)

5 DataLink Layer 5-45

Algorithm Overview Each bridge has unique id (eg B1 B2

B3) Select bridge with smallest id as root Select bridge on each LAN closest to root

as designated bridge (use id to break ties) Each bridge forwards frames over each LAN for which it is the designated bridge

A

C

E

D

B

K

F

H

J

G

I

B5

B2

B3

B7

B4

B1

B6

5 DataLink Layer 5-46

Algorithm Details

Bridges exchange configuration messages id for bridge sending the message id for what the sending bridge believes to be

root bridge distance (hops) from sending bridge to root

bridge Each bridge records current best

configuration message for each port Initially each bridge believes it is the root

5 DataLink Layer 5-47

Algorithm Detail (cont) When learn not root stop generating config

messages in steady state only root generates configuration messages

When learn not designated bridge stop forwarding config messages in steady state only designated bridges forward config

messages

Root continues to periodically send config messages If any bridge does not receive config message after

a period of time it starts generating config messages claiming to be the root

5 DataLink Layer 5-48

Broadcast and Multicast Forward all broadcastmulticast frames

current practice Learn when no group members

downstream Accomplished by having each member of

group G send a frame to bridge multicast address with G in source field

5 DataLink Layer 5-49

Limitations of Bridges

Do not scale spanning tree algorithm does not scale broadcast does not scale

Do not accommodate heterogeneity

Caution beware of transparency

5 DataLink Layer 5-50

Switch link-layer device smarter than hubs take active

role store forward Ethernet frames examine incoming framersquos MAC address selectively

forward frame to one-or-more outgoing links when frame is to be forwarded on segment uses CSMACD to access segment

transparent hosts are unaware of presence of switches

plug-and-play self-learning switches do not need to be configured

5 DataLink Layer 5-51

Switch allows multiple simultaneous transmissions

hosts have dedicated direct connection to switch

switches buffer packets Ethernet protocol used on

each incoming link but no collisions full duplex each link is its own collision

domain switching A-to-Arsquo and B-

to-Brsquo simultaneously without collisions not possible with dumb hub

A

Arsquo

B

Brsquo

C

Crsquo

switch with six interfaces(123456)

1 23

45

6

5 DataLink Layer 5-52

Switch Table

Q how does switch know that Arsquo reachable via interface 4 Brsquo reachable via interface 5

A each switch has a switch table each entry (MAC address of host interface

to reach host time stamp)

looks like a routing table Q how are entries created

maintained in switch table something like a routing

protocol

A

Arsquo

B

Brsquo

C

Crsquo

switch with six interfaces(123456)

1 23

45

6

5 DataLink Layer 5-53

Switch self-learning

switch learns which hosts can be reached through which interfaces when frame received

switch ldquolearnsrdquo location of sender incoming LAN segment

records senderlocation pair in switch table

A

Arsquo

B

Brsquo

C

Crsquo

1 23

45

6

A Arsquo

Source ADest Arsquo

MAC addr interface TTL

Switch table (initially empty)

A 1 60

5 DataLink Layer 5-54

Forwarding

bull How do determine onto which LAN segment to forward framebull Looks like a routing problem

hub

hubhub

switch1

2 3

5 DataLink Layer 5-55

Self learning

A switch has a switch table entry in switch table

(MAC Address Interface Time Stamp) stale entries in table dropped (TTL can be 60

min) switch learns which hosts can be reached through

which interfaces when frame received switch ldquolearnsrdquo location

of sender incoming LAN segment records senderlocation pair in switch table

5 DataLink Layer 5-56

Self-learning forwarding example

A

Arsquo

B

Brsquo

C

Crsquo

1 23

45

6

A Arsquo

Source ADest Arsquo

MAC addr interface TTL

Switch table (initially empty)

A 1 60

A ArsquoA ArsquoA ArsquoA ArsquoA Arsquo

frame destination unknownflood

Arsquo A

destination A location known

Arsquo 4 60

selective send

5 DataLink Layer 5-57

FilteringForwardingWhen switch receives a frame

index switch table using MAC dest addressif entry found for destination

then if dest on segment from which frame arrived

then drop the frame else forward the frame on interface indicated else flood

forward on all but the interface on which the frame arrived

5 DataLink Layer 5-58

Switch example

Suppose C sends frame to D

Switch receives frame from from C notes in bridge table that C is on interface 1 because D is not in table switch forwards frame into

interfaces 2 and 3

frame received by D

hub

hub hub

switch

A

B CD

EF

G H

I

address interface

ABEG

1123

12 3

5 DataLink Layer 5-59

Switch example

Suppose D replies back with frame to C

Switch receives frame from from D notes in bridge table that D is on interface 2 because C is in table switch forwards frame only to

interface 1

frame received by C

hub

hub hub

switch

A

B CD

EF

G H

I

address interface

ABEGC

11231

5 DataLink Layer 5-60

Switch traffic isolation switch installation breaks subnet into LAN

segments switch filters packets

same-LAN-segment frames not usually forwarded onto other LAN segments

segments become separate collision domains

hub hub hub

switch

collision domain collision domain

collision domain

5 DataLink Layer 5-61

Switches dedicated access Switch with many

interfaces Hosts have direct

connection to switch No collisions full duplex

Switching A-to-Arsquo and B-to-Brsquo simultaneously no collisions

switch

A

Arsquo

B

Brsquo

C

Crsquo

5 DataLink Layer 5-62

More on Switches

cut-through switching frame forwarded from input to output port without first collecting entire frameslight reduction in latency

combinations of shareddedicated 101001000 Mbps interfaces

5 DataLink Layer 5-63

Institutional network

hub

hubhub

switch

to externalnetwork

router

IP subnet

mail server

web server

5 DataLink Layer 5-64

Switches vs Routers both store-and-forward devices

routers network layer devices (examine network layer headers) switches are link layer devices

routers maintain routing tables implement routing algorithms

switches maintain switch tables implement filtering learning algorithms

5 DataLink Layer 5-65

Summary comparison

hubs routers switches

traffi c isolation

no yes yes

plug amp play yes no yes

optimal routing

no yes no

cut through

yes no yes

5 DataLink Layer 5-66

IEEE 802 Standards

The 802 working groups The important ones are marked with The ones marked with are hibernating The one marked with dagger gave up

  • Slide 1
  • Link Layer
  • Ethernet
  • Slide 4
  • Star topology
  • Ethernet Frame Structure
  • Ethernet Frame Structure (more)
  • Unreliable connectionless service
  • Ethernet uses CSMACD
  • Ethernet CSMACD algorithm
  • Ethernetrsquos CSMACD (more)
  • Collision Detection
  • Algorithm (cont)
  • Binary Exponential Backoff
  • Ethernet MAC Sublayer Protocol (2)
  • CSMACD efficiency
  • Ethernet Performance
  • 8023 Ethernet Standards Link amp Physical Layers
  • Manchester encoding
  • Ethernet Cabling
  • Ethernet Cabling (2)
  • Ethernet Cabling (3)
  • 10BaseT and 100BaseT
  • 100Mbps Fast Ethernet
  • Fast Ethernet
  • Gbit Ethernet
  • Gigabit Ethernet
  • Wireless Link Characteristics
  • Wireless network characteristics
  • IEEE 80211 Wireless LAN
  • Slide 31
  • 80211 LAN architecture
  • 80211 Channels association
  • IEEE 80211 multiple access
  • IEEE 80211 MAC Protocol CSMACA
  • Avoiding collisions (more)
  • Collision Avoidance RTS-CTS exchange
  • Slide 38
  • Slide 39
  • Hubs
  • Interconnecting with hubs
  • Inter - Networking
  • Learning Bridges
  • Spanning Tree Algorithm
  • Algorithm Overview
  • Algorithm Details
  • Algorithm Detail (cont)
  • Broadcast and Multicast
  • Limitations of Bridges
  • Switch
  • Switch allows multiple simultaneous transmissions
  • Switch Table
  • Switch self-learning
  • Forwarding
  • Self learning
  • Self-learning forwarding example
  • FilteringForwarding
  • Switch example
  • Slide 59
  • Switch traffic isolation
  • Switches dedicated access
  • More on Switches
  • Institutional network
  • Switches vs Routers
  • Summary comparison
  • IEEE 802 Standards
Page 45: Chapter 5B

5 DataLink Layer 5-45

Algorithm Overview Each bridge has unique id (eg B1 B2

B3) Select bridge with smallest id as root Select bridge on each LAN closest to root

as designated bridge (use id to break ties) Each bridge forwards frames over each LAN for which it is the designated bridge

A

C

E

D

B

K

F

H

J

G

I

B5

B2

B3

B7

B4

B1

B6

5 DataLink Layer 5-46

Algorithm Details

Bridges exchange configuration messages id for bridge sending the message id for what the sending bridge believes to be

root bridge distance (hops) from sending bridge to root

bridge Each bridge records current best

configuration message for each port Initially each bridge believes it is the root

5 DataLink Layer 5-47

Algorithm Detail (cont) When learn not root stop generating config

messages in steady state only root generates configuration messages

When learn not designated bridge stop forwarding config messages in steady state only designated bridges forward config

messages

Root continues to periodically send config messages If any bridge does not receive config message after

a period of time it starts generating config messages claiming to be the root

5 DataLink Layer 5-48

Broadcast and Multicast Forward all broadcastmulticast frames

current practice Learn when no group members

downstream Accomplished by having each member of

group G send a frame to bridge multicast address with G in source field

5 DataLink Layer 5-49

Limitations of Bridges

Do not scale spanning tree algorithm does not scale broadcast does not scale

Do not accommodate heterogeneity

Caution beware of transparency

5 DataLink Layer 5-50

Switch link-layer device smarter than hubs take active

role store forward Ethernet frames examine incoming framersquos MAC address selectively

forward frame to one-or-more outgoing links when frame is to be forwarded on segment uses CSMACD to access segment

transparent hosts are unaware of presence of switches

plug-and-play self-learning switches do not need to be configured

5 DataLink Layer 5-51

Switch allows multiple simultaneous transmissions

hosts have dedicated direct connection to switch

switches buffer packets Ethernet protocol used on

each incoming link but no collisions full duplex each link is its own collision

domain switching A-to-Arsquo and B-

to-Brsquo simultaneously without collisions not possible with dumb hub

A

Arsquo

B

Brsquo

C

Crsquo

switch with six interfaces(123456)

1 23

45

6

5 DataLink Layer 5-52

Switch Table

Q how does switch know that Arsquo reachable via interface 4 Brsquo reachable via interface 5

A each switch has a switch table each entry (MAC address of host interface

to reach host time stamp)

looks like a routing table Q how are entries created

maintained in switch table something like a routing

protocol

A

Arsquo

B

Brsquo

C

Crsquo

switch with six interfaces(123456)

1 23

45

6

5 DataLink Layer 5-53

Switch self-learning

switch learns which hosts can be reached through which interfaces when frame received

switch ldquolearnsrdquo location of sender incoming LAN segment

records senderlocation pair in switch table

A

Arsquo

B

Brsquo

C

Crsquo

1 23

45

6

A Arsquo

Source ADest Arsquo

MAC addr interface TTL

Switch table (initially empty)

A 1 60

5 DataLink Layer 5-54

Forwarding

bull How do determine onto which LAN segment to forward framebull Looks like a routing problem

hub

hubhub

switch1

2 3

5 DataLink Layer 5-55

Self learning

A switch has a switch table entry in switch table

(MAC Address Interface Time Stamp) stale entries in table dropped (TTL can be 60

min) switch learns which hosts can be reached through

which interfaces when frame received switch ldquolearnsrdquo location

of sender incoming LAN segment records senderlocation pair in switch table

5 DataLink Layer 5-56

Self-learning forwarding example

A

Arsquo

B

Brsquo

C

Crsquo

1 23

45

6

A Arsquo

Source ADest Arsquo

MAC addr interface TTL

Switch table (initially empty)

A 1 60

A ArsquoA ArsquoA ArsquoA ArsquoA Arsquo

frame destination unknownflood

Arsquo A

destination A location known

Arsquo 4 60

selective send

5 DataLink Layer 5-57

FilteringForwardingWhen switch receives a frame

index switch table using MAC dest addressif entry found for destination

then if dest on segment from which frame arrived

then drop the frame else forward the frame on interface indicated else flood

forward on all but the interface on which the frame arrived

5 DataLink Layer 5-58

Switch example

Suppose C sends frame to D

Switch receives frame from from C notes in bridge table that C is on interface 1 because D is not in table switch forwards frame into

interfaces 2 and 3

frame received by D

hub

hub hub

switch

A

B CD

EF

G H

I

address interface

ABEG

1123

12 3

5 DataLink Layer 5-59

Switch example

Suppose D replies back with frame to C

Switch receives frame from from D notes in bridge table that D is on interface 2 because C is in table switch forwards frame only to

interface 1

frame received by C

hub

hub hub

switch

A

B CD

EF

G H

I

address interface

ABEGC

11231

5 DataLink Layer 5-60

Switch traffic isolation switch installation breaks subnet into LAN

segments switch filters packets

same-LAN-segment frames not usually forwarded onto other LAN segments

segments become separate collision domains

hub hub hub

switch

collision domain collision domain

collision domain

5 DataLink Layer 5-61

Switches dedicated access Switch with many

interfaces Hosts have direct

connection to switch No collisions full duplex

Switching A-to-Arsquo and B-to-Brsquo simultaneously no collisions

switch

A

Arsquo

B

Brsquo

C

Crsquo

5 DataLink Layer 5-62

More on Switches

cut-through switching frame forwarded from input to output port without first collecting entire frameslight reduction in latency

combinations of shareddedicated 101001000 Mbps interfaces

5 DataLink Layer 5-63

Institutional network

hub

hubhub

switch

to externalnetwork

router

IP subnet

mail server

web server

5 DataLink Layer 5-64

Switches vs Routers both store-and-forward devices

routers network layer devices (examine network layer headers) switches are link layer devices

routers maintain routing tables implement routing algorithms

switches maintain switch tables implement filtering learning algorithms

5 DataLink Layer 5-65

Summary comparison

hubs routers switches

traffi c isolation

no yes yes

plug amp play yes no yes

optimal routing

no yes no

cut through

yes no yes

5 DataLink Layer 5-66

IEEE 802 Standards

The 802 working groups The important ones are marked with The ones marked with are hibernating The one marked with dagger gave up

  • Slide 1
  • Link Layer
  • Ethernet
  • Slide 4
  • Star topology
  • Ethernet Frame Structure
  • Ethernet Frame Structure (more)
  • Unreliable connectionless service
  • Ethernet uses CSMACD
  • Ethernet CSMACD algorithm
  • Ethernetrsquos CSMACD (more)
  • Collision Detection
  • Algorithm (cont)
  • Binary Exponential Backoff
  • Ethernet MAC Sublayer Protocol (2)
  • CSMACD efficiency
  • Ethernet Performance
  • 8023 Ethernet Standards Link amp Physical Layers
  • Manchester encoding
  • Ethernet Cabling
  • Ethernet Cabling (2)
  • Ethernet Cabling (3)
  • 10BaseT and 100BaseT
  • 100Mbps Fast Ethernet
  • Fast Ethernet
  • Gbit Ethernet
  • Gigabit Ethernet
  • Wireless Link Characteristics
  • Wireless network characteristics
  • IEEE 80211 Wireless LAN
  • Slide 31
  • 80211 LAN architecture
  • 80211 Channels association
  • IEEE 80211 multiple access
  • IEEE 80211 MAC Protocol CSMACA
  • Avoiding collisions (more)
  • Collision Avoidance RTS-CTS exchange
  • Slide 38
  • Slide 39
  • Hubs
  • Interconnecting with hubs
  • Inter - Networking
  • Learning Bridges
  • Spanning Tree Algorithm
  • Algorithm Overview
  • Algorithm Details
  • Algorithm Detail (cont)
  • Broadcast and Multicast
  • Limitations of Bridges
  • Switch
  • Switch allows multiple simultaneous transmissions
  • Switch Table
  • Switch self-learning
  • Forwarding
  • Self learning
  • Self-learning forwarding example
  • FilteringForwarding
  • Switch example
  • Slide 59
  • Switch traffic isolation
  • Switches dedicated access
  • More on Switches
  • Institutional network
  • Switches vs Routers
  • Summary comparison
  • IEEE 802 Standards
Page 46: Chapter 5B

5 DataLink Layer 5-46

Algorithm Details

Bridges exchange configuration messages id for bridge sending the message id for what the sending bridge believes to be

root bridge distance (hops) from sending bridge to root

bridge Each bridge records current best

configuration message for each port Initially each bridge believes it is the root

5 DataLink Layer 5-47

Algorithm Detail (cont) When learn not root stop generating config

messages in steady state only root generates configuration messages

When learn not designated bridge stop forwarding config messages in steady state only designated bridges forward config

messages

Root continues to periodically send config messages If any bridge does not receive config message after

a period of time it starts generating config messages claiming to be the root

5 DataLink Layer 5-48

Broadcast and Multicast Forward all broadcastmulticast frames

current practice Learn when no group members

downstream Accomplished by having each member of

group G send a frame to bridge multicast address with G in source field

5 DataLink Layer 5-49

Limitations of Bridges

Do not scale spanning tree algorithm does not scale broadcast does not scale

Do not accommodate heterogeneity

Caution beware of transparency

5 DataLink Layer 5-50

Switch link-layer device smarter than hubs take active

role store forward Ethernet frames examine incoming framersquos MAC address selectively

forward frame to one-or-more outgoing links when frame is to be forwarded on segment uses CSMACD to access segment

transparent hosts are unaware of presence of switches

plug-and-play self-learning switches do not need to be configured

5 DataLink Layer 5-51

Switch allows multiple simultaneous transmissions

hosts have dedicated direct connection to switch

switches buffer packets Ethernet protocol used on

each incoming link but no collisions full duplex each link is its own collision

domain switching A-to-Arsquo and B-

to-Brsquo simultaneously without collisions not possible with dumb hub

A

Arsquo

B

Brsquo

C

Crsquo

switch with six interfaces(123456)

1 23

45

6

5 DataLink Layer 5-52

Switch Table

Q how does switch know that Arsquo reachable via interface 4 Brsquo reachable via interface 5

A each switch has a switch table each entry (MAC address of host interface

to reach host time stamp)

looks like a routing table Q how are entries created

maintained in switch table something like a routing

protocol

A

Arsquo

B

Brsquo

C

Crsquo

switch with six interfaces(123456)

1 23

45

6

5 DataLink Layer 5-53

Switch self-learning

switch learns which hosts can be reached through which interfaces when frame received

switch ldquolearnsrdquo location of sender incoming LAN segment

records senderlocation pair in switch table

A

Arsquo

B

Brsquo

C

Crsquo

1 23

45

6

A Arsquo

Source ADest Arsquo

MAC addr interface TTL

Switch table (initially empty)

A 1 60

5 DataLink Layer 5-54

Forwarding

bull How do determine onto which LAN segment to forward framebull Looks like a routing problem

hub

hubhub

switch1

2 3

5 DataLink Layer 5-55

Self learning

A switch has a switch table entry in switch table

(MAC Address Interface Time Stamp) stale entries in table dropped (TTL can be 60

min) switch learns which hosts can be reached through

which interfaces when frame received switch ldquolearnsrdquo location

of sender incoming LAN segment records senderlocation pair in switch table

5 DataLink Layer 5-56

Self-learning forwarding example

A

Arsquo

B

Brsquo

C

Crsquo

1 23

45

6

A Arsquo

Source ADest Arsquo

MAC addr interface TTL

Switch table (initially empty)

A 1 60

A ArsquoA ArsquoA ArsquoA ArsquoA Arsquo

frame destination unknownflood

Arsquo A

destination A location known

Arsquo 4 60

selective send

5 DataLink Layer 5-57

FilteringForwardingWhen switch receives a frame

index switch table using MAC dest addressif entry found for destination

then if dest on segment from which frame arrived

then drop the frame else forward the frame on interface indicated else flood

forward on all but the interface on which the frame arrived

5 DataLink Layer 5-58

Switch example

Suppose C sends frame to D

Switch receives frame from from C notes in bridge table that C is on interface 1 because D is not in table switch forwards frame into

interfaces 2 and 3

frame received by D

hub

hub hub

switch

A

B CD

EF

G H

I

address interface

ABEG

1123

12 3

5 DataLink Layer 5-59

Switch example

Suppose D replies back with frame to C

Switch receives frame from from D notes in bridge table that D is on interface 2 because C is in table switch forwards frame only to

interface 1

frame received by C

hub

hub hub

switch

A

B CD

EF

G H

I

address interface

ABEGC

11231

5 DataLink Layer 5-60

Switch traffic isolation switch installation breaks subnet into LAN

segments switch filters packets

same-LAN-segment frames not usually forwarded onto other LAN segments

segments become separate collision domains

hub hub hub

switch

collision domain collision domain

collision domain

5 DataLink Layer 5-61

Switches dedicated access Switch with many

interfaces Hosts have direct

connection to switch No collisions full duplex

Switching A-to-Arsquo and B-to-Brsquo simultaneously no collisions

switch

A

Arsquo

B

Brsquo

C

Crsquo

5 DataLink Layer 5-62

More on Switches

cut-through switching frame forwarded from input to output port without first collecting entire frameslight reduction in latency

combinations of shareddedicated 101001000 Mbps interfaces

5 DataLink Layer 5-63

Institutional network

hub

hubhub

switch

to externalnetwork

router

IP subnet

mail server

web server

5 DataLink Layer 5-64

Switches vs Routers both store-and-forward devices

routers network layer devices (examine network layer headers) switches are link layer devices

routers maintain routing tables implement routing algorithms

switches maintain switch tables implement filtering learning algorithms

5 DataLink Layer 5-65

Summary comparison

hubs routers switches

traffi c isolation

no yes yes

plug amp play yes no yes

optimal routing

no yes no

cut through

yes no yes

5 DataLink Layer 5-66

IEEE 802 Standards

The 802 working groups The important ones are marked with The ones marked with are hibernating The one marked with dagger gave up

  • Slide 1
  • Link Layer
  • Ethernet
  • Slide 4
  • Star topology
  • Ethernet Frame Structure
  • Ethernet Frame Structure (more)
  • Unreliable connectionless service
  • Ethernet uses CSMACD
  • Ethernet CSMACD algorithm
  • Ethernetrsquos CSMACD (more)
  • Collision Detection
  • Algorithm (cont)
  • Binary Exponential Backoff
  • Ethernet MAC Sublayer Protocol (2)
  • CSMACD efficiency
  • Ethernet Performance
  • 8023 Ethernet Standards Link amp Physical Layers
  • Manchester encoding
  • Ethernet Cabling
  • Ethernet Cabling (2)
  • Ethernet Cabling (3)
  • 10BaseT and 100BaseT
  • 100Mbps Fast Ethernet
  • Fast Ethernet
  • Gbit Ethernet
  • Gigabit Ethernet
  • Wireless Link Characteristics
  • Wireless network characteristics
  • IEEE 80211 Wireless LAN
  • Slide 31
  • 80211 LAN architecture
  • 80211 Channels association
  • IEEE 80211 multiple access
  • IEEE 80211 MAC Protocol CSMACA
  • Avoiding collisions (more)
  • Collision Avoidance RTS-CTS exchange
  • Slide 38
  • Slide 39
  • Hubs
  • Interconnecting with hubs
  • Inter - Networking
  • Learning Bridges
  • Spanning Tree Algorithm
  • Algorithm Overview
  • Algorithm Details
  • Algorithm Detail (cont)
  • Broadcast and Multicast
  • Limitations of Bridges
  • Switch
  • Switch allows multiple simultaneous transmissions
  • Switch Table
  • Switch self-learning
  • Forwarding
  • Self learning
  • Self-learning forwarding example
  • FilteringForwarding
  • Switch example
  • Slide 59
  • Switch traffic isolation
  • Switches dedicated access
  • More on Switches
  • Institutional network
  • Switches vs Routers
  • Summary comparison
  • IEEE 802 Standards
Page 47: Chapter 5B

5 DataLink Layer 5-47

Algorithm Detail (cont) When learn not root stop generating config

messages in steady state only root generates configuration messages

When learn not designated bridge stop forwarding config messages in steady state only designated bridges forward config

messages

Root continues to periodically send config messages If any bridge does not receive config message after

a period of time it starts generating config messages claiming to be the root

5 DataLink Layer 5-48

Broadcast and Multicast Forward all broadcastmulticast frames

current practice Learn when no group members

downstream Accomplished by having each member of

group G send a frame to bridge multicast address with G in source field

5 DataLink Layer 5-49

Limitations of Bridges

Do not scale spanning tree algorithm does not scale broadcast does not scale

Do not accommodate heterogeneity

Caution beware of transparency

5 DataLink Layer 5-50

Switch link-layer device smarter than hubs take active

role store forward Ethernet frames examine incoming framersquos MAC address selectively

forward frame to one-or-more outgoing links when frame is to be forwarded on segment uses CSMACD to access segment

transparent hosts are unaware of presence of switches

plug-and-play self-learning switches do not need to be configured

5 DataLink Layer 5-51

Switch allows multiple simultaneous transmissions

hosts have dedicated direct connection to switch

switches buffer packets Ethernet protocol used on

each incoming link but no collisions full duplex each link is its own collision

domain switching A-to-Arsquo and B-

to-Brsquo simultaneously without collisions not possible with dumb hub

A

Arsquo

B

Brsquo

C

Crsquo

switch with six interfaces(123456)

1 23

45

6

5 DataLink Layer 5-52

Switch Table

Q how does switch know that Arsquo reachable via interface 4 Brsquo reachable via interface 5

A each switch has a switch table each entry (MAC address of host interface

to reach host time stamp)

looks like a routing table Q how are entries created

maintained in switch table something like a routing

protocol

A

Arsquo

B

Brsquo

C

Crsquo

switch with six interfaces(123456)

1 23

45

6

5 DataLink Layer 5-53

Switch self-learning

switch learns which hosts can be reached through which interfaces when frame received

switch ldquolearnsrdquo location of sender incoming LAN segment

records senderlocation pair in switch table

A

Arsquo

B

Brsquo

C

Crsquo

1 23

45

6

A Arsquo

Source ADest Arsquo

MAC addr interface TTL

Switch table (initially empty)

A 1 60

5 DataLink Layer 5-54

Forwarding

bull How do determine onto which LAN segment to forward framebull Looks like a routing problem

hub

hubhub

switch1

2 3

5 DataLink Layer 5-55

Self learning

A switch has a switch table entry in switch table

(MAC Address Interface Time Stamp) stale entries in table dropped (TTL can be 60

min) switch learns which hosts can be reached through

which interfaces when frame received switch ldquolearnsrdquo location

of sender incoming LAN segment records senderlocation pair in switch table

5 DataLink Layer 5-56

Self-learning forwarding example

A

Arsquo

B

Brsquo

C

Crsquo

1 23

45

6

A Arsquo

Source ADest Arsquo

MAC addr interface TTL

Switch table (initially empty)

A 1 60

A ArsquoA ArsquoA ArsquoA ArsquoA Arsquo

frame destination unknownflood

Arsquo A

destination A location known

Arsquo 4 60

selective send

5 DataLink Layer 5-57

FilteringForwardingWhen switch receives a frame

index switch table using MAC dest addressif entry found for destination

then if dest on segment from which frame arrived

then drop the frame else forward the frame on interface indicated else flood

forward on all but the interface on which the frame arrived

5 DataLink Layer 5-58

Switch example

Suppose C sends frame to D

Switch receives frame from from C notes in bridge table that C is on interface 1 because D is not in table switch forwards frame into

interfaces 2 and 3

frame received by D

hub

hub hub

switch

A

B CD

EF

G H

I

address interface

ABEG

1123

12 3

5 DataLink Layer 5-59

Switch example

Suppose D replies back with frame to C

Switch receives frame from from D notes in bridge table that D is on interface 2 because C is in table switch forwards frame only to

interface 1

frame received by C

hub

hub hub

switch

A

B CD

EF

G H

I

address interface

ABEGC

11231

5 DataLink Layer 5-60

Switch traffic isolation switch installation breaks subnet into LAN

segments switch filters packets

same-LAN-segment frames not usually forwarded onto other LAN segments

segments become separate collision domains

hub hub hub

switch

collision domain collision domain

collision domain

5 DataLink Layer 5-61

Switches dedicated access Switch with many

interfaces Hosts have direct

connection to switch No collisions full duplex

Switching A-to-Arsquo and B-to-Brsquo simultaneously no collisions

switch

A

Arsquo

B

Brsquo

C

Crsquo

5 DataLink Layer 5-62

More on Switches

cut-through switching frame forwarded from input to output port without first collecting entire frameslight reduction in latency

combinations of shareddedicated 101001000 Mbps interfaces

5 DataLink Layer 5-63

Institutional network

hub

hubhub

switch

to externalnetwork

router

IP subnet

mail server

web server

5 DataLink Layer 5-64

Switches vs Routers both store-and-forward devices

routers network layer devices (examine network layer headers) switches are link layer devices

routers maintain routing tables implement routing algorithms

switches maintain switch tables implement filtering learning algorithms

5 DataLink Layer 5-65

Summary comparison

hubs routers switches

traffi c isolation

no yes yes

plug amp play yes no yes

optimal routing

no yes no

cut through

yes no yes

5 DataLink Layer 5-66

IEEE 802 Standards

The 802 working groups The important ones are marked with The ones marked with are hibernating The one marked with dagger gave up

  • Slide 1
  • Link Layer
  • Ethernet
  • Slide 4
  • Star topology
  • Ethernet Frame Structure
  • Ethernet Frame Structure (more)
  • Unreliable connectionless service
  • Ethernet uses CSMACD
  • Ethernet CSMACD algorithm
  • Ethernetrsquos CSMACD (more)
  • Collision Detection
  • Algorithm (cont)
  • Binary Exponential Backoff
  • Ethernet MAC Sublayer Protocol (2)
  • CSMACD efficiency
  • Ethernet Performance
  • 8023 Ethernet Standards Link amp Physical Layers
  • Manchester encoding
  • Ethernet Cabling
  • Ethernet Cabling (2)
  • Ethernet Cabling (3)
  • 10BaseT and 100BaseT
  • 100Mbps Fast Ethernet
  • Fast Ethernet
  • Gbit Ethernet
  • Gigabit Ethernet
  • Wireless Link Characteristics
  • Wireless network characteristics
  • IEEE 80211 Wireless LAN
  • Slide 31
  • 80211 LAN architecture
  • 80211 Channels association
  • IEEE 80211 multiple access
  • IEEE 80211 MAC Protocol CSMACA
  • Avoiding collisions (more)
  • Collision Avoidance RTS-CTS exchange
  • Slide 38
  • Slide 39
  • Hubs
  • Interconnecting with hubs
  • Inter - Networking
  • Learning Bridges
  • Spanning Tree Algorithm
  • Algorithm Overview
  • Algorithm Details
  • Algorithm Detail (cont)
  • Broadcast and Multicast
  • Limitations of Bridges
  • Switch
  • Switch allows multiple simultaneous transmissions
  • Switch Table
  • Switch self-learning
  • Forwarding
  • Self learning
  • Self-learning forwarding example
  • FilteringForwarding
  • Switch example
  • Slide 59
  • Switch traffic isolation
  • Switches dedicated access
  • More on Switches
  • Institutional network
  • Switches vs Routers
  • Summary comparison
  • IEEE 802 Standards
Page 48: Chapter 5B

5 DataLink Layer 5-48

Broadcast and Multicast Forward all broadcastmulticast frames

current practice Learn when no group members

downstream Accomplished by having each member of

group G send a frame to bridge multicast address with G in source field

5 DataLink Layer 5-49

Limitations of Bridges

Do not scale spanning tree algorithm does not scale broadcast does not scale

Do not accommodate heterogeneity

Caution beware of transparency

5 DataLink Layer 5-50

Switch link-layer device smarter than hubs take active

role store forward Ethernet frames examine incoming framersquos MAC address selectively

forward frame to one-or-more outgoing links when frame is to be forwarded on segment uses CSMACD to access segment

transparent hosts are unaware of presence of switches

plug-and-play self-learning switches do not need to be configured

5 DataLink Layer 5-51

Switch allows multiple simultaneous transmissions

hosts have dedicated direct connection to switch

switches buffer packets Ethernet protocol used on

each incoming link but no collisions full duplex each link is its own collision

domain switching A-to-Arsquo and B-

to-Brsquo simultaneously without collisions not possible with dumb hub

A

Arsquo

B

Brsquo

C

Crsquo

switch with six interfaces(123456)

1 23

45

6

5 DataLink Layer 5-52

Switch Table

Q how does switch know that Arsquo reachable via interface 4 Brsquo reachable via interface 5

A each switch has a switch table each entry (MAC address of host interface

to reach host time stamp)

looks like a routing table Q how are entries created

maintained in switch table something like a routing

protocol

A

Arsquo

B

Brsquo

C

Crsquo

switch with six interfaces(123456)

1 23

45

6

5 DataLink Layer 5-53

Switch self-learning

switch learns which hosts can be reached through which interfaces when frame received

switch ldquolearnsrdquo location of sender incoming LAN segment

records senderlocation pair in switch table

A

Arsquo

B

Brsquo

C

Crsquo

1 23

45

6

A Arsquo

Source ADest Arsquo

MAC addr interface TTL

Switch table (initially empty)

A 1 60

5 DataLink Layer 5-54

Forwarding

bull How do determine onto which LAN segment to forward framebull Looks like a routing problem

hub

hubhub

switch1

2 3

5 DataLink Layer 5-55

Self learning

A switch has a switch table entry in switch table

(MAC Address Interface Time Stamp) stale entries in table dropped (TTL can be 60

min) switch learns which hosts can be reached through

which interfaces when frame received switch ldquolearnsrdquo location

of sender incoming LAN segment records senderlocation pair in switch table

5 DataLink Layer 5-56

Self-learning forwarding example

A

Arsquo

B

Brsquo

C

Crsquo

1 23

45

6

A Arsquo

Source ADest Arsquo

MAC addr interface TTL

Switch table (initially empty)

A 1 60

A ArsquoA ArsquoA ArsquoA ArsquoA Arsquo

frame destination unknownflood

Arsquo A

destination A location known

Arsquo 4 60

selective send

5 DataLink Layer 5-57

FilteringForwardingWhen switch receives a frame

index switch table using MAC dest addressif entry found for destination

then if dest on segment from which frame arrived

then drop the frame else forward the frame on interface indicated else flood

forward on all but the interface on which the frame arrived

5 DataLink Layer 5-58

Switch example

Suppose C sends frame to D

Switch receives frame from from C notes in bridge table that C is on interface 1 because D is not in table switch forwards frame into

interfaces 2 and 3

frame received by D

hub

hub hub

switch

A

B CD

EF

G H

I

address interface

ABEG

1123

12 3

5 DataLink Layer 5-59

Switch example

Suppose D replies back with frame to C

Switch receives frame from from D notes in bridge table that D is on interface 2 because C is in table switch forwards frame only to

interface 1

frame received by C

hub

hub hub

switch

A

B CD

EF

G H

I

address interface

ABEGC

11231

5 DataLink Layer 5-60

Switch traffic isolation switch installation breaks subnet into LAN

segments switch filters packets

same-LAN-segment frames not usually forwarded onto other LAN segments

segments become separate collision domains

hub hub hub

switch

collision domain collision domain

collision domain

5 DataLink Layer 5-61

Switches dedicated access Switch with many

interfaces Hosts have direct

connection to switch No collisions full duplex

Switching A-to-Arsquo and B-to-Brsquo simultaneously no collisions

switch

A

Arsquo

B

Brsquo

C

Crsquo

5 DataLink Layer 5-62

More on Switches

cut-through switching frame forwarded from input to output port without first collecting entire frameslight reduction in latency

combinations of shareddedicated 101001000 Mbps interfaces

5 DataLink Layer 5-63

Institutional network

hub

hubhub

switch

to externalnetwork

router

IP subnet

mail server

web server

5 DataLink Layer 5-64

Switches vs Routers both store-and-forward devices

routers network layer devices (examine network layer headers) switches are link layer devices

routers maintain routing tables implement routing algorithms

switches maintain switch tables implement filtering learning algorithms

5 DataLink Layer 5-65

Summary comparison

hubs routers switches

traffi c isolation

no yes yes

plug amp play yes no yes

optimal routing

no yes no

cut through

yes no yes

5 DataLink Layer 5-66

IEEE 802 Standards

The 802 working groups The important ones are marked with The ones marked with are hibernating The one marked with dagger gave up

  • Slide 1
  • Link Layer
  • Ethernet
  • Slide 4
  • Star topology
  • Ethernet Frame Structure
  • Ethernet Frame Structure (more)
  • Unreliable connectionless service
  • Ethernet uses CSMACD
  • Ethernet CSMACD algorithm
  • Ethernetrsquos CSMACD (more)
  • Collision Detection
  • Algorithm (cont)
  • Binary Exponential Backoff
  • Ethernet MAC Sublayer Protocol (2)
  • CSMACD efficiency
  • Ethernet Performance
  • 8023 Ethernet Standards Link amp Physical Layers
  • Manchester encoding
  • Ethernet Cabling
  • Ethernet Cabling (2)
  • Ethernet Cabling (3)
  • 10BaseT and 100BaseT
  • 100Mbps Fast Ethernet
  • Fast Ethernet
  • Gbit Ethernet
  • Gigabit Ethernet
  • Wireless Link Characteristics
  • Wireless network characteristics
  • IEEE 80211 Wireless LAN
  • Slide 31
  • 80211 LAN architecture
  • 80211 Channels association
  • IEEE 80211 multiple access
  • IEEE 80211 MAC Protocol CSMACA
  • Avoiding collisions (more)
  • Collision Avoidance RTS-CTS exchange
  • Slide 38
  • Slide 39
  • Hubs
  • Interconnecting with hubs
  • Inter - Networking
  • Learning Bridges
  • Spanning Tree Algorithm
  • Algorithm Overview
  • Algorithm Details
  • Algorithm Detail (cont)
  • Broadcast and Multicast
  • Limitations of Bridges
  • Switch
  • Switch allows multiple simultaneous transmissions
  • Switch Table
  • Switch self-learning
  • Forwarding
  • Self learning
  • Self-learning forwarding example
  • FilteringForwarding
  • Switch example
  • Slide 59
  • Switch traffic isolation
  • Switches dedicated access
  • More on Switches
  • Institutional network
  • Switches vs Routers
  • Summary comparison
  • IEEE 802 Standards
Page 49: Chapter 5B

5 DataLink Layer 5-49

Limitations of Bridges

Do not scale spanning tree algorithm does not scale broadcast does not scale

Do not accommodate heterogeneity

Caution beware of transparency

5 DataLink Layer 5-50

Switch link-layer device smarter than hubs take active

role store forward Ethernet frames examine incoming framersquos MAC address selectively

forward frame to one-or-more outgoing links when frame is to be forwarded on segment uses CSMACD to access segment

transparent hosts are unaware of presence of switches

plug-and-play self-learning switches do not need to be configured

5 DataLink Layer 5-51

Switch allows multiple simultaneous transmissions

hosts have dedicated direct connection to switch

switches buffer packets Ethernet protocol used on

each incoming link but no collisions full duplex each link is its own collision

domain switching A-to-Arsquo and B-

to-Brsquo simultaneously without collisions not possible with dumb hub

A

Arsquo

B

Brsquo

C

Crsquo

switch with six interfaces(123456)

1 23

45

6

5 DataLink Layer 5-52

Switch Table

Q how does switch know that Arsquo reachable via interface 4 Brsquo reachable via interface 5

A each switch has a switch table each entry (MAC address of host interface

to reach host time stamp)

looks like a routing table Q how are entries created

maintained in switch table something like a routing

protocol

A

Arsquo

B

Brsquo

C

Crsquo

switch with six interfaces(123456)

1 23

45

6

5 DataLink Layer 5-53

Switch self-learning

switch learns which hosts can be reached through which interfaces when frame received

switch ldquolearnsrdquo location of sender incoming LAN segment

records senderlocation pair in switch table

A

Arsquo

B

Brsquo

C

Crsquo

1 23

45

6

A Arsquo

Source ADest Arsquo

MAC addr interface TTL

Switch table (initially empty)

A 1 60

5 DataLink Layer 5-54

Forwarding

bull How do determine onto which LAN segment to forward framebull Looks like a routing problem

hub

hubhub

switch1

2 3

5 DataLink Layer 5-55

Self learning

A switch has a switch table entry in switch table

(MAC Address Interface Time Stamp) stale entries in table dropped (TTL can be 60

min) switch learns which hosts can be reached through

which interfaces when frame received switch ldquolearnsrdquo location

of sender incoming LAN segment records senderlocation pair in switch table

5 DataLink Layer 5-56

Self-learning forwarding example

A

Arsquo

B

Brsquo

C

Crsquo

1 23

45

6

A Arsquo

Source ADest Arsquo

MAC addr interface TTL

Switch table (initially empty)

A 1 60

A ArsquoA ArsquoA ArsquoA ArsquoA Arsquo

frame destination unknownflood

Arsquo A

destination A location known

Arsquo 4 60

selective send

5 DataLink Layer 5-57

FilteringForwardingWhen switch receives a frame

index switch table using MAC dest addressif entry found for destination

then if dest on segment from which frame arrived

then drop the frame else forward the frame on interface indicated else flood

forward on all but the interface on which the frame arrived

5 DataLink Layer 5-58

Switch example

Suppose C sends frame to D

Switch receives frame from from C notes in bridge table that C is on interface 1 because D is not in table switch forwards frame into

interfaces 2 and 3

frame received by D

hub

hub hub

switch

A

B CD

EF

G H

I

address interface

ABEG

1123

12 3

5 DataLink Layer 5-59

Switch example

Suppose D replies back with frame to C

Switch receives frame from from D notes in bridge table that D is on interface 2 because C is in table switch forwards frame only to

interface 1

frame received by C

hub

hub hub

switch

A

B CD

EF

G H

I

address interface

ABEGC

11231

5 DataLink Layer 5-60

Switch traffic isolation switch installation breaks subnet into LAN

segments switch filters packets

same-LAN-segment frames not usually forwarded onto other LAN segments

segments become separate collision domains

hub hub hub

switch

collision domain collision domain

collision domain

5 DataLink Layer 5-61

Switches dedicated access Switch with many

interfaces Hosts have direct

connection to switch No collisions full duplex

Switching A-to-Arsquo and B-to-Brsquo simultaneously no collisions

switch

A

Arsquo

B

Brsquo

C

Crsquo

5 DataLink Layer 5-62

More on Switches

cut-through switching frame forwarded from input to output port without first collecting entire frameslight reduction in latency

combinations of shareddedicated 101001000 Mbps interfaces

5 DataLink Layer 5-63

Institutional network

hub

hubhub

switch

to externalnetwork

router

IP subnet

mail server

web server

5 DataLink Layer 5-64

Switches vs Routers both store-and-forward devices

routers network layer devices (examine network layer headers) switches are link layer devices

routers maintain routing tables implement routing algorithms

switches maintain switch tables implement filtering learning algorithms

5 DataLink Layer 5-65

Summary comparison

hubs routers switches

traffi c isolation

no yes yes

plug amp play yes no yes

optimal routing

no yes no

cut through

yes no yes

5 DataLink Layer 5-66

IEEE 802 Standards

The 802 working groups The important ones are marked with The ones marked with are hibernating The one marked with dagger gave up

  • Slide 1
  • Link Layer
  • Ethernet
  • Slide 4
  • Star topology
  • Ethernet Frame Structure
  • Ethernet Frame Structure (more)
  • Unreliable connectionless service
  • Ethernet uses CSMACD
  • Ethernet CSMACD algorithm
  • Ethernetrsquos CSMACD (more)
  • Collision Detection
  • Algorithm (cont)
  • Binary Exponential Backoff
  • Ethernet MAC Sublayer Protocol (2)
  • CSMACD efficiency
  • Ethernet Performance
  • 8023 Ethernet Standards Link amp Physical Layers
  • Manchester encoding
  • Ethernet Cabling
  • Ethernet Cabling (2)
  • Ethernet Cabling (3)
  • 10BaseT and 100BaseT
  • 100Mbps Fast Ethernet
  • Fast Ethernet
  • Gbit Ethernet
  • Gigabit Ethernet
  • Wireless Link Characteristics
  • Wireless network characteristics
  • IEEE 80211 Wireless LAN
  • Slide 31
  • 80211 LAN architecture
  • 80211 Channels association
  • IEEE 80211 multiple access
  • IEEE 80211 MAC Protocol CSMACA
  • Avoiding collisions (more)
  • Collision Avoidance RTS-CTS exchange
  • Slide 38
  • Slide 39
  • Hubs
  • Interconnecting with hubs
  • Inter - Networking
  • Learning Bridges
  • Spanning Tree Algorithm
  • Algorithm Overview
  • Algorithm Details
  • Algorithm Detail (cont)
  • Broadcast and Multicast
  • Limitations of Bridges
  • Switch
  • Switch allows multiple simultaneous transmissions
  • Switch Table
  • Switch self-learning
  • Forwarding
  • Self learning
  • Self-learning forwarding example
  • FilteringForwarding
  • Switch example
  • Slide 59
  • Switch traffic isolation
  • Switches dedicated access
  • More on Switches
  • Institutional network
  • Switches vs Routers
  • Summary comparison
  • IEEE 802 Standards
Page 50: Chapter 5B

5 DataLink Layer 5-50

Switch link-layer device smarter than hubs take active

role store forward Ethernet frames examine incoming framersquos MAC address selectively

forward frame to one-or-more outgoing links when frame is to be forwarded on segment uses CSMACD to access segment

transparent hosts are unaware of presence of switches

plug-and-play self-learning switches do not need to be configured

5 DataLink Layer 5-51

Switch allows multiple simultaneous transmissions

hosts have dedicated direct connection to switch

switches buffer packets Ethernet protocol used on

each incoming link but no collisions full duplex each link is its own collision

domain switching A-to-Arsquo and B-

to-Brsquo simultaneously without collisions not possible with dumb hub

A

Arsquo

B

Brsquo

C

Crsquo

switch with six interfaces(123456)

1 23

45

6

5 DataLink Layer 5-52

Switch Table

Q how does switch know that Arsquo reachable via interface 4 Brsquo reachable via interface 5

A each switch has a switch table each entry (MAC address of host interface

to reach host time stamp)

looks like a routing table Q how are entries created

maintained in switch table something like a routing

protocol

A

Arsquo

B

Brsquo

C

Crsquo

switch with six interfaces(123456)

1 23

45

6

5 DataLink Layer 5-53

Switch self-learning

switch learns which hosts can be reached through which interfaces when frame received

switch ldquolearnsrdquo location of sender incoming LAN segment

records senderlocation pair in switch table

A

Arsquo

B

Brsquo

C

Crsquo

1 23

45

6

A Arsquo

Source ADest Arsquo

MAC addr interface TTL

Switch table (initially empty)

A 1 60

5 DataLink Layer 5-54

Forwarding

bull How do determine onto which LAN segment to forward framebull Looks like a routing problem

hub

hubhub

switch1

2 3

5 DataLink Layer 5-55

Self learning

A switch has a switch table entry in switch table

(MAC Address Interface Time Stamp) stale entries in table dropped (TTL can be 60

min) switch learns which hosts can be reached through

which interfaces when frame received switch ldquolearnsrdquo location

of sender incoming LAN segment records senderlocation pair in switch table

5 DataLink Layer 5-56

Self-learning forwarding example

A

Arsquo

B

Brsquo

C

Crsquo

1 23

45

6

A Arsquo

Source ADest Arsquo

MAC addr interface TTL

Switch table (initially empty)

A 1 60

A ArsquoA ArsquoA ArsquoA ArsquoA Arsquo

frame destination unknownflood

Arsquo A

destination A location known

Arsquo 4 60

selective send

5 DataLink Layer 5-57

FilteringForwardingWhen switch receives a frame

index switch table using MAC dest addressif entry found for destination

then if dest on segment from which frame arrived

then drop the frame else forward the frame on interface indicated else flood

forward on all but the interface on which the frame arrived

5 DataLink Layer 5-58

Switch example

Suppose C sends frame to D

Switch receives frame from from C notes in bridge table that C is on interface 1 because D is not in table switch forwards frame into

interfaces 2 and 3

frame received by D

hub

hub hub

switch

A

B CD

EF

G H

I

address interface

ABEG

1123

12 3

5 DataLink Layer 5-59

Switch example

Suppose D replies back with frame to C

Switch receives frame from from D notes in bridge table that D is on interface 2 because C is in table switch forwards frame only to

interface 1

frame received by C

hub

hub hub

switch

A

B CD

EF

G H

I

address interface

ABEGC

11231

5 DataLink Layer 5-60

Switch traffic isolation switch installation breaks subnet into LAN

segments switch filters packets

same-LAN-segment frames not usually forwarded onto other LAN segments

segments become separate collision domains

hub hub hub

switch

collision domain collision domain

collision domain

5 DataLink Layer 5-61

Switches dedicated access Switch with many

interfaces Hosts have direct

connection to switch No collisions full duplex

Switching A-to-Arsquo and B-to-Brsquo simultaneously no collisions

switch

A

Arsquo

B

Brsquo

C

Crsquo

5 DataLink Layer 5-62

More on Switches

cut-through switching frame forwarded from input to output port without first collecting entire frameslight reduction in latency

combinations of shareddedicated 101001000 Mbps interfaces

5 DataLink Layer 5-63

Institutional network

hub

hubhub

switch

to externalnetwork

router

IP subnet

mail server

web server

5 DataLink Layer 5-64

Switches vs Routers both store-and-forward devices

routers network layer devices (examine network layer headers) switches are link layer devices

routers maintain routing tables implement routing algorithms

switches maintain switch tables implement filtering learning algorithms

5 DataLink Layer 5-65

Summary comparison

hubs routers switches

traffi c isolation

no yes yes

plug amp play yes no yes

optimal routing

no yes no

cut through

yes no yes

5 DataLink Layer 5-66

IEEE 802 Standards

The 802 working groups The important ones are marked with The ones marked with are hibernating The one marked with dagger gave up

  • Slide 1
  • Link Layer
  • Ethernet
  • Slide 4
  • Star topology
  • Ethernet Frame Structure
  • Ethernet Frame Structure (more)
  • Unreliable connectionless service
  • Ethernet uses CSMACD
  • Ethernet CSMACD algorithm
  • Ethernetrsquos CSMACD (more)
  • Collision Detection
  • Algorithm (cont)
  • Binary Exponential Backoff
  • Ethernet MAC Sublayer Protocol (2)
  • CSMACD efficiency
  • Ethernet Performance
  • 8023 Ethernet Standards Link amp Physical Layers
  • Manchester encoding
  • Ethernet Cabling
  • Ethernet Cabling (2)
  • Ethernet Cabling (3)
  • 10BaseT and 100BaseT
  • 100Mbps Fast Ethernet
  • Fast Ethernet
  • Gbit Ethernet
  • Gigabit Ethernet
  • Wireless Link Characteristics
  • Wireless network characteristics
  • IEEE 80211 Wireless LAN
  • Slide 31
  • 80211 LAN architecture
  • 80211 Channels association
  • IEEE 80211 multiple access
  • IEEE 80211 MAC Protocol CSMACA
  • Avoiding collisions (more)
  • Collision Avoidance RTS-CTS exchange
  • Slide 38
  • Slide 39
  • Hubs
  • Interconnecting with hubs
  • Inter - Networking
  • Learning Bridges
  • Spanning Tree Algorithm
  • Algorithm Overview
  • Algorithm Details
  • Algorithm Detail (cont)
  • Broadcast and Multicast
  • Limitations of Bridges
  • Switch
  • Switch allows multiple simultaneous transmissions
  • Switch Table
  • Switch self-learning
  • Forwarding
  • Self learning
  • Self-learning forwarding example
  • FilteringForwarding
  • Switch example
  • Slide 59
  • Switch traffic isolation
  • Switches dedicated access
  • More on Switches
  • Institutional network
  • Switches vs Routers
  • Summary comparison
  • IEEE 802 Standards
Page 51: Chapter 5B

5 DataLink Layer 5-51

Switch allows multiple simultaneous transmissions

hosts have dedicated direct connection to switch

switches buffer packets Ethernet protocol used on

each incoming link but no collisions full duplex each link is its own collision

domain switching A-to-Arsquo and B-

to-Brsquo simultaneously without collisions not possible with dumb hub

A

Arsquo

B

Brsquo

C

Crsquo

switch with six interfaces(123456)

1 23

45

6

5 DataLink Layer 5-52

Switch Table

Q how does switch know that Arsquo reachable via interface 4 Brsquo reachable via interface 5

A each switch has a switch table each entry (MAC address of host interface

to reach host time stamp)

looks like a routing table Q how are entries created

maintained in switch table something like a routing

protocol

A

Arsquo

B

Brsquo

C

Crsquo

switch with six interfaces(123456)

1 23

45

6

5 DataLink Layer 5-53

Switch self-learning

switch learns which hosts can be reached through which interfaces when frame received

switch ldquolearnsrdquo location of sender incoming LAN segment

records senderlocation pair in switch table

A

Arsquo

B

Brsquo

C

Crsquo

1 23

45

6

A Arsquo

Source ADest Arsquo

MAC addr interface TTL

Switch table (initially empty)

A 1 60

5 DataLink Layer 5-54

Forwarding

bull How do determine onto which LAN segment to forward framebull Looks like a routing problem

hub

hubhub

switch1

2 3

5 DataLink Layer 5-55

Self learning

A switch has a switch table entry in switch table

(MAC Address Interface Time Stamp) stale entries in table dropped (TTL can be 60

min) switch learns which hosts can be reached through

which interfaces when frame received switch ldquolearnsrdquo location

of sender incoming LAN segment records senderlocation pair in switch table

5 DataLink Layer 5-56

Self-learning forwarding example

A

Arsquo

B

Brsquo

C

Crsquo

1 23

45

6

A Arsquo

Source ADest Arsquo

MAC addr interface TTL

Switch table (initially empty)

A 1 60

A ArsquoA ArsquoA ArsquoA ArsquoA Arsquo

frame destination unknownflood

Arsquo A

destination A location known

Arsquo 4 60

selective send

5 DataLink Layer 5-57

FilteringForwardingWhen switch receives a frame

index switch table using MAC dest addressif entry found for destination

then if dest on segment from which frame arrived

then drop the frame else forward the frame on interface indicated else flood

forward on all but the interface on which the frame arrived

5 DataLink Layer 5-58

Switch example

Suppose C sends frame to D

Switch receives frame from from C notes in bridge table that C is on interface 1 because D is not in table switch forwards frame into

interfaces 2 and 3

frame received by D

hub

hub hub

switch

A

B CD

EF

G H

I

address interface

ABEG

1123

12 3

5 DataLink Layer 5-59

Switch example

Suppose D replies back with frame to C

Switch receives frame from from D notes in bridge table that D is on interface 2 because C is in table switch forwards frame only to

interface 1

frame received by C

hub

hub hub

switch

A

B CD

EF

G H

I

address interface

ABEGC

11231

5 DataLink Layer 5-60

Switch traffic isolation switch installation breaks subnet into LAN

segments switch filters packets

same-LAN-segment frames not usually forwarded onto other LAN segments

segments become separate collision domains

hub hub hub

switch

collision domain collision domain

collision domain

5 DataLink Layer 5-61

Switches dedicated access Switch with many

interfaces Hosts have direct

connection to switch No collisions full duplex

Switching A-to-Arsquo and B-to-Brsquo simultaneously no collisions

switch

A

Arsquo

B

Brsquo

C

Crsquo

5 DataLink Layer 5-62

More on Switches

cut-through switching frame forwarded from input to output port without first collecting entire frameslight reduction in latency

combinations of shareddedicated 101001000 Mbps interfaces

5 DataLink Layer 5-63

Institutional network

hub

hubhub

switch

to externalnetwork

router

IP subnet

mail server

web server

5 DataLink Layer 5-64

Switches vs Routers both store-and-forward devices

routers network layer devices (examine network layer headers) switches are link layer devices

routers maintain routing tables implement routing algorithms

switches maintain switch tables implement filtering learning algorithms

5 DataLink Layer 5-65

Summary comparison

hubs routers switches

traffi c isolation

no yes yes

plug amp play yes no yes

optimal routing

no yes no

cut through

yes no yes

5 DataLink Layer 5-66

IEEE 802 Standards

The 802 working groups The important ones are marked with The ones marked with are hibernating The one marked with dagger gave up

  • Slide 1
  • Link Layer
  • Ethernet
  • Slide 4
  • Star topology
  • Ethernet Frame Structure
  • Ethernet Frame Structure (more)
  • Unreliable connectionless service
  • Ethernet uses CSMACD
  • Ethernet CSMACD algorithm
  • Ethernetrsquos CSMACD (more)
  • Collision Detection
  • Algorithm (cont)
  • Binary Exponential Backoff
  • Ethernet MAC Sublayer Protocol (2)
  • CSMACD efficiency
  • Ethernet Performance
  • 8023 Ethernet Standards Link amp Physical Layers
  • Manchester encoding
  • Ethernet Cabling
  • Ethernet Cabling (2)
  • Ethernet Cabling (3)
  • 10BaseT and 100BaseT
  • 100Mbps Fast Ethernet
  • Fast Ethernet
  • Gbit Ethernet
  • Gigabit Ethernet
  • Wireless Link Characteristics
  • Wireless network characteristics
  • IEEE 80211 Wireless LAN
  • Slide 31
  • 80211 LAN architecture
  • 80211 Channels association
  • IEEE 80211 multiple access
  • IEEE 80211 MAC Protocol CSMACA
  • Avoiding collisions (more)
  • Collision Avoidance RTS-CTS exchange
  • Slide 38
  • Slide 39
  • Hubs
  • Interconnecting with hubs
  • Inter - Networking
  • Learning Bridges
  • Spanning Tree Algorithm
  • Algorithm Overview
  • Algorithm Details
  • Algorithm Detail (cont)
  • Broadcast and Multicast
  • Limitations of Bridges
  • Switch
  • Switch allows multiple simultaneous transmissions
  • Switch Table
  • Switch self-learning
  • Forwarding
  • Self learning
  • Self-learning forwarding example
  • FilteringForwarding
  • Switch example
  • Slide 59
  • Switch traffic isolation
  • Switches dedicated access
  • More on Switches
  • Institutional network
  • Switches vs Routers
  • Summary comparison
  • IEEE 802 Standards
Page 52: Chapter 5B

5 DataLink Layer 5-52

Switch Table

Q how does switch know that Arsquo reachable via interface 4 Brsquo reachable via interface 5

A each switch has a switch table each entry (MAC address of host interface

to reach host time stamp)

looks like a routing table Q how are entries created

maintained in switch table something like a routing

protocol

A

Arsquo

B

Brsquo

C

Crsquo

switch with six interfaces(123456)

1 23

45

6

5 DataLink Layer 5-53

Switch self-learning

switch learns which hosts can be reached through which interfaces when frame received

switch ldquolearnsrdquo location of sender incoming LAN segment

records senderlocation pair in switch table

A

Arsquo

B

Brsquo

C

Crsquo

1 23

45

6

A Arsquo

Source ADest Arsquo

MAC addr interface TTL

Switch table (initially empty)

A 1 60

5 DataLink Layer 5-54

Forwarding

bull How do determine onto which LAN segment to forward framebull Looks like a routing problem

hub

hubhub

switch1

2 3

5 DataLink Layer 5-55

Self learning

A switch has a switch table entry in switch table

(MAC Address Interface Time Stamp) stale entries in table dropped (TTL can be 60

min) switch learns which hosts can be reached through

which interfaces when frame received switch ldquolearnsrdquo location

of sender incoming LAN segment records senderlocation pair in switch table

5 DataLink Layer 5-56

Self-learning forwarding example

A

Arsquo

B

Brsquo

C

Crsquo

1 23

45

6

A Arsquo

Source ADest Arsquo

MAC addr interface TTL

Switch table (initially empty)

A 1 60

A ArsquoA ArsquoA ArsquoA ArsquoA Arsquo

frame destination unknownflood

Arsquo A

destination A location known

Arsquo 4 60

selective send

5 DataLink Layer 5-57

FilteringForwardingWhen switch receives a frame

index switch table using MAC dest addressif entry found for destination

then if dest on segment from which frame arrived

then drop the frame else forward the frame on interface indicated else flood

forward on all but the interface on which the frame arrived

5 DataLink Layer 5-58

Switch example

Suppose C sends frame to D

Switch receives frame from from C notes in bridge table that C is on interface 1 because D is not in table switch forwards frame into

interfaces 2 and 3

frame received by D

hub

hub hub

switch

A

B CD

EF

G H

I

address interface

ABEG

1123

12 3

5 DataLink Layer 5-59

Switch example

Suppose D replies back with frame to C

Switch receives frame from from D notes in bridge table that D is on interface 2 because C is in table switch forwards frame only to

interface 1

frame received by C

hub

hub hub

switch

A

B CD

EF

G H

I

address interface

ABEGC

11231

5 DataLink Layer 5-60

Switch traffic isolation switch installation breaks subnet into LAN

segments switch filters packets

same-LAN-segment frames not usually forwarded onto other LAN segments

segments become separate collision domains

hub hub hub

switch

collision domain collision domain

collision domain

5 DataLink Layer 5-61

Switches dedicated access Switch with many

interfaces Hosts have direct

connection to switch No collisions full duplex

Switching A-to-Arsquo and B-to-Brsquo simultaneously no collisions

switch

A

Arsquo

B

Brsquo

C

Crsquo

5 DataLink Layer 5-62

More on Switches

cut-through switching frame forwarded from input to output port without first collecting entire frameslight reduction in latency

combinations of shareddedicated 101001000 Mbps interfaces

5 DataLink Layer 5-63

Institutional network

hub

hubhub

switch

to externalnetwork

router

IP subnet

mail server

web server

5 DataLink Layer 5-64

Switches vs Routers both store-and-forward devices

routers network layer devices (examine network layer headers) switches are link layer devices

routers maintain routing tables implement routing algorithms

switches maintain switch tables implement filtering learning algorithms

5 DataLink Layer 5-65

Summary comparison

hubs routers switches

traffi c isolation

no yes yes

plug amp play yes no yes

optimal routing

no yes no

cut through

yes no yes

5 DataLink Layer 5-66

IEEE 802 Standards

The 802 working groups The important ones are marked with The ones marked with are hibernating The one marked with dagger gave up

  • Slide 1
  • Link Layer
  • Ethernet
  • Slide 4
  • Star topology
  • Ethernet Frame Structure
  • Ethernet Frame Structure (more)
  • Unreliable connectionless service
  • Ethernet uses CSMACD
  • Ethernet CSMACD algorithm
  • Ethernetrsquos CSMACD (more)
  • Collision Detection
  • Algorithm (cont)
  • Binary Exponential Backoff
  • Ethernet MAC Sublayer Protocol (2)
  • CSMACD efficiency
  • Ethernet Performance
  • 8023 Ethernet Standards Link amp Physical Layers
  • Manchester encoding
  • Ethernet Cabling
  • Ethernet Cabling (2)
  • Ethernet Cabling (3)
  • 10BaseT and 100BaseT
  • 100Mbps Fast Ethernet
  • Fast Ethernet
  • Gbit Ethernet
  • Gigabit Ethernet
  • Wireless Link Characteristics
  • Wireless network characteristics
  • IEEE 80211 Wireless LAN
  • Slide 31
  • 80211 LAN architecture
  • 80211 Channels association
  • IEEE 80211 multiple access
  • IEEE 80211 MAC Protocol CSMACA
  • Avoiding collisions (more)
  • Collision Avoidance RTS-CTS exchange
  • Slide 38
  • Slide 39
  • Hubs
  • Interconnecting with hubs
  • Inter - Networking
  • Learning Bridges
  • Spanning Tree Algorithm
  • Algorithm Overview
  • Algorithm Details
  • Algorithm Detail (cont)
  • Broadcast and Multicast
  • Limitations of Bridges
  • Switch
  • Switch allows multiple simultaneous transmissions
  • Switch Table
  • Switch self-learning
  • Forwarding
  • Self learning
  • Self-learning forwarding example
  • FilteringForwarding
  • Switch example
  • Slide 59
  • Switch traffic isolation
  • Switches dedicated access
  • More on Switches
  • Institutional network
  • Switches vs Routers
  • Summary comparison
  • IEEE 802 Standards
Page 53: Chapter 5B

5 DataLink Layer 5-53

Switch self-learning

switch learns which hosts can be reached through which interfaces when frame received

switch ldquolearnsrdquo location of sender incoming LAN segment

records senderlocation pair in switch table

A

Arsquo

B

Brsquo

C

Crsquo

1 23

45

6

A Arsquo

Source ADest Arsquo

MAC addr interface TTL

Switch table (initially empty)

A 1 60

5 DataLink Layer 5-54

Forwarding

bull How do determine onto which LAN segment to forward framebull Looks like a routing problem

hub

hubhub

switch1

2 3

5 DataLink Layer 5-55

Self learning

A switch has a switch table entry in switch table

(MAC Address Interface Time Stamp) stale entries in table dropped (TTL can be 60

min) switch learns which hosts can be reached through

which interfaces when frame received switch ldquolearnsrdquo location

of sender incoming LAN segment records senderlocation pair in switch table

5 DataLink Layer 5-56

Self-learning forwarding example

A

Arsquo

B

Brsquo

C

Crsquo

1 23

45

6

A Arsquo

Source ADest Arsquo

MAC addr interface TTL

Switch table (initially empty)

A 1 60

A ArsquoA ArsquoA ArsquoA ArsquoA Arsquo

frame destination unknownflood

Arsquo A

destination A location known

Arsquo 4 60

selective send

5 DataLink Layer 5-57

FilteringForwardingWhen switch receives a frame

index switch table using MAC dest addressif entry found for destination

then if dest on segment from which frame arrived

then drop the frame else forward the frame on interface indicated else flood

forward on all but the interface on which the frame arrived

5 DataLink Layer 5-58

Switch example

Suppose C sends frame to D

Switch receives frame from from C notes in bridge table that C is on interface 1 because D is not in table switch forwards frame into

interfaces 2 and 3

frame received by D

hub

hub hub

switch

A

B CD

EF

G H

I

address interface

ABEG

1123

12 3

5 DataLink Layer 5-59

Switch example

Suppose D replies back with frame to C

Switch receives frame from from D notes in bridge table that D is on interface 2 because C is in table switch forwards frame only to

interface 1

frame received by C

hub

hub hub

switch

A

B CD

EF

G H

I

address interface

ABEGC

11231

5 DataLink Layer 5-60

Switch traffic isolation switch installation breaks subnet into LAN

segments switch filters packets

same-LAN-segment frames not usually forwarded onto other LAN segments

segments become separate collision domains

hub hub hub

switch

collision domain collision domain

collision domain

5 DataLink Layer 5-61

Switches dedicated access Switch with many

interfaces Hosts have direct

connection to switch No collisions full duplex

Switching A-to-Arsquo and B-to-Brsquo simultaneously no collisions

switch

A

Arsquo

B

Brsquo

C

Crsquo

5 DataLink Layer 5-62

More on Switches

cut-through switching frame forwarded from input to output port without first collecting entire frameslight reduction in latency

combinations of shareddedicated 101001000 Mbps interfaces

5 DataLink Layer 5-63

Institutional network

hub

hubhub

switch

to externalnetwork

router

IP subnet

mail server

web server

5 DataLink Layer 5-64

Switches vs Routers both store-and-forward devices

routers network layer devices (examine network layer headers) switches are link layer devices

routers maintain routing tables implement routing algorithms

switches maintain switch tables implement filtering learning algorithms

5 DataLink Layer 5-65

Summary comparison

hubs routers switches

traffi c isolation

no yes yes

plug amp play yes no yes

optimal routing

no yes no

cut through

yes no yes

5 DataLink Layer 5-66

IEEE 802 Standards

The 802 working groups The important ones are marked with The ones marked with are hibernating The one marked with dagger gave up

  • Slide 1
  • Link Layer
  • Ethernet
  • Slide 4
  • Star topology
  • Ethernet Frame Structure
  • Ethernet Frame Structure (more)
  • Unreliable connectionless service
  • Ethernet uses CSMACD
  • Ethernet CSMACD algorithm
  • Ethernetrsquos CSMACD (more)
  • Collision Detection
  • Algorithm (cont)
  • Binary Exponential Backoff
  • Ethernet MAC Sublayer Protocol (2)
  • CSMACD efficiency
  • Ethernet Performance
  • 8023 Ethernet Standards Link amp Physical Layers
  • Manchester encoding
  • Ethernet Cabling
  • Ethernet Cabling (2)
  • Ethernet Cabling (3)
  • 10BaseT and 100BaseT
  • 100Mbps Fast Ethernet
  • Fast Ethernet
  • Gbit Ethernet
  • Gigabit Ethernet
  • Wireless Link Characteristics
  • Wireless network characteristics
  • IEEE 80211 Wireless LAN
  • Slide 31
  • 80211 LAN architecture
  • 80211 Channels association
  • IEEE 80211 multiple access
  • IEEE 80211 MAC Protocol CSMACA
  • Avoiding collisions (more)
  • Collision Avoidance RTS-CTS exchange
  • Slide 38
  • Slide 39
  • Hubs
  • Interconnecting with hubs
  • Inter - Networking
  • Learning Bridges
  • Spanning Tree Algorithm
  • Algorithm Overview
  • Algorithm Details
  • Algorithm Detail (cont)
  • Broadcast and Multicast
  • Limitations of Bridges
  • Switch
  • Switch allows multiple simultaneous transmissions
  • Switch Table
  • Switch self-learning
  • Forwarding
  • Self learning
  • Self-learning forwarding example
  • FilteringForwarding
  • Switch example
  • Slide 59
  • Switch traffic isolation
  • Switches dedicated access
  • More on Switches
  • Institutional network
  • Switches vs Routers
  • Summary comparison
  • IEEE 802 Standards
Page 54: Chapter 5B

5 DataLink Layer 5-54

Forwarding

bull How do determine onto which LAN segment to forward framebull Looks like a routing problem

hub

hubhub

switch1

2 3

5 DataLink Layer 5-55

Self learning

A switch has a switch table entry in switch table

(MAC Address Interface Time Stamp) stale entries in table dropped (TTL can be 60

min) switch learns which hosts can be reached through

which interfaces when frame received switch ldquolearnsrdquo location

of sender incoming LAN segment records senderlocation pair in switch table

5 DataLink Layer 5-56

Self-learning forwarding example

A

Arsquo

B

Brsquo

C

Crsquo

1 23

45

6

A Arsquo

Source ADest Arsquo

MAC addr interface TTL

Switch table (initially empty)

A 1 60

A ArsquoA ArsquoA ArsquoA ArsquoA Arsquo

frame destination unknownflood

Arsquo A

destination A location known

Arsquo 4 60

selective send

5 DataLink Layer 5-57

FilteringForwardingWhen switch receives a frame

index switch table using MAC dest addressif entry found for destination

then if dest on segment from which frame arrived

then drop the frame else forward the frame on interface indicated else flood

forward on all but the interface on which the frame arrived

5 DataLink Layer 5-58

Switch example

Suppose C sends frame to D

Switch receives frame from from C notes in bridge table that C is on interface 1 because D is not in table switch forwards frame into

interfaces 2 and 3

frame received by D

hub

hub hub

switch

A

B CD

EF

G H

I

address interface

ABEG

1123

12 3

5 DataLink Layer 5-59

Switch example

Suppose D replies back with frame to C

Switch receives frame from from D notes in bridge table that D is on interface 2 because C is in table switch forwards frame only to

interface 1

frame received by C

hub

hub hub

switch

A

B CD

EF

G H

I

address interface

ABEGC

11231

5 DataLink Layer 5-60

Switch traffic isolation switch installation breaks subnet into LAN

segments switch filters packets

same-LAN-segment frames not usually forwarded onto other LAN segments

segments become separate collision domains

hub hub hub

switch

collision domain collision domain

collision domain

5 DataLink Layer 5-61

Switches dedicated access Switch with many

interfaces Hosts have direct

connection to switch No collisions full duplex

Switching A-to-Arsquo and B-to-Brsquo simultaneously no collisions

switch

A

Arsquo

B

Brsquo

C

Crsquo

5 DataLink Layer 5-62

More on Switches

cut-through switching frame forwarded from input to output port without first collecting entire frameslight reduction in latency

combinations of shareddedicated 101001000 Mbps interfaces

5 DataLink Layer 5-63

Institutional network

hub

hubhub

switch

to externalnetwork

router

IP subnet

mail server

web server

5 DataLink Layer 5-64

Switches vs Routers both store-and-forward devices

routers network layer devices (examine network layer headers) switches are link layer devices

routers maintain routing tables implement routing algorithms

switches maintain switch tables implement filtering learning algorithms

5 DataLink Layer 5-65

Summary comparison

hubs routers switches

traffi c isolation

no yes yes

plug amp play yes no yes

optimal routing

no yes no

cut through

yes no yes

5 DataLink Layer 5-66

IEEE 802 Standards

The 802 working groups The important ones are marked with The ones marked with are hibernating The one marked with dagger gave up

  • Slide 1
  • Link Layer
  • Ethernet
  • Slide 4
  • Star topology
  • Ethernet Frame Structure
  • Ethernet Frame Structure (more)
  • Unreliable connectionless service
  • Ethernet uses CSMACD
  • Ethernet CSMACD algorithm
  • Ethernetrsquos CSMACD (more)
  • Collision Detection
  • Algorithm (cont)
  • Binary Exponential Backoff
  • Ethernet MAC Sublayer Protocol (2)
  • CSMACD efficiency
  • Ethernet Performance
  • 8023 Ethernet Standards Link amp Physical Layers
  • Manchester encoding
  • Ethernet Cabling
  • Ethernet Cabling (2)
  • Ethernet Cabling (3)
  • 10BaseT and 100BaseT
  • 100Mbps Fast Ethernet
  • Fast Ethernet
  • Gbit Ethernet
  • Gigabit Ethernet
  • Wireless Link Characteristics
  • Wireless network characteristics
  • IEEE 80211 Wireless LAN
  • Slide 31
  • 80211 LAN architecture
  • 80211 Channels association
  • IEEE 80211 multiple access
  • IEEE 80211 MAC Protocol CSMACA
  • Avoiding collisions (more)
  • Collision Avoidance RTS-CTS exchange
  • Slide 38
  • Slide 39
  • Hubs
  • Interconnecting with hubs
  • Inter - Networking
  • Learning Bridges
  • Spanning Tree Algorithm
  • Algorithm Overview
  • Algorithm Details
  • Algorithm Detail (cont)
  • Broadcast and Multicast
  • Limitations of Bridges
  • Switch
  • Switch allows multiple simultaneous transmissions
  • Switch Table
  • Switch self-learning
  • Forwarding
  • Self learning
  • Self-learning forwarding example
  • FilteringForwarding
  • Switch example
  • Slide 59
  • Switch traffic isolation
  • Switches dedicated access
  • More on Switches
  • Institutional network
  • Switches vs Routers
  • Summary comparison
  • IEEE 802 Standards
Page 55: Chapter 5B

5 DataLink Layer 5-55

Self learning

A switch has a switch table entry in switch table

(MAC Address Interface Time Stamp) stale entries in table dropped (TTL can be 60

min) switch learns which hosts can be reached through

which interfaces when frame received switch ldquolearnsrdquo location

of sender incoming LAN segment records senderlocation pair in switch table

5 DataLink Layer 5-56

Self-learning forwarding example

A

Arsquo

B

Brsquo

C

Crsquo

1 23

45

6

A Arsquo

Source ADest Arsquo

MAC addr interface TTL

Switch table (initially empty)

A 1 60

A ArsquoA ArsquoA ArsquoA ArsquoA Arsquo

frame destination unknownflood

Arsquo A

destination A location known

Arsquo 4 60

selective send

5 DataLink Layer 5-57

FilteringForwardingWhen switch receives a frame

index switch table using MAC dest addressif entry found for destination

then if dest on segment from which frame arrived

then drop the frame else forward the frame on interface indicated else flood

forward on all but the interface on which the frame arrived

5 DataLink Layer 5-58

Switch example

Suppose C sends frame to D

Switch receives frame from from C notes in bridge table that C is on interface 1 because D is not in table switch forwards frame into

interfaces 2 and 3

frame received by D

hub

hub hub

switch

A

B CD

EF

G H

I

address interface

ABEG

1123

12 3

5 DataLink Layer 5-59

Switch example

Suppose D replies back with frame to C

Switch receives frame from from D notes in bridge table that D is on interface 2 because C is in table switch forwards frame only to

interface 1

frame received by C

hub

hub hub

switch

A

B CD

EF

G H

I

address interface

ABEGC

11231

5 DataLink Layer 5-60

Switch traffic isolation switch installation breaks subnet into LAN

segments switch filters packets

same-LAN-segment frames not usually forwarded onto other LAN segments

segments become separate collision domains

hub hub hub

switch

collision domain collision domain

collision domain

5 DataLink Layer 5-61

Switches dedicated access Switch with many

interfaces Hosts have direct

connection to switch No collisions full duplex

Switching A-to-Arsquo and B-to-Brsquo simultaneously no collisions

switch

A

Arsquo

B

Brsquo

C

Crsquo

5 DataLink Layer 5-62

More on Switches

cut-through switching frame forwarded from input to output port without first collecting entire frameslight reduction in latency

combinations of shareddedicated 101001000 Mbps interfaces

5 DataLink Layer 5-63

Institutional network

hub

hubhub

switch

to externalnetwork

router

IP subnet

mail server

web server

5 DataLink Layer 5-64

Switches vs Routers both store-and-forward devices

routers network layer devices (examine network layer headers) switches are link layer devices

routers maintain routing tables implement routing algorithms

switches maintain switch tables implement filtering learning algorithms

5 DataLink Layer 5-65

Summary comparison

hubs routers switches

traffi c isolation

no yes yes

plug amp play yes no yes

optimal routing

no yes no

cut through

yes no yes

5 DataLink Layer 5-66

IEEE 802 Standards

The 802 working groups The important ones are marked with The ones marked with are hibernating The one marked with dagger gave up

  • Slide 1
  • Link Layer
  • Ethernet
  • Slide 4
  • Star topology
  • Ethernet Frame Structure
  • Ethernet Frame Structure (more)
  • Unreliable connectionless service
  • Ethernet uses CSMACD
  • Ethernet CSMACD algorithm
  • Ethernetrsquos CSMACD (more)
  • Collision Detection
  • Algorithm (cont)
  • Binary Exponential Backoff
  • Ethernet MAC Sublayer Protocol (2)
  • CSMACD efficiency
  • Ethernet Performance
  • 8023 Ethernet Standards Link amp Physical Layers
  • Manchester encoding
  • Ethernet Cabling
  • Ethernet Cabling (2)
  • Ethernet Cabling (3)
  • 10BaseT and 100BaseT
  • 100Mbps Fast Ethernet
  • Fast Ethernet
  • Gbit Ethernet
  • Gigabit Ethernet
  • Wireless Link Characteristics
  • Wireless network characteristics
  • IEEE 80211 Wireless LAN
  • Slide 31
  • 80211 LAN architecture
  • 80211 Channels association
  • IEEE 80211 multiple access
  • IEEE 80211 MAC Protocol CSMACA
  • Avoiding collisions (more)
  • Collision Avoidance RTS-CTS exchange
  • Slide 38
  • Slide 39
  • Hubs
  • Interconnecting with hubs
  • Inter - Networking
  • Learning Bridges
  • Spanning Tree Algorithm
  • Algorithm Overview
  • Algorithm Details
  • Algorithm Detail (cont)
  • Broadcast and Multicast
  • Limitations of Bridges
  • Switch
  • Switch allows multiple simultaneous transmissions
  • Switch Table
  • Switch self-learning
  • Forwarding
  • Self learning
  • Self-learning forwarding example
  • FilteringForwarding
  • Switch example
  • Slide 59
  • Switch traffic isolation
  • Switches dedicated access
  • More on Switches
  • Institutional network
  • Switches vs Routers
  • Summary comparison
  • IEEE 802 Standards
Page 56: Chapter 5B

5 DataLink Layer 5-56

Self-learning forwarding example

A

Arsquo

B

Brsquo

C

Crsquo

1 23

45

6

A Arsquo

Source ADest Arsquo

MAC addr interface TTL

Switch table (initially empty)

A 1 60

A ArsquoA ArsquoA ArsquoA ArsquoA Arsquo

frame destination unknownflood

Arsquo A

destination A location known

Arsquo 4 60

selective send

5 DataLink Layer 5-57

FilteringForwardingWhen switch receives a frame

index switch table using MAC dest addressif entry found for destination

then if dest on segment from which frame arrived

then drop the frame else forward the frame on interface indicated else flood

forward on all but the interface on which the frame arrived

5 DataLink Layer 5-58

Switch example

Suppose C sends frame to D

Switch receives frame from from C notes in bridge table that C is on interface 1 because D is not in table switch forwards frame into

interfaces 2 and 3

frame received by D

hub

hub hub

switch

A

B CD

EF

G H

I

address interface

ABEG

1123

12 3

5 DataLink Layer 5-59

Switch example

Suppose D replies back with frame to C

Switch receives frame from from D notes in bridge table that D is on interface 2 because C is in table switch forwards frame only to

interface 1

frame received by C

hub

hub hub

switch

A

B CD

EF

G H

I

address interface

ABEGC

11231

5 DataLink Layer 5-60

Switch traffic isolation switch installation breaks subnet into LAN

segments switch filters packets

same-LAN-segment frames not usually forwarded onto other LAN segments

segments become separate collision domains

hub hub hub

switch

collision domain collision domain

collision domain

5 DataLink Layer 5-61

Switches dedicated access Switch with many

interfaces Hosts have direct

connection to switch No collisions full duplex

Switching A-to-Arsquo and B-to-Brsquo simultaneously no collisions

switch

A

Arsquo

B

Brsquo

C

Crsquo

5 DataLink Layer 5-62

More on Switches

cut-through switching frame forwarded from input to output port without first collecting entire frameslight reduction in latency

combinations of shareddedicated 101001000 Mbps interfaces

5 DataLink Layer 5-63

Institutional network

hub

hubhub

switch

to externalnetwork

router

IP subnet

mail server

web server

5 DataLink Layer 5-64

Switches vs Routers both store-and-forward devices

routers network layer devices (examine network layer headers) switches are link layer devices

routers maintain routing tables implement routing algorithms

switches maintain switch tables implement filtering learning algorithms

5 DataLink Layer 5-65

Summary comparison

hubs routers switches

traffi c isolation

no yes yes

plug amp play yes no yes

optimal routing

no yes no

cut through

yes no yes

5 DataLink Layer 5-66

IEEE 802 Standards

The 802 working groups The important ones are marked with The ones marked with are hibernating The one marked with dagger gave up

  • Slide 1
  • Link Layer
  • Ethernet
  • Slide 4
  • Star topology
  • Ethernet Frame Structure
  • Ethernet Frame Structure (more)
  • Unreliable connectionless service
  • Ethernet uses CSMACD
  • Ethernet CSMACD algorithm
  • Ethernetrsquos CSMACD (more)
  • Collision Detection
  • Algorithm (cont)
  • Binary Exponential Backoff
  • Ethernet MAC Sublayer Protocol (2)
  • CSMACD efficiency
  • Ethernet Performance
  • 8023 Ethernet Standards Link amp Physical Layers
  • Manchester encoding
  • Ethernet Cabling
  • Ethernet Cabling (2)
  • Ethernet Cabling (3)
  • 10BaseT and 100BaseT
  • 100Mbps Fast Ethernet
  • Fast Ethernet
  • Gbit Ethernet
  • Gigabit Ethernet
  • Wireless Link Characteristics
  • Wireless network characteristics
  • IEEE 80211 Wireless LAN
  • Slide 31
  • 80211 LAN architecture
  • 80211 Channels association
  • IEEE 80211 multiple access
  • IEEE 80211 MAC Protocol CSMACA
  • Avoiding collisions (more)
  • Collision Avoidance RTS-CTS exchange
  • Slide 38
  • Slide 39
  • Hubs
  • Interconnecting with hubs
  • Inter - Networking
  • Learning Bridges
  • Spanning Tree Algorithm
  • Algorithm Overview
  • Algorithm Details
  • Algorithm Detail (cont)
  • Broadcast and Multicast
  • Limitations of Bridges
  • Switch
  • Switch allows multiple simultaneous transmissions
  • Switch Table
  • Switch self-learning
  • Forwarding
  • Self learning
  • Self-learning forwarding example
  • FilteringForwarding
  • Switch example
  • Slide 59
  • Switch traffic isolation
  • Switches dedicated access
  • More on Switches
  • Institutional network
  • Switches vs Routers
  • Summary comparison
  • IEEE 802 Standards
Page 57: Chapter 5B

5 DataLink Layer 5-57

FilteringForwardingWhen switch receives a frame

index switch table using MAC dest addressif entry found for destination

then if dest on segment from which frame arrived

then drop the frame else forward the frame on interface indicated else flood

forward on all but the interface on which the frame arrived

5 DataLink Layer 5-58

Switch example

Suppose C sends frame to D

Switch receives frame from from C notes in bridge table that C is on interface 1 because D is not in table switch forwards frame into

interfaces 2 and 3

frame received by D

hub

hub hub

switch

A

B CD

EF

G H

I

address interface

ABEG

1123

12 3

5 DataLink Layer 5-59

Switch example

Suppose D replies back with frame to C

Switch receives frame from from D notes in bridge table that D is on interface 2 because C is in table switch forwards frame only to

interface 1

frame received by C

hub

hub hub

switch

A

B CD

EF

G H

I

address interface

ABEGC

11231

5 DataLink Layer 5-60

Switch traffic isolation switch installation breaks subnet into LAN

segments switch filters packets

same-LAN-segment frames not usually forwarded onto other LAN segments

segments become separate collision domains

hub hub hub

switch

collision domain collision domain

collision domain

5 DataLink Layer 5-61

Switches dedicated access Switch with many

interfaces Hosts have direct

connection to switch No collisions full duplex

Switching A-to-Arsquo and B-to-Brsquo simultaneously no collisions

switch

A

Arsquo

B

Brsquo

C

Crsquo

5 DataLink Layer 5-62

More on Switches

cut-through switching frame forwarded from input to output port without first collecting entire frameslight reduction in latency

combinations of shareddedicated 101001000 Mbps interfaces

5 DataLink Layer 5-63

Institutional network

hub

hubhub

switch

to externalnetwork

router

IP subnet

mail server

web server

5 DataLink Layer 5-64

Switches vs Routers both store-and-forward devices

routers network layer devices (examine network layer headers) switches are link layer devices

routers maintain routing tables implement routing algorithms

switches maintain switch tables implement filtering learning algorithms

5 DataLink Layer 5-65

Summary comparison

hubs routers switches

traffi c isolation

no yes yes

plug amp play yes no yes

optimal routing

no yes no

cut through

yes no yes

5 DataLink Layer 5-66

IEEE 802 Standards

The 802 working groups The important ones are marked with The ones marked with are hibernating The one marked with dagger gave up

  • Slide 1
  • Link Layer
  • Ethernet
  • Slide 4
  • Star topology
  • Ethernet Frame Structure
  • Ethernet Frame Structure (more)
  • Unreliable connectionless service
  • Ethernet uses CSMACD
  • Ethernet CSMACD algorithm
  • Ethernetrsquos CSMACD (more)
  • Collision Detection
  • Algorithm (cont)
  • Binary Exponential Backoff
  • Ethernet MAC Sublayer Protocol (2)
  • CSMACD efficiency
  • Ethernet Performance
  • 8023 Ethernet Standards Link amp Physical Layers
  • Manchester encoding
  • Ethernet Cabling
  • Ethernet Cabling (2)
  • Ethernet Cabling (3)
  • 10BaseT and 100BaseT
  • 100Mbps Fast Ethernet
  • Fast Ethernet
  • Gbit Ethernet
  • Gigabit Ethernet
  • Wireless Link Characteristics
  • Wireless network characteristics
  • IEEE 80211 Wireless LAN
  • Slide 31
  • 80211 LAN architecture
  • 80211 Channels association
  • IEEE 80211 multiple access
  • IEEE 80211 MAC Protocol CSMACA
  • Avoiding collisions (more)
  • Collision Avoidance RTS-CTS exchange
  • Slide 38
  • Slide 39
  • Hubs
  • Interconnecting with hubs
  • Inter - Networking
  • Learning Bridges
  • Spanning Tree Algorithm
  • Algorithm Overview
  • Algorithm Details
  • Algorithm Detail (cont)
  • Broadcast and Multicast
  • Limitations of Bridges
  • Switch
  • Switch allows multiple simultaneous transmissions
  • Switch Table
  • Switch self-learning
  • Forwarding
  • Self learning
  • Self-learning forwarding example
  • FilteringForwarding
  • Switch example
  • Slide 59
  • Switch traffic isolation
  • Switches dedicated access
  • More on Switches
  • Institutional network
  • Switches vs Routers
  • Summary comparison
  • IEEE 802 Standards
Page 58: Chapter 5B

5 DataLink Layer 5-58

Switch example

Suppose C sends frame to D

Switch receives frame from from C notes in bridge table that C is on interface 1 because D is not in table switch forwards frame into

interfaces 2 and 3

frame received by D

hub

hub hub

switch

A

B CD

EF

G H

I

address interface

ABEG

1123

12 3

5 DataLink Layer 5-59

Switch example

Suppose D replies back with frame to C

Switch receives frame from from D notes in bridge table that D is on interface 2 because C is in table switch forwards frame only to

interface 1

frame received by C

hub

hub hub

switch

A

B CD

EF

G H

I

address interface

ABEGC

11231

5 DataLink Layer 5-60

Switch traffic isolation switch installation breaks subnet into LAN

segments switch filters packets

same-LAN-segment frames not usually forwarded onto other LAN segments

segments become separate collision domains

hub hub hub

switch

collision domain collision domain

collision domain

5 DataLink Layer 5-61

Switches dedicated access Switch with many

interfaces Hosts have direct

connection to switch No collisions full duplex

Switching A-to-Arsquo and B-to-Brsquo simultaneously no collisions

switch

A

Arsquo

B

Brsquo

C

Crsquo

5 DataLink Layer 5-62

More on Switches

cut-through switching frame forwarded from input to output port without first collecting entire frameslight reduction in latency

combinations of shareddedicated 101001000 Mbps interfaces

5 DataLink Layer 5-63

Institutional network

hub

hubhub

switch

to externalnetwork

router

IP subnet

mail server

web server

5 DataLink Layer 5-64

Switches vs Routers both store-and-forward devices

routers network layer devices (examine network layer headers) switches are link layer devices

routers maintain routing tables implement routing algorithms

switches maintain switch tables implement filtering learning algorithms

5 DataLink Layer 5-65

Summary comparison

hubs routers switches

traffi c isolation

no yes yes

plug amp play yes no yes

optimal routing

no yes no

cut through

yes no yes

5 DataLink Layer 5-66

IEEE 802 Standards

The 802 working groups The important ones are marked with The ones marked with are hibernating The one marked with dagger gave up

  • Slide 1
  • Link Layer
  • Ethernet
  • Slide 4
  • Star topology
  • Ethernet Frame Structure
  • Ethernet Frame Structure (more)
  • Unreliable connectionless service
  • Ethernet uses CSMACD
  • Ethernet CSMACD algorithm
  • Ethernetrsquos CSMACD (more)
  • Collision Detection
  • Algorithm (cont)
  • Binary Exponential Backoff
  • Ethernet MAC Sublayer Protocol (2)
  • CSMACD efficiency
  • Ethernet Performance
  • 8023 Ethernet Standards Link amp Physical Layers
  • Manchester encoding
  • Ethernet Cabling
  • Ethernet Cabling (2)
  • Ethernet Cabling (3)
  • 10BaseT and 100BaseT
  • 100Mbps Fast Ethernet
  • Fast Ethernet
  • Gbit Ethernet
  • Gigabit Ethernet
  • Wireless Link Characteristics
  • Wireless network characteristics
  • IEEE 80211 Wireless LAN
  • Slide 31
  • 80211 LAN architecture
  • 80211 Channels association
  • IEEE 80211 multiple access
  • IEEE 80211 MAC Protocol CSMACA
  • Avoiding collisions (more)
  • Collision Avoidance RTS-CTS exchange
  • Slide 38
  • Slide 39
  • Hubs
  • Interconnecting with hubs
  • Inter - Networking
  • Learning Bridges
  • Spanning Tree Algorithm
  • Algorithm Overview
  • Algorithm Details
  • Algorithm Detail (cont)
  • Broadcast and Multicast
  • Limitations of Bridges
  • Switch
  • Switch allows multiple simultaneous transmissions
  • Switch Table
  • Switch self-learning
  • Forwarding
  • Self learning
  • Self-learning forwarding example
  • FilteringForwarding
  • Switch example
  • Slide 59
  • Switch traffic isolation
  • Switches dedicated access
  • More on Switches
  • Institutional network
  • Switches vs Routers
  • Summary comparison
  • IEEE 802 Standards
Page 59: Chapter 5B

5 DataLink Layer 5-59

Switch example

Suppose D replies back with frame to C

Switch receives frame from from D notes in bridge table that D is on interface 2 because C is in table switch forwards frame only to

interface 1

frame received by C

hub

hub hub

switch

A

B CD

EF

G H

I

address interface

ABEGC

11231

5 DataLink Layer 5-60

Switch traffic isolation switch installation breaks subnet into LAN

segments switch filters packets

same-LAN-segment frames not usually forwarded onto other LAN segments

segments become separate collision domains

hub hub hub

switch

collision domain collision domain

collision domain

5 DataLink Layer 5-61

Switches dedicated access Switch with many

interfaces Hosts have direct

connection to switch No collisions full duplex

Switching A-to-Arsquo and B-to-Brsquo simultaneously no collisions

switch

A

Arsquo

B

Brsquo

C

Crsquo

5 DataLink Layer 5-62

More on Switches

cut-through switching frame forwarded from input to output port without first collecting entire frameslight reduction in latency

combinations of shareddedicated 101001000 Mbps interfaces

5 DataLink Layer 5-63

Institutional network

hub

hubhub

switch

to externalnetwork

router

IP subnet

mail server

web server

5 DataLink Layer 5-64

Switches vs Routers both store-and-forward devices

routers network layer devices (examine network layer headers) switches are link layer devices

routers maintain routing tables implement routing algorithms

switches maintain switch tables implement filtering learning algorithms

5 DataLink Layer 5-65

Summary comparison

hubs routers switches

traffi c isolation

no yes yes

plug amp play yes no yes

optimal routing

no yes no

cut through

yes no yes

5 DataLink Layer 5-66

IEEE 802 Standards

The 802 working groups The important ones are marked with The ones marked with are hibernating The one marked with dagger gave up

  • Slide 1
  • Link Layer
  • Ethernet
  • Slide 4
  • Star topology
  • Ethernet Frame Structure
  • Ethernet Frame Structure (more)
  • Unreliable connectionless service
  • Ethernet uses CSMACD
  • Ethernet CSMACD algorithm
  • Ethernetrsquos CSMACD (more)
  • Collision Detection
  • Algorithm (cont)
  • Binary Exponential Backoff
  • Ethernet MAC Sublayer Protocol (2)
  • CSMACD efficiency
  • Ethernet Performance
  • 8023 Ethernet Standards Link amp Physical Layers
  • Manchester encoding
  • Ethernet Cabling
  • Ethernet Cabling (2)
  • Ethernet Cabling (3)
  • 10BaseT and 100BaseT
  • 100Mbps Fast Ethernet
  • Fast Ethernet
  • Gbit Ethernet
  • Gigabit Ethernet
  • Wireless Link Characteristics
  • Wireless network characteristics
  • IEEE 80211 Wireless LAN
  • Slide 31
  • 80211 LAN architecture
  • 80211 Channels association
  • IEEE 80211 multiple access
  • IEEE 80211 MAC Protocol CSMACA
  • Avoiding collisions (more)
  • Collision Avoidance RTS-CTS exchange
  • Slide 38
  • Slide 39
  • Hubs
  • Interconnecting with hubs
  • Inter - Networking
  • Learning Bridges
  • Spanning Tree Algorithm
  • Algorithm Overview
  • Algorithm Details
  • Algorithm Detail (cont)
  • Broadcast and Multicast
  • Limitations of Bridges
  • Switch
  • Switch allows multiple simultaneous transmissions
  • Switch Table
  • Switch self-learning
  • Forwarding
  • Self learning
  • Self-learning forwarding example
  • FilteringForwarding
  • Switch example
  • Slide 59
  • Switch traffic isolation
  • Switches dedicated access
  • More on Switches
  • Institutional network
  • Switches vs Routers
  • Summary comparison
  • IEEE 802 Standards
Page 60: Chapter 5B

5 DataLink Layer 5-60

Switch traffic isolation switch installation breaks subnet into LAN

segments switch filters packets

same-LAN-segment frames not usually forwarded onto other LAN segments

segments become separate collision domains

hub hub hub

switch

collision domain collision domain

collision domain

5 DataLink Layer 5-61

Switches dedicated access Switch with many

interfaces Hosts have direct

connection to switch No collisions full duplex

Switching A-to-Arsquo and B-to-Brsquo simultaneously no collisions

switch

A

Arsquo

B

Brsquo

C

Crsquo

5 DataLink Layer 5-62

More on Switches

cut-through switching frame forwarded from input to output port without first collecting entire frameslight reduction in latency

combinations of shareddedicated 101001000 Mbps interfaces

5 DataLink Layer 5-63

Institutional network

hub

hubhub

switch

to externalnetwork

router

IP subnet

mail server

web server

5 DataLink Layer 5-64

Switches vs Routers both store-and-forward devices

routers network layer devices (examine network layer headers) switches are link layer devices

routers maintain routing tables implement routing algorithms

switches maintain switch tables implement filtering learning algorithms

5 DataLink Layer 5-65

Summary comparison

hubs routers switches

traffi c isolation

no yes yes

plug amp play yes no yes

optimal routing

no yes no

cut through

yes no yes

5 DataLink Layer 5-66

IEEE 802 Standards

The 802 working groups The important ones are marked with The ones marked with are hibernating The one marked with dagger gave up

  • Slide 1
  • Link Layer
  • Ethernet
  • Slide 4
  • Star topology
  • Ethernet Frame Structure
  • Ethernet Frame Structure (more)
  • Unreliable connectionless service
  • Ethernet uses CSMACD
  • Ethernet CSMACD algorithm
  • Ethernetrsquos CSMACD (more)
  • Collision Detection
  • Algorithm (cont)
  • Binary Exponential Backoff
  • Ethernet MAC Sublayer Protocol (2)
  • CSMACD efficiency
  • Ethernet Performance
  • 8023 Ethernet Standards Link amp Physical Layers
  • Manchester encoding
  • Ethernet Cabling
  • Ethernet Cabling (2)
  • Ethernet Cabling (3)
  • 10BaseT and 100BaseT
  • 100Mbps Fast Ethernet
  • Fast Ethernet
  • Gbit Ethernet
  • Gigabit Ethernet
  • Wireless Link Characteristics
  • Wireless network characteristics
  • IEEE 80211 Wireless LAN
  • Slide 31
  • 80211 LAN architecture
  • 80211 Channels association
  • IEEE 80211 multiple access
  • IEEE 80211 MAC Protocol CSMACA
  • Avoiding collisions (more)
  • Collision Avoidance RTS-CTS exchange
  • Slide 38
  • Slide 39
  • Hubs
  • Interconnecting with hubs
  • Inter - Networking
  • Learning Bridges
  • Spanning Tree Algorithm
  • Algorithm Overview
  • Algorithm Details
  • Algorithm Detail (cont)
  • Broadcast and Multicast
  • Limitations of Bridges
  • Switch
  • Switch allows multiple simultaneous transmissions
  • Switch Table
  • Switch self-learning
  • Forwarding
  • Self learning
  • Self-learning forwarding example
  • FilteringForwarding
  • Switch example
  • Slide 59
  • Switch traffic isolation
  • Switches dedicated access
  • More on Switches
  • Institutional network
  • Switches vs Routers
  • Summary comparison
  • IEEE 802 Standards
Page 61: Chapter 5B

5 DataLink Layer 5-61

Switches dedicated access Switch with many

interfaces Hosts have direct

connection to switch No collisions full duplex

Switching A-to-Arsquo and B-to-Brsquo simultaneously no collisions

switch

A

Arsquo

B

Brsquo

C

Crsquo

5 DataLink Layer 5-62

More on Switches

cut-through switching frame forwarded from input to output port without first collecting entire frameslight reduction in latency

combinations of shareddedicated 101001000 Mbps interfaces

5 DataLink Layer 5-63

Institutional network

hub

hubhub

switch

to externalnetwork

router

IP subnet

mail server

web server

5 DataLink Layer 5-64

Switches vs Routers both store-and-forward devices

routers network layer devices (examine network layer headers) switches are link layer devices

routers maintain routing tables implement routing algorithms

switches maintain switch tables implement filtering learning algorithms

5 DataLink Layer 5-65

Summary comparison

hubs routers switches

traffi c isolation

no yes yes

plug amp play yes no yes

optimal routing

no yes no

cut through

yes no yes

5 DataLink Layer 5-66

IEEE 802 Standards

The 802 working groups The important ones are marked with The ones marked with are hibernating The one marked with dagger gave up

  • Slide 1
  • Link Layer
  • Ethernet
  • Slide 4
  • Star topology
  • Ethernet Frame Structure
  • Ethernet Frame Structure (more)
  • Unreliable connectionless service
  • Ethernet uses CSMACD
  • Ethernet CSMACD algorithm
  • Ethernetrsquos CSMACD (more)
  • Collision Detection
  • Algorithm (cont)
  • Binary Exponential Backoff
  • Ethernet MAC Sublayer Protocol (2)
  • CSMACD efficiency
  • Ethernet Performance
  • 8023 Ethernet Standards Link amp Physical Layers
  • Manchester encoding
  • Ethernet Cabling
  • Ethernet Cabling (2)
  • Ethernet Cabling (3)
  • 10BaseT and 100BaseT
  • 100Mbps Fast Ethernet
  • Fast Ethernet
  • Gbit Ethernet
  • Gigabit Ethernet
  • Wireless Link Characteristics
  • Wireless network characteristics
  • IEEE 80211 Wireless LAN
  • Slide 31
  • 80211 LAN architecture
  • 80211 Channels association
  • IEEE 80211 multiple access
  • IEEE 80211 MAC Protocol CSMACA
  • Avoiding collisions (more)
  • Collision Avoidance RTS-CTS exchange
  • Slide 38
  • Slide 39
  • Hubs
  • Interconnecting with hubs
  • Inter - Networking
  • Learning Bridges
  • Spanning Tree Algorithm
  • Algorithm Overview
  • Algorithm Details
  • Algorithm Detail (cont)
  • Broadcast and Multicast
  • Limitations of Bridges
  • Switch
  • Switch allows multiple simultaneous transmissions
  • Switch Table
  • Switch self-learning
  • Forwarding
  • Self learning
  • Self-learning forwarding example
  • FilteringForwarding
  • Switch example
  • Slide 59
  • Switch traffic isolation
  • Switches dedicated access
  • More on Switches
  • Institutional network
  • Switches vs Routers
  • Summary comparison
  • IEEE 802 Standards
Page 62: Chapter 5B

5 DataLink Layer 5-62

More on Switches

cut-through switching frame forwarded from input to output port without first collecting entire frameslight reduction in latency

combinations of shareddedicated 101001000 Mbps interfaces

5 DataLink Layer 5-63

Institutional network

hub

hubhub

switch

to externalnetwork

router

IP subnet

mail server

web server

5 DataLink Layer 5-64

Switches vs Routers both store-and-forward devices

routers network layer devices (examine network layer headers) switches are link layer devices

routers maintain routing tables implement routing algorithms

switches maintain switch tables implement filtering learning algorithms

5 DataLink Layer 5-65

Summary comparison

hubs routers switches

traffi c isolation

no yes yes

plug amp play yes no yes

optimal routing

no yes no

cut through

yes no yes

5 DataLink Layer 5-66

IEEE 802 Standards

The 802 working groups The important ones are marked with The ones marked with are hibernating The one marked with dagger gave up

  • Slide 1
  • Link Layer
  • Ethernet
  • Slide 4
  • Star topology
  • Ethernet Frame Structure
  • Ethernet Frame Structure (more)
  • Unreliable connectionless service
  • Ethernet uses CSMACD
  • Ethernet CSMACD algorithm
  • Ethernetrsquos CSMACD (more)
  • Collision Detection
  • Algorithm (cont)
  • Binary Exponential Backoff
  • Ethernet MAC Sublayer Protocol (2)
  • CSMACD efficiency
  • Ethernet Performance
  • 8023 Ethernet Standards Link amp Physical Layers
  • Manchester encoding
  • Ethernet Cabling
  • Ethernet Cabling (2)
  • Ethernet Cabling (3)
  • 10BaseT and 100BaseT
  • 100Mbps Fast Ethernet
  • Fast Ethernet
  • Gbit Ethernet
  • Gigabit Ethernet
  • Wireless Link Characteristics
  • Wireless network characteristics
  • IEEE 80211 Wireless LAN
  • Slide 31
  • 80211 LAN architecture
  • 80211 Channels association
  • IEEE 80211 multiple access
  • IEEE 80211 MAC Protocol CSMACA
  • Avoiding collisions (more)
  • Collision Avoidance RTS-CTS exchange
  • Slide 38
  • Slide 39
  • Hubs
  • Interconnecting with hubs
  • Inter - Networking
  • Learning Bridges
  • Spanning Tree Algorithm
  • Algorithm Overview
  • Algorithm Details
  • Algorithm Detail (cont)
  • Broadcast and Multicast
  • Limitations of Bridges
  • Switch
  • Switch allows multiple simultaneous transmissions
  • Switch Table
  • Switch self-learning
  • Forwarding
  • Self learning
  • Self-learning forwarding example
  • FilteringForwarding
  • Switch example
  • Slide 59
  • Switch traffic isolation
  • Switches dedicated access
  • More on Switches
  • Institutional network
  • Switches vs Routers
  • Summary comparison
  • IEEE 802 Standards
Page 63: Chapter 5B

5 DataLink Layer 5-63

Institutional network

hub

hubhub

switch

to externalnetwork

router

IP subnet

mail server

web server

5 DataLink Layer 5-64

Switches vs Routers both store-and-forward devices

routers network layer devices (examine network layer headers) switches are link layer devices

routers maintain routing tables implement routing algorithms

switches maintain switch tables implement filtering learning algorithms

5 DataLink Layer 5-65

Summary comparison

hubs routers switches

traffi c isolation

no yes yes

plug amp play yes no yes

optimal routing

no yes no

cut through

yes no yes

5 DataLink Layer 5-66

IEEE 802 Standards

The 802 working groups The important ones are marked with The ones marked with are hibernating The one marked with dagger gave up

  • Slide 1
  • Link Layer
  • Ethernet
  • Slide 4
  • Star topology
  • Ethernet Frame Structure
  • Ethernet Frame Structure (more)
  • Unreliable connectionless service
  • Ethernet uses CSMACD
  • Ethernet CSMACD algorithm
  • Ethernetrsquos CSMACD (more)
  • Collision Detection
  • Algorithm (cont)
  • Binary Exponential Backoff
  • Ethernet MAC Sublayer Protocol (2)
  • CSMACD efficiency
  • Ethernet Performance
  • 8023 Ethernet Standards Link amp Physical Layers
  • Manchester encoding
  • Ethernet Cabling
  • Ethernet Cabling (2)
  • Ethernet Cabling (3)
  • 10BaseT and 100BaseT
  • 100Mbps Fast Ethernet
  • Fast Ethernet
  • Gbit Ethernet
  • Gigabit Ethernet
  • Wireless Link Characteristics
  • Wireless network characteristics
  • IEEE 80211 Wireless LAN
  • Slide 31
  • 80211 LAN architecture
  • 80211 Channels association
  • IEEE 80211 multiple access
  • IEEE 80211 MAC Protocol CSMACA
  • Avoiding collisions (more)
  • Collision Avoidance RTS-CTS exchange
  • Slide 38
  • Slide 39
  • Hubs
  • Interconnecting with hubs
  • Inter - Networking
  • Learning Bridges
  • Spanning Tree Algorithm
  • Algorithm Overview
  • Algorithm Details
  • Algorithm Detail (cont)
  • Broadcast and Multicast
  • Limitations of Bridges
  • Switch
  • Switch allows multiple simultaneous transmissions
  • Switch Table
  • Switch self-learning
  • Forwarding
  • Self learning
  • Self-learning forwarding example
  • FilteringForwarding
  • Switch example
  • Slide 59
  • Switch traffic isolation
  • Switches dedicated access
  • More on Switches
  • Institutional network
  • Switches vs Routers
  • Summary comparison
  • IEEE 802 Standards
Page 64: Chapter 5B

5 DataLink Layer 5-64

Switches vs Routers both store-and-forward devices

routers network layer devices (examine network layer headers) switches are link layer devices

routers maintain routing tables implement routing algorithms

switches maintain switch tables implement filtering learning algorithms

5 DataLink Layer 5-65

Summary comparison

hubs routers switches

traffi c isolation

no yes yes

plug amp play yes no yes

optimal routing

no yes no

cut through

yes no yes

5 DataLink Layer 5-66

IEEE 802 Standards

The 802 working groups The important ones are marked with The ones marked with are hibernating The one marked with dagger gave up

  • Slide 1
  • Link Layer
  • Ethernet
  • Slide 4
  • Star topology
  • Ethernet Frame Structure
  • Ethernet Frame Structure (more)
  • Unreliable connectionless service
  • Ethernet uses CSMACD
  • Ethernet CSMACD algorithm
  • Ethernetrsquos CSMACD (more)
  • Collision Detection
  • Algorithm (cont)
  • Binary Exponential Backoff
  • Ethernet MAC Sublayer Protocol (2)
  • CSMACD efficiency
  • Ethernet Performance
  • 8023 Ethernet Standards Link amp Physical Layers
  • Manchester encoding
  • Ethernet Cabling
  • Ethernet Cabling (2)
  • Ethernet Cabling (3)
  • 10BaseT and 100BaseT
  • 100Mbps Fast Ethernet
  • Fast Ethernet
  • Gbit Ethernet
  • Gigabit Ethernet
  • Wireless Link Characteristics
  • Wireless network characteristics
  • IEEE 80211 Wireless LAN
  • Slide 31
  • 80211 LAN architecture
  • 80211 Channels association
  • IEEE 80211 multiple access
  • IEEE 80211 MAC Protocol CSMACA
  • Avoiding collisions (more)
  • Collision Avoidance RTS-CTS exchange
  • Slide 38
  • Slide 39
  • Hubs
  • Interconnecting with hubs
  • Inter - Networking
  • Learning Bridges
  • Spanning Tree Algorithm
  • Algorithm Overview
  • Algorithm Details
  • Algorithm Detail (cont)
  • Broadcast and Multicast
  • Limitations of Bridges
  • Switch
  • Switch allows multiple simultaneous transmissions
  • Switch Table
  • Switch self-learning
  • Forwarding
  • Self learning
  • Self-learning forwarding example
  • FilteringForwarding
  • Switch example
  • Slide 59
  • Switch traffic isolation
  • Switches dedicated access
  • More on Switches
  • Institutional network
  • Switches vs Routers
  • Summary comparison
  • IEEE 802 Standards
Page 65: Chapter 5B

5 DataLink Layer 5-65

Summary comparison

hubs routers switches

traffi c isolation

no yes yes

plug amp play yes no yes

optimal routing

no yes no

cut through

yes no yes

5 DataLink Layer 5-66

IEEE 802 Standards

The 802 working groups The important ones are marked with The ones marked with are hibernating The one marked with dagger gave up

  • Slide 1
  • Link Layer
  • Ethernet
  • Slide 4
  • Star topology
  • Ethernet Frame Structure
  • Ethernet Frame Structure (more)
  • Unreliable connectionless service
  • Ethernet uses CSMACD
  • Ethernet CSMACD algorithm
  • Ethernetrsquos CSMACD (more)
  • Collision Detection
  • Algorithm (cont)
  • Binary Exponential Backoff
  • Ethernet MAC Sublayer Protocol (2)
  • CSMACD efficiency
  • Ethernet Performance
  • 8023 Ethernet Standards Link amp Physical Layers
  • Manchester encoding
  • Ethernet Cabling
  • Ethernet Cabling (2)
  • Ethernet Cabling (3)
  • 10BaseT and 100BaseT
  • 100Mbps Fast Ethernet
  • Fast Ethernet
  • Gbit Ethernet
  • Gigabit Ethernet
  • Wireless Link Characteristics
  • Wireless network characteristics
  • IEEE 80211 Wireless LAN
  • Slide 31
  • 80211 LAN architecture
  • 80211 Channels association
  • IEEE 80211 multiple access
  • IEEE 80211 MAC Protocol CSMACA
  • Avoiding collisions (more)
  • Collision Avoidance RTS-CTS exchange
  • Slide 38
  • Slide 39
  • Hubs
  • Interconnecting with hubs
  • Inter - Networking
  • Learning Bridges
  • Spanning Tree Algorithm
  • Algorithm Overview
  • Algorithm Details
  • Algorithm Detail (cont)
  • Broadcast and Multicast
  • Limitations of Bridges
  • Switch
  • Switch allows multiple simultaneous transmissions
  • Switch Table
  • Switch self-learning
  • Forwarding
  • Self learning
  • Self-learning forwarding example
  • FilteringForwarding
  • Switch example
  • Slide 59
  • Switch traffic isolation
  • Switches dedicated access
  • More on Switches
  • Institutional network
  • Switches vs Routers
  • Summary comparison
  • IEEE 802 Standards
Page 66: Chapter 5B

5 DataLink Layer 5-66

IEEE 802 Standards

The 802 working groups The important ones are marked with The ones marked with are hibernating The one marked with dagger gave up

  • Slide 1
  • Link Layer
  • Ethernet
  • Slide 4
  • Star topology
  • Ethernet Frame Structure
  • Ethernet Frame Structure (more)
  • Unreliable connectionless service
  • Ethernet uses CSMACD
  • Ethernet CSMACD algorithm
  • Ethernetrsquos CSMACD (more)
  • Collision Detection
  • Algorithm (cont)
  • Binary Exponential Backoff
  • Ethernet MAC Sublayer Protocol (2)
  • CSMACD efficiency
  • Ethernet Performance
  • 8023 Ethernet Standards Link amp Physical Layers
  • Manchester encoding
  • Ethernet Cabling
  • Ethernet Cabling (2)
  • Ethernet Cabling (3)
  • 10BaseT and 100BaseT
  • 100Mbps Fast Ethernet
  • Fast Ethernet
  • Gbit Ethernet
  • Gigabit Ethernet
  • Wireless Link Characteristics
  • Wireless network characteristics
  • IEEE 80211 Wireless LAN
  • Slide 31
  • 80211 LAN architecture
  • 80211 Channels association
  • IEEE 80211 multiple access
  • IEEE 80211 MAC Protocol CSMACA
  • Avoiding collisions (more)
  • Collision Avoidance RTS-CTS exchange
  • Slide 38
  • Slide 39
  • Hubs
  • Interconnecting with hubs
  • Inter - Networking
  • Learning Bridges
  • Spanning Tree Algorithm
  • Algorithm Overview
  • Algorithm Details
  • Algorithm Detail (cont)
  • Broadcast and Multicast
  • Limitations of Bridges
  • Switch
  • Switch allows multiple simultaneous transmissions
  • Switch Table
  • Switch self-learning
  • Forwarding
  • Self learning
  • Self-learning forwarding example
  • FilteringForwarding
  • Switch example
  • Slide 59
  • Switch traffic isolation
  • Switches dedicated access
  • More on Switches
  • Institutional network
  • Switches vs Routers
  • Summary comparison
  • IEEE 802 Standards