The DV protocol uses UDP so that the student gets experience with datagram sockets. Because UDP does not guarantee reliable data transfer, and because in order to build its routing table, the client must receive all DV messages, the DV protocol includes a basic reliability mechanism, called stop-and-wait Automatic Repeat reQuest (ARQ). Stop-and-wait ARQ provides reliability by requiring that each packet sent is acknowledged. The sender sends a packet and waits for an acknowledgement (ACK) packet, before continuing. Since packets, also ACK packets, can be lost or duplicated, sequence numbers are used to determine which ACK acknowledges what. In fact, when a receiver acknowledges reception of a packet, it attaches to the ACK the sequence number of the next packet it expects.
First, the student's client sends the authentication message. The server responds with the message AUTH_OK s, where s is a random integer sequence number from within the range [1..2^30]. All messages sent by the server contain a sequence number, and the client must respond to every message received with an acknowledgement of the form ACK s+1.
Upon reception of the acknowledgement of the AUTH_OK s message, the server starts sending the routing data. The routing data messages have the format [x, y, z, s], where x is the network interface number, y is the name of a router, z is the distance to router y, and s is the sequence number. The sequence number is incremented by one for each new message. The server resends, by default, with one second intervals, if a message is not acknowledged. If no ACK is received in 15 seconds, the server gives up, and stops resending the message. These timeouts can be configured in a configuration file, as discussed in Section Configuring Verkkoke.
Each of these messages are sent in separate UDP packets. In the DV protocol, the distance between two adjacent routers is assumed to be always one. As the client receives the routing messages, it calculates its routing table using a distributed Bellman-Ford algorithm.