LAN switching and Bridges CS491G: Computer Networking Lab
LAN switching and Bridges CS491G: Computer Networking Lab V. Arun Slides adapted from Liebeherr and El Zarki, and Kurose and Ross 1 Outline Interconnection devices Bridges/LAN switches vs. Routers Learning Bridges Transparent bridges 2 Introduction Several different devices for interconnecting networks Ethernet Hub Ethernet Hub Hosts Hosts Bridge
Router X.25 Network Tokenring Gateway 3 Ethernet Hub Connects hosts to Ethernet LAN and connects multiple Ethernet LANs Collisions are propagated Ethernet Hub Ethernet Hub Host Host IP IP LLC LLC 802.3 MAC
Hub Hub 802.3 MAC 4 Bridges/LAN switches A bridge or LAN switch is a device that interconnects two or more Local Area Networks (LANs) and forwards packets between these networks. Bridges/LAN switches operate at the Data Link Layer (Layer 2) Tokenring Bridge IP LLC 802.3 MAC IP Bridge LLC LAN 802.3 MAC
LLC 802.5 MAC LAN 802.5 MAC 5 Ethernet Hubs vs. Ethernet Switches An Ethernet switch is a packet switch for Ethernet frames Buffering of frames prevents collisions. Each port is isolated and builds its own collision domain An Ethernet Hub does not perform buffering: Collisions occur if two frames arrive at the same time. Hub Switch CSMA/CD CSMA/CD CSMA/CD CSMA/CD CSMA/CD CSMA/CD CSMA/CD CSMA/CD
CSMA/CD CSMA/CD CSMA/CD CSMA/CD CSMA/CD HighSpeed Backplane CSMA/CD CSMA/CD CSMA/CD Input Buffers Output Buffers 7 Dual Speed Ethernet hub Dual-speed hubs operate at 10 Mbps and 100 Mbps per second
Conceptually these hubs operate like two Ethernet hubs separated by a bridge 100 Mbps 100 Mbps 100 Mbps 100 Mbps 10 Mbps 10 Mbps 10 Mbps 10 Mbps Dual-Speed Ethernet Hub 8 Routers Routers operate at the Network Layer (Layer 3) Interconnect IP networks IP network IP network IP network
Host Router Host Router Application Application TCP TCP IP Network Access Host IP IP protocol Data Link Network Access IP IP protocol Network
Access Router Data Link Network Access IP protocol Network Access Router Data Link IP Network Access Host 9 Bridges versus Routers An enterprise network (e.g., university) with a large number of local area networks (LANs) can use routers or bridges
1980s: LANs interconnection via bridges Late 1980s and early 1990s: increasingly use of routers Since mid1990s: LAN switches replace most routers Late 2000s: Switches and SDN 11 A Routed Enterprise Network Router Internet Hub FDDI FDDI 12 A Switched Enterprise Network Internet Router Bridge/ Switch 13 Interconnecting networks: Bridges versus Routers Routers Each hosts IP address must be configured Bridges/LAN switches
MAC addresses of hosts are hardwired If network is reconfigured, IP addresses may need to be reassigned No network configuration needed Routing done via RIP or OSPF Routing done by learning bridge algorithm spanning tree algorithm Bridges do not manipulate frames Each router manipulates packet header (e.g., reduces TTL field) 14 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 understanding bridges:
(1) Forwarding of Frames (2) Learning of Addresses (3) Spanning Tree Algorithm 15 (1) Frame Forwarding Each bridge maintains a MAC forwarding table Forwarding table plays the same role as the routing table of an IP router Entries have the form ( MAC address, port, age), where MAC address: host name or group address port: port number of bridge age: aging time of entry (in seconds) with interpretation: a machine with MAC address lies in direction of the port number from the bridge. The entry is age time units old. MAC forwarding table MAC address port a0:e1:34:82:ca:34 45:6d:20:23:fe:2e 1 2 age 10
20 16 (1) Frame Forwarding Assume a MAC frame arrives on port x. Port x Is MAC address of destination in forwarding table for ports A, B, or C ? Found? Forward the frame on the appropriate port Bridge 2 Port A Port C Port B Not found ? Flood the frame, i.e., send the frame on all ports except port x. 17 (2) Address Learning (Learning Bridges) Routing entries set automatically with a simple heuristic: Source field of a frame that arrives on a port tells which hosts are reachable from this port.
Src=x, Dest=y Src=x, Dest=y Src=y, Dest=y Src=x, Dest=x Port 1 Port 2 Port 3 Port 4 x is at Port 3 y is at Port 4 Port 5 Port 6 Src=y, Dest=y Src=x, Dest=x Src=x, Dest=y Src=x, Dest=y 18 (2) Address Learning (Learning Bridges) Learning Algorithm: For each frame received, the source 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). Src=y, Dest=x Port 1 Port 2 Src=y, Dest=x Port 3 Port 4 x is at Port 3 y is at Port 4 Port 5 Port 6 19 Example Consider the following packets: (Src=A, Dest=F), (Src=C, Dest=A), (Src=E, Dest=C) What have the bridges learned? Bridge 2 1 Bridge Bridge 2 Port1 Port2 LAN 1
A Port2 Port1 LAN 2 B C LAN 3 D E F 20 Need for a forwarding between networks What do bridges do if some LANs are reachable only in multiple hops ? What do bridges do if the path between two LANs is not unique ? LAN 2 d
Bridge 4 Bridge 3 LAN 5 Bridge 1 Bridge 5 LAN 1 Bridge 2 LAN 3 LAN 4 21 Problems with network of bridges Consider the two LANs that are connected by two bridges. Assume host n is transmitting a frame F with unknown destination. What is happening? F Bridges A and B flood the frame Bridge A to LAN 2. F Bridge B sees F on LAN 2 (with unknown destination), and copies the frame back to LAN 1 Bridge A does the same.
Duplication causes broadcast storm Wheres the problem? Whats the solution ? LAN 2 F Bridge B F LAN 1 F host n 22 Transparent Bridges Three principal approaches can be found: Fixed Routing Source Routing Spanning Tree Routing (IEEE 802.1d) We only discuss the last one Bridges that execute the spanning tree algorithm are called transparent bridges 23 Spanning Tree Protocol (IEEE 802.1d) Spanning Tree Protocol (SPT) is a solution to prevent loops when forwarding frames between LANs
Standardized as IEEE 802.1d LAN 2 d Bridge 4 Bridge 3 SPT organizes bridges and LANs as spanning tree in a dynamic environment Frames are forwarded only along the branches of the spanning tree Trees dont have loops LAN 5 Bridge 1 Bridge 5 Bridges exchange messages to configure the bridge (Bridge Protocol Data Unit or BPDUs) to build tree. LAN 1 Bridge 2 LAN 3 LAN 4 24
Configuration BPDUs Destination MAC address Source MAC address message type Set to 0 lowest bit is "topology change bit (TC bit) flags Cost bridge ID port ID ID of root Cost of the path from the bridge sending this message ID of bridge sending this message message age ID of port from which message is sent maximum age Time between
BPDUs from the root (default: 1sec) Set to 0 version root ID Configuration Message Set to 0 protocol identifier hello time forward delay Time between recalculations of the spanning tree (default: 15 secs) time since root sent a message on which this message is based 25 What do the BPDUs do? With the help of the BPDUs, bridges can: Elect a single bridge as the root bridge. Calculate the distance of the shortest path to the root bridge Each LAN can determine a designated bridge, which is the bridge closest to the root. The designated bridge will forward
packets towards the root bridge. Each bridge can determine a root port, the port that gives the best path to the root. Select ports to be included in the spanning tree. 26 Concepts Each bridge as 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 of 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. 27 Concepts Root Path Cost: For each bridge, the cost of the min-cost path 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 one with highest priority - if min-cost bridge has two or more ports
on the LAN, select port with lowest ID Note: We assume that cost of a path is the number of hops. 28 Steps of Spanning Tree Algorithm Each bridge is sending out BPDUs that contain the following information: rootID ID cost cost bridge bridge ID ID port port ID ID root root bridge (what the sender thinks it is) root path cost for sending bridge Identifies sending bridge Identifies the sending port Transmission of BPDUs results in the distributed computation of a spanning tree Convergence of the algorithm is very quick 29 Ordering of Messages We define an ordering of BPDU messages IDR1 R1 C1 C1 ID IDB1 B1 ID IDP1 P1
ID M1 IDR2 R2 C2 C2 ID IDB2 B2 ID IDP2 P2 ID M2 We say M1 advertises a better path than M2 (M1<
Root bridge updated to the smallest received root ID that has been received so far 31 Operations of Spanning Tree Protocol Each bridge B looks on all its ports for BPDUs that are better than its own BPDUs Suppose a bridge with BPDU: M1 R1 C1 C1 B1 B1 P1 P1 R1 receives a better BPDU: M2 R2 C2 C2 B2 B2 P2 P2 R2 Then it will update the BPDU to: R2 C2+1 C2+1 B1 B1 P1 P1 R2
However, the new BPDU is not necessarily sent out On each bridge, the port where the best BPDU (via relation <<) was received is the root port of the bridge. 32 When to send a BPDU Say, B has generated a BPDU for each port x RR Cost Cost BB xx B will send this BPDU on port x only if its BPDU is better (via relation <<) than any BPDU that B received from port x. Port x Bridge B Port A Port C Port B
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 33 Selecting the Ports for the Spanning Tree Each bridges makes a local decision which of its ports are part of the spanning tree Now B can decide which ports are in the spanning tree: Bs root port is part of the spanning tree All designated ports are part of the spanning tree All other ports are not part of the spanning tree 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) 34 Building the Spanning Tree LAN 2 Consider the network on the right. Assume that the bridges have calculated the designated ports (D) and the root ports (R) as indicated. d D Bridge
Bridge D R R LAN 5 Bridge R Bridge What is the spanning tree? On each LAN, connect R ports to the D ports on this LAN D LAN 1 R D LAN 3 Bridge D LAN 4 35
Example Assume that all bridges send out their BPDUs once per second, and assume that all bridges send their BPDUs at the same time Assume that all bridges are turned on simultaneously at time T=0 sec. Bridge ID 5 Bridge ID 7 LAN LAN port C port A port C port A LAN port B port B port B port A Bridge ID 3 port B LAN
port A Bridge ID 1 port A LAN port C Bridge ID 2 port B port B LAN port A port C port D Bridge ID 6 LAN 36 Example: BPDUs sent by the bridges T=0sec Bridge 1 Bridge 2
(1,1,7,port) none T=1sec T=2sec In the table (1,0,1,port) means that the BPDU is (1,0,1,A) if the BPDU is sent on port A and (1,0,1,B) if it is sent on port B. At T=1, Bridge 7 receives two BPDUs from Bridge 1: (1,0,1,A) and (1,0,1,B). We assume that A is numerically smaller than B. If not, then the root port of Bridge 7 changes. 37 Example: Settings after convergence Root Port Designated Ports Blocked ports Bridge 1 Bridge 2 Bridge 3 Bridge 5 Bridge 6
Bridge 7 - A B A B B A,B - A,C B,C D - - B - -
A,C A,C Bridge ID 5 Bridge ID 7 LAN Resulting tree: LAN port C port A LAN port C port A port B port B port B port A Bridge ID 3 port B LAN
port A Bridge ID 1 port A LAN port C port B port B LAN port A Bridge ID 2 port C port D Bridge ID 6 LAN 38 VLANs 39 VLANs: motivation consider:
Computer Science Electrical Engineering Computer Engineering CS user moves office to EE, but wants connect to CS switch? single broadcast domain: all layer-2 broadcast traffic (ARP, DHCP, unknown location of destination MAC address) must cross entire LAN security/privacy, efficiency issues Link Layer 5-40 VLANs Virtual Local Area Network switch(es) supporting VLAN capabilities can be configured to define multiple virtual LANS over single
physical LAN infrastructure. port-based VLAN: switch ports grouped (by switch management software) so that single physical switch 1 7 9 15 2 8 10 16 Electrical Engineering (VLAN ports 1-8) Computer Science (VLAN ports 9-15) operates as multiple virtual
switches 1 7 9 15 2 8 10 16 Electrical Engineering (VLAN ports 1-8) Computer Science (VLAN ports 9-16) Link Layer 5-41 Port-based VLAN can also define VLAN based on MAC addresses of endpoints, rather than switch port
router traffic isolation: frames to/from ports 1-8 can only reach ports 1-8 1 7 9 15 2 8 10 16 dynamic membership: ports can be dynamically assigned Electrical Engineering (VLAN ports 1-8) among VLANs forwarding between VLANS: done via routing (just as with separate switches) Computer Science
(VLAN ports 9-15) in practice vendors sell combined switches plus routers Link Layer 5-42 VLANS spanning multiple switches 1 7 9 15 1 3 5 7 2 8 10 16 2 4
6 8 Electrical Engineering (VLAN ports 1-8) Computer Science (VLAN ports 9-15) Ports 2,3,5 belong to EE VLAN Ports 4,6,7,8 belong to CS VLAN trunk port: carries frames between VLANS defined over multiple physical switches frames forwarded within VLAN between switches cant be vanilla 802.1 frames (must carry VLAN ID info) 802.1q protocol adds/removed additional header fields for frames forwarded between trunk ports Link Layer 5-43 802.1Q VLAN frame format type preamble dest. address source
address data (payload) CRC 802.1 frame type data (payload) 2-byte Tag Protocol Identifier (value: 81-00) CRC 802.1Q frame Recomputed CRC Tag Control Information (12 bit VLAN ID field, 3 bit priority field like IP TOS) Link Layer 5-44
Polar Curve For a polar curve r(θ), the AREA inside a "leaf" is (Because instead of infinitesimally small rectangles, use triangles) where θ1 and θ2 are the "first" two times that r = 0. and We know arc length l...
ECG (look for long QTc) Lytes, CBC, LFTs, ESR, TFTs, CK. ... (easy to forget to screen for eating disorders!) Shame and guilt. ... Laura visits multiple different fast-food restaurants in succession and in neighborhoods far from home, so that...
Dividend yield is calculated as the total calendar year cash dividends divided by the year end share price. RoE excludes the impact of warrant exercises 2011 peer group included Amlin, Aspen, Axis, Beazley, Catlin, Endurance, Flagstone, Hiscox, Montpelier, Renaissance Re...
Intravenous therapy or IV therapy is the giving of liquid substances directly ... Blood itself is a colloid. IV Fluids. ... Aqueous solutions of water-soluble molecules. The most commonly used crystalloid fluid is . normal saline=, a solution of sodium...
PACs also show that your association is a visible player in the political arena and about the issues you care about the most. A PAC is one tool to build strong relationships with candidates for office, who may be future...
Arousal, Stress, and Anxiety Arousal, Stress, and Anxiety Defining Arousal, Stress, and Anxiety Trait States Measuring Arousal and Anxiety Physiological signs (heart rate, respiration, skin conductance, biochemistry) Global and multidimensional self-report surveys e.g. Sport Anxiety Scale (trait anxiety) e.g. Sport...
Ready to download the document? Go ahead and hit continue!