BIT 3105 NETWORK PROGRAMMING KCA Past Paper

UNIVERSITY EXAMINATIONS: 2014/2015
ORDINARY EXAMINATION FOR THE BACHELOR OF SCIENCE
IN INFORMATION TECHNOLOGY
BIT 3105 NETWORK PROGRAMMING
DATE: APRIL, 2015 TIME: 2 HOURS
INSTRUCTIONS: Answer Question ONE and any other TWO

QUESTION ONE (30 MARKS) – COMPULSORY
(a) Distinguish between the following terms as used in client/server systems:
a) Datagram and Stream. [2 Marks]
b) Subnet and Subnet mask [2 Marks]
c) Client-based and Cooperative Processing C/S classes [2 Marks]
d) Heterogeneous and Homogeneous environments [2 Marks]
e) wait() and waitpid() [2 Marks]
(b) Why is the Application layer of the OSI Reference Model referred to as Layer 7
and yet it is the first layer that the user interacts with? [6 Marks]
(c) In view of the implementation approaches of a 2-Tier Client/Server system,
discuss how a dynamic web site is a fat client-thin server implementation of a 2-
Tier C/S. [4 Marks]
(d) Briefly describe any three (3) functional interfaces provided by middleware.
[3 Marks]
(e) Why is it a good idea to close() each socket when you are done with it?
[2 Marks]
(f) Explain briefly what the code below does. [5 Marks]
k = listen(sockfd, 5)
QUESTION TWO – (TOTAL MARKS: 20)
(a) Briefly discuss “Extensibility” and “Security” as attributes of a middleware.
[4 Marks]
(b) With the aid of a well labelled diagram, describe an Ethernet frame.
[5 Marks]
(c) Describe the ‘3-way’ process involved when a TCP connection is being
established. [6 Marks]
(d) (i) List the four (4) desired characteristics of a network API. [2 Marks]
(ii) What is wrong with this line of code? Re-write it correctly. [3 Marks]
mysock = socket(PF_INET,SOCKECT_STREAM,0);
QUESTION THREE – (TOTAL MARKS: 20)
(a) Explain the two (2) reasons for TIME_WAIT. [2 Marks]
(b) Define file descriptor. [2 Marks]
(c) What are Byte Ordering Functions? [2 Marks]
(d) What is sockaddr_ and how is it uniquely identified? [2 Marks]
(e) Discuss “Relocation” and “Persistence” as two forms of transparency
[4 Marks]
(f) Compare the implementation details of Concurrent Server and Iterative server.
[4 Marks]
(g) What are the steps involved in transmission and reception of an ICMP message?
[4 Marks]
QUESTION FOUR: (TOTAL MARKS: 20)
(a) What is the purpose of a zombie state? [2 Marks]
(b) (i) Give the generic structure of a socket address and briefly explain the parts of the
structure. [3 Marks]
(ii) How do the internet family and UNIX family implement this structure of the
socket? [3 Marks]
(c)(i) Briefly explain the purpose of buffers in a TCP connection. [2 Marks]
(ii) List and explain the two (2) types of buffers that are in used in a TCP connection.
[6 Marks]
(d) Provide the Internet Socket Port number and the type of transport layer
protocol (whether TCP, UDP or both) used by the following applications:
[4 Marks]
i). FTP (File Transfer Protocol)
ii). Telnet
iii).HTTP (Hypertext Transfer Protocol)
iv).HTTPS (Hypertext Transfer Protocol over SSL/TLS)
QUESTION FIVE – (TOTAL MARKS: 20)
(a) In a sequential server application, what prevents the server from dying once it has
served a client? [2 Marks]
(b) “ENOMEM” and “EAGAIN” are among possible errors that are likely to occur
when an OS fails to create a socket. Briefly discuss these two errors. [4 Marks]
(c) Processes running in a networked environment can communicate in two ways
either through Remote Procedure Calls (RPC) or Message Passing. Distinguish
between these two. [4 Marks]
(d) Three (3) things happen when a server accepts a connection request from a client.
List and explain them. [6 Marks]
(e) List and briefly discuss the factors that need to be considered in choosing the best
server design. [4 Marks]

(Visited 903 times, 9 visits today)
Share this: