UCS413

Download as pdf or txt
Download as pdf or txt
You are on page 1of 1

Roll Number:

Thapar Institute of Engineering & Technology, P


Computer Science & Engineering Department
END SEMESTER EXAMINATION
BE (Third Year): Semester-V (2020/21) Course Code: UCS413
Course Name: Network Programming
February 03 , 2021 Wednesday, 14.30 — 16.30 Hrs
Time: 2 Hours, M. Marks: 50 Name of Faculty: Dr. Neeraj Kumar
Note: Attempt any five questions. All questions are of equal weightage
Assume missing data, if any, suitably.
Questions having multiple parts should be attempted at one place

Q1. a) Write a TCP socket program to implement the chat Client and server program? (5)
b) Explain the following functions in TCP socket
I) Listen and accept
(5)
II)Wait and connect
Q2. a) Write server side and a client side socket programs for a String Reverse service. The client (5)

• sends a string to the server in the request and the server responds to client with the reverse
of the string? (5)


b) What is the purpose of DNS server? Differentiate between recursive and iterative DNS
query for lookup operation.

Q3. a) Explain the IPv4 and IPv6 Socket Address Structures with suitable examples? Also compare (5)
the TCP header with UDP header. Which are the fields in TCP header which are missing from (5)
the UDP header?
b) Explain in detail the IP data gram packet and its features in comparison to the other
datagrams?

Q4. a) A client uses UDP to send data to a server. The data are 15 bytes. Calculate the efficiency of (5)
this transmission at the UDP level.
b) A window holds bytes 2001 to 6000. The next byte to be sent is 3001. Draw a figure to show (5)

• i)
the situation of the window after the following events
An ACK segment with the acknowledgement number 3500 and window size

• Q5.
ii)

a)
advertisement 4000 is received.
A segment carrying 1500 bytes is sent

Differentiate between three transmission modes of FTP? Illustrate with the help of an (5)
example how these modes operate for data transfer.
b) Why do we need POP3 and IMAP4 for electronic mail? Show with the help of a diagram the (5)
sequence of activities at the client and server during the mail transfer ?

Q 6. a) Define the following terms with respect to the mobility of the mobile node from one (5)
network domain to other. I) Care of address ii) home and foreign domain
b) An organization is granted the block 211.17.180.0/24. The administrator wants to create 32 (5)
subnets. i) find the first and last address in subnet 1 ii) find the first and last address in
subnet 32.

Q7. a) What is the role of file descriptors during socket creation? What are the (5)
attributes/parameters used during the creation of socket using file descriptors.
b) What are VLANs? How does the membership is generated in VLANs. Why VLANs create (5)
extra security for a network?

You might also like