Download Layer 2 - University of California, San Diego

Survey
yes no Was this document useful for you?
   Thank you for your participation!

* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project

Document related concepts

Topology (electrical circuits) wikipedia , lookup

Signal-flow graph wikipedia , lookup

Transcript
Repeating
Repeating
Repeating
Repeating
Repeating, Bridging,
Switching, and Routing
Home
0
We Deliver For You
Eric L. Michelsen
Inductive Logic
Visitor
63
Topics
•
•
•
•
•
•
•
•
Simple Ethernet LAN
Simple Repeating
Repeated Repeaters
Multiport Coax Repeaters
Bridging
Spanning Tree
Switching
Routing
Inductive Logic
2/5/2002
2
Where in the Stack?
7. Application
Application
Gateway
7. Application
6. Presentation
6. Presentation
5. Session
5. Session
4. Transport
4. Transport
3. Network
Router
3. Network
2. Link
Bridge
2. Link
1. Physical
Repeater
1. Physical
Note: IP routers used to be called “gateways,”
not to be confused with “application gateway.”
We won’t be talking about application gateways.
Inductive Logic
2/5/2002
3
Simple Ethernet LAN
• Layer 2 interface to host, Layer 1 interface to medium
• Each Ethernet interface has globally unique MAC address
• Ethernet has restrictions: 10Base5 10Base2 10BaseT 100BaseT


Layer 2
Cable Length
Number of Interfaces
node
node
node
MAC
MAC
MAC
500m
185m
100m
100m
100
30
2
2

185 m
Layer 1
10Base2
(coaxial)
7. Application
6. Presentation
5. Session
4. Transport
3. Network
node
node
MAC
100 m
Inductive Logic
10BaseT
(2-pair UTP)
MAC
2. Link
1. Physical
2/5/2002
4
Ethernet Services
• Local addressing


LAN: Local Area Network
Despite globally unique MAC
addresses, nodes can only reach
local hosts (hosts on their LAN)
• Datagram service

One packet at a time
• Best effort delivery


Not guaranteed
No acknowledgement
• Other services (reliable delivery,
7. Application
6. Presentation
5. Session
4. Transport
3. Network
2. Link
Local addressing
Datagram
Best effort
Raw bits
1. Physical
Wires, voltage,
current
global addressing) require Layer
3 and higher protocols
Inductive Logic
2/5/2002
5
•
•
•
•
Simple Repeater
Simplest and lowest overall network performance
Repeats everything, including collisions
Transparent to nodes
All interfaces must run at the same speed (no buffering)
node
node

node
node
node

10Base2
(coaxial)
Repeater
Segment 1, 185 m
Segment 2, 185 m
370 m
Repeating
Hub
node
100 m
100 m
node
Inductive Logic
Repeating
Hub
10BaseT
100 m
node
100 m
100 m
100 m
node
node
10BaseT
100 m
node
2/5/2002
6
Repeated Repeaters
• Repeaters can be chained up to a limit: the 5-4-3 rule:
Between any 2 nodes, no more than




5 segments
4 repeaters
3 coax segments
Fun fact: 4-3-4 is also allowed (802.3 sec 13.3.f.3)
Repeater
10BaseT
Repeating
Hub
Inductive Logic
noncoax
Repeater
Repeating
Hub
Repeater
Repeating
Hub
noncoax
Repeater
Repeating
Hub
2/5/2002
7
Multiport Coax Repeaters
• Still follows the 5-4-3 rule
• With all repeaters, broadcast domain and collision domain
are the same
coax
Repeater
noncoax
Repeater
Repeater
noncoax
Repeater
Broadcast domain
Collision domain
Inductive Logic
2/5/2002
8
Bridging
•
•
•
•
•
•
•
•
Yours is Yours, and Mines is Mines
Bridges separate traffic as needed by segment
Learn node MAC addresses dynamically (at least 4000)
Flood unknown MAC addresses & broadcasts on all ports
Bridge ports have no MAC addresses (transparent to nodes)
Store and Forward delivery (typically)
Each interface can run at an arbitrary speed (bridges have buffering)
Standardized in IEEE-802.1d
Collision domain is per segment, broadcast domain is all hosts on LAN
node
node
node
MAC
MAC
MAC
No
MAC
node
node
node
MAC
MAC
MAC
Bridge
Collision domain
Simultaneous traffic
Inductive Logic
Collision domain
Broadcast domain
2/5/2002
9
Spanning Tree Protocol (STP)
• Bridge loops are catastrophic
• Spanning Tree protocol disables redundant links, restores
•
•
them dynamically as needed
Suboptimal routing: minimum path along spanning tree
Bridge as a whole has a MAC address (not its interfaces)
node
node
node
Bridge
Bridge A
MAC
MAC
Unknown or
Broadcast
packet crashes
network
Bridge
MAC
Inductive Logic
X
node
Bridge B
node
node
Disabled by
spanning tree
MAC
X
Chosen by
spanning tree
as root bridge
Bridge C
MAC
Disabled by
spanning tree.
Frames from B to C
go through bridge A
2/5/2002
10
Switching (3Com Link Switch 1000)
A Bridge Too Far
• Imagine a big bridge with lots of ports (LS-1000 has 24)

