chapters 2 and 3 extending ethernet lans: repeaters, hubs, bridges and switches professor rick han...

29
Chapters 2 and 3 Extending Ethernet LANs: Repeaters, Hubs, Bridges and Switches Professor Rick Han University of Colorado at Boulder [email protected]

Post on 22-Dec-2015

224 views

Category:

Documents


0 download

TRANSCRIPT

Chapters 2 and 3Extending Ethernet LANs:

Repeaters, Hubs, Bridges and Switches

Professor Rick HanUniversity of Colorado at Boulder

[email protected]

Prof. Rick Han, University of Colorado at Boulder

Announcements

• Previous lecture will be online by Friday• Homework #1 is on the Web site, due

Feb. 5• Programming assignment #1 is now

available on Web site, due Feb. 19 (3 weeks)

• Next, Chapter 3, Ethernet, repeaters, switched Ethernet, Ethernet bridges and hubs

Prof. Rick Han, University of Colorado at Boulder

Recap of Previous Lecture• Wireless Ethernet – 802.11

• MAC layer• DCF = CSMA/CA• PCF mode polls for delay-sensitive traffic

• Physical layer• 802.11b: Direct Sequence Spread Spectrum

multiplies data d(t) by faster chipping sequence c(t) to spread spectrum

• 802.11a: OFDM

• Token-based MAC protocols• Token Ring• FDDI

Prof. Rick Han, University of Colorado at Boulder

Ethernet / 802.3• CSMA/CD• Technologies:

• 10Base2 = 10 Mbps using Baseband signalling over coaxial cable, longest segment <= 200 m

• 10Base 5 = 10 Mbps Baseband over coax, max seg <=500 m

• 10BaseT = 10 Mbps Baseband over Twisted pair of copper wires, <= 100 m

• 100BaseT = “Fast” Ethernet, 100 Mbps Baseband over twisted pair, <= 100 m

• Gigabit Ethernet over fiber and copper wire• In future, 10G Ethernet

Prof. Rick Han, University of Colorado at Boulder

An Ethernet Frame• All of the Ethernet technologies use the

same Ethernet frame:

• Addressing:• Every Ethernet host has a unique address,

burned into ROM by manufacturer• Each manufacturer is given a unique prefix

• Receiver accepts frames:• When dest. address = its own address• When dest. address = all 1’s (broadcast

address)• When it’s in promiscuous listening mode

Preamble Dest Addr Type DataSrc Addr

8 bytes 6 6 2

CRC

446-1500

Prof. Rick Han, University of Colorado at Boulder

An Ethernet Frame (2)

• Data size:• at least 46 bytes to allow collisions to be

detected• maximum transmission unit (MTU) is 1500

bytes

• Type field: • identifies the type of network layer protocol

encapsulated within, e.g. IP, ARP, RARP, …

Preamble Dest Addr Type DataSrc Addr

8 bytes 6 6 2

CRC

446-1500

Preamble Dest Addr Type

Data

Src Addr CRCIP Packet

Prof. Rick Han, University of Colorado at Boulder

An Ethernet Frame (3)• How does Ethernet determine End-of-

Frame?

• Answer:• 10 Mbps Ethernet uses Manchester encoding,

100 Mbps Fast Ethernet uses 4B5B encoding.• Both encodings force transitions in bits/groups

of bits (for clock recovery)• When bit transitions start, receiver detects

preamble to signal start-of-frame• Receiver listens until there are no more bit

transitions – this is an implicit end-of-frame

Preamble Dest Addr Type DataSrc Addr

8 bytes 6 6 2

CRC

446-1500

Prof. Rick Han, University of Colorado at Boulder

Connecting Ethernet LANs

• Companies/universities consist of many departments, each with own Ethernet LAN

• Interconnect Ethernet LAN’s so computers across departments can communicate

EthernetEthernet

Prof. Rick Han, University of Colorado at Boulder

Interconnection Topologies

Cascade orDaisy Chain

Star Topology

Prof. Rick Han, University of Colorado at Boulder

