Download presentation
Presentation is loading. Please wait.
1
Topic 2: Packet Switching
Connecting nodes that aren’t directly connected Problem Statement: The directly connected networks described in the previous chapter suffer from two limitations. First, there is a limit to how many hosts can be attached. For example, only two hosts can be attached to a point-to-point link, and an Ethernet can connect up to only 1024 hosts. Second, there is a limit to how large of a geographic area a single network can serve. For example, an Ethernet can span only 2500 m, and even though point-to-point links can be quite long, they do not really serve the area between the two ends. Since our goal is to build networks that can be global in scale, the next problem is therefore to enable communication between hosts that are not directly connected. This problem is not unlike the one addressed in the telephone network: Your phone is not directly connected to every person you might want to call, but instead is connected to an exchange that contains a switch. It is the switches that create the impression that you have a connection to the person at the other end of the call. Similarly, computer networks use packet switches (as distinct from the circuit switches used for telephony) to enable packets to travel from one host to another, even when no direct connection exists between those hosts. A packet switch is a device with several inputs and outputs leading to and from the hosts that the switch interconnects. The core job of a switch is to take packets that arrive on an input and forward (or switch) them to the right output so that they will reach their appropriate destination. There are a variety of ways that the switch can determine the “right” output for a packet, which can be broadly categorized as connectionless and connection-oriented approaches. A key problem that a switch must deal with is the finite bandwidth of its outputs. If packets destined for a certain output arrive at a switch and their arrival rate exceeds the capacity of that output, then we have a problem of contention. The switch queues (buffers) packets until the contention subsides, but if it lasts too long, the switch will run out of buffer space and be forced to discard packets. When packets are discarded too frequently, the switch is said to be congested. The ability of a switch to handle contention is a key aspect of its performance, and many high-performance switches use exotic hardware to reduce the effects of contention.
2
Single collision domain
Recap Single collision domain To understand these things in more detail, the following book is a recommended reading: “Cisco LAN switching” by Kennedy Clark and Kevin Hamilton
3
Single collision domain
Recap Single collision domain Hub is a multi-port repeater that does not look inside the contents of the frame or at any networking headers but simply forwards the received frame to all ports other than the incoming port.
4
Recap Collision domain Collision domain
Bridge/ Switch A bridge is a device that’s more intelligent than a repeater/ hub. This is because the bridge does not automatically forward the received frame to all connected ports other than the receiving port; specifically, it filters the received packet (i.e., it does not forward it) in cases where the destination node is on the same LAN segment from which the packet was received by the switch. In the example above, if the sender and receiver are on the LHS LAN segment, while the bridge will receive the frame that the sender sends to the receiver, it will not forward it to the RHS LAN segment since the bridge can look inside the MAC header and see the destination address (and it knows that this destination address is on the LHS LAN segment).
5
Three desirable features of switching:
Recap Three desirable features of switching: Although a switch has limited I/O ports, large networks can be built by interconnecting switches Switches can be connected using Point-to-Point links -> we can build geographically dispersed networks Adding a new host does not necessarily degrade the network performance of existing nodes In the simplest terms, a switch is a mechanism that allows us to interconnect links to form a larger network. A switch is a multi-input, multi-output device, which transfers packets from an input to one or more outputs. The last claim above cannot be made for the shared-media networks discussed in the last chapter. For example, it is impossible for two hosts on the same Ethernet to transmit continuously at 10 Mbps because they share the same transmission medium. Every host on a switched network has its own link to the switch, so it may be entirely possible for many hosts to transmit at the full link speed (bandwidth), provided that the switch is designed with enough aggregate capacity. In general, switched networks are considered more scalable (i.e., more capable of growing to large numbers of nodes) than shared-media networks because of this ability to support many hosts at full speed. A switch is connected to a set of links and, for each of these links, runs the appropriate data link protocol to communicate with the node at the other end of the link. A switch’s primary job is to receive incoming packets on one of its links and to transmit them on some other link. This function is sometimes referred to as either switching or forwarding, and in terms of the OSI architecture, it is the main function of the network layer. Note: Normally the function of switching between different data-links is called routing (distinct from switching which is at L2 and is used for the same link-layer technology).
6
Topic 1: Direct-link networks
Source Host Application Transport Network Data Link Bits Application Transport Network Data Link Destination Host (Same LAN) Bits Repeater/ Hub How does routing take place in a single LAN: Technically speaking, routing is used to connect two different LANs. We use routing here, loosely, to define delivery of the packet to the destination. The application layer data is prepended with a transport layer header, and then an IP header, and lastly with a MAC header. When the destination node (on the same LAN) receives the frame, it removes the IP address, recognizes its own IP address in the destination field, demuxes the packet to the right application using the Transport layer (TCP or UDP) port information. There is no intermediate routing node enroute. When the distance between source host and destination host increases, or the number of nodes increase, switches or bridges can be used. In a hub: a frame is received; it is copied on all other ports; it’s called a physical layer device. Show a frame being copied on all ports. Motivate the question? Why copy on all ports, when you can just copy to the port the destination MAC is in? This can improve throughput as it will reduce some collisions and enable simultaneous transmissions. In a switch, the frame is copied to the port destination MAC is connected to; how are the MAC addresses learnt? A router is used to connect different LANs; An example? A repeater (or hub) simply forwards the bits on all other ports
7
Topic 2: Packet switched networks
Source Host Application Transport Network Data Link Bits Application Transport Network Data Link Destination Host (Same LAN) Bits Bridges/ Switches How does routing take place in a single LAN: Technically speaking, routing is used to connect two different LANs. We use routing here, loosely, to define delivery of the packet to the destination. The application layer data is prepended with a transport layer header, and then an IP header, and lastly with a MAC header. When the destination node (on the same LAN) receives the frame, it removes the IP address, recognizes its own IP address in the destination field, demuxes the packet to the right application using the Transport layer (TCP or UDP) port information. There is no intermediate routing node enroute. When the distance between source host and destination host increases, or the number of nodes increase, switches or bridges can be used. In a hub: a frame is received; it is copied on all other ports; it’s called a physical layer device. Show a frame being copied on all ports. Motivate the question? Why copy on all ports, when you can just copy to the port the destination MAC is in? This can improve throughput as it will reduce some collisions and enable simultaneous transmissions. In a switch, the frame is copied to the port destination MAC is connected to; how are the MAC addresses learnt? A router is used to connect different LANs; An example? A bridge/ L2 switch inspects dest. MAC to decide which port(s) to forward to
8
Topic 2: Internetworking
The other LAN may speak/ understand another protocol (addressing/ framing/ MAC, etc.) Source Host Application Transport Network Data Link Bits Application Transport Network Data Link How does routing take place in a single LAN: Technically speaking, routing is used to connect two different LANs. We use routing here, loosely, to define delivery of the packet to the destination. The application layer data is prepended with a transport layer header, and then an IP header, and lastly with a MAC header. When the destination node (on the same LAN) receives the frame, it removes the IP address, recognizes its own IP address in the destination field, demuxes the packet to the right application using the Transport layer (TCP or UDP) port information. There is no intermediate routing node enroute. When the distance between source host and destination host increases, or the number of nodes increase, switches or bridges can be used. In a hub: a frame is received; it is copied on all other ports; it’s called a physical layer device. Show a frame being copied on all ports. Motivate the question? Why copy on all ports, when you can just copy to the port the destination MAC is in? This can improve throughput as it will reduce some collisions and enable simultaneous transmissions. In a switch, the frame is copied to the port destination MAC is connected to; how are the MAC addresses learnt? A router is used to connect different LANs; An example? Bits Destination Host (Another LAN) Router (L3 Switch) A router / L3 switch inspects destination IP to decide which port(s) to forward to
9
Internetworking (Example)
Destination Source Let’s crystallize the theory we’ve learn up till now with this example. The source and destination nodes both use Ethernet technology; however, they are on different LANs. The route from the source to the destination goes through networks other than Ethernet (FDDI and PPP). Network 3 and Network 4 cannot understand Ethernet packets. Therefore, the router R1 should send the Ethernet frame as a FDDI frame on network 3 and R2 should send the Ethernet frame as a PPP frame on Network 4. Network 1 can understand Ethernet frame. From Douglas Comer’s book: (Free chapter on Internetworking from: Each network technology is designed to fit a specific set of constraints. For example, LAN technologies are designed to provide high-speed communication across short distances, while WAN technologies are designed to provide communication across large areas. Consequently, No single networking technology is best for all needs. A large organization with diverse networking requirements needs multiple physical networks. More important, if the organization chooses the type of network that is best for each task, the organization will have several types of networks. For example, a LAN technology like Ethernet might be the best solution for connecting computers at a given site, but a leased data circuit might be used to interconnect a site in one city with a site in another. Concept of Universal Service: The chief problem with multiple networks should be obvious: a computer attached to a given network can only communicate with other computers attached to the same network. The problem became evident in the 1970s as large organizations began to acquire multiple networks. Each network in the organization formed an island. In many early installations, each computer attached to a single network, and employees had to choose a computer appropriate for each task. That is, an employee was given access to multiple screens and keyboards, and the employee was forced to move from one computer to another to send a message across the appropriate network. Users are neither satisfied nor productive when they must use a separate computer for each network. Consequently, most modern computer communication systems allow communication between any two computers analogous to the way a telephone system provides communication between any two telephones. Known as universal service, the concept is a fundamental part of networking. With universal service, a user on any computer in any organization can send messages or data to any other user. Furthermore, a user does not need to change computer systems when changing tasks — all information is available to all computers. As a result, users are more productive. A communication system that supplies universal service allows arbitrary pairs of computers to communicate. Although universal service is highly desirable, incompatibilities among network hardware, frames, and addresses prevent a bridged network from including arbitrary technologies. Internetworking Despite the incompatibilities among network technologies, researchers have devised a scheme that provides universal service among heterogeneous networks. Called internetworking, the scheme uses both hardware and software. Additional hardware systems are used to interconnect a set of physical networks. Software on the attached computers then provides universal service. The resulting system of connected physical networks is known as an internetwork or internet. The basic hardware component used to connect heterogeneous networks is a router. Physically, a router is an independent hardware system dedicated to the task of interconnecting networks. Like a bridge, a router contains a processor and memory as well as a separate I/O interface for each network to which it connects. The network treats a connection to a router the same as a connection to any other computer. The figure uses a cloud to depict each network because router connections are not restricted to a particular network technology. A router can connect two LANs, a LAN and a WAN, or two WANs. Furthermore, when a router connects two networks in the same general category, the networks do not need to use the same technology. For example, a router can connect an Ethernet to a Wi-Fi network. Thus, each cloud represents an arbitrary network technology. An Internet router is a special-purpose hardware system dedicated to the task of interconnecting networks. A router can interconnect networks that use different technologies, including different media, physical addressing schemes, or frame formats. Destination
10
Packet Switching Approaches
Major packet-switching approaches are: Datagram – connectionless (CL) approach Virtual Circuit – connection-oriented (CO) approach Source Routing The question then is, How does the switch decide which output port to place each packet on? The general answer is that it looks at the header of the packet for an identifier that it uses to make the decision. The details of how it uses this identifier vary, but there are two common approaches. The first is the datagram or connectionless approach. The second is the virtual circuit or connection-oriented approach. A third approach, source routing, is less common than these other two, but it is simple to explain and does have some useful applications.
11
Datagram (CL) Approach
Why is this approach called connection-less? What will be the forwarding table at Switch 2? The idea behind datagrams is incredibly simple: You just make sure that every packet contains enough information to enable any switch to decide how to get it to its destination. That is, every packet contains the complete destination address. Consider the example network illustrated in Figure 3.4, in which the hosts have addresses A, B, C, and so on. To decide how to forward a packet, a switch consults a forwarding table (sometimes called a routing table), an example of which is depicted in Table 3.1. This particular table shows the forwarding information that switch 2 needs to forward datagrams in the example network. It is pretty easy to figure out such a table when you have a complete map of a simple network like that depicted here; we could imagine a network operator configuring the tables statically. This is called Static Routing. It is a lot harder to create the forwarding tables in large, complex networks with dynamically changing topologies and multiple paths between destinations. That harder problem is known as routing and is the topic of Section 4.2. We can think of routing as a process that takes place in the background so that, when a data packet turns up, we will have the right information in the forwarding table to be able to forward, or switch, the packet. Connectionless (datagram) networks have the following characteristics: ■ A host can send a packet anywhere at any time, since any packet that turns up at a switch can be immediately forwarded (assuming a correctly populated forwarding table). As we will see, this contrasts with most connection-oriented networks, in which some “connection state” needs to be established before the first data packet is sent. ■ When a host sends a packet, it has no way of knowing if the network is capable of delivering it or if the destination host is even up and running. ■ Each packet is forwarded independently of previous packets that might have been sent to the same destination. Thus, two successive packets from host A to host B may follow completely different paths (perhaps because of a change in the forwarding table at some switch in the network). ■ A switch or link failure might not have any serious effect on communication if it is possible to find an alternate route around the failure and to update the forwarding table accordingly.
12
Forwarding table at Switch 2
Datagram Approach Forwarding table at Switch 2 The idea behind datagrams is incredibly simple: You just make sure that every packet contains enough information to enable any switch to decide how to get it to its destination. That is, every packet contains the complete destination address. Consider the example network illustrated in Figure 3.4, in which the hosts have addresses A, B, C, and so on. To decide how to forward a packet, a switch consults a forwarding table (sometimes called a routing table), an example of which is depicted in Table 3.1. This particular table shows the forwarding information that switch 2 needs to forward datagrams in the example network. It is pretty easy to figure out such a table when you have a complete map of a simple network like that depicted here; we could imagine a network operator configuring the tables statically. This is called Static Routing. It is a lot harder to create the forwarding tables in large, complex networks with dynamically changing topologies and multiple paths between destinations. That harder problem is known as routing and is the topic of Section 4.2. We can think of routing as a process that takes place in the background so that, when a data packet turns up, we will have the right information in the forwarding table to be able to forward, or switch, the packet. Connectionless (datagram) networks have the following characteristics: ■ A host can send a packet anywhere at any time, since any packet that turns up at a switch can be immediately forwarded (assuming a correctly populated forwarding table). As we will see, this contrasts with most connection-oriented networks, in which some “connection state” needs to be established before the first data packet is sent. ■ When a host sends a packet, it has no way of knowing if the network is capable of delivering it or if the destination host is even up and running. ■ Each packet is forwarded independently of previous packets that might have been sent to the same destination. Thus, two successive packets from host A to host B may follow completely different paths (perhaps because of a change in the forwarding table at some switch in the network). ■ A switch or link failure might not have any serious effect on communication if it is possible to find an alternate route around the failure and to update the forwarding table accordingly.
13
Virtual Circuit (VC) Approach
Multiple VCs can be defined for an interface Different VCI identify the same circuit; VCI is significant only locally Virtual Circuits are: like circuit switching since end-to-end path is established/ torn down like packet switching since data divided into packets with identifiers VC state information is kept at each switch A widely used technique for packet switching, which differs significantly from the datagram model, uses the concept of a virtual circuit (VC). This approach, which is also called a connection-oriented model, requires that we first set up a virtual connection from the source host to the destination host before any data is sent. To understand how this works, consider Figure 3.5, where host A again wants to send packets to host B. We can think of this as a two-stage process. The first stage is “connection setup.” The second is data transfer. We consider each in turn. Connection Setup Phase: In the connection setup phase, it is necessary to establish “connection state” in each of the switches between the source and destination hosts. The connection state for a single connection consists of an entry in a “VC table” in each switch through which the connection passes. One entry in the VC table on a single switch contains: ■ a virtual circuit identifier (VCI) that uniquely identifies the connection at this switch and that will be carried inside the header of the packets that belong to this connection ■ an incoming interface on which packets for this VC arrive at the switch ■ an outgoing interface in which packets for this VC leave the switch ■ a potentially different VCI that will be used for outgoing packets The semantics of one such entry is as follows: If a packet arrives on the designated incoming interface and that packet contains the designated VCI value in its header, then that packet should be sent out the specified outgoing interface with the specified outgoing VCI value first having been placed in its header. There may of course be many virtual connections established in the switch at one time. Also, we observe that the incoming and outgoing VCI values are generally not the same. Thus, the VCI is not a globally significant identifier for the connection; rather, it has significance only on a given link—that is, it has link local scope. Whenever a new connection is created, we need to assign a new VCI for that connection on each link that the connection will traverse. We also need to ensure that the chosen VCI on a given link is not currently in use on that link by some existing connection. There are two broad classes of approach to establishing connection state. One is to have a network administrator configure the state, in which case the virtual circuit is “permanent.” Of course, it can also be deleted by the administrator, so a permanent virtual circuit (PVC) might best be thought of as a long-lived or administratively configured VC. Alternatively, a host can send messages into the network to cause the state to be established. This is referred to as signalling, and the resulting virtual circuits are said to be switched. The salient characteristic of a switched virtual circuit (SVC) is that a host may set up and delete such a VC dynamically without the involvement of a network administrator. Note that an SVC should more accurately be called a “signalled” VC, since it is the use of signalling (not switching) that distinguishes an SVC from a PVC. In real networks of reasonable size, the burden of configuring VC tables correctly in a large number of switches would quickly become excessive using the above procedures. Thus, some sort of signalling is almost always used, even when setting up “permanent” VCs. In the case of PVCs, signalling is initiated by the network administrator, while SVCs are usually set up using signalling by one of the hosts. We consider now how the same VC just described could be set up by signalling from the host. To start the signalling process, host A sends a setup message into the network, that is, to switch 1. The setup message contains, among other things, the complete destination address of host B. The setup message needs to get all the way to B to create the necessary connection state in every switch along the way. We can see that getting the setup message to B is a lot like getting a datagram to B, in that the switches have to know which output to send the setup message to so that it eventually reaches B. For now, let’s just assume that the switches know enough about the network topology to figure out how to do that, so that the setup message flows on to switches 2 and 3 before finally reaching host B. There are several things to note about virtual circuit switching: ■ Since host A has to wait for the connection request to reach the far side of the network and return before it can send its first data packet, there is at least one RTT of delay before data is sent. ■ While the connection request contains the full address for host B (which might be quite large, being a global identifier on the network), each data packet contains only a small identifier, which is only unique on one link. Thus, the per-packet overhead caused by the header is reduced relative to the datagram model. ■ If a switch or a link in a connection fails, the connection is broken and a new one will need to be established. Also, the old one needs to be torn down to free up table storage space in the switches. ■ The issue of how a switch decides which link to forward the connection request on has been glossed over. In essence, this is the same problem as building up the forwarding table for datagram forwarding, which requires some sort of routing algorithm. Host A will send a packet to Host B using VCI 5
14
Virtual Circuit Approaches
How to establish VC state information at every node? 1) Permanent Virtual Circuit (PVC) Connection state entered manually Administrator maintained Survives reboot Usually persists for months
15
Virtual Circuit Approach
How to establish VC state information at every node? 2) Switched Virtual Circuit (SVC) Requested dynamically Application initiated Terminated when application exits
16
Multiple VCs share physical circuit
A widely used technique for packet switching, which differs significantly from the datagram model, uses the concept of a virtual circuit (VC). This approach, which is also called a connection-oriented model, requires that we first set up a virtual connection from the source host to the destination host before any data is sent. To understand how this works, consider Figure 3.5, where host A again wants to send packets to host B. We can think of this as a two-stage process. The first stage is “connection setup.” The second is data transfer. We consider each in turn. Connection Setup Phase: In the connection setup phase, it is necessary to establish “connection state” in each of the switches between the source and destination hosts. The connection state for a single connection consists of an entry in a “VC table” in each switch through which the connection passes. One entry in the VC table on a single switch contains: ■ a virtual circuit identifier (VCI) that uniquely identifies the connection at this switch and that will be carried inside the header of the packets that belong to this connection ■ an incoming interface on which packets for this VC arrive at the switch ■ an outgoing interface in which packets for this VC leave the switch ■ a potentially different VCI that will be used for outgoing packets The semantics of one such entry is as follows: If a packet arrives on the designated incoming interface and that packet contains the designated VCI value in its header, then that packet should be sent out the specified outgoing interface with the specified outgoing VCI value first having been placed in its header. There may of course be many virtual connections established in the switch at one time. Also, we observe that the incoming and outgoing VCI values are generally not the same. Thus, the VCI is not a globally significant identifier for the connection; rather, it has significance only on a given link—that is, it has link local scope. Whenever a new connection is created, we need to assign a new VCI for that connection on each link that the connection will traverse. We also need to ensure that the chosen VCI on a given link is not currently in use on that link by some existing connection. There are two broad classes of approach to establishing connection state. One is to have a network administrator configure the state, in which case the virtual circuit is “permanent.” Of course, it can also be deleted by the administrator, so a permanent virtual circuit (PVC) might best be thought of as a long-lived or administratively configured VC. Alternatively, a host can send messages into the network to cause the state to be established. This is referred to as signalling, and the resulting virtual circuits are said to be switched. The salient characteristic of a switched virtual circuit (SVC) is that a host may set up and delete such a VC dynamically without the involvement of a network administrator. Note that an SVC should more accurately be called a “signalled” VC, since it is the use of signalling (not switching) that distinguishes an SVC from a PVC. In real networks of reasonable size, the burden of configuring VC tables correctly in a large number of switches would quickly become excessive using the above procedures. Thus, some sort of signalling is almost always used, even when setting up “permanent” VCs. In the case of PVCs, signalling is initiated by the network administrator, while SVCs are usually set up using signalling by one of the hosts. We consider now how the same VC just described could be set up by signalling from the host. To start the signalling process, host A sends a setup message into the network, that is, to switch 1. The setup message contains, among other things, the complete destination address of host B. The setup message needs to get all the way to B to create the necessary connection state in every switch along the way. We can see that getting the setup message to B is a lot like getting a datagram to B, in that the switches have to know which output to send the setup message to so that it eventually reaches B. For now, let’s just assume that the switches know enough about the network topology to figure out how to do that, so that the setup message flows on to switches 2 and 3 before finally reaching host B. There are several things to note about virtual circuit switching: ■ Since host A has to wait for the connection request to reach the far side of the network and return before it can send its first data packet, there is at least one RTT of delay before data is sent. ■ While the connection request contains the full address for host B (which might be quite large, being a global identifier on the network), each data packet contains only a small identifier, which is only unique on one link. Thus, the per-packet overhead caused by the header is reduced relative to the datagram model. ■ If a switch or a link in a connection fails, the connection is broken and a new one will need to be established. Also, the old one needs to be torn down to free up table storage space in the switches. ■ The issue of how a switch decides which link to forward the connection request on has been glossed over. In essence, this is the same problem as building up the forwarding table for datagram forwarding, which requires some sort of routing algorithm.
17
Virtual Circuit vs. Leased Lines
Leased line, even when idle, remains dedicated unlike VCs in which statistical multiplexing is used Bit delay is constant on a leased line but variable on virtual circuits (due to queuing delays) Leased lines are circuit switched whereas virtual circuits are packet switched Leased lines are usually more expensive than VCs A widely used technique for packet switching, which differs significantly from the datagram model, uses the concept of a virtual circuit (VC). This approach, which is also called a connection-oriented model, requires that we first set up a virtual connection from the source host to the destination host before any data is sent. To understand how this works, consider Figure 3.5, where host A again wants to send packets to host B. We can think of this as a two-stage process. The first stage is “connection setup.” The second is data transfer. We consider each in turn. Connection Setup Phase: In the connection setup phase, it is necessary to establish “connection state” in each of the switches between the source and destination hosts. The connection state for a single connection consists of an entry in a “VC table” in each switch through which the connection passes. One entry in the VC table on a single switch contains: ■ a virtual circuit identifier (VCI) that uniquely identifies the connection at this switch and that will be carried inside the header of the packets that belong to this connection ■ an incoming interface on which packets for this VC arrive at the switch ■ an outgoing interface in which packets for this VC leave the switch ■ a potentially different VCI that will be used for outgoing packets The semantics of one such entry is as follows: If a packet arrives on the designated incoming interface and that packet contains the designated VCI value in its header, then that packet should be sent out the specified outgoing interface with the specified outgoing VCI value first having been placed in its header. There may of course be many virtual connections established in the switch at one time. Also, we observe that the incoming and outgoing VCI values are generally not the same. Thus, the VCI is not a globally significant identifier for the connection; rather, it has significance only on a given link—that is, it has link local scope. Whenever a new connection is created, we need to assign a new VCI for that connection on each link that the connection will traverse. We also need to ensure that the chosen VCI on a given link is not currently in use on that link by some existing connection. There are two broad classes of approach to establishing connection state. One is to have a network administrator configure the state, in which case the virtual circuit is “permanent.” Of course, it can also be deleted by the administrator, so a permanent virtual circuit (PVC) might best be thought of as a long-lived or administratively configured VC. Alternatively, a host can send messages into the network to cause the state to be established. This is referred to as signalling, and the resulting virtual circuits are said to be switched. The salient characteristic of a switched virtual circuit (SVC) is that a host may set up and delete such a VC dynamically without the involvement of a network administrator. Note that an SVC should more accurately be called a “signalled” VC, since it is the use of signalling (not switching) that distinguishes an SVC from a PVC. In real networks of reasonable size, the burden of configuring VC tables correctly in a large number of switches would quickly become excessive using the above procedures. Thus, some sort of signalling is almost always used, even when setting up “permanent” VCs. In the case of PVCs, signalling is initiated by the network administrator, while SVCs are usually set up using signalling by one of the hosts. We consider now how the same VC just described could be set up by signalling from the host. To start the signalling process, host A sends a setup message into the network, that is, to switch 1. The setup message contains, among other things, the complete destination address of host B. The setup message needs to get all the way to B to create the necessary connection state in every switch along the way. We can see that getting the setup message to B is a lot like getting a datagram to B, in that the switches have to know which output to send the setup message to so that it eventually reaches B. For now, let’s just assume that the switches know enough about the network topology to figure out how to do that, so that the setup message flows on to switches 2 and 3 before finally reaching host B. There are several things to note about virtual circuit switching: ■ Since host A has to wait for the connection request to reach the far side of the network and return before it can send its first data packet, there is at least one RTT of delay before data is sent. ■ While the connection request contains the full address for host B (which might be quite large, being a global identifier on the network), each data packet contains only a small identifier, which is only unique on one link. Thus, the per-packet overhead caused by the header is reduced relative to the datagram model. ■ If a switch or a link in a connection fails, the connection is broken and a new one will need to be established. Also, the old one needs to be torn down to free up table storage space in the switches. ■ The issue of how a switch decides which link to forward the connection request on has been glossed over. In essence, this is the same problem as building up the forwarding table for datagram forwarding, which requires some sort of routing algorithm.
18
Frame relay – Example VC technology
A widely used technique for packet switching, which differs significantly from the datagram model, uses the concept of a virtual circuit (VC). This approach, which is also called a connection-oriented model, requires that we first set up a virtual connection from the source host to the destination host before any data is sent. To understand how this works, consider Figure 3.5, where host A again wants to send packets to host B. We can think of this as a two-stage process. The first stage is “connection setup.” The second is data transfer. We consider each in turn. Connection Setup Phase: In the connection setup phase, it is necessary to establish “connection state” in each of the switches between the source and destination hosts. The connection state for a single connection consists of an entry in a “VC table” in each switch through which the connection passes. One entry in the VC table on a single switch contains: ■ a virtual circuit identifier (VCI) that uniquely identifies the connection at this switch and that will be carried inside the header of the packets that belong to this connection ■ an incoming interface on which packets for this VC arrive at the switch ■ an outgoing interface in which packets for this VC leave the switch ■ a potentially different VCI that will be used for outgoing packets The semantics of one such entry is as follows: If a packet arrives on the designated incoming interface and that packet contains the designated VCI value in its header, then that packet should be sent out the specified outgoing interface with the specified outgoing VCI value first having been placed in its header. There may of course be many virtual connections established in the switch at one time. Also, we observe that the incoming and outgoing VCI values are generally not the same. Thus, the VCI is not a globally significant identifier for the connection; rather, it has significance only on a given link—that is, it has link local scope. Whenever a new connection is created, we need to assign a new VCI for that connection on each link that the connection will traverse. We also need to ensure that the chosen VCI on a given link is not currently in use on that link by some existing connection. There are two broad classes of approach to establishing connection state. One is to have a network administrator configure the state, in which case the virtual circuit is “permanent.” Of course, it can also be deleted by the administrator, so a permanent virtual circuit (PVC) might best be thought of as a long-lived or administratively configured VC. Alternatively, a host can send messages into the network to cause the state to be established. This is referred to as signalling, and the resulting virtual circuits are said to be switched. The salient characteristic of a switched virtual circuit (SVC) is that a host may set up and delete such a VC dynamically without the involvement of a network administrator. Note that an SVC should more accurately be called a “signalled” VC, since it is the use of signalling (not switching) that distinguishes an SVC from a PVC. In real networks of reasonable size, the burden of configuring VC tables correctly in a large number of switches would quickly become excessive using the above procedures. Thus, some sort of signalling is almost always used, even when setting up “permanent” VCs. In the case of PVCs, signalling is initiated by the network administrator, while SVCs are usually set up using signalling by one of the hosts. We consider now how the same VC just described could be set up by signalling from the host. To start the signalling process, host A sends a setup message into the network, that is, to switch 1. The setup message contains, among other things, the complete destination address of host B. The setup message needs to get all the way to B to create the necessary connection state in every switch along the way. We can see that getting the setup message to B is a lot like getting a datagram to B, in that the switches have to know which output to send the setup message to so that it eventually reaches B. For now, let’s just assume that the switches know enough about the network topology to figure out how to do that, so that the setup message flows on to switches 2 and 3 before finally reaching host B. There are several things to note about virtual circuit switching: ■ Since host A has to wait for the connection request to reach the far side of the network and return before it can send its first data packet, there is at least one RTT of delay before data is sent. ■ While the connection request contains the full address for host B (which might be quite large, being a global identifier on the network), each data packet contains only a small identifier, which is only unique on one link. Thus, the per-packet overhead caused by the header is reduced relative to the datagram model. ■ If a switch or a link in a connection fails, the connection is broken and a new one will need to be established. Also, the old one needs to be torn down to free up table storage space in the switches. ■ The issue of how a switch decides which link to forward the connection request on has been glossed over. In essence, this is the same problem as building up the forwarding table for datagram forwarding, which requires some sort of routing algorithm. Other approaches include X.25 and ATM
19
Source Routing Approach
A third approach to switching that uses neither virtual circuits nor conventional datagrams is known as source routing. The name derives from the fact that all the information about network topology that is required to switch a packet across the network is provided by the source host. There are various ways to implement source routing. One would be to assign a number to each output of each switch and to place that number in the header of the packet. The switching function is then very simple: For each packet that arrives on an input, the switch would read the port number in the header and transmit the packet on that output. However, since there will in general be more than one switch in the path between the sending and the receiving host, the header for the packet needs to contain enough information to allow every switch in the path to determine which output the packet needs to be placed on. One way to do this would be to put an ordered list of switch ports in the header and to rotate the list so that the next switch in the path is always at the front of the list. In this example, the packet needs to traverse three switches to get from host A to host B. At switch 1, it needs to exit on port 1, at the next switch it needs to exit at port 0, and at the third switch it needs to exit at port 3. Thus, the original header when the packet leaves host A contains the list of ports (3, 0, 1), where we assume that each switch reads the rightmost element of the list. To make sure that the next switch gets the appropriate information, each switch rotates the list after it has read its own entry. Thus, the packet header as it leaves switch 1 en route to switch 2 is now (1, 3, 0); switch 2 performs another rotation and sends out a packet with (0, 1, 3) in the header. Although not shown, switch 3 performs yet another rotation, restoring the header to what it was when host A sent it. There are some variations on this approach. For example, rather than rotate the header, each switch could just strip the first element as it uses it. Rotation has an advantage over stripping, however: Host B gets a copy of the complete header, which may help it figure out how to get back to host A.
20
References Chapter 3: Packet Switching [P&D]
21
Questions/ Confusions?
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.