CS 779/879
Design of Network Protocols
Spring 2006
Final Exam


Time 2 & 1/2 hours


Open:   Textbooks & Notes

Closed:   Notebooks

 

 

Name:  

                           
Unix Login:

 

Each Question is 25 points.

 

To simplify the readability of your code:

- do not write any include statements and

- do not check for any errors (unless it is very essential), for example:

if (connect(. . .)) < 0)

   perror(". . .");

   Should be written as:

connect (. . .);

Q1:

In the IPv6 lecture, we have examined  four client programs:

c4,  c6,  c4u  & c6u

In the last lecture ( Name and Address Conversions )  we have combined two of these clients programs, c4u and c6u, into a single client  program that we called cgu  (general udp client).

In this question, you are asked  to combine all the four client programs into a single client program called cg. The syntax of cg is:

cg    <hostname | ipv4 | ipv6>   [u]

When the option u is used, the program behaves exactly as the cgu program, otherwise the program behaves as a general tcp client.

Examples:

% cg   something    u                                //IPv4 udp client

% cg   128.82.4.210  u                              //udp IPv4 client

% cg   fe80::203:baff:fe2a:67ff        //tcp IPv6 client

 

Solution

Q2:

In this question we are using the examples of the SCTP lecture.

Part 1:  Assume we have typed the following commands:

% hostname

something

% cd /home/cs779/public_html/sctpSolaris10

% tcpServer &

% udpServer &

% udpServerSctp &

% tcpServerSctp &

 

Which of these four servers will not work and why?

 

Part 2:  Assume we have typed the following commands:

% hostname

somethingmore

% cd  /home/cs779/public_html/sctpSolaris10

% tcpClient something &

% udpClient something &

% tcpClientSctp something &

% udpClientSctp something &

 

Which of these four clients will work and why?

Solution

 

Q3:

We can easily write a TCP client program that tests if there is no TCP service available at a specified TCP port.

However, in this question you are asked to write a UDP client program that tests if there is no UDP echo server running at a specified UDP port.

The syntax of this program is:

testUDPservice  <hostname> <portnumber>  <maxwait>

Example:

%  testUDPservice  something  2345  10

The program returns within 10 seconds and outputs:

No udp echo server on something at port 2345

OR

There is a udp server on something at port 2345

OR

Time out (10 seconds: Could not confirm that there is a udp server on something at port 2345.

 

Solution

 

Q4:

Each of you can easily write a UDP echo server program that receives a upd packet and echoes it back to its sender.

However, in this question you are asked to write a UDP server program that receives a udp packet and send it the recipient (instead of the sender)!

This sounds odd, but writes it anyway (this is an exam and you have to follow orders).

Why it is odd?

 

Solution