Transcript Bridges

CMPE 150 – Winter 2009
Lecture 9
February 3, 2009
P.E. Mantey
CMPE 150 -- Introduction to
Computer Networks






Instructor: Patrick Mantey
[email protected]
http://www.soe.ucsc.edu/~mantey/
Office: Engr. 2 Room 595J
Office hours: Tues 3-5 PM, Mon 5-6 PM*
TA: Anselm Kia [email protected]
Web site: http://www.soe.ucsc.edu/classes/cmpe150/Winter09/
Text: Tannenbaum: Computer Networks
(4th edition – available in bookstore, etc. )
Syllabus

Internet Layering
Level 4
-- Application Layer
(rlogin, ftp, SMTP, POP3, IMAP, HTTP..)
-- Transport Layer(a.k.a Host-to-Host)
Level 3
Level 2
(TCP, UDP, ARP, ICMP, etc.)
-- Network Layer (a.k.a. Internet) (IP)
-- (Data) Link Layer / MAC sub-layer
Level 1
(a.k.a. Network Interface or
Network Access Layer)
-- Physical Layer
Level 5
Today’s Agenda



Repeaters, Hubs, Switches, Routers, …
VLANS
Midterm Review
Data Link Layer Switching
•
•
•
•
•
Bridges from 802.x to 802.y
Local Internetworking
Spanning Tree Bridges
Remote Bridges
Repeaters, Hubs, Bridges, Switches,
Routers, Gateways
• Virtual LANs
Bridges
• Bridges used to connect multiple LANS
• Link Layer
– Do not look at anything in packets
• Work for any payload within the frame
– IPv4, IPv6, Apple Talk, etc.
– (vs. routers which work at packet (IP) level)
• Individual LANS are shared media (cable or
hub)
• (Few hubs still in use – now switched
Ethernet)
Data Link Layer Switching
• Multiple LANs connected by a backbone to
handle a total load higher than the
capacity of a single LAN.
Bridges from 802.x to 802.y
Operation of a LAN bridge from 802.11 to 802.3.
Bridges from 802.x to 802.y (2)
The IEEE 802 frame formats.
The drawing is not to scale.
Local Internetworking
• A configuration with four LANs and two
bridges.
Bridge Operations
• Promiscuous mode – send all frames to all connected
LANs
• Discard frames whose destination is same LAN as
source
– Keeps table of (LAN) addresses for each LAN
• Tables built by “flooding”
– Send everything to everybody if not in table
– See where frame comes from – add them to table
– “backward learning”
– Tables have time stamp of last use for each address
– TTL
Spanning Tree Bridges
Two parallel transparent bridges – bridges
communicate to avoid loops.
Spanning Tree Bridges (2)
(a) Interconnected LANs. (b) A spanning
tree covering the LANs.
(The dotted lines are not part of the spanning tree.)
Remote Bridges
Remote bridges can be used to interconnect
distant LANs.
Repeaters, Hubs, Bridges,
Switches, Routers and
Gateways
(a) Which device is in which layer.
(b) Frames, packets, and headers.
Repeaters, Hubs, Bridges,
Switches, Routers and
Gateways
(a) A hub. (b) A bridge. (c) a switch.
http://www.cisco.com/warp/public/473/lan-switch-transparent.swf
Switched Ethernet
• Point-to-point connections to multi-port
hub acting like switch; no collisions.
• More efficient under high traffic load:
break large shared Ethernet into smaller
segments.
Switch
Hub
LAN Interconnection
•
•
•
•
Extend LAN coverage.
Interconnect different types of LAN.
Connect to an internetwork.
Reliability and security.
Bridges 1
• Operate at the MAC layer.
– Interconnect LANs of the same type, or
– LANs that speak different MAC protocols.
LAN A
1
LAN B
4
5
8
B
Frames for
5->8.
Frames for
1->4
Bridges 2
• Function:
– Listens to all frames on LAN A and accepts those
addressed to stations on LAN B.
– Using B’s MAC protocol retransmits the frames onto
B.
– Does the same for B-to-A traffic.
Bridges 3
• Behave like a station; have multiple
interfaces, 1 per LAN.
• Use destination address to forward
unicast frames; if destination is on the
same LAN, drops frame; otherwise
forwards it.
• Forward all broadcast frames.
• Have storage and routing capability.
Bridges 4
• No additional encapsulation.
• But they may have to do header
conversion if interconnecting different
LANs (e.g., 802.3 to 802.4 frame).
• May interconnect more than 2 LANs.
• LANs may be interconnected by more
than 1 bridge.
Bridge Protocol Architecture
• IEEE 802.1D specification for MAC
bridges.
LLC
MAC
PHY
Station
LAN
MAC
PHY PHY
Bridge
LAN
LLC
MAC
PHY
Station
Need “Plug ‘n Play” for LANS
• Delivery of frames at Link layer uses MAC
address
• Switch / Bridge have tables of MAC
addresses and corresponding LAN links
• Any time a port is connected, tables
needed to be dynamically updated
• When a device is disconneceted, tables
need to reflect change
• Switch derives its table for local
connections
Address Learning – Bridges
•
•
•
•
Problem: determine locations of
destinations.
Bridges operate in promiscuous mode, i.e.,
accept all frames.
Basic idea: look at source address of
received frame to learn where that station is
(which direction frame came from).
Build routing table so that if frame comes
from A on interface N, save [A, N].
Address Learning – Bridges (2)
•
•
•
When bridges start, all tables are empty.
So they flood: every frame for unknown
destination, is forwarded on all interfaces
except the one it came from.
As bridge learns where destinations are -when its routing table (RT) contains that
destination -- it no longer needs to flood
for those destinations.
Address Learning 3
•
•
•
•
RT entries have a time-to-live (TTL).
RT entries get refreshed when frames
from source already in the table arrive at
the bridge.
Periodically, process running on bridge
scans RT and purges stale entries, i.e.,
entries older than TTL.
Bridge reverts to flooding forwarding for
unknown destinations reverts to flooding.
Routing with Bridges
• Uses MAC (physical) addresses
• May have alternate paths
(via
bridges) to destination
• Choose best path
• 3 algorithms:
– Fixed routing.
– Spanning tree.
– Source routing.
Fixed Routing
• Fixed route for every source-destination
pair of LANs.
• Does not automatically respond to
changes in load/topology.
Spanning Tree Routing
• Aka transparent bridges.
• Bridge routing table is automatically
maintained (set up and updated as
topology changes).
• 3 mechanisms:
– Address learning.
– Frame forwarding.
– Loop resolution.
Frame Forwarding
• Depends on source and destination LAN.
– If destination LAN (where frame is going to) =
source LAN (where frame is coming from), discard
frame.
– If destination LAN ≠source LAN, forward frame.
– If destination LAN unknown, flood frame.
• Special purpose hardware used to
perform RT lookup and update in few
microseconds.
Loops
• Alternate routes: loops.
• Example:
–
–
–
–
1
2
LAN A
101
LAN B
LAN A, bridge 101,
LAN B, bridge 104,
LAN E, bridge 107,
LAN A.
107
103
104
E
4
5
Loop: Problems
B
LAN 1
B1
B2
LAN 2
A
1. Station A sends frame to B; bridges B1 and B2 don’t know B.
2. B1 copies frame onto LAN1; B2 does the same.
3. B2 sees B1’s frame to unknown destination and copies it onto LAN 2.
4. B1 sees B2’s frame and does the same.
5. This can go on forever.
Loop Resolution
• Goal: remove “extra” paths by removing
“extra” bridges.
• Spanning tree:
– Given graph G(V,E), there exists a tree that spans
all nodes where there is only one path between
any pair of nodes, i.e., NO loops.
– LANs are represented by nodes and bridges by
edges.
Definitions 1
• Bridge ID: unique number (e.g., MAC
address + integer) assigned to each
bridge.
• Root: bridge with smallest ID.
• Cost: associated with each interface;
specifies cost of transmitting frame
through that interface.
• Root port: interface to minimum-cost
path to root.
Routing with Bridges
• Bridge decides to relay frame based on
destination MAC address.
• If only 2 LANs, decision is simple.
• If more complex topologies, routing is
needed, i.e., frame may traverse more
than 1 bridge.
Routing
• Determining where to send frame so that
it reaches the destination.
• Routing by learning: adaptive or
backward learning.
Note on Terminology: Repeaters
and Bridges
• Repeaters:
– Extend scope of LANs.
– Serve as amplifiers.
– No storage/routing capabilities.
• Bridges:
– Also extend scope of LANs.
– Routing/storage capabilities.
Bridges
• Operate at the data link layer.
– Only examine DLL header information.
– Do not look at the network layer header.
Virtual LANs
A building with centralized wiring using hubs
and a switch.
Virtual LANs (2)
(a) Four physical LANs organized into two
VLANs, gray and white, by two bridges. (b) The
same 15 machines organized into two VLANs
by switches.
The IEEE 802.1Q Standard
Transition from legacy Ethernet to VLANaware Ethernet. The shaded symbols are
VLAN aware. The empty ones are not.
The IEEE 802.1Q Standard (2)
The 802.3 (legacy) and 802.1Q Ethernet
frame formats.
Review of Terminology:
Repeaters and Bridges

Repeaters:




Extend scope of LANs.
Serve as amplifiers.
No storage/routing capabilities.
Bridges:


Also extend scope of LANs.
Routing/storage capabilities.
Bridges

Operate at the data link layer.


Only examine DLL header information.
Do not look at the network layer header.