You are on page 1of 3

Computer Networks Exam - January, 25th 2010

Name:

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

1. Internet is a worldwide network made of ...


NETWORKS
2. What is a Request For Comments document?
IT IS (USUALLY) THE SPECIFICATION OF AN COMMUNICATION PROTOCOL. (BCP, FYI, IEN, RTR & STD)
3. List which different elements can be found on the Internet (not more than four).
HOSTS (CLIENTS & SERVERS) , ROUTERS & LINKS
4. Why do networks use switching techniques?
BECAUSE IT IS NOT PRACTICAL TO HAVE A LINK BETWEEN EACH POSSIBLE PAIR OF HOSTS
5. Distributed applications code runs on ...
... MORE THAN ONE COMPUTER AT A TIME (I.E.: CLIENT AND SERVER).
6. Name two technologies for transmission media.
OPTICAL WAVES AND RADIO WAVES

7. What unit is used for transmission speed?


BITS PER SECOND (OR BPS).
8. What is queueing delay?
THE TIME A PACKET IS WAITING ON A ROUTER'S OUTPUT QUEUE (TO BE RETRANSMITTED).
9. How many layers does have the TCP/IP architecture? List them.
FIVE: APPLICATION, TRANSPORT, NETWORK, LINK LAYER, PHYSICAL.
10. In the client/server model, what does a server when it is not serving a client?
IT WAITS FOR A NEW CLIENT. (SO IT DOES NOTHING, IT JUST SITS THERE WAITING).
11.What is a cable modem?
IT IS A DEVICE THAT PROVIDES NETWORKING SERVICES THROUGH AN HFC INFRASTRUCTURE.
12. What command you may use in Linux to access a Windows' shared folder?
SMBCLIENT //SERVER/FOLDER

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


PROPAGATION DELAY DEPENDS ON SOURCE TO DESTINATION DISTANCE. IT CAN BE REDUCED IF THEY CAN MOVE.
14. What is the syntax of HTTP 1.0 status line (1st line of a response)?
<HTTP/1.0><SP><STATUS-CODE><SP><STATUS-STRING><CR><LF>
15. How many clients may a server have?
IT CAN HAVE MANY. DEPENDING ON THE SERVER IT CAN SERVE ONE OR MORE AT A TIME WHILE OTHERS WAIT.
16. Explain the effect of: ./sock ­l :7777 ­d ls
COMMAND "ls" RUNS EVERY TIME A CLIENT CONNECTS TO PORT 7777 OF THAT COMPUTER. CALL IT "REMOTE
DIR"

