| < Day Day Up > |
|
Suppose you want to transfer a file from one computer to another. In packet switching, a file is divided into small units (for instance, 1,024 bytes) called packets, and each packet is sent over the transmission medium. At the receiving end, these packets will be put together, and the file is given to the user. The sender just gives a command to send a file, and the recipient receives the file—the underlying operation of packetization is transparent and is not known to the user.
To transmit data using this concept, we need special equipment called packet switches, as shown in Figure 15.2. A packet switch has ports to receive packets from incoming lines and ports to send packets on outgoing lines. The packet switch receives each packet, analyzes the data fields in the packet to find the destination address, and puts the packet in the required outgoing line. This mechanism is known as packet switching. The packet switch should have buffers to hold the packets if they arrive at a rate faster than the rate at which the packets can be processed. When the packets arrive on the input ports, they are kept in buffers, each packet is analyzed by the packet switch (to find out the destination address), and based on the destination address, the packet will be sent through one of the outgoing ports. In other words, the packet is "routed" to the appropriate destination.
Figure 15.2: A packet switching network.
In packet switching, the data is divided into small units called packets, and each packet is sent over the network. The packet switch analyzes the destination address in the packet and routes the packet toward the destination.
Good concept. The main advantage is that each packet can take a different route to reach the destination, and it is not necessary that all packets follow the same route. If one communication link fails, packets can take a different route; if one communication link has too much traffic, the packets can take a route with less traffic. What are the problems?
Since each packet can travel independently, the packet has to carry the address of the destination.
Since different packets can take different routes, they may not be received in sequence at the destination, and hence each packet has to carry a sequence number so that at the destination all the packets can be put in sequence.
Due to transmission errors, some packets may be received with errors. Each packet must contain some error detection mechanism.
Some packets may get lost due to intermittent problems in the medium or packet switches. There must be some mechanism for acknowledgements— the receiver has to inform the sender whether a particular packet is received correctly or request a retransmission of the packet. Each packet should also have the source address in addition to the destination address.
There are a few more problems, but these are the major problems. Is packet switching worth it, then? Well, yes, because it provides a very reliable mechanism for transfer of data provided we establish the necessary procedures. Also, we can avoid the call setup and call disconnection procedures, saving time.
For packet switching to work, we need a packet switch. The job of a packet switch is to get the packets from an incoming port, analyze the packet to see its destination address, and then put the packet in the outgoing port. In the packet switch, the incoming packet is kept in a buffer (in a queue). The software takes each packet, analyzes it, and keeps it in an outgoing buffer. This switching has to be done very fast. For fast packet switching, the size of the packet is an important issue.
If the packet size is very large, the packet switch should have a large buffer. If the packet is small, for each packet there will be overhead (additional data to be inserted such as addresses, CRC, etc.). The size of the packet is a design parameter. Just to get an idea of the packet size used in practical networks, in Ethernet LANs, the maximum packet size is 1,526 bytes, and in X.25-based networks, it is 1,024 bytes.
A packet switch will have incoming ports and outgoing ports. The packet received on the incoming port will be analyzed by the packet switch for the destination address, and the packet is given to one of the outgoing ports towards the destination.
Packet switching takes two forms: virtual circuit and datagram service.
Note | The size of the packet is an important design parameter. If the packet is small, the overhead on each packet will be very high. On the other hand, if the packet is large, a high capacity buffer is required in the packet switch. |
When a computer (source node) has to transmit some information to another computer (destination node) over a packet network, a small packet, called the call setup packet, is sent by the source node to the destination node. The call setup packet will take a route to reach the destination node, and the destination can send a call accept packet. The route taken by these packets is subsequently used to transmit the data packets. A virtual circuit is established between the transmitting and receiving nodes to transfer the data. This is similar to circuit switching, and hence some time is lost in call setup and call disconnection. However, the advantage is that all the data packets are received at the destination in the same sequence, so reassembly is easier. The virtual circuit service (also known as connection-oriented service) concept is shown in Figure 15.3.
Figure 15.3: Virtual circuit (connection-oriented) service.
At the time of setting up the call, at each packet switch, the necessary buffers will be allocated, and the outgoing port will also be allocated. When a packet arrives, the packet switch knows what to do. If the packet switch cannot accept a call for any reason, it informs the sender so that the sender can find an alternative path.
A virtual circuit can be set up on a per-call basis or on a permanent basis. A virtual circuit set up on a per-call basis is called a switched virtual circuit (SVC), similar to the call set up in a PSTN when we call someone else's telephone. A virtual circuit set up on a permanent basis is called a permanent virtual circuit (PVC), which is similar to a leased line.
Note | For creating a permanent virtual circuit (PVC), each packet switch on the route between the source and destination has to be programmed. The PVC is a concatenation of the routes between packet switches. A PVC is used when there is heavy traffic between two nodes so that no time is wasted in setting up a call for each data transfer session. |
X.25, Asynchronous Transfer Mode (ATM), and Frame Relay–based networks use the virtual circuit mechanism.
In virtual circuit service, also known as connection-oriented service, first a circuit is established between the source and destination, then data transfer takes place, and finally the circuit is disconnected. This is similar to circuit-switching operation.
In datagram service, there is no procedure for call setup (and hence for call disconnection as well). Each data packet (called a datagram) is handled independently: the data is divided into packets, and each packet can take its own route to reach the destination, as shown in Figure 15.4. However, in this scheme, the packets can reach the destination at different times and hence not in sequence. It is the responsibility of the destination to put the packets in order and check whether all the packets are received or whether some packets are lost. If packets are lost, this has to be communicated to the source with a request for retransmission. The advantage of datagram service is that there is no call setup.
Figure 15.4: Datagram service.
For data communication (such as e-mail or file transfer), datagram service is quite efficient because the channel can be used efficiently.
In datagram service, each packet is handled independently by the packet switch. The advantage of datagram service is that there is no call setup and disconnection procedures, and hence it is much more efficient as compared to a virtual circuit.
A third mechanism used to send packets from the source to destination is source routing. In this mechanism, the source decides which route the packet has to take. This information is also included in the packet. Each packet switch receives the packet and then forwards it to the next packet switch based on the information available in the packet. For source routing to work, the source should know the complete topology of the network (how many packet switches are there, how each packet switch is connected to other packet switches, and so on). Hence, this mechanism is rarely used.
In source routing, the source specifies the route to be taken by the packets. However, this is difficult to implement because the topology of the network needs to be known by the source.
| < Day Day Up > |
|