Ethernet Backoff revisited Bridges and LAN Switches After N - - PDF document

ethernet backoff revisited bridges and lan switches
SMART_READER_LITE
LIVE PREVIEW

Ethernet Backoff revisited Bridges and LAN Switches After N - - PDF document

Ethernet Backoff revisited Bridges and LAN Switches After N collisions, pick a number k between 0 and 2 N -1 Wait for k*51.2 us Send frame if no one has started using the channel 9/20/06 CS/ECE 438 - UIUC, Fall 2006 1 9/20/06


slide-1
SLIDE 1

1

9/20/06 CS/ECE 438 - UIUC, Fall 2006 1

Bridges and LAN Switches

9/20/06 CS/ECE 438 - UIUC, Fall 2006 2

Ethernet Backoff revisited

 After N collisions, pick a number k

between 0 and 2N-1

 Wait for k*51.2 us  Send frame if no one has started

using the channel

9/20/06 CS/ECE 438 - UIUC, Fall 2006 3

Repeated Collisions

 Suppose A, B, and C each have a

frame to send, causing a collision

 A picks k=0, B and C pick k=1

 A wins, sends frame

 After A is done, B and C both try to

send again

 Collision again  Increase collision counter

9/20/06 CS/ECE 438 - UIUC, Fall 2006 4

Capture Effect

 A and B collide

A picks 0, B picks 1

A wins, transmits frame

 Suppose A has another frame to send

A and B collide again

A’s collision counter is 1, pick k from 0,1

B’s collision counter is 2, pick k from 0,1,2,3

 A is likely to win again

And keep winning!

9/20/06 CS/ECE 438 - UIUC, Fall 2006 5

Bridges: Building Extended LAN’s

Traditional LAN

Shared medium (e.g., Ethernet)

Cheap, easy to administer

Supports broadcast traffic

Problem

Scale LAN concept

Larger geographic area (> O(1 km))

More hosts (> O(100))

But retain LAN-like functionality

Solution

bridges

9/20/06 CS/ECE 438 - UIUC, Fall 2006 6

Bridges

Problem

LANs have physical limitations

Ethernet – 1500m 

Solution

Connect two or more LANs with a bridge

Accept and forward

Level 2 connection (no extra packet header)

A collection of LANs connected by bridges is called an extended LAN

slide-2
SLIDE 2

2

9/20/06 CS/ECE 438 - UIUC, Fall 2006 7

Bridges vs. Switches

 Switch

Receive frame on input port

Translate address to output port

Forward frame

 Bridge

Connect shared media

All ports bidirectional

Repeat subset of traffic

Receive frame on one port

Send on all other ports

9/20/06 CS/ECE 438 - UIUC, Fall 2006 8

Uses and Limitations of Bridges

 Bridges

extend LAN concept

Limited scalability

to O(1,000) hosts

not to global networks

Not heterogeneous

some use of address, but

no translation between frame formats

9/20/06 CS/ECE 438 - UIUC, Fall 2006 9

Bridges with Loops

 Problem

If there is a loop in the extended LAN, a packet could circulate forever

Side question: Are loops good or bad?  Solution

Select which bridges should actively forward

Create a spanning tree to eliminate unnecessary edges

Adds robustness

Complicates learning/forwarding

9/20/06 CS/ECE 438 - UIUC, Fall 2006 10

Example Extended LAN with LOOPS

B9 B4 B B7 B1 B5 B2 A K J I H G F E D C B

9/20/06 CS/ECE 438 - UIUC, Fall 2006 11

Spanning Tree Algorithm

 View extended LAN as bipartite graph

LAN’s are graph nodes

Bridges are also graph nodes

Ports are edges connecting LAN’s to bridges

 Spanning tree required

Connect all LAN’s

Can leave out bridges

9/20/06 CS/ECE 438 - UIUC, Fall 2006 12

Defining a Spanning Tree

 Basic Rules

Bridge with the lowest ID is the root

For a given bridge

A port in the direction of the root bridge is the root port

For a given LAN

The bridge closest to the root (or the bridge with the lowest ID to break ties) is the designated bridge for a LAN

The corresponding port is the designated port

Bridges with no designated ports and ports that are neither a root port nor a designated port are not part of the tree.

slide-3
SLIDE 3

3

9/20/06 CS/ECE 438 - UIUC, Fall 2006 13

Spanning Tree Algorithm

B9 B4 B B7 B1 B5 B2 B1 D D D D D A K J I H G F E D C B R R R R R D D D D D D

Root

D – designated port R – root port

9/20/06 CS/ECE 438 - UIUC, Fall 2006 14

Using a Spanning Tree: Forwarding

Forwarding

Each bridge forwards frames

  • ver each LAN for

which it is the designated bridge

  • r connected by a

root port

B4 B7 B1 B5 B2 B1 A K J I H G F E D C B

9/20/06 CS/ECE 438 - UIUC, Fall 2006 15

Using a Spanning Tree: Broadcast and Multicast

Forward all broadcast/ multicast frames

