3

First some information:

In virtual circuit model ( which is in the Network Layer ) there are three phases:

1) Connection establishment => In this step a path is chosen. Let's simply say, use routers with id 4,9,12 to get to the destination.

2) Data transfer => In this step the packets ( IP packets ) are forwarded.

3) Connection tear down => Circuit information is removed from the routers.

So in this model, the packets only need to know what circuit they are on. So they do not need full addresses. If a packet only carries the information that it is on circuit 9454, the routers will be able to know where to forward the packets to, because a connection was established, and routers hold the necessary information...

Now lets move up one level, to the Transport Layer.. TCP ( Transmission Control Protocol ) uses connections! Does that mean TCP uses Virtual Circuit Model in the Network Layer? Or is still Datagram Model used in Network Layer, and TCP makes its own connection in the Transport Layer?

My question is also valid for UDP in Transport Layer and Datagram Model in Network Layer. Can we say that a UDP connection will always use Datagram Model in the Network Layer?

2
  • Why downvote, downvoter? Feb 17, 2014 at 7:31
  • 1
    To be honest, I don't actually see what's wrong with the question. It seems the author is looking for a clarification for what the difference between a circuit and a connection is, and what the relationship between packet switching and circuit switching is. It might be a bit trivial for this forum but I can't think of a better one for it, and a canonical answer might actually be good. Feb 17, 2014 at 15:31

3 Answers 3

7

I would give an answer of "no, but it is remarkably similar."

Here's some history and a largely complete explanation.

Circuits 101

Information networks can route traffic, basically, in terms of circuit switching or in terms of packet switching. Circuit switching offers many more guarantees than packet switching, but this comes at a cost, and so circuit switched networks can't degrade gracefully. The classic circuit-switched network is the PSTN, and a virtual circuit would be something like a DS0 on the PSTN.

A DS0 basically works as part of a bundle of connections, usually in a DS1. In a DS1, you will have a bundle of DS0's which are transmitted together, frame-by frame in time-division manner, so each DS0 is guaranteed a specific bandwidth, timeliness, etc. by the underlying network transport.

Another way to look at this is that a physical circuit would be something like a cat6 cable running between two terminals. You can send data back and forth over the wires at guaranteed speeds, and no other communications are going to interfere with that. Indeed the early telephone networks worked by connecting physical circuits (that is copper wires) using manual or electromechanical switches. As this was computerized, the circuits were virtualized and digital (as opposed to analog) information was sent down wires on a time division basis again with a circuit reserving a slot in the time division schedule.

What this means is that circuit switching is more about bandwidth reservation than it is about routing. The former leads to the latter. I.e. a circuit reserves bandwidth for the entire connection.

Why TCP Connections are not Virtual Circuits

TCP/IP is fully packet-switched. It makes no provisions for virtual circuits. This is why things like QoS are often necessary when trunking VOIP (a virtual circuit has built-in QoS guarantees). You have no guarantee that all packets will be routed alike. They may not come through in the same order. They may not come through in a timely manner (from a connection-oriented perspective). So you can't really build virtual circuits per se on top of a packet switched protocol like IP.

TCP comes somewhat close and in fact can work as a somewhat imperfect substitute. It offers as many of the guarantees as it can. This is why, when implemented on TCP/IP, H.323 uses TCP connections instead of the virtual circuits the protocol prefers.

But TCP connections still aren't circuits, because they don't reserve bandwidth during connection on every switch between the two nodes.

Of course TCP connections are more than just datagrams. They include routing information (as does UDP) but they also include the accounting information necessary to reconstruct the stream on the other side in order.

The Answer

Both TCP and UDP are datagram protocols. They send a packet of data with routing information to routers with none of the guarantees of that a circuit offers. TCP offers a subset of guarantees on the end points of what a circuit would offer by adding accounting information to allow the end points to handle errors and a series of data in order, but it is only a subset. Of datagram protocols, TCP is the closest thing one will find to a virtual circuit but it is still conceptually and operationally very different.

3
  • Thanks for the answer. I am only confused about: "Both TCP and UDP are datagram protools". In the book I am following ( Tannenbaum ) it is stated that UDP is a datagram protocol where as TCP uses "Connections"... Feb 19, 2014 at 14:06
  • Koray: A TCP connection is a series of datagrams plus routing and accounting information necessary to reconstruct the stream in the same order on the other side. If that clears it up, I will edit that into my answer. Feb 20, 2014 at 2:37
  • Can you give some examples where virtual circuit approach is used, where a path is established for the connection duration in modern networks?
    – Sandeep
    Aug 14, 2021 at 12:26
4

TCP uses IP as network layer. The IP header contains the information where the packet is coming from (Source IP) and where the packet is going to (Destination IP). IP delivers the packets to the destination and does not care about circuits or anything else. It's a purely packet-based protocol.

TCP itself is a connection-oriented protocol. It's not a virtual-circuit either. (It does not reservere bandwidth and neither does it provide or promise a constant bit rate or latency.)

UDP is a connection-less protocol. It's fire-and-forget. The application has to make sure the data arrives. (if it does care about that at all).

3

TCP uses the underlying IP layer to make create connections on top of the datagram layer. It is not a circuit model.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.