The old telephone system (PSTN) uses circuit switching to transmit voice data whereas VoIP uses packet-switching to do so. The difference in the way these two types of switching work is the thing that made VoIP so different and successful.
To understand switching, you need to realize that the network in place between two communicating persons is a complex field of devices and machines, especially if the network is the Internet. Consider a person in Mauritius having a phone conversation with another person on the other side of the globe, say in the US. There are a large number of routers, switches and other kinds of devices that take the data transmitted during the communication from one end to the other.
Switching and routing
Switching and routing are technically two different things, but for the sake of simplicity, let us take switches and routers (which are devices that make switching and routing respectively) as devices doing one job: make a link in the connection and forward data from the source to the destination.
Paths or circuits
The important thing to look for in transmitting information over such a complex network is the path or circuit. The devices making up the path are called nodes. For instance, switches, routers and some other network devices, are nodes.
In circuit-switching, this path is decided upon before the data transmission starts. The system decides on which route to follow, based on a resource-optimizing algorithm, and transmission goes according to the path. For the whole length of the communication session between the two communicating bodies, the route is dedicated and exclusive, and released only when the session terminates.
Packet Switching
Packet switching is a digital network communications method that groups all transmitted data, irrespective of content, type, or structure into suitably-sized blocks, called packets. The network over which packets are transmitted is a shared network which routes each packet independently from all others and allocates transmission resources as needed. The principal goals of packet switching are to optimize utilization of available link capacity, minimize response times and increase the robustness of communication. When traversing network adapters, switches and other network nodes, packets are buffered and queued, resulting in variable delay and throughput, depending on the traffic load in the network.
Network resources are managed by statistical multiplexing or dynamic bandwidth allocation in which a physical communication channel is effectively divided into an arbitrary number of logical variable-bit-rate channels or data streams. Each logical stream consists of a sequence of packets, which normally are forwarded by a network node asynchronously using first-in, first-out buffering. Alternatively, the packets may be forwarded according to some scheduling discipline for fair queuing or for differentiated or guaranteed quality of service, such as pipeline forwarding or time-driven priority (TDP). Any buffering introduces varying latency and throughput in transmission. In case of a shared physical medium, the packets may be delivered according to some packet-mode multiple access schemes.
Packet switching contrasts with another principal networking paradigm, circuit switching, a method which sets up a specific circuit with a limited number dedicated connection of constant bit rate and constant delay between nodes for exclusive use during the communication session.
Packet mode (or packet-oriented, packet-based) communication may be utilized with or without intermediate forwarding nodes (packet switches)..
Connectionless and connection-oriented packet switching
The service actually provided to the user by networks using packet switching nodes can be either connectionless (based on datagram messages), or virtual circuit switching (also known as connection oriented). Some connectionless protocols are Ethernet, IP, and UDP; connection oriented packet-switching protocols include X.25, Frame relay, Asynchronous Transfer Mode (ATM), Multiprotocol Label Switching (MPLS), and TCP.
In connection oriented networks, each packet is labeled with a connection ID rather than an address. Address information is only transferred to each node during a connection set-up phase, when an entry is added to each switching table in the network nodes.
In connectionless networks, each packet is labeled with a destination address, and may also be labeled with the sequence number of the packet. This precludes the need for a dedicated path to help the packet find its way to its destination. Each packet is dispatched and may go via different routes. At the destination, the original message/data is reassembled in the correct order, based on the packet sequence number. Thus a virtual connection, also known as a virtual circuit or byte stream is provided to the end-user by a transport layer protocol, although intermediate network nodes only provides a connectionless network layer service.
Packet switching in networks
Packet switching is used to optimize the use of the channel capacity available in digital telecommunication networks such as computer networks, to minimize the transmission latency (i.e. the time it takes for data to pass across the network), and to increase robustness of communication.
The most well-known use of packet switching is the Internet and local area networks. The Internet uses the Internet protocol suite over a variety of Link Layer protocols. For example, Ethernet and frame relay are very common. Newer mobile phone technologies (e.g., GPRS, I-mode) also use packet switching.
X.25 is a notable use of packet switching in that, despite being based on packet switching methods, it provided virtual circuits to the user. These virtual circuits carry variable-length packets. In 1978, X.25 was used to provide the first international and commercial packet switching network, the International Packet Switched Service (IPSS). Asynchronous Transfer Mode (ATM) also is a virtual circuit technology, which uses fixed-length cell relay connection oriented packet switching.
Datagram packet switching is also called connectionless networking because no connections are established. Technologies such as Multiprotocol Label Switching (MPLS) and the Resource Reservation Protocol (RSVP) create virtual circuits on top of datagram networks. Virtual circuits are especially useful in building robust failover mechanisms and allocating bandwidth for delay-sensitive applications.
MPLS and its predecessors, as well as ATM, have been called "fast packet" technologies. MPLS, indeed, has been called "ATM without cells". Modern routers, however, do not require these technologies to be able to forward variable-length packets at multigigabit speeds across the network.
Virtual circuit packet switching
Protocols which route data from a node or hop to another hop between two end hosts in a network are called network-layer or L3 protocols. In the Internet, the only currently available network-layer protocol is IP, which comes in two flavors: IPv4 makes use of 32-bit long addresses and IPv6 uses 128-bit long addresses. We will mostly focus on IPv4 as IPv4 is the currently deployed version of IP in the Internet. Because of the advantages of virtual circuit packet switching and the growing popularity of IP, many Internet service providers send IP packets over virtual circuits. Virtual circuit packet switching technologies that have been used in the Internet backbones are ATM and, more recently, MPLS.
ATM is a VC-switching technology which was standardized starting in the late 1980s. ATM uses fixed-length payloads with a length of 48 bytes and a 5-byte header, yielding 53-byte long ATM cells. Among the 40 header bits of a cell, 28 are reserved to identify the virtual circuit to which the cell belongs. The corresponding fields are called VCI/VPI (Virtual Circuit Identifier/Virtual Path Identifier). The VCI/VPI fields are updated at each switch.
A first issue that arises when trying to send IP packets over ATM virtual circuits is the need for a definition of an encapsulation of IP packets in ATM cells, i.e., how to put IP data inside ATM cells. Encapsulation is performed by an adaptation layer (AAL). Moreover, most IP packets are too large to fit in a 53-byte ATM cell. An IP header is at least 20 bytes long, and hosts cannot be coerced to send IP packets of at most 53 bytes. Therefore, IP packets must be cut into smaller pieces in a process called segmentation before they can be encapsulated and put in ATM cells. The last router on the path of IP packets must reassemble the fragments to reconstitute the original IP packets. Segmentation and Reassembly (SAR) is a complex and time consuming process.
Sending IP traffic over an ATM infrastructure proves to be complex. Far from solving the circuit interruption problem that arises on link failure with VC-switching, IP over ATM introduces the aforementioned issues and requires additional hardware as combined IP routers/ATM switches do not exist.
Brief comparison
- Circuit switching is old and expensive, and it is what PSTN uses. Packet switching is more modern.
- When you are making a PSTN call, you are actually renting the lines, with all it implies. See why international calls are expensive? So if you speak for, say 10 minutes, you pay for ten minutes of dedicated line. You normally speak only when your correspondent is silent, and vice versa. Taking also into consideration the amount of time no one speaks, you finally use much less than half of what you are paying for. With VoIP, you actually can use a network or circuit even if there are other people using it at the same time. There is no circuit dedication. The cost is shared.
- Circuit-switching is more reliable than packet-switching. When you have a circuit dedicated for a session, you are sure to get all information across. When you use a circuit which is open for other services, then there is a big possibility of congestion (which is for a network what a traffic jam is for the road), and hence the delays or even packet loss. This explains the relatively lower quality of VoIP voice compared to PSTN. But you actually have other protocols giving a helping hand in making packet-switching techniques to make connections more reliable. An example is the TCP protocol. Since voice is to some extent tolerant to some packet loss (unless text - since a comma lost can mean a big difference), packet-switching is finally ideal for VoIP.
No comments:
Post a Comment