Ethernet Repeaters• Repeaters interconnect Ethernet LANs at

the physical layer• Repeat an incoming waveform on all

outgoing interfaces using analog amplifier• No memory in repeater

• Plug-and-play, cheap, extends range of LAN

Data Re-amplified data

AttenuatedData

Prof. Rick Han, University of Colorado at Boulder

Ethernet Repeaters (2)• Preserves the property of a broadcast

medium that any transmission by any node is heard by other nodes• Collisions will be heard by all nodes

DataColliding signal

Data

Colliding signal

Prof. Rick Han, University of Colorado at Boulder

Ethernet Repeaters (3)• Problem: Can’t extend repeaters

indefinitely• CSMA/CD requires low prop. delay to work

efficiently• If nodes too far apart, then prop. delay too

long• Ethernet limits # of repeaters to <=4 between

any two Ethernet nodes• 10Base5 has max segment size of 500 m, so 5

10Base5 LANs daisy-chained with 4 repeaters = 2.5 km length

• Star topology enables interLAN communication yet largely avoids this problem

• Problem: Noise in analog waveform is amplified each time repeater is traversed

Prof. Rick Han, University of Colorado at Boulder

Ethernet Hubs

• Essentially the same as physical layer repeaters, but with additional features• Monitoring• Fault isolation – has intelligence to detect and

isolate a faulty hub or faulty Ethernet node (flooding the local Ethernet)

• Multi-port• 5 port and 10 port 10BaseT Ethernet Hubs for

$40• 5 port Fast Ethernet Hub for $60

Prof. Rick Han, University of Colorado at Boulder

Multi-Tier Ethernet LANs

• Connect the hubs together into tiers• Hub-hub backbone connections don’t require

hosts• Hybrid of star and daisy-chain topologies

Backbone Hub

DepartmentHub

HubDepartment

Hub

Prof. Rick Han, University of Colorado at Boulder

An Actual Ethernet HubNormal 8 ports: connect hosts here Uplink: connect to

another hub

Prof. Rick Han, University of Colorado at Boulder

Problems with Ethernet Hubs

• All nodes are in the same CSMA/CD collision domain • => more collisions, exponential backoff, and

reduced throughput

Backbone Hub

Hub Hub Hub

Prof. Rick Han, University of Colorado at Boulder

Problems with Ethernet Hubs (2)

• Heterogeneous LANs: what happens when one LAN is 10BaseT and another is 100BaseT?• Need digital buffering in hub• But hubs are just analog repeaters• Strictly speaking, can’t use hubs to connect

LANs w/ diff. speeds, though see ads for 10/100 “Hubs”

10BaseT 100BaseT

?• Same problems as repeaters: limited

distance and noise

Prof. Rick Han, University of Colorado at Boulder

Ethernet Bridges

• Interconnects 2 or more Ethernet LANs at Layer 2

• Forwards and filters complete digital frames, unlike hubs that repeat analog waveforms• When a frame arrives, bridge looks at

destination MAC address to see on which outgoing interface to forward the frameLayer 2

Bridge

Frame to Z

Node Z

Frame to Z

Prof. Rick Han, University of Colorado at Boulder

Ethernet Bridges (2)

• Bridge is transparent to Ethernet nodes.• Nodes aren’t aware that bridge is being used

to connect one LAN to another LAN• Bridge itself has no address.

• Conceptually, interconnection topologies are similar to hubs: cascade, star, multi-tier, … LAN 1 LAN 2

Layer 2Bridge

Prof. Rick Han, University of Colorado at Boulder

Bridges Maintain a Table for Forwarding and Filtering

• Label the interfaces into/out of the bridge• When a frame arrives, store the source

address and the originating interface from which the frame came (and current time)

Layer 2Bridge

U

Interface 1 Interface 2

Frame to Z

Z

Src Addr Originating Interface

Time

U 1 --

Prof. Rick Han, University of Colorado at Boulder

Self-Learning Bridges Build A TableLayer 2Bridge

