IF 361 – TCP / IP AND SOCKET PROGRAMMING - Model Anna Univ Question Papers

Started by Kalyan, Jul 02, 2008, 04:51 PM

Previous topic - Next topic

Kalyan

MODEL QUESTION PAPER
VI SEMESTER
B.TECH. INFORMATION TECHNOLOGY
IF 361 – TCP / IP AND SOCKET PROGRAMMING

Time: Three Hours Maximum : 100 Marks

Answer All The Questions
Part A (10 x 2 = 20 Marks)

1.a) Give the IP address 126.110.16.7 what class of address is it?

b) Given a netmask of 255.255.255.0 how many subnets are available.

2. What are the advantages of doing reassembly at the ultimate destination instead of doing it after the datagram travels across one network?

3. What is the need for pre assigned UDP port numbers? Give the merits and demerits.

4. When a TCP segment arrives at a host, the socket to which the segment is directed depends on:
a. The destination port number.
b. The source port number
c. The source IP address of the datagram that encapsulated the segment
d. All of the above.
e. None of the above

5. What is the special case in which a host connected to an Ethernet need not use ARP or an ARP cache before transmitting an IP datagram.

6. Is it possible to address a datagram to a router's IP address? Does it make sense to do so?

7. What is socket abstraction?

8. How is an end point identified?

9. What are RAW sockets? What kind of applications require raw sockets?

10. How is a TCP socket different from a UDP socket?

PART – B (5 x 16 = 80 Marks)

11.i) What is meant when someone says that a protocol maintains state? Give an example of a network protocol that maintain state and an example of a network protocol that does not. [4 marks]

ii) What is the purpose of DNS? Why is it necessary? [4 marks]

iii) Write short notes on ARP and RARP [8 marks]

12.a) Explain the header formats for the three major protocols in the TCP/IP protocol suite. [3+5+8 marks]

(OR)

12.b) An organisation has a class network 200.1.1 and wants to form subnets for FOUR departments A, B, C, D will hosts as follows

A : 72 Hosts B : 35 Hosts C : 20 Hosts D : 18 Hosts
i) Give a possible arrangement of subnet masks to make this possible
ii) Suggest what the organization might do if department D grows to 34 hosts.

13.a)i) Draw the TCP state machine and explain. [12 marks]

ii) Trace the state transition for two machines that agree to close a connection gracefully. [4 marks]

(OR)

13.b)i) Explain the karn's Algorithm to avoid the problem of ambiguous acknowledgements. [8 marks]

ii) What is silly window syndrome and how it can be avoided on the receiver side.
[8 marks]

14.a)i) List the order in which the following functions should likely be called in a TCP server: accept(), bind(), close(), listen(), socket(), read(). Give the syntax of each system call. [8 marks]

ii) what are the purpose of the ntohs(), htons(), nothl() functions in a socket program? Give the syntax of each. [6 marks]

iii) Why is it a good idea to close() each socket when you are done with it? [2 marks]

(OR)

14.b) Explain the following system clls that a process can use to receive data through a socket: read(), readv(), recvfrom(), recvmsg(). Bring out their differences giving examples. [16 marks]

15.a) Write a server side and a client side socket program for a String Reverse service. The client sends a string to the server in the request and the server responds with the reverse of the string. Make necessary assumptions. [16 marks]

(OR)

15.b) Write a server side and a client side socket program for ECHO service. The server must be capable of handling multiple concurrent connections. Make necessary assumptions. [16 marks]