Professional Documents
Culture Documents
Packet Switching
Packet Switching
3.1 Switching and Forwarding 3.2 Bridges and LAN Switches 3.3 Cell Switching (ATM)
Transparent Bridges
How to efficiently forward frames Three principal approaches can be found:
Fixed Routing Source Routing Spanning Tree Routing (IEEE 802.1d)
Transparent Bridges
Overall design goal: Complete transparency Plug-and-play: Self-configuring without hardware or software changes Bridges should not impact operation of existing LANs Three parts to transparent bridges: (1) Forwarding of Frames (2) Learning of Addresses (3) Spanning Tree Algorithm
with interpretation:
a machine with MAC address lies in direction of the port number from the bridge. The entry is age time units old.
Bridge 2
Port C
Found?
Src=x, Dest=y
Src=x, Dest=y
Src=x, Dest=y
Src=x, Dest=y
Algorithm: For each frame received, the bridge stores the source field in the forwarding database together with the port where the frame was received. All entries are deleted after some time (default is 15 seconds).
Port 1 x is at Port 3 y is at Port 4 Port 2
Src=y, Dest=x
Src=y, Dest=x
Port 3
Example
Consider the following packets: (Src=A, Dest=F), (Src=C, Dest=A), (Src=E, Dest=C) What have the bridges learned?
Bridge 1
Port1 Port2 Port1
Bridge 2
Port2
LAN 1
A B
LAN 2
C D E
LAN 3
F
Danger of Loops
Consider the two LANs that are connected by two bridges. LAN 2 Assume host n is transmitting a frame F with unknown destination. What is happening? F F Bridges A and B flood the frame Bridge B Bridge A to LAN 2. F F Bridge B sees F on LAN 2 (with unknown destination), and copies LAN 1 the frame back to LAN 1 Bridge A does the same. F The copying continues Wheres the problem? Whats the host n solution ?
LAN 2
d
Bridge 3 Bridge 1
Bridge 4
LAN 5
Bridge 5
Bridges that run 802.1d are called transparent bridges Bridges exchange messages to configure the bridge (Configuration Bridge Protocol Data Unit, Configuration BPDUs) to build the tree.
LAN 1
Bridge 2
LAN 3
LAN 4
Algorhyme
I think that I shall never see A graph more lovely than a tree. A tree whose crucial property Is loop-free connectivity. A tree that must be sure to span So packets can reach every LAN. First, the root must be selected. By ID, it is elected. Least-cost paths from root are traced. In the tree, these paths are placed. A mesh is made by folks like me, Then bridges find a spanning tree. - Radia Perlman
Concepts
Each bridge has a unique identifier: Bridge ID
Bridge ID = { Priority : 2 bytes; Bridge MAC address: 6 bytes }
Priority is configured Bridge MAC address is lowest MAC addresses of all ports
Each port within a bridge has a unique identifier (port ID). Root Bridge: The bridge with the lowest identifier is the root of the spanning tree. Root Port: Each bridge has a root port which identifies the next hop from a bridge to the root.
Concepts
Root Path Cost: For each bridge, the cost of the mincost path to the root.
Assume it is measured in #hops to the root
Designated Bridge, Designated Port: Single bridge on a LAN that provides the minimal cost path to the root for this LAN: - if two bridges have the same cost, select the one with the lowest identifier - if the min-cost bridge has two or more ports on the LAN, select the port with the lowest identifier
Note: We assume that cost of a path is the number of hops.
root bridge (what the sender thinks it is) root path cost for sending bridge Identifies sending bridge Identifies the sending port
The transmission of ConfMs results in the distributed computation of a spanning tree The convergence of the algorithm is very quick
Ordering of Messages
We define an ordering of ConfM messages ID R1 C1 ID B1 ID P1 M1 ID R2 C2 ID B2 ID P2 M2
We say M1 advertises a better path than M2 (M1<<M2) if (R1 < R2), Or (R1 == R2) and (C1 < C2), Or (R1 == R2) and (C1 == C2) and (B1 < B2), Or (R1 == R2) and (C1 == C2) and (B1 == B2) and (P1 < P2)
Each bridge looks at the ConfMs received on all its ports and its own transmitted ConfMs. Root bridge is the smallest received root ID that has been received so far (Whenever a smaller ID arrives, the root is updated)
R1 C1 B1 P1
R2 C2 B2 P2
R2 C2+1 B1 P1
However, the new ConfM is not necessarily sent out On each bridge, the port where the best ConfM (via relation <<) was received is the root port of the bridge.
Cost
x
Port x
B will send this ConfM on port x only if its ConfM is better (via relation <<) than any ConfM that B received from port x.
Bridge B
Port A Port B Port C
In this case, B also assumes that it is the designated bridge for the LAN to which the port connects And port x is the designated port of that LAN
Bs ports that are in the spanning tree will forward packets (=forwarding state) Bs ports that are not in the spanning tree will not forward packets (=blocking state)
Limitations of Bridges
Do not scale
spanning tree algorithm does not scale broadcast does not scale
Packet Switching
3.1 Switching and Forwarding 3.2 Bridges and LAN Switches 3.3 Cell Switching (ATM)
Connection-oriented packet-switched network Provides a single transport mechanism for integrated services traffic
Data, voice, video, images, graphics, All statistically multiplexed at ATM layer
Used in both WAN and LAN settings Signaling (connection setup) Protocol: Q.2931 Specified by ATM forum
Point-to-point technology
End-to-end connection is needed using a signaling protocol
ATM Cells
53 byte fixed cells 5 bytes header & 48 byte data
Fixed-length easier to switch in hardware
simpler enables parallelism
No optimal length
if small: high header-to-data overhead if large: low utilization for small messages
ATM Layering
Three layers
ATM adaptation layer (AAL) ATM layer (53 byte cells at network layer) ATM physical layer
User data
AAL PDU
ATM cell
44 bytes
ATM Layers
Connection-oriented without acknowledgments. The basic element is the unidirectional virtual circuit or channel with fixed-size cells. Two possible interfaces:
UNI (User-Network Interface): Boundary between an ATM network and host. NNI (Network-Network Interface): Between two ATM switches (or routers).
HEC:
AAL
AAL
ATM ATM
AAL5
Format
< 64 KB Data 0 47 bytes Pad 16 Reserved 16 Len 32 CRC-32
pad so trailer always falls at end of ATM cell Length: size of PDU (data only) CRC-32 (detects missing or mis-ordered cells) User data User data
AAL5 PDU
User data
pad trailer
ATM cell
48 bytes
48 bytes
48 bytes
ATM network: moves cell along VC to destination at Destination Host: AAL5 reassembles cells into original datagram if CRC OK, datagram is passed to IP