You are on page 1of 4

Computer Networks Exam - ETSIAp – February, 5th 2009

Name:

Rules: Short answers are appreciated. Each question scores 2%. Duration 2
hours.

1. Provide a definition of the Internet.


It is a network of networks.

2. What documents are used to specify an Internet protocol?


RFC = Request For Comments

3. What is the Internet made of?


End systems, routers, links

4. What is a packet on a packet switching network?


It's a data unit, forwarded through the network till reaching destination

5. What is a distributed application?


An application that runs across several computers

6. Name two different types of transmission media?


Twisted pair, fiber optics

7. What unit do we use to measure channel bandwidth?


Bits per second (bps)

8. What is the propagation delay?


The time it takes the signal to travel from transmitter to receiver

9. How many layers does have the TCP/IP architecture? List them.
Five: Application, Transport, Network, Data Link Layer, Physical Layer

10.In the client/server model, who does start the connection the client or the
server?
The client starts the connection

11.What ADSL stands for?


Asymmetric Digital Subscriber Line

12.What command you may use in Linux to access a Windows' shared folder?
smbclient

13.Is there a way to reduce propagation delay? Reason your answer.


Only if you can get transmitter and receiver closer. It's a physical limit.

14. What is the syntax of an HTTP request line (1st line of a request)?
<method><space><url><space><HTTP/<version>><CR><LF>

15. What type of message is sent by clients to servers?


request

16.Explain what the command ./sock ­l :7777 ­d date does?


It creates a date server. Clients connecting to port 7777 will obtain datetime.

17.A program has received DatagramPacket dp. Write the code to print to the
standard output the text contained in this datagram.
String text = new String(dp.getData(),0,dp.getLength());
System.out.println(text);

18.Hostname is wrong on this line: Socket s = new Socket (“www.upv.ee”, 


80); What will happen when running this line?
UnknownHostException will be raised.

19.When inheriting from Thread class, why is it not possible to include a


throws clause on the declaration of run() method?
Because run is an inherited method we're rewriting. It has to have the same
attributes as the original one on the parent class (without throws).

20.What is it an iterative server?


A server that process clients sequentially, one after the other.

21.A web browser downloads a web page that contains four images.
Neglecting the transmission time, how many round trip times (RTT) will the
download take if HTTP 1.1 is used?
Six: one for connection plus five additional objects.

22.Same as #21 but using pipelining too.


Three: one for connection, one for html page, one for the remaining objects.

23.What does the HTTP HEAD method do?


It's the same as GET but without downloading any object.

24.How do we know which is the mail server of mailbox


vincent@upvnet.upv.es?
We need to make a DNS MX query.

25.Why FTP protocol may have a problem with Firewalls?


Because data connection is initiated by the server (active mode).

26.How many threads does have a Java program that starts just one thread
from main method?
Two: the main thread plus the additional one it's been just created.

27.Write Java code that waits till a connection is made on SeverSocket ss and
then it prints the IP remote port of the socket.
Socket s=ss.accept();
System.out.println(s.getPort());
28.Write Java code to read a text line from Socket s and print it to the
standard output.
Scanner in = new Scanner(s.getInputStream());
System.out.println(in.nextLine());
29.In the declaration PrintWriter out = new PrintWriter(os, true); 
What is the purpose of the second parameter (true)?
It forces an automatic flush every time println() method is invoked.

30.Write Java code that prints whether port 1055 on localhost is open
(accepting connections) or closed.
try {Socket s=new Socket("localhost",1055); System.out.println("OPEN"); }
catch(IOException e) {System.out.println("CLOSED"); }

31.What is the channel utilization of an stop & wait protocol if packet


transmission time is 10 msec and propagation delay is 100 msec?
(Acknowledgment transmission time is considered negligible).

U=Ttx / Ttotal = 10 / (10 + 2*100) = 10 / 210 = 1/21 = 4.7%

32.What was sliding window protocol created for?


To improve efficiency when delay is large compared to transmission time.

33.What happens after a timeout on a Go-back-N sliding window protocol?


All outstanding (pending of acknowledgment) packets are resent.

34.Name all the TCP flags.


SYN, FIN, ACK, PSH, URG, RST

35. What is the TCP header field “ReceiveWindow” for?


It is the base of flow control. Each receiver informs about is buffer space.

36.What type of handshaking is used for establishing a TCP connection?


The so-called three way handshake: SYN, SYN+ACK, ACK

37.How UDP protocol checksum is calculated? Is it mandatory?


Datagram is considered as a sequence of 16 bit numbers. They are added
using one's complement addition. UDP checksum calculation is optional.

38.If TCP provides a connection-oriented service, what type of service does


UDP provide?
Connectionless service

39.What is the maximum size of a UDP datagram?


64 Kbytes (more exactly 65535 - 8 = 65527 bytes). Real world
implementations use to lower this value to, for example, 8192 bytes.

40.How is the Maximum Segment Size (MSS) determined on TCP protocol?


By the use of a TCP option when the TCP connection is made.

41.What is the minimum size in bytes of a TCP segment header?


20 bytes (five 32-bit words).

42.What variables are involved in TCP congestion control?


Threshold and CongestionWindow

43.TCP uses a moving average to estimate the round-trip time of a connection:


EstimatedRTT = (1­α)*EstimatedRTT + α*SampleRTT. What is the
purpose of α?
It tunes the remembering factor. It allows to balance between history and
sampled time value.

44.What is TCP Fast Retransmit algorithm?


It is a retransmission triggered by receiving three duplicate acknowledgments.

45.What happens to the delivery ratio when a network gets congested? Why?
It drops dramatically. When the network gets congested some packets are
dropped by routers.

46.What are the two modes of operation of TCP congestion control?


Slow Start and Congestion Avoidance.

47.What is the value of CongestionWindow after a timeout event?


One Maximum Segment Size bytes (1 MSS).

48.What is TCP delayed acknowledgment?


It's a policy where receiver sends an ACK only after receiving two consecutive
segments or after 500 msec of receiving just one data segment.

49.In TCP, what signals the reception of a duplicate acknowledgment?


A gap in the data (caused by a segment lost or delayed).

50.If the sequence numbers of two consecutive TCP segments are 11200 and
11400. How many data bytes does the first segment contain?
It contains bytes from 11200 to 11399, that is 200 bytes.

You might also like