Switching Chapter 7 Switching Techniques 1. Circuit Switching • Dedicated resource 2. Packet Switching • Shared resource 1. Virtual circuits 2. Datagram Circuit Switching • A complete circuit (route or path) between source and destination nodes is established before the data can be transmitted. • The circuit between the source and destination can be established on any communication link/transmission medium (telephone lines, coaxial cable, satellite link, microwave link, etc.). • The following three steps are required to establish the connections: 1. Connection Setup. This requires a subscriber’s request for service, identifies the terminal, searches and grabs a circuit, informs the required terminal and then receives its response. 2. Data Interchange. The established link is held during the transmission of data between source and destination and sends out the billing information (depending on the distance and duration of the connection) to the subscribers. 3. Connection Termination. After the communication is completed, the link channels and shared devices are released. Circuit Switching • Problems 1. This allocated capacity is idle when the session has nothing to send. Thus not efficient. 2. Circuit switching usually uses a fixed data rate (e.g., 64 kbps) Packet Switching Packet Switching • Packets are parts of messages and include control bits (for detecting transmission errors). • Networks break the message into blocks (or packets). • The message is divided into blocks (or packets) of fixed size with its own control information regarding the routing, etc., across the network. • Route chosen on packet-by-packet basis. • Different packets may follow different route, results in out-of-sequence arrival at destination. • The receiver, after receiving the packets out of sequence, has to arrange the packets in the same order as they were transmitted from the source. Packet Switching • If any node receives a garbled packet, it will request the sending node to transmit the same packet again. • The acknowledgement will be sent upon receiving the last packet. • If the destination node does not receive all the packets within the specified time, it sends a request for the data (instead of acknowledgement) to the source about the missing packets. • The packet switching technique allows the switching nodes to transmit the packets without waiting for a complete message and also allows them to adjust the traffic they have, thus minimizing the resource requirements of the nodes. If any particular node is already heavily loaded, it will reject the packets until its load becomes moderate. Packet Switching 1. Datagram Packet Switching (Connectionless service) : I. No connection setup is required. II. Packets are routed from entry to exit node independently of each other. III. Each packet may follow a different path through the network. Packets may arrive at the exit node out of sequence. IV. Packets transmitted by an entry node may never reach the exit node. V. No guarantee of sequenced or reliable delivery is made. VI. Can provide connection-oriented service if the exit node is capable of re-sequencing out-of-order packets and requesting any missing packets from the entry node. Packet Switching 2. Virtual Circuit Packet Switching (Connection- oriented service) : I. A connection needs to be established and torn down between the source and destination. II. In the connection setup procedure, a path through the network is selected. III. All packets travel from the entry node to the exit node through this path. IV. Reliable and Sequenced delivery of data packets to the destination host are guaranteed. X.25 • In the case of packet-switching networks, the attached stations must organize their data into packets for transmission. This requires a certain level of cooperation between the network and the attached stations. • This cooperation is embodied in an interface standard. The standard used for traditional packet-switching networks is called X.25. • ITU-T standard for interface between host and packet switched network. • Defines three layers – Physical – Link – Packet X.25 Physical • The physical level deals with the physical interface between an attached station computer, terminal and the link that attaches that station to the packet- switching node. Two ends are distinct – Data Terminal Equipment DTE (user equipment) – Data Circuit-terminating Equipment DCE (node) • It makes use of the physical-level specification in a standard known as X.21 X.25 Link • The link level standard is referred to as LAPB (Link Access Protocol - Balanced). • The link level provides for the reliable transfer of data across the physical link, by transmitting the data as a sequence of frames. X.25 Packet • The packet level provides a virtual circuit service. This service enables any subscriber to the network to set up logical connections, called virtual circuits, to other subscribers. • All data in this connection form a single stream between the end stations. • Established on demand. • What is important for an external virtual circuit is that there is a logical relationship, or logical channel, established between two stations, and all of the data associated with that logical channel are considered as part of a single stream of data between the two stations. X.25 Packet • X.25 virtual circuits is shown in Figure. • In this example, station A has a virtual circuit connection to C; station B has two virtual circuits established, one to C and one to D; and stations E and F each have a virtual circuit connection to D. • As an example of how these external virtual circuits are used, station D keeps track of data packets arriving from three different workstations (B, E, F) on the basis of the virtual circuit number associated with each incoming packet. X.25 Packet • User data are passed down to X.25 level 3, which appends control information as a header, creating a packet. This control information serves several purposes, including identifying by number a particular virtual circuit with its associated data, and providing sequence numbers that can be used for flow and error control on a virtual circuit basis. • The entire X.25 packet is then passed down to the LAPB entity, which appends control information at the front and back of the packet, forming a LAPB frame (Link Access Protocol– Balanced). Again, the control information in the frame is needed for the operation of the LAPB protocol. Issues with X.25 • key features include: – multiplexing of virtual circuits at layer 3. – layers 2 and 3 include flow and error control. • hence have considerable overhead. • not appropriate for modern digital systems with high reliability. Frame Relay • Today's networks employ reliable digital transmission technology over high- quality, reliable transmission links, many of which are optical fiber. In addition, with the use of optical fiber and digital transmission, high data rates can be achieved. In this environment, the overhead of X.25 is not only unnecessary but degrades the effective utilization of the available high data rates. • Frame relay is designed to eliminate much of the overhead that X.25 imposes on end user systems and on the packet-switching network. The key differences between frame relay and a conventional X.25 packet-switching service are: 1. Call control signaling, which is information needed to set up and manage a connection, is carried on a separate logical connection from user data. Thus, intermediate nodes need not maintain state tables or process messages relating to call control on an individual per-connection basis. 2. Multiplexing and switching of logical connections takes place at layer 2 instead of layer 3, eliminating one entire layer of processing. 3. There is no hop-by-hop flow control and error control. End-to-end flow control and error control are the responsibility of a higher layer, if they are employed at all. 4. Thus, with frame relay, a single user data frame is sent from source to destination, and an acknowledgment, generated at a higher layer, may be carried back in a frame. There are no hop-by-hop exchanges of data frames and acknowledgments.