Learn when there are no group members downstream

Have each member of group G send a frame with multicast address G in it to a bridge

B4 B7 B1 B5 B2 B1 A K J I H G F E D C B

9/20/06 CS/ECE 438 - UIUC, Fall 2006 16

Finding the Tree by a distributed Algorithm

 Bridges run a distributed spanning

tree algorithm

 Select when bridges should actively

forward frames

 Developed by Radia Perlman at DEC  Now IEEE 802.1 specification

9/20/06 CS/ECE 438 - UIUC, Fall 2006 17

Distributed Spanning Tree Algorithm

 Bridges exchange configuration messages

(Y,d,X)

Y = root node

d = distance to root node

X = originating node  Each bridge records current best

configuration message for each port

 Initially, each bridge believes it is the root  When a bridge discovers it is not the root,

stop generating messages

9/20/06 CS/ECE 438 - UIUC, Fall 2006 18

Distributed Spanning Tree Algorithm

 Bridges forward configuration messages

Outward from root bridge

i.e., on all designated ports

 Bridge assumes

It is designated bridge for a LAN

Until it learns otherwise

 Steady State

root periodically send configuration messages

A timeout is used to restart the algorithm

slide-4
SLIDE 4

4

9/20/06 CS/ECE 438 - UIUC, Fall 2006 19

Spanning Tree Algorithm

Example at bridge B3

1.

B3 receives (B2, 0, B2)

2.

Since 2 < 3, B3 accepts B2 as root

3.

B3 adds one to the distance advertised by B2 and sends (B2, 1, B3)

4.

B2 accepts B1 as root and sends (B1, 1, B2)

5.

B5 accepts B1 as root and sends (B1, 1, B5)

6.

B3 accepts B1 as root and stops forwarding

B4 B7 B1 B5 B2 B1 A K J I H G F E D C B

9/20/06 CS/ECE 438 - UIUC, Fall 2006 20

Bridges: Limitations

 Does not scale

Spanning tree algorithm scales linearly

Broadcast does not scale

 Virtual LANs (VLAN)

An extended LAN that is partitioned into several networks

Each network appears separate

Limits effect of broadcast

Simple to change virtual topology

9/20/06 CS/ECE 438 - UIUC, Fall 2006 21

Bridges: Limitations

 Does not accommodate heterogeneity

Networks must have the same address format

e.g. Ethernet-to-Ethernet  Caution

Beware of transparency

May break assumptions of the point-to-point protocols

Frames may get dropped

Variable latency

Reordering

Bridges happen!

9/20/06 CS/ECE 438 - UIUC, Fall 2006 22

Switch

 Link layer device

stores and forwards Ethernet frames

examines frame header and selectively forwards frame based on MAC dest address

when frame is to be forwarded on segment, uses CSMA/CD to access segment

 transparent

hosts are unaware of presence of switches

 plug-and-play, self-learning

switches do not need to be configured

9/20/06 CS/ECE 438 - UIUC, Fall 2006 23

Forwarding

  • How do determine onto which LAN segment to

forward frame?

  • Looks like a routing problem...

hub hub hub switch 1 2 3

9/20/06 CS/ECE 438 - UIUC, Fall 2006 24

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 “learns” location

  • f sender: incoming LAN segment

records sender/location pair in switch table

slide-5
SLIDE 5

5

9/20/06 CS/ECE 438 - UIUC, Fall 2006 25

forward on all but the interface

  • n which the frame arrived

Filtering/Forwarding

When switch receives a frame: index switch table using MAC dest address if 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

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 C D E F G H I address interface A B E G 1 1 2 3 1 2 3

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 C D E F G H I address interface A B E G C 1 1 2 3 1

Switch: traffic isolation

 switch installation breaks subnet into LAN segments  switch filters packets:  same-LAN-segment frames not usually forwarded

  • nto other LAN segments

 segments become separate collision domains

hub hub hub switch collision domain collision domain collision domain

9/20/06 CS/ECE 438 - UIUC, Fall 2006 29

Switches: dedicated access

 Switch with many

interfaces

 Hosts have direct

connection to switch

 No collisions; full duplex

Switching: A-to-A’ and B- to-B’ simultaneously, no collisions

switch

A A’ B B’ C C’

9/20/06 CS/ECE 438 - UIUC, Fall 2006 30

More on Switches

 cut-through switching: frame

forwarded from input to output port without first collecting entire frame

 slight reduction in latency  combinations of shared/dedicated,

10/100/1000 Mbps interfaces

slide-6
SLIDE 6

6

9/20/06 CS/ECE 438 - UIUC, Fall 2006 31

Institutional network

hub hub hub switch to external network router

IP subnet

mail server web server

9/20/06 CS/ECE 438 - UIUC, Fall 2006 32

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

9/20/06 CS/ECE 438 - UIUC, Fall 2006 33

Summary comparison

No Yes* Yes Cut- through Yes No No Optimal Routing No Yes Yes Plug and play Yes Yes No Traffic isolation Routers Switches Bridges