Title: Plan for next month or so
1Plan for next month or so
- Networking
-
- Networking at the link layer (LAN networking)
- Tanenbaum p 318-329
-
- Networking at the Network layer
- Intro Stallings pp 530-540
- Routing Tanenbaum pp 350-384
- Global Internet Tanenbaum pp 431-473
- QoS Tanenbaum pp 397 418
2Today
- Networking at the link layer
3Building Bigger LANs from Smaller LANs
LANs are interconnected with Repeaters Hubs Swi
tches Bridges LANs connect to much larger netw
orks through routers. LANs are subdivided usi
ng VLAN
increasing intelligence
These should all be transparent.
4Interconnection Schemes
- Hubs or repeaters physical-level
interconnection.
- Devices repeat/amplify signal.
- No buffering/routing capability.
- Bridges link-layer interconnection.
- Store-and-forward frames to destination LAN.
- Need to speak protocols of LANs it interconnect.
- Routers network-layer interconnection.
- Interconnect different types of networks.
5Repeater
These connect two wires and make them seems like
a longer wire. They capture the signal on the i
nput, amplify and transmit on the output.
They perform no local functions. With repeate
rs, 10Mbps Ethernet can cover 2500m.
6Hub
Hubs are like multi-port repeaters.
Frames that simultaneously arrive at a hub colli
de even through they dont arrive on the same
wire. Hubs do not amplify. Hubs perform no l
ogical function.
7Switch
If there are many hosts on a single LAN, the
network might saturate. A switch can alleviate th
is problem. When a frame arrives at the switch,
it is placed in a buffer. The frame destination
address of the frame is analyzed and the frame is
placed on the port that leads to the correct
destination. (Store and forward).
Typically, only one host is attached to one swit
ch port. So collisions never occur. However, the
switch has an internal LAN that must support
collision avoidance. Very good for security!
8Bridges
Bridges connect different LANS at the link layer
(routers do a similar thing at the network
layer). Bridges are like switches, but with a b
it more intelligence. Interconnect LANs of the
same type, or LANs that speak different MAC
protocols. So they may have to convert header.
But this is limited.
LAN A
Extended LAN
Bridge
1
4
LAN B
5
8
9Bridges
Why bridges A bridge breaks a large LAN into sma
ller, more manageable ones. Extend the size (e.
g., a 10Mbps Ethernet cant go more than 2500m.)
Connect LANS of different types.
If one breaks, the others still function. If one
is hacked into, the damage is limited.
Traffic load can be managed with hierarchical
networks.
High speed LAN (between buildings)
bridges
lower speed LAN (in a building)
lower speed LAN (in a building)
lower speed LAN (in a building)
10Bridge Protocol Architecture
- IEEE 802.1D specification for MAC bridges.
LLC
LLC
MAC
MAC
MAC
LAN
LAN
PHY
PHY
PHY
PHY
Bridge
Station
Station
11Bridges 4
- No additional encapsulation.
- Operate at the data link layer.
- Only examine DLL header information.
- Do not look at the network layer header.
- 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.
12How bridges work
Bridges accept every frame on the LAN to which it
is attached. It stores the frame, decides where
it should go, and then forwards it. This is
called store and forward (compare to a hub or
repeaters). The difficult task is to decide if
and where the frame be forwarded.
13Flooding
Flooding The bridge transmits every frame it
sees onto every link, but the one it came in on.
Mostly always works. Does not need any user int
ervention and simple to program.
Not efficient, we lose the capacity increase
associated with hierarchical networks.
All broadcast frame must be flooded.
14Routing 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.
15Forwarding Tables
The bridge has a table that maps destinations to
out-going links.
The bridge accepts all packets from LAN A.
The bridge checks if the destination of the frame
is on LAN A or B. If it is on LAN B, the frame i
s transmitted onto LAN B. Otherwise, it drops th
e frame. Traffic from B to A is handled similar
ly.
16Routing
- Determining where to send frame so that it
reaches the destination.
- Routing by learning adaptive or backward
learning.
17Routing with Bridges
- 3 algorithms
- Fixed routing.
- Spanning tree.
- Source routing.
18Fixed Routing
- Fixed route for every source-destination pair of
LANs.
- Does not automatically respond to changes in
load/topology.
- Statically configured routing matrix (pre-loaded
into bridge).
- If alternate routes, pick shortest one.
- Rij first bridge on the route from i to j.
19Fixed Routing Example
1
2
3
Source LAN
A B C D E
F G
LAN A
107
101
103
105
106
A
102
102
101
106
B
101
102
103
104
105
LAN B
LAN C
105
C
102
101
103
107
106
107
104
D
101
103
102
105
106
106
103
105
104
E
LAN D
107
102
103
E
F
G
104
105
106
105
107
106
102
101
F
103
4
5
6
7
102
101
106
107
105
103
G
Ex E- F 107 102 105.
20Fixed Routing
101
From A
From B
- Each bridge keeps column for each LAN it
attaches.
- Table From X derived from column x.
- Every entry that has the number of the bridge
results in entry.
Dest
Next hop
Dest
Next hop
A A C A D - E - F
A
G A
B
B
C
D B
E
F
G
21Fixed Routing
- Simple and minimal processing.
- Too limited for internets with dynamically
changing topology.
22Dynamic Routing
Determine routing tables without any user
intervention. Must learn the network (backward le
arning). Must adapt to changes in the network (ta
bles expire and are relearned).
23Address Learning 1
- Problem determine where destinations are.
- 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.
24Address Learning 2
- When bridges first start, all tables are empty.
- So they flood every frame for unknown
destination, is forwarded on all interfaces
except the one it came from.
- With time, bridges learn where destinations are,
and no longer need to flood for known
destinations.
25Backward Learning
- Bridges look at frames (MAC) source address to
find which machine is accessible on which LAN.
LAN 4
A
C
B
LAN 1
B2
LAN 2
B1
LAN 3
If B1 sees frame from C on LAN 2, RT entry (C,
LAN2). Any frame to C on LAN1 will be forwarded.
But, frame to C on LAN2 will not be forwarded.
26Address Learning 3
- RT entries have a time-to-live (TTL).
- RT entries refreshed when frames from source
already in the table arrive.
- Periodically, process running on bridge scans RT
and purges stale entries, i.e., entries older
than TTL.
- Forwarding to unknown destinations reverts to
flooding.
27Frame Forwarding
- Depends on source and destination LANs.
- 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.
28Loops
2
1
- Alternate routes loops.
- Example
- LAN A, bridge 101,
- LAN B, bridge 104,
- LAN E, bridge 107,
- LAN A.
LAN A
101
LAN B
107
103
104
E
4
5
29Loop Problems
B
LAN 1
B1
B2
LAN 2
A
1. Station A sends frame to B bridges B1 and B2
dont know B. 2. B1 copies frame onto LAN1 B2 do
es the same. 3. B2 sees B1s frame to unknown des
tination and copies it onto LAN 2.
4. B1 sees B2s frame and does the same.
5. This can go on forever.
30Loop 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.
31Spanning 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.
32Definitions 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.
33Definitions 2
- Root path cost cost of path to root bridge.
- Designated bridge on any LAN, bridge closest to
root, i.e., the one with minimum root path cost.
34Spanning Tree Algorithm 1
- 1. Determine root bridge.
- 2. Determine root port on all bridges.
- 3. Determine designated bridges.
35Spanning Tree Algorithm 2
- Initially all bridges assume they are the root
and broadcast message with its ID, root path
cost.
- Eventually, lowest-ID bridge will be known to
everyone and will become root.
- Root bridge periodically broadcasts its the
root.
36Spanning Tree Algorithm 3
- Directly connected bridges update their cost to
root and broadcast message on other LANs they are
attached.
- This is propagated throughout network.
- On any (non-directly connected) LAN, bridge
closest to root becomes designated bridge.
37Spanning Tree Example
LAN 2
LAN 2
10
5
10
5
10
10
B3
B4
B3
B4
B1
B1
10
5
10
5
10
10
LAN 5
LAN 5
5
5
B5
B5
5
5
LAN 1
LAN 1
10
10
5
5
5
5
B2
B2
LAN 3
LAN 4
LAN 3
LAN 4
38Spanning Tree Example
B1
. Only designated bridges on each LAN allowed to
forward frames. . Bridges continue
exchanging info to react to topology changes.
LAN 2
LAN 1
B4
B3
B5
LAN 5
B2
LAN 3
LAN 4
39Source Routing 1
- Route determined a priori by sender.
- Route included in the frame header as sequence of
LAN and bridge identifiers.
- When bridge receives frame
- Forward frame if bridge is on the route.
- Discard frame otherwise.
40Source Routing 2
- Route sequence of bridges and LANs.
LAN 3
X-Z L1,B1,L3,B3,L2. X-Z L1,B2,L4,B4,L2
B3
LAN 2
B1
LAN 1
Z
B4
B2
LAN 4
X
41Source Routing 4
- No need to maintain routing table.
- Frame has all needed routing information.
- However, stations need to find route to
destination.
42Route Discovery 1
- Finding all routes.
- If destination is unknown, source sends broadcast
route discovery frame.
- Frame reaches every LAN.
- When reply comes back, intermediate bridges
record their id.
- Source gets complete route information.
- Problem frame explosion.
43Route Discovery 2
- Alternative single route request frame forwarded
according to spanning tree.
LAN 1
X
LAN 3
B3
B1
LAN 2
Single-route broadcast
Z
X
Z
LAN 4
B4
44Route Discovery 3
L2, B3, L3, B1, L1
LAN 1
X
LAN 3
B3
B1
LAN 2
Z
L2, B4, L4, B2, L1
LAN 4
B4
B2
45Route Selection
- Select minimum-cost route, e.g., minimum-hop
route.
- If tie, choose the one that arrived first.
- Routes are cached with a TTL when TTL expires,
re-discover route.
46Routers
- Operate at the network layer, i.e., inspect the
network-layer header.
- Usually main router functionality implemented in
software.
- Store-and-forward.
- Ability to interconnect heterogeneous networks
address translation, link speed and packet size
mismatch.