■ A network is a set of connected devices. Whenever we have multiple
devices, we have the problem of how to connect them to make one-to- one communication possible. ■ One solution is to make a point-to-point connection between each pair of devices. ■ These methods, however, are impractical and wasteful when applied to very large networks. ■ The number and length of the links require too much infrastructure to be cost-efficient, and the majority of those links would be idle most of the time. ■ A better solution is switching. ■ A switched network consists of a series of interlinked nodes, called switches. ■ Switches are devices capable of creating temporary connections between two or more devices linked to the switch. ■ In a switched network, some of these nodes are connected to the end systems. Others are used only for routing. Three Methods of Switching ■ Circuit switching, packet switching, and message switching. The first two are commonly used today. ■ The third has been phased out in general communications but still has networking applications. Switching and TCP/IP Layers ■ At the physical layer, we can have only circuit switching. There are no packets exchanged at the physical layer. The switches at the physical layer allow signals to travel in one path or another. ■ At the data-link layer, we can have packet switching. However, the term packet in this case means frames or cells. Packet switching at the data- link layer is normally done using a virtual-circuit approach. ■ At the network layer, we can have packet switching. In this case, either a virtual-circuit approach or a datagram approach can be used. ■ At the application layer, we can have only message switching. The communication at the application layer occurs by exchanging messages. CIRCUIT-SWITCHED NETWORKS ■ A circuit-switched network consists of a set of switches connected by physical links. A connection between two stations is a dedicated path made of one or more links. However, each connection uses only one dedicated channel on each link. Each link is normally divided into n channels by using FDM or TDM. Setup Phase ■ The actual communication in a circuit-switched network requires three phases. ■ Before the two parties (or multiple parties in a conference call) can communicate, a dedicated circuit (combination of channels in links) needs to be established. ■ The end systems are normally connected through dedicated lines to the switches, so connection setup means creating dedicated channels between the switches. ■ When system A needs to connect to system M, it sends a setup request that includes the address of system M, to switch I. Switch I finds a channel between itself and switch IV that can be dedicated for this purpose. Switch I then sends the request to switch IV, which finds a dedicated channel between itself and switch III. Switch III informs system M of system A’s intention at this time. ■ In the next step to making a connection, an acknowledgment from system M needs to be sent in the opposite direction to system A. Only after system A receives this acknowledgment is the connection established. ■ Note that end-to-end addressing is required for creating a connection between the two end systems. Data-Transfer Phase
■ After the establishment of the dedicated circuit (channels), the two
parties can transfer data. Teardown Phase
■ When one of the parties needs to disconnect, a signal is sent to each
switch to release the resources. Efficiency ■ It can be argued that circuit-switched networks are not as efficient as the other two types of networks because resources are allocated during the entire duration of the connection. ■ These resources are unavailable to other connections. ■ In a telephone network, people normally terminate the communication when they have finished their conversation. ■ However, in computer networks, a computer can be connected to another computer even if there is no activity for a long time. In this case, allowing resources to be dedicated means that other connections are deprived. Delay ■ Although a circuit-switched network normally has low efficiency, the delay in this type of network is minimal. During data transfer the data are not delayed at each switch; the resources are allocated for the duration of the connection. PACKET SWITCHING ■ If the message is going to pass through a packet-switched network, it needs to be divided into packets of fixed or variable size. ■ The size of the packet is determined by the network and the governing protocol. ■ In packet switching, there is no resource allocation for a packet. ■ This means that there is no reserved bandwidth on the links, and there is no scheduled processing time for each packet. Resources are allocated on demand. ■ The allocation is done on a firstcome, first-served basis. ■ When a switch receives a packet, no matter what the source or destination is, the packet must wait if there are other packets being processed. ■ This lack of reservation may create delay. ■ In a packet-switched network, there is no resource reservation; resources are allocated on demand. ■ We can have two types of packet-switched networks: datagram networks and virtual circuit networks. Datagram Networks ■ In a datagram network, each packet is treated independently of all others. ■ Even if a packet is part of a multipacket transmission, the network treats it as though it existed alone. Packets in this approach are referred to as datagrams. ■ Datagram switching is normally done at the network layer. ■ The datagram networks are sometimes referred to as connectionless networks. ■ The term connectionless here means that the switch (packet switch) does not keep information about the connection state. ■ There are no setup or teardown phases. Each packet is treated the same by a switch regardless of its source or destination. ■ If there are no setup or teardown phases, how are the packets routed to their destinations in a datagram network? ■ In this type of network, each switch (or packet switch) has a routing table which is based on the destination address. ■ The routing tables are dynamic and are updated periodically. ■ The destination addresses and the corresponding forwarding output ports are recorded in the tables. Destination Address ■ Every packet in a datagram network carries a header that contains, among other information, the destination address of the packet. ■ When the switch receives the packet, this destination address is examined; the routing table is consulted to find the corresponding port through which the packet should be forwarded. ■ This address, unlike the address in a virtual-circuit network, remains the same during the entire journey of the packet. Efficiency ■ The efficiency of a datagram network is better than that of a circuit- switched network; resources are allocated only when there are packets to be transferred. ■ If a source sends a packet and there is a delay of a few minutes before another packet can be sent, the resources can be reallocated during these minutes for other packets from other sources. Delay ■ There may be greater delay in a datagram network than in a virtual- circuit network. ■ Although there are no setup and teardown phases, each packet may experience a wait at a switch before it is forwarded. ■ In addition, since not all packets in a message necessarily travel through the same switches, the delay is not uniform for the packets of a message. Virtual-Circuit Networks ■ A virtual-circuit network is a cross between a circuit-switched network and a datagram network. It has some characteristics of both. – As in a circuit-switched network, there are setup and teardown phases in addition to the data transfer phase. – Resources can be allocated during the setup phase, as in a circuit- switched network, or on demand, as in a datagram network. – As in a datagram network, data are packetized and each packet carries an address in the header. However, the address in the header has local jurisdiction (it defines what the next switch should be and the channel on which the packet is being carried), not end-to-end jurisdiction. – As in a circuit-switched network, all packets follow the same path established during the connection. – A virtual-circuit network is normally implemented in the data-link layer, while a circuit-switched network is implemented in the physical layer and a datagram network in the network layer. Addressing ■ In a virtual-circuit network, two types of addressing are involved: global and local (virtual-circuit identifier). ■ Global Addressing
– A source or a destination needs to have a global address—an address
that can be unique in the scope of the network or internationally if the network is part of an international network. A global address in virtual-circuit networks is used only to create a virtual-circuit identifier. ■ Virtual-Circuit Identifier – The identifier that is actually used for data transfer is called the virtual-circuit identifier (VCI) or the label. A VCI, unlike a global address, is a small number that has only switch scope; it is used by a frame between two switches. When a frame arrives at a switch, it has a VCI; when it leaves, it has a different VCI. Data-Transfer Phase ■ Three phases. ■ To transfer a frame from a source to its destination, all switches need to have a table entry for this virtual circuit. The table, in its simplest form, has four columns. This means that the switch holds four pieces of information for each virtual circuit that is already set up. ■ The data-transfer phase is active until the source sends all its frames to the destination. ■ The procedure at the switch is the same for each frame of a message. The process creates a virtual circuit, not a real circuit, between the source and destination. Setup Phase ■ In the setup phase, a switch creates an entry for a virtual circuit. For example, suppose source A needs to create a virtual circuit to B. Two steps are required: the setup request and the acknowledgment. Acknowledgment ■ A special frame, called the acknowledgment frame, completes the entries in the switching tables. Teardown Phase
■ In this phase, source A, after sending all frames to B, sends a special
frame called a teardown request. ■ Destination B responds with a teardown confirmation frame. All switches delete the corresponding entry from their tables. Efficiency ■ In virtual-circuit switching, all packets belonging to the same source and destination travel the same path, but the packets may arrive at the destination with different delays if resource allocation is on demand. ■ Resource reservation in a virtual-circuit network can be made during the setup or can be on demand during the data-transfer phase. ■ In the first case, the delay for each packet is the same; in the second case, each packet may encounter different delays. Delay