17. A program has received a DatagramPacket dp. Write the Java code to print (to standard output)
sender's IP address.
System.out.println(dp.getAddress().getHostAddress());
18. What will happen when running this code? Socket s = new Socket 
(“www.upv.es”, 80);
A TCP CONNECTION TO PORT 80 OF "WWW.UPV.ES" SERVER WILL BE ATTEMPTED.
19. What type of socket is used to create a TCP server?
IT'S SERVERSOCKET CLASS.
20.What is it a concurrent server?
IT IS A SERVER THAT CAN SERVER MORE THAN ONE CLIENT AT A TIME.
21. A web browser downloads a web page that contains three images. Neglecting the transmission
time, how many round trip times (RTT) will the download take if pipelined HTTP 1.1 is used?
1 TCP CONNECT + 1 WEB PAGE + 1 THREE IMAGES = 3 RTT
22. Same as #21 but using HTTP 1.0.
1 TCP CONNECT + 1 WEB PAGE + 3 * (1 TCP CONNECT + 1 IMAGE) = 8 RTT (OR 4 RTT FOR PARALLEL CONNECTIONS)
23. What does the HTTP POST method do?
IT ALLOWS TO UPLOAD DATA FROM A WEB CLIENT TO THE WEB SERVER.
24. What is a DNS MX-type record for?
MX-TYPE RECORD STORE MAIL DOMAINS. THEY ARE USED TO FIND EMAIL SERVERS (I.E.: WHO IS @UPV.ES?)
25. When downloading a file using FTP protocol and passive mode, who starts data connection?
THE CLIENT.
26. When do you think a multithread server is preferred over an iterative one?
WHENEVER THE SERVICE TIME IS NOTICEABLE (AND CLIENT SOFTWARE IS USED BY HUMANS).
27.Write Java code that waits until a connection is made on SeverSocket ss and waits till the
token “Hello” is received. (Tokens are delimited by blanks or end of line).
Socket s = ss.accept(); Scan sc = new Scan(s.getInputStream());
while(!sc.next().equals("Hello"));
28. Write Java code to write “Hello World” to Socket s.
PrintWriter pw = new PrintWriter(s.getOutputStream(),true);
pw.println("Hello World");
29. When using PrintWriter println method, which is the end of line marker sent?
IT'S PLATFORM-DEPENDENT. IT'S <CR><LF> ON WINDOWS AND <LF> ON LINUX.
30. Using command line, how can you tell if port 1055 is open or closed in your computer?
telnet localhost 1055 WILL ACCEPT THE CONNECTION (IF OPEN) OR REJECT IT (IF CLOSED).
31. What is the channel utilization of an stop & wait protocol if packet transmission time is 2 msec,
acknowledge transmission time is 1 msec and propagation delay is 100 msec?
U = 2 / ( 2 + 1 + 2 * 100)= 2/203=0.98%
32. What can we do obtain 50% utilization in problem #31? (another protocol is used)
2X/(2X+1+200)=0.5 ⇨ X = 100.5 (AS PACKETS ARE EQUAL SIZE) 101 PACKETS MAX. SENDER'S WINDOW
33. What happens after a timeout on a selective repeat sliding-window protocol?
ONLY ONE PACKET IS RETRANSMITTED.
34. What is the value of TCP sequence number at the beginning of a connection?
IT IS A PSEUDO-RANDOM NUMBER (IT GROWS MONOTONICALLY WITH TIME THOUGH).
35. What is TCP header field Urgent Pointer for?
IT SIGNALS THE OFFSET WHERE NORMAL DATA STARTS ON A TCP SEGMENT.
36. What type of handshaking is used for closing a TCP connection?
EACH END HAS TO SEND A FIN SEGMENT AND GET IT ACKNOWLEDGED BY THE OTHER END.
37. How TCP protocol checksum is calculated?
IT CONSIDERS THE SEGMENT AS A SEQUENCE OF 16 NUMBERS THAT ARE ADDED USING 1-COMPLEMENT ARITHMETIC.
38. Why it is said UDP service is unreliable?
BECAUSE IT DOES NOT PROVIDE DELIVERY WARRANTIES (NOR IT SIGNALS DATA AS DELIVERED).
39.What is TCP's Maximum Segment Size (MSS)?
IT IS THE MAXIMUM DATA SIZE A SEGMENT CAN CONTAIN (NOT THE MAXIMUM TOTAL SEGMENT SIZE).
40. How is the Maximum Segment Size (MSS) determined on TCP protocol?
EACH END MAKES IT EXPLICIT DURING CONNECTION HANDSHAKE USING A TCP OPTION.
41. What is the maximum size (in bytes) of a TCP header?
60 BYTES (15 IS THE MAXIMUM NUMBER OF 32-BIT WORDS)
42. What is the purpose of TCP's congestion control?
TO PREVENT NETWORK CONGESTION TO DEVELOP.
43. TCP uses a moving average to estimate the round-trip time of a connection: Why?
BECAUSE ROUND TRIP TIMES ARE CHANGING ALL THE TIME DUE TO VARYING NETWORK CONDITIONS.
44. When is TCP Fast Retransmit triggered?
WHENEVER THREE DUPLICATED ACKNOWLEDGEMENTS ARE RECEIVED.
45. What is the purpose of slow start?
TO START WITH A SMALL CONGESTION WINDOW SIZE BUT ALLOWING A FAST GROWTH FOR IT.
46. What is congestion avoidance phase?
IT IS THE SECOND CONGESTION CONTROL PHASE, THAT ONLY ALLOWS A SMALL CONGESTION WINDOW INCREASE.
47. What is the value of CongestionWindow at the beginning of a connexion?
ONE MSS. (IN SOME IMPLEMENTATIONS INITIAL VALUE MAY BE TWO, AS MANY MICROSOFT'S).
48. What is the purpose of TCP delayed acknowledgments?
TO REDUCE THE NUMBER OF ACKNOWLEDGEMENTS SENT WITHOUT SACRIFICING RELIABILITY.
49. What are cumulative acknowledgements?
IT MEANS EACH ACKNOWLEDGEMENT MESSAGE ALSO ACKNOWLEDGES ALL THE PREVIOUS DATA.
50. What causes a +1 increase of the sequence number when received if that segment carries no
data?
RECEIVING A SEGMENT WITH SYN OR FIN FLAG ACTIVATED WILL INCREASE BY ONE THE SEQUENCE NUMBER.

You might also like