Department of Engineering Science ES465/CES 440, Intro. to Networking & Network Management Repeaters, Bridges, & Switches http://www.sonoma.edu/users/k/kujoory References • “Computer Networks & Internet,” Douglas Comer, 6th ed, Pearson, 2014, Ch 17, Textbook, 5th ed, slides by Lami Kaya (LKaya@ieee.org) with some changes. • “Computer Networks,” A. Tanenbaum, 5th ed., Prentice Hall, 2011, ISBN: 13:978013212695-3. • “Computer & Communication Networks,” Nader F. Mir, 2nd ed, Prentice Hall, 2015, ISBN: 13: 9780133814743. • “Data Communications Networking,” Behrouz A. Forouzan, 4th ed, Mc-Graw Hill, 2007 • “Data & Computer Communications,” W. Stallings, 7th ed., Prentice Hall, 2004. • “Computer Networks: A Systems Approach," L. Peterson, B. Davie, 4th Ed., Morgan Kaufmann 2007. Ali Kujoory 6/30/2016 Not to be reproduced without permission 1 Topics Covered • • • • • • • • • • • 17.1 Introduction 17.2 Distance Limitation & LAN Design 17.3 Fiber Modem Extensions 17.4 Repeaters 17.5 Bridges & Bridging 17.6 Learning Bridges & Frame Filtering 17.7 Why Bridging Works Well 17.8 Distributed Spanning Tree 17.9 Switching & Layer 2 Switches 17.10 VLAN Switches 17.11 Bridging Used with Other Devices Ali Kujoory 6/30/2016 Not to be reproduced without permission 2 17.1 Introduction • This chapter – discusses two important concepts: • Mechanisms that can extend a LAN across a longer distance & • LAN switching – introduces repeaters, hubs, bridges, & the spanning tree algorithm used to prevent forwarding loops Ali Kujoory 6/30/2016 Not to be reproduced without permission 3 17.2 Distance Limitation & Design • The major parameters an engineer needs to consider in the design a network are: – Capacity – Maximum cost – Distance that can be achieved at a given cost • Limitation of distance arises since hardware is engineered to emit a fixed amount of energy Ali Kujoory 6/30/2016 – At distance beyond the design limit, stations will not receive sufficiently strong signal & errors occur • Max length specification is fundamental part of LAN technology • LAN hardware will not work correctly over wires that exceed the bound Not to be reproduced without permission 4 17.3 Fiber Modem Extensions • Most extension mechanisms use standard interface & – insert additional hardware components that can relay signals across longer distances • The simplest LAN extension mechanism consists of an optical fiber & a pair of fiber modems – used to connect a computer to a remote Ethernet • Fig. 17.1 illustrates the interconnection • Each of the fiber modems contains hardware to perform two functions: – accept packets over the Ethernet interface & send them over the optical fiber & – accept packets that arrive over the optical fiber & send them over the Ethernet interface Fig. 17.1 Illustration of fiber modems used to provide a connection between a computer & a remote Ethernet. Ali Kujoory 6/30/2016 Not to be reproduced without permission 5 17.4 Repeaters • A repeater is an analog device used to propagate LAN signals over long distances – A repeater does not understand packets or signal coding, instead – it merely amplifies the signal received & transmits the amplified version as output • Repeaters were used extensively with the original Ethernet, & have been used with other LAN technologies Ali Kujoory 6/30/2016 – Recently, repeaters have been introduced with infrared receivers • to permit a receiver to be located at a longer distance from a computer – Consider a situation in which the infrared receiver for a cable television controller must be in a different room than the controller • Fig. 17.2 illustrates an infrared sensor extended with a repeater Not to be reproduced without permission 6 Figure 15.3 Function of a repeater 15.7 Ali Kujoory 6/30/2016 Not to be reproduced without permission 7 17.5 Bridges & Bridging • A bridge is a mechanism that connects two LAN segments • The bridge listens in promiscuous mode on each segment, i.e., – receives all packets sent on the segment promiscuous = not restricted to one port (go to all ports as in a Hub) • When it receives a valid frame from one segment – the bridge forwards a copy of the frame to the other segment Ali Kujoory 6/30/2016 • Thus, two LAN segments connected by a bridge appear to behave like a single LAN – a computer connected to either segment can send a frame to any computer on the both segments • A broadcast frame is delivered to all computers – Thus, computers do not know whether they are connected to a single LAN segment or a bridged LAN • Bridge technology is also included in a cable & DSL modem Not to be reproduced without permission 8 17.6 Learning Bridges & Frame Filtering – the bridge must forward a copy of each broadcast or multicast frame • Bridges do not blindly forward a copy of each frame from one LAN to another, instead, – A bridge uses MAC addresses to perform filtering • A bridge examines the destination address in a frame, & – does not forward the frame onto the other LAN segments unless necessary • If the LAN supports broadcast or multicast Ali Kujoory 6/30/2016 • to make the bridged LAN operate like a single LAN • How can a bridge know which computers are attached to which segments? – Most bridges are called adaptive or learning bridges • because they learn the locations of computers automatically – To do so, a bridge uses source addresses Not to be reproduced without permission 9 17.6 Learning Bridges & Frame Filtering • When a frame arrives from a given segment – the bridge extracts the source address from the header, & – adds the address to a list of computers attached to the segment • Bridge uses the MAC address to determine whether to forward the frame • A bridge learns that a computer is present on a segment as soon as the computer transmits a frame Ali Kujoory 6/30/2016 • Consider the bridged LANs in Fig. 17.3, & • the example of a learning bridge in Fig. 17.4, which – lists a sequence of packet transmissions, – the location information that the bridge has accumulated at each step in time, & – the disposition of the packet, • i.e., the segments over which the packet is sent Not to be reproduced without permission 10 Figure 15.5 A bridge connecting two LANs 15.11 Ali Kujoory 6/30/2016 Not to be reproduced without permission 11 Figure 15.6 A learning bridge and the process of learning 15.12 Ali Kujoory 6/30/2016 Not to be reproduced without permission 12 17.6 Learning Bridges & Frame Filtering Fig 17.3 Illustration of six computers connected to a pair of bridged LAN segments. Does not know yet where B is Fig 17.4 Example of a learning bridge with computers A, B, & C on one segment & computers X, Y, & Z on another. Ali Kujoory 6/30/2016 Not to be reproduced without permission 13 17.7 Why Bridging Works Well • A bridged network can exhibit higher overall performance than a single LAN • A bridge permits simultaneous transmission on each segment • In Fig. 17.3, e.g., – computer A can send a packet to computer B – at the same time computer X sends a packet to computer Y – Although it receives a copy of each packet • because each packet has been sent to a destination on the same segment as the source – the bridge merely discards the two frames without forwarding them • A bridge permits simultaneous activity on attached segments – a pair of computers on one segment can communicate at the same time as a pair of computers on another segment • the bridge will not forward either of them Ali Kujoory 6/30/2016 Not to be reproduced without permission 14 17.8 Distributed Spanning Tree (DST) • Consider the four LAN segments already connected by three bridges & a fourth bridge about to be inserted • Assume the computers (not shown) are plugged into each hub as in Fig. 17.5 • The network operates well before the 4th bridge inserted – Computers can send unicast frames to one another, also – Broadcast & multicast work well • When the 4th bridge is inserted, the loop becomes problematic Fig. 17.5 Illustration of a bridged network with a fourth bridge about to be inserted. Ali Kujoory 6/30/2016 Not to be reproduced without permission 15 Figure 15.7 Loop problem in a learning bridge 15.16 Ali Kujoory 6/30/2016 Not to be reproduced without permission 16 17.8 Distributed Spanning Tree (DST) • In Fig. 17.5 unless at least one bridge is prevented from forwarding broadcasts, – copies of a broadcast frame will go around the loop for ever – Computers attached to hubs receive an endless # of copies • To prevent cycle of endless loop, bridges implement an algorithm that computes a Distributed Spanning Tree Ali Kujoory 6/30/2016 • DST views bridges as nodes in a graph & imposes a “tree on a graph” (= without loop) • DST was originally developed by DEC called “Spanning Tree Protocol (STP) in 1985 • STP consists of three steps: 1. Root election 2. Shortest path computation 3. Forwarding Not to be reproduced without permission 17 17.8 Distributed Spanning Tree (Spanning Tree Protocol) 1. Root election – bridges multicast a packet that contains their bridge ID, & o the bridge with the smallest ID is chosen – To permit a manager to control the election, a bridge ID consists of two parts: o a 16-bit configurable priority # o a 48-bit MAC address 2. Shortest path computation – Each bridge computes a shortest path to the root bridge Ali Kujoory 6/30/2016 -- Links included in the shortest paths of all bridges form the spanning tree 3. Forwarding – An interface that connects to the shortest path is enabled for forwarding packets; o an interface that does not lie on the shortest path is blocked • In STP, Ethernet bridges communicate amongst themselves using a multicast address that is reserved for STP Not to be reproduced without permission 18 17.8 Distributed Spanning Tree (Spanning Tree Protocol) • Variations of STP have been designed & standardized – IEEE created a standard named 802.1d (in 1990) – the standard was updated in 1998 • IEEE standard 802.1q provides a way to run STP on a set of logically independent networks, that – share a physical medium without any confusion or interference Ali Kujoory 6/30/2016 • Cisco created a proprietary version of STP, Per-VLAN Spanning Tree (PVST) for use on a VLAN switch • IEEE standard 802.1w introduced the Rapid STP (RSTP) has been incorporated in 801.1d-2004 (in 1998), & – now replaces STP, some versions are • Multiple Instance STP (MISTP) • Multiple STP (MSTP) Not to be reproduced without permission 19 17.9 Switching & Layer 2 Switches • An Ethernet switch, sometimes called a Layer 2 switch is an electronic device that resembles a hub – a switch provides multiple ports that each attach to a single computer & – a switch allows computers to send frames to one another • The difference between a hub & a switch arises from the way the devices operate: – while a switch is a digital device that forwards packets – We can think of a hub as simulating a shared transmission medium – We think of a switch as simulating a bridged network that has one computer per LAN segment • Fig. 17.6 illustrates the conceptual use of bridges in a switch – a hub operates as an analog device that forwards signals among computers Ali Kujoory 6/30/2016 Not to be reproduced without permission 20 17.9 Switching & Layer 2 Switches Ali Kujoory 6/30/2016 Not to be reproduced without permission 21 17.9 Switching & Layer 2 Switches • A switch does not contain separate bridges – a switch consists of an intelligent interface attached to each port & – a central fabric that provides simultaneous transfers • An interface contains – a processor, memory, & other hardware needed to accept a packet – consult a forwarding table & – send the packet across the fabric to the correct output port Ali Kujoory 6/30/2016 • An interface can buffer arriving packets when an output port is busy • Fig. 17.7 illustrates the architecture – Physically, switches are available in many sizes (ports) • Advantage of using a switched LAN instead of a hub is parallelism – Although a hub can only support one transmission at a time • a switch permits multiple transfers to occur at the same time, provided the transfers are independent Not to be reproduced without permission 22 17.9 Switching & Layer 2 Switches Ali Kujoory 6/30/2016 Not to be reproduced without permission 23 17.10 VLAN Switches • Virtual Local Area Network (VLAN) switches • The concept is straightforward: – allow a manager to configure a single switch to – emulate multiple, independent switches • A manager can specify a set of ports on the switch & designates them to be on virtual LAN 1 – designates another set of ports to be on virtual LAN 2, & so on • When a computer on virtual LAN 2 broadcasts a packet – only those computers on the same virtual LAN receive a copy – i.e., once configured, a VLAN switch makes it appear that there are multiple switches Ali Kujoory 6/30/2016 Not to be reproduced without permission 24 17.10 VLAN Switches • Dividing computers into separate broadcast domains does not appear important – until one considers a large company or a service provider • In each case, it may be important to guarantee that a set of computers can communicate – without others receiving the packets & – without receiving packets from outsiders • E.g., a company may choose to provide a firewall between computers in the CEO's office & other computers in the company Ali Kujoory 6/30/2016 Not to be reproduced without permission 25 17.11 Multiple Switches & Shared VLANs • Switches are usually placed in physical proximity to computers • E.g., an organization, may choose to place a switch on each floor – Locating a switch near a set of computers reduces # of wires that must be run – Conventional switches can be interconnected for a large single network – Reduces the chances of collisions on a large switch Ali Kujoory 6/30/2016 • Can VLAN operate across multiple switches? YES – Not without extra support – IEEE802.1Q allows that with additional VLAN tag, Fig. 17.8 • Without VLAN tag multiple switches cannot manage multiple VLANs effectively – Imagine if both VLAN1, VLAN2, & VLAN3 span across SwitchA, SwitchB, & SwitchC • It will very time-consuming to configure the switches with the organizational changes Not to be reproduced without permission 26 17.11 Multiple Switches & Shared VLANs • VLAN tags is used when computers attached to each switch in a network belong to different departments • The 4-byte VLAN tag is specified in IEEE 802.1Q Fig. 17.8 The format of an Ethernet frame with an 802.1Q VLAN tag. Ali Kujoory 6/30/2016 Not to be reproduced without permission 27 17.11 Multiple Switches & Shared VLANs Fig. 17.9 An example of how 802.1Q frame format is used with interconnected VLAN switches • 802.1Q tag allows multiple VLAN switches to be interconnected 6/30/2016 VLA Ns Switc hes A 10 1 B 10 1 C 11 1 D 11 2 E 10 2 F 12 2 • When a PC broadcasts a frame – Whereas the frames between switches use 802.1Q format – Frames between each switch & the computers use the standard format without tag Ali Kujoory PCs – The corresponding switch delivers a copy to each local port that is a part of VLAN & • Inserts the VLAN tag, & sends the frame across the inter-switch link. – The second switch receives the frame, removes the tag & • Delivers a copy to PCs of that VLAN Not to be reproduced without permission 28 17.12 The Importance of Bridging • Although bridges are not sold as stand-alone devices, bridging is a fundamental concept that has been incorporated into many devices • E.g., a DSL or cable modem provides a form of bridging: • Some wireless technologies also use a form of bridging to transfer frames from a mobile device to a provider's network – provides an Ethernet connection at a subscriber's residence & – transfers Ethernet packets between the subscriber's location & the provider's network Ali Kujoory 6/30/2016 Not to be reproduced without permission 29