U

Interface 1 Interface 2

Z

Event Originating Interface 1

Originating Interface 2

Bridge boots up -- --

U sends to V U --

V sends to U U,V --

Z sends to U U,V Z

Z sends to Y U,V Z

Y sends to V U,V Y,Z

V Y

SimplifiedTable:

Until Y sends, don’t knowits location

Prof. Rick Han, University of Colorado at Boulder

Frame Forwarding RulesLayer 2Bridge

U

Interface 1 Interface 2

ZV Y

• If dest. node is on same LAN interface as src. node, then don’t forward frame

• If dest. node is on diff. LAN interface than src. node, then route frame to dest. LAN

• If dest. node is not in table, then forward to all outgoing interfaces• Don’t know yet where dest. node is located,

so forward the frame to all outgoing LAN’s

Prof. Rick Han, University of Colorado at Boulder

Frame Forwarding Rules (2)Layer 2Bridge

U

Interface 1 Interface 2

Z

Event Originating Interface 1

Originating Interface 2

Bridge Forwarding Action

Boot state -- --

U sends to V U -- Forward to all outgoing (e.g. 2)

V sends to U U,V -- none

Z sends to U U,V Z Forward to 1

Y sends to Z U,V Y,Z none

V sends to Y U,V Y,Z Forward to 2

V Y

Prof. Rick Han, University of Colorado at Boulder

Advantage of Bridges vs. Hubs

• Can interconnect heterogeneous LANs• Installed infrastructure of 10BaseT can

interconnect with new 100BaseT Fast Ethernet• Buffering of digital frames in bridges enables

this

• No theoretical limit to extending the geographical reach of a LAN• After determining outgoing LAN interface

where frame is to be sent, transmit via CSMA/CD on that LAN

• Collision domains are isolated, so don’t have to deal with propagation

• Noise doesn’t accumulate as with analog amplifiers

• Plug-and-play (as with hubs)

Prof. Rick Han, University of Colorado at Boulder

Problems With Bridges

• Bridges can interconnect LANs and have multiple paths between every node• Inadvertent

Layer 2BridgeBridge

Bridge

Bridge

• Purposely for robustness, in case highest tier fails

• Problem: Frames can cycle forever in a loop and multiply to crash LAN!

Prof. Rick Han, University of Colorado at Boulder

Problems With Bridges: Packet Multiplication Effect

• Suppose all bridges have just booted• Suppose A wants to send to Z

Bridge 4Bridge 1

Bridge2

Bridge 3

• Bridge 1 sends A’s frame to LAN 5 & 4

• These two frames propagate to Bridge 3, where they multiply into 4 copies• Exponentially multiplying copies!

AZ

LAN1 LAN3

LAN2

LAN4

LAN5

Prof. Rick Han, University of Colorado at Boulder

Problems With Bridges:Endless Looping

• Suppose all bridges have just booted• Suppose A wants to send to Z

Bridge 4Bridge 1

Bridge2

Bridge 3

• Bridge 2 sends frame to LAN 2

• Bridge 3 sends frame to LAN 3

• Bridge 4 -> LAN 4

• Back to LAN 1• Frames can cycle forever!

A ZLAN1 LAN3

LAN2

LAN4

Prof. Rick Han, University of Colorado at Boulder

Spanning Tree Solution To Looping and Packet

Multiplication• Bridges communicate with each other to set up a spanning tree that has no loops

Bridge 4Bridge 1

Bridge2

Bridge 3

• Disconnect some interfaces, though physical link exists

• Some frames may take long route though shorter direct physical route exists

A ZLAN1 LAN3

LAN2

LAN4

Prof. Rick Han, University of Colorado at Boulder

Spanning Tree Solution (2)

• Some bridges may be eliminated completely!

LAN1 LAN3LAN2

LAN4LAN1 LAN3LAN2

LAN4

Original Spanning Tree

LAN1 LAN3

LAN2

LAN4

LAN1 LAN3

LAN2

LAN4rootOriginal Spanning Tree