As the title suggests, I am unable to see the difference between the following concepts that are constantly being mentioned in the class on networking at my university:
I feel like the respective terms are constantly being explained using the same analogies. Since I couldn't find a clarifing answer online, I thought it might be good idea to mention this here.
Thank you!
Most people understand the classic Internet (IP) and Telephone-line (POTS) examples but unfortunately, these examples aren't enough to fully differentiate the four terms:
| Packet-switching (PS) | Circuit-Switching (CS) |
|------------------------------|------------------------|
Connectionless (CL) | IP | - |
Connection-oriented (CO) | ... | Telephone (POTS) |
From the above, it's easy to see how people can equate CO to CS and equate CL to PS. However this equating is wrong because it turns out, there are protocols that are both connection-oriented and packet-switching:
| Packet-switching (PS) | Circuit-Switching (CS) |
|------------------------------|------------------------|
Connectionless (CL) | IP | - |
Connection-oriented (CO) | TCP, ATM, X.25 | Telephone (POTS) |
The bottom-left is now filled in with a third type of network that at first, may seem confusing.
To understand, please compare the three:
The first case is too inflexible and no longer used. The third cases are is used heavily by the Internet -- in TCP, data flow is a trivial path consisting of one edge going from host to host. At this layer, this is only one possible path and so indeed data flows (trivially) along the same path always. However, it uses a lower layer protocol, IP, that takes our data flow and breaks into "packets" that take different paths. (CO, PS) networks have a fancier name of virtual circuits. Also note that (CL, CS) networks do not exist.
Please don't conflate the terms circuit switching and virtual circuits by writing "(virtual) circuit-switching". They are two completely different things. For example, POTS Telephone lines are circuit switching but have nothing to do with virtual circuits!
The biggest mistake I see is to assume that all packet-switching networks are connection-less. At school, they taught me that a Packet-switching network necessarily must take the packets and route them individually resulting in different paths and out-of-order delivery. This is wrong! This is only true of CL Packet-switching. From Wikipedia:
Packet switching may be classified into connectionless packet switching, also known as datagram switching, and connection-oriented packet switching, also known as virtual circuit switching.
In fact, when you visit websites in your browser, you'll be using CO packet switching (TCP to be precise).
If you like analogies:
To me, it seems like it should be:
What is the difference between connection-oriented and connectionless services? (layer 3/layer 4 question)
What is the difference between packet switched and circuit switched services? (layer 1/layer 2 question)
A connection-oriented service could be anything that utilizes TCP (transmission control protocol) as it requires a reliable connection where data needs to arrive in a certain order and error free. Services such as ftp, http, and telnet utilize TCP. TCP uses a series of ACK and SYN messages to ensure that the connection is up and that packets are arriving as intended. This is done on all packets that are sent and received. If a packet is dropped, a message is sent back to the sender to re-transmit the packet. TCP operates at layer 4.
On the otherhand, a connectionless service could be anything that utilizes UDP (user datagram protocol) and/or IP (internet protocol) where traffic doesn't need to be guaranteed to arrive at it's destination. Applications that need to be fast use UDP as the dropping packets is a tradeoff when working in near real-time. Services such as snmp, syslog, and some speed test sites use UDP. UDP also operates at layer 4. IP operates at layer 3.
Circuit switching is a technology that is traditionally used in the telecom industry. TDM (time division multiplexing) is used to allocate circuits for services such as voice service. When a circuit is set up, say for a phone call on a DS0 within a T1, that phone call has all the bandwidth that is allocated to that circuit (DS0) and as a result that bandwidth isn't shared with anyone else. At the physical layer (layer 1) T1's, DS0's, DS1's, DS3's, and optical carrier level circuits (SONET) are used for transport. Circuits that are provisioned on the above technologies are dedicated end-to-end.
Packet switching is a where data is segmented into packets and switched through a network. A major technology that utilizes packet switching at layer 2 is Ethernet. With packet switching, packets are moved around over shared media where resources are not dedicated end-to-end. As a result, congestion may occur.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With