•
•
•
•
Runs all interfaces simultaneously at (or near) wire speed
Default path for unknown MAC addresses (not flooded)
Broadcasts must still be flooded
Cut through delivery (typically, but configurable)
Optional spanning tree: just don’t do it
Default Path
Switching
Hub
Simultaneous
traffic
Broadcast
domain
Collision domains
Inductive Logic
2/5/2002
11
Bridge/Switch Fun Facts
• Addresses age out after configurable time


•
•
•
•
•
default 5 minutes on 802.1d bridge
default 15 minutes on LS-1000
Lost address is more severe on a switch (no flooding)
802.1d bridge learns 4000 addresses, LS-1000 learns 500
No flow control (typically), discard overflow
LS-1000 can invoke flow control by deliberately colliding
with inbound frames it cannot handle
LS-1000 has 3 forwarding modes:



Cut Through: as fast as possible (propagates some collisions)
Fragment-Free: cut through after collision time over (512 bits,
propagates CRC errors)
Store-and-Forward: maximum delay, forwards only good frames
Inductive Logic
2/5/2002
12
Wireless LAN
• Unlicensed National Information Infrastructure (U-NII)
band, which spans 5.15 to 5.35 GHz and 5.725 to 5.825
GHz. The lower 200 MHz of the band is used for inbuilding applications; the upper 100 MHz is typically used
for building-to-building or campus-bridging systems.
• ISM bands (Industrial, Scientific and Medical)
• 2.4 to 2.483 GHz, 802.11 specifies a total of 79 channels
with 1-MHz spacing. data rates of 1, 2, 5.5, and 11 Mbps
Inductive Logic
2/5/2002
13
Routing
•
A Cut Above
Routing operates completely at Layer 3 (e.g., IP)


repeating, bridging, switching are Layer 1/2 (e.g., Ethernet)
Routing has nothing to do with Ethernet, FDDI, Token Ring, etc.
• Each packet takes one route: no flooding
• Routing protocols update topology
• Arbitrary topology: loops allowed
Nodes
Router
Frame Relay
SONET
Nodes
Router
Inductive Logic
7. Application
Router
Nodes
5. Session
ATM
Telephone
modem
Router
6. Presentation
4. Transport
Nodes
3. Network
2. Link
1. Physical
2/5/2002
14
•
•
•
•
Routing: The Whole Truth
Routers find least cost path
Time To Live (TTL) kills looping packets
Default routes minimize routing table size
Each Layer 3 protocol requires 1 or more routing protocols


IP uses RIP, RIP2, OSPF, EGP, GGP, ...
IPX uses IPX RIP (not IP RIP)
• Opaque to nodes: they must interact with routers


IP uses ICMP
IPX nodes listen to RIP
Router 1
Router 2
node A
node B
Least cost path
Router 3
Inductive Logic
2/5/2002
15
Side By Side
Repeating
Bridging
Switching
Routing
Works at Layer...
1
2
2
3
Transparent?
Yes
Yes
Yes
No
Performance
worst
ok
high
high delay
Complexity
low
restricted,
no loops
medium
high
way-high
arbitrary
no loops
arbitrary
Topology
broadcast & broadcast
never
(w/ default route)
unknown
Looping packet catastrophic catastrophic catastrophic TTL kills it
flood or
default or
Unknown address
flood
default
opt. discard
discard
Forwarding
instant
store & fwd cut thru (typ) store & fwd
Packet Flooding
always
Topology learning
none
Inductive Logic
STP
opt. STP
L3 protocol
2/5/2002
16
This slide intentionally left blank
Inductive Logic
2/5/2002
17