CS475 – Networks Lecture 7 Chapter 3 – Internetworking Assignments • Reading for Lecture 8: Section 3.2 • Homework 3, Programming Project 2 posted, due Thursday, September 22 Ch. 3 Internetworking Direct link networks from Chapter 1 must be connected together inputs and outputs. Its job is to forward (switch) a packet to form a global network. This internetworking is accomplished arriving on an input to the right output. by switches and routers. A router interconnects links of different types, dealing with A switch interconnects links of the same type. It has multiple __________________. 3.1 Switching and Forwarding A switch can use one of three methods to determine which oriented approach, (3) source routing. output port a packet should be forwarded to: (1) _____________ All three methods assume that each node has a unique identifier or connectless approach, (2) virtual-circuit or connection- (an address). 3.1.1 Datagram Forwarding Dest. Port A 3 B 0 C 3 D 3 E 2 F 1 G 0 H 0 Forwarding table for switch 2 Fig 3.2 Example network for datagram forwarding In datagram forwarding each packet contains the complete • A switch or link failure can be tolerated if an alternate route destination address. Each switch contains a ________________ exists. (routing) table. For a simple network like the one shown here a network • A host can send a packet at any time (in contrast to virtual administrator could construct the forwarding tables manually. circuit networks). For more complex networks with dynamically changing • A host has no way of knowing if the network can deliver the topologies and multiple paths between nodes, ______________ algorithms are used to construct the table. We will study routing packet (or if the dest. is up). algorithms next class. • Packets are forwarded independently. The Internet Protocol (IP) is based on datagram forwarding. 09/15/2011 1 of 6 3.1.2 Virtual Circuit Switching SWITCH In Int. In VCI Out Int. Out VCI 1 2 5 1 11 2 3 11 2 7 3 0 7 1 4 Selected virtual circuit entries from switch tables (for a VC between hosts A and B) Fig 3.3 An example of a virtual circuit network Communication between nodes A and B on a VC network requires that a connection be setup. In the setup (______________________) process host A sends a setup message to the network. The message contains the address of host B. As the message passes through each switch, the switch assigns a VC identifier (VCI) for that connection on the upstream link. The response from B contains the VCI for the downsteam link so The VC tables establish a virtual circuit between hosts A and B. each switch can construct an entry in the VC table. Notice that each link in a VC will typically have a different VCI. Multiple VCIs are normally assigned to a link. Each VCI would correspond to a different VC. • There is at least a ______________ delay for setup before two After the nodes are done communicating the VC should be torn down to free resources (VC table entries and VC buffers). nodes can communication. • While the connection request has to have the full address of B, It is relatively easy to implement different Quality of Service data frames need only a VCI. (The VCI is changed in the (________________) guarantees on different VCs. frame by switch.) Frame Relay and ATM networks are popular examples of VC • In the event of a switch or link failure a new connection must explore ATM in more detail next week (Section 3.3). be setup. • Forwarding of the connection request requires a routing algorithm. 09/15/2011 networks. They are used as backbone networks. We will 2 of 6 Asynchronous Transfer Mode (ATM) Asynchronous Transfer Mode (ATM) was embraced by the The most significant feature of the ATM cell is its ___________. telephone industry in the 1980s and early 1990s. • Easier to build hardware, write algorithms ATM is a connection-oriented (virtual circuits), packet-switched • Easier to do tasks in parallel, improving scalability technology. It uses fixed-length 53 byte (5 byte header, 48 byte The payload of 48 bytes was a compromise. Voice data is better payload) packets called cells. in smaller units; digital data better in larger units. Although ATM was originally designed to compete with Ethernet, it is now used primarily only in _________ networks. 3.1.3 Source Routing In source routing the source node provides all the information about the network that is necessary for the packet to reach the destination. The information is embedded in the packet _________________. In the example on the previous slide the required switch output port number is included in the header. Since the number of switches is usually unknown, the list of ports numbers is rotated so that the port of the next switch is always at the head of the Fig 3.7 Source routing example (the switch reads the rightmost number) list. packet passes through the switch.) Source routing requires the sending host know enough about the network topology to build the header (analogous to building As alternatives to rotating the port list, the port number could be stripped as in (b) or the header could contain a pointer to the next port number as in (c). (The pointer would be updated as the forwarding or VC tables). Note that packet headers must, in general, be of _____________ length with no upper bound on the size of the header. 3.1.4 Bridges and LAN Switches Switches that forward packets between shared-media LANs (e.g. ports are in different collision domains. Ethernets) are known as LAN switches or bridges. Bridges can be used to create an extended LAN. For example a A bridge (unlike a hub or repeater) _______________ a packet bridge can be used to connect two Ethernets that are at their received on one port and retransmits it on all other ports. The max. size and form an extended Ethernet. 09/15/2011 3 of 6 Learning Bridges Host Port A 1 B 1 C 1 X 2 Y 2 Z 2 Forwarding Table A bridge need not forward all frames. The bridge could use a _________________ frames need to be forwarded to all ports forwarding table to only send packets addressed to host A out (except the port they are received on). Port 1. Forwarding tables are constructed automatically. Initially the Table entries have timeout values to handle moving hosts from bridge forwards packets to all ports while it inspects the source one network to another. Frames addressed to hosts not listed in address in each frame. It builds the table by associating source the table are forwarded to all other ports. addresses with the ____________ on which the frame arrives. Spanning Tree Algorithm The network at right contains ____________________. Simple forwarding tables might allow duplicate frames to arrive (along different paths) or broadcast frames to endlessly cycle. If we imagine the network as a graph (with bridges as vertices) then a spanning tree is a _________________ which includes all vertices but includes no loops. An example graph and a corresponding spanning tree are shown in Fig. 3.13 (below right). (The spanning tree shown is one of many possible.) Fig. 3.10 Extended LAN with loops The spanning tree algorithm is a protocol used by bridges to agree on a spanning tree for an extended network. The algorithm allows each bridge to select ports over which it will and will not forward frames. The algorithm is ___________________ so that if a bridge fails, Fig. 3.11 (a) cyclic graph (b) spanning tree a new spanning tree is constructed. 09/15/2011 4 of 6 The algorithm works as follows to allow each bridge to select • ports over which it will forward packets: • bridge for forwarding frames toward the root. The Each bridge has a unique ID (B1, B2). The bridge with designated bridge is the one __________________ to the smallest ID is the ________________________. the root (if there is a tie, the lowest ID wins). The root forwards packets out all ports. • On each LAN one bridge is selected as the designated • Each bridge is connected to multiple LANs and it Each bridge computes the shortest path (# of hops) to participates in election of a designated bridge for each the root and notes which port is on this path. This port LAN it is connected to. The bridge forwards frames is used as the preferred path to the root. over those ports for which it is the designated bridge. B5 is the designated bridge for LAN A because it is closer to the Each configuration message contains the following information: root (B1) than B3. It is also the designated bridge for LAN B 1) The ID for the bridge sending the message because it has a lower ID than B7. 2) The ID of the bridge thought to be root Ports not in the spanning tree neither accept or transmit frames. 3) The distance (hops) to the root Frames from LAN B addressed (or broadcast frames) to nodes in LAN K would follow the B1-B5-B7 path. Note that bridges B3 and B6 are currently unused. If bridge B5 were to go down the algorithm is rerun and bridges B3 and B7 would become designated bridges for LANs A and B respectively. The network would function normally. In real networks the spanning tree is created by bridges passing ____________________________ messages to each other and then deciding whether or not they are a root or designated bridge (refer to the text for details). Fig. 3.12 Spanning tree with removed ports Broadcast and Multicast Bridges forward broadcast frames on each active (selected) port spanning tree are receiving the multicast the segment can be other than the one on which it is received. _____________________. Each host in a multicast group must Multicasts can be handled in the same way, but they can be periodically send a frame to the multicast address so that the handled more efficiently. If no hosts on a segment of the bridge does not prune the segment containing the host. 09/15/2011 5 of 6 Limitations of Bridges Bridges should be used only to connect 10 or so LANs. The Packets can be sent (using only MAC addressing) between hosts spanning tree algorithm scales linearly and broadcast messages on the the same VLAN. Broadcast messages are restricted to the are sent across the extended LAN. same VLAN. One approach to building larger networks is to use routers to Frames on VLAN 100 are never forwarded to VLAN 200 (and connect (extended) LANs. We will discuss routing in Section vice versa). The packets must be routed between VLANs. 3.3 Newer LAN switches provide support for _________________ LANs (VLAN). VLANs allow a bridged network to be partitioned into smaller separate LANs. Ports on LAN switches can be assigned to particular VLANs. In-class Exercises Problem 3.3 on page 285 Problem 3.13 on page 288 Turn in at the end of class. 09/15/2011 6 of 6