Virtual Circuit (VC)

What is a virtual circuit?
The Internet is a datagram network. Many of the alternatives architectures to the Internet are virtual-circuit networks and use connections at the network layer. These network-layer connections are called virtual circuits (VC). A VC network is a connection (analogous to the connection-oriented service in the transport layer), host-to-host service. A significant property of a VC is that it is implemented in both the end systems and the network core.

A VC consists of a path, a VC number and a entry in the forwarding table in every router along the path. A packet sent using VC will have a VC number in it's header. When a router receives this packet, it has to look up the VC number along with the incoming interface in the table. This gives the router the output interface and a new VC number that has to be inserted into the header. So the VC number may change at all routers along the path. The reason the VC number varies is because it reduces the needed length of the VC field in the header and, more importantly, it makes the VC setup easier. Having all devices along a path agree upon a VC number that is free on all devices would require much more work.

Phases of a VC
There are three phases in a virtual circuit:

VC Setup: The transport layer contacts the network layer and specifies the receiver's address. The network layer then determines the path between the end systems and a VC number is determined and an entry is inserted into the forwarding table in each of the devices along the path. It is also possible to reserve resources (e.g. bandwidth) along the path.

Data transfer: Once the VC has been established, packets can begin to flow between the end systems...

VC Teardown: When the transport layer in one of the end systems decides to terminate the connection, the other party is notified and the entry in the forwarding tables in the routers is removed.

Note that during the VC setup, all the routers along the path is involved in the handshake to establish a connection. The message sent into the network to either set up a VC or tear it down is called a signaling message.