April 1999
NI222: NETWORKS AND THE INTERNET

QUESTION 2

Total Marks: 20 Marks

Click here to access other questions

GRADE A
Sample student's solutions are indicated in green.
Return too Question 2

 

(a) Explain what a virtual circuit is, and how Internet applications communicate with TCP using unique virtual circuits. [4]
A virtual circuit consist of originating host number and IP address, and target host number and IP address. These four component, formed a virtual circuit. This virtual circuit of origin and destination set up a path for communication, Internet afflictions communicate with TCP using unique virtual circuits because even though the port number is the same, different terminal have different remote number.
TCP establishes, manage and terminates the connection where communication are done via packets or datagrams along this routes. The IP packets has within its header the destination (IP address) and will be send along the virtual circuit.

 

(b) Why does the Internet use both TCP and UDP instead of just one of them? Explain with suitable examples of applications that use these protocols. [4]
Internet uses both TCP and UDP instead of just one of them because UDP  (user datagram protocol) is easier to use, has little setup overheads, and is connectionless. The datagram do not need to be acknowledge. Thus it is good for streaming video images that require high speed. TCP has elaborate connection management mechanism at the expense of high processing cost and is subject to network traffic.

The example of application using UDP is SNMP (simple network management protocol) and application using TCP is HTTP.

 

(c) TCP uses a simple three-way handshake protocol in setting up a connection. Explain carefully how this handshake protocol works, and how it avoids the possibility of deadlock. [6]
This handshake protocol works by having one party(A) requesting a connection (CR) and another party (B) to acknowledgement to the connection (CC). A once receive the CC will sent an acknowledgement back to B and then the network connection is established. If in the case that CC is lost, A will time-out if it didi not received the CC and B will time-out if it did not received A's acknowledgement . Both will return to IDLE stage.

They avoid the possibility of deadlock, which is when resources are tied down in dead situation, in two-way handshake. In two-way handshake, A requesting a connection (CR) and B returns with acknowledgement (CC). But in situation when the (CC) is lost, A will be waiting forever for B's acknowledgement and resouces are clocked in this dead situation hence, the name 'Deadlock'.

 

(d) Having avoided deadlock, is livelock still a problem? Explain the concept of livelock, and how it is avoided in the TCP handshake protocol. [6]
Having avoided 'livelock' is still a problem in simple three-way handshake. The concept of livelock can be explained in the following.

If A and B send a connection request (CR) at the same time and both will be waiting for the other to react sending a CC acknowledgement back. This happens until both are timed-out and return to IDLE stage. This could well be recreated infinitely cauisng a situation called 'livelock' to arise. In the TCp handshake protocol, using sequence number. When there is a breakdown and a packet is lost, A will check the sequence number and if it is lower than its current one, then that means that packet is obselete and is discharged.

For this, even if both A and B send CR at about the same time, both will recongise and acknowledge each with different sequence number nad acknowledgement. Thus there will not be confusion and both state will be connected. Thus, 'livelock' will be overcame.