Network Layer

# VCs and datagram networks

It’s possible to define a some sort of parallelism between transport-layer protocols and network-layer protocols. In the transport-layer protocol there is UDP that is a connectionless protocol and TCP that provide only connection service. Computer network that provide connection service are called virtual-circuit networks and those that support connectionless are called datagram networks. In general a computer network can’t support both connection and connectionless service.

Finally, a big distinction between transport and network layer is that in the first the communication happens between processes, in the second between hosts.

## Virtual-Circuit Networks

A VC consist of a path, several VC numbers, one for each router and entries in the forwarding table. Whenever a new VC enter the network all router forwarding tables are updates, the same when a VC leaves the network. This is possible if the router maintains a connection between each other so they can rapidly exchange information and updates their respective forwarding tables

 Incoming interface Incoming VC Outgoing interface Outgoing VC 1 12 2 22 2 63 1 18 3 7 2 17 1 97 3 87

There are three identifiable phases in a virtual circuit

• VS setup: the transport layer contacts* the network layer by specifying the receiver address and wait for the network to setup the VC (create/update all routing tables, reserve resources)
• Data transfer: packet starts flowing in the VC
• VC teardown: the sender informs* the VC to terminate the VC.

Another important difference between the transport layer and the network layer is that is the second, specifically inside a VC network, every router is fully aware of all the other VC.

*The end systems sends signaling messages, to initiate or terminate a VC, over signaling protocols

## Datagram Netowrks

In a datagram network the sender need to insert the receiver address in every packet its sends to it. Each router extract the destination address and using its own forwarding table to select the appropriate outgoing link.

 Destination address Outgoing interface 00010000 00000000 ~ 00010111 11111111 0 00011000 00000000 ~ 00011000 11111111 1 00011001 00000000 ~ 00011111 11111111 2 otherwise 3

In a scenario where the destination address is a $32$ bit integer the forwarding tables uses longest prefix match to resolve the outgoing interface in a reasonable amount of time (each interface represent intervals of address instead of specific addresses). The forwarding tables in a datagram network are updated by the routing algorithm about every $1\sim 5$ minutes and it may occur that packets with the same destination follow different path (this is impossible with VCs).