Welcome to Scribd, the world's digital library. Read, publish, and share books and documents. See more
Download
Standard view
Full view
of .
Save to My Library
Look up keyword
Like this
3Activity
0 of .
Results for:
No results containing your search query
P. 1
Solved 1st Term2010

Solved 1st Term2010

Ratings: (0)|Views: 482 |Likes:
Published by hj43us

More info:

Published by: hj43us on Sep 15, 2010
Copyright:Attribution Non-commercial

Availability:

Read on Scribd mobile: iPhone, iPad and Android.
download as PDF, TXT or read online from Scribd
See more
See less

03/26/2012

pdf

text

original

 
1
st
term - Computer Networks Exam - September
, 13
th
2010Name:Rules:
Short answers are appreciated. Each question scores 2%. Duration 2 hours.1.In what countries may you find the Internet?
 Internet is a worldwide network.
2.Who can write a
 Request For Comments
document?
 Anyone, it is open to anybody.
3.In a nuts & bolts approach, what elements is the Internet made of?.
 Hosts, data links and routers.
4.What is packet switching?5.What is a distributed application?
 It is piece of software that runs on two (or more) computers at once.
6.In a twisted pair, why are wires twisted?
Wires are twisted to minimize interference from/to other pairs on the same cable.
7.What “bps” stands for?
bits per second 
8.What is nodal processing delay?
 It is the time it takes a node to process an incoming packet (till it is put on an output queue).
9.Why is TCP/IP a layered architecture?
 It is more flexible: A layer can be replaced without affecting others.
10. In the client/server model, which one (client or server) is started first?
The server is started first.
11.What transmission media is used by ADSL?
Twisted pair.
12. Is it possible to mount a Windows shared folder in Linux? If yes, How?
Yes, by means of smbmount command.
13.What does happen in
 stop&wait 
protocol if propagation delay is much greater than transmissiontime?
 Link utilization is poor and therefore thoughtput is low: highly innefficient communication.
14. What is the syntax of an FTP protocol response?
<xxx>sp<text_line><CR><LF> (where xxx is a 3-digit decimal number status code).
15. Can a server transmit to several clients simultaneously?
Yes, it is possible if it is a concurrent server.
16. Explain the effect of:
ls | ./sock :7777
The listing of "ls" command is transmitted to a TCP server on port 7777 (on the localhost).
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”, 88888);
 
 It will throw an exception: java.lang.IllegalArgumentException: port out of range:88888
19. What type of socket is used to create a UDP server?
 DatagramSocket 
20.What is an iterative server?
 It is a server than can only process one client at a time.
21. A web browser downloads a web page that contains four images. Neglecting the transmissiontime, how many round trip times (RTT) will the download take if pipelined HTTP 1.1 is used?
 
3 RTT 
22. Same as #21 but using HTTP 1.0.
4 RTT 
23. What does the HTTP HEAD method do?
 It is like a GET method but without transmitting the requested object (just the headers).
24. What is a DNS PTR-type record for?
To enable PTR queries: these queries provide the name for a given IP address
25. When uploading a file using FTP protocol and passive mode, who starts data connection?
The client 
26. What type of server is one that can only handle one client at a time?
 An iterative server 
27.Write Java code that waits until a connection is made on
SeverSocket ss
 
and then it waitstill the text “Hello World” is received.
Socket s=ss.connect(); Scanner sc=new Scanner(s.getInputStream());while(sc.nextLine().indexOf("Hello World")==-1) ;
28. Write Java code to write “Hello World” to
Socket s,
making sure it is transmitted rightaway.
 PrintWriter pw = new PrintWriter(s.getOuputStream(), true); pw.println("Hello World");
29. When using PrintWriter 
println
method, which is the end of line marker transmitted?
System.getProperty("line.separator");
30. Using command line, how can you tell if there is a web server in your computer?
telnet localhost 80
31. What is the channel utilization of an
 stop & wait 
protocol if packet transmission time is 20msec, acknowledge transmission time is negligible and propagation delay is 100 msec?
U=20/(20+2*100)=20/220=1/11=9%
32. How can we obtain 50% utilization in problem #31?
 A sliding window protocol with a window size of 6 will give 54% utilization.
33. What happens after a timeout on a
Go-back-N 
sliding-window protocol?
 All the frames pending of acknowledgement are retransmitted.
34. What is the value of TCP sequence number at the end of a connection?
The initial value plus the number of transmitted bytes plus two.
35. What is TCP 16-bit header field
receiver window
for?
Connection flow control.
36. What type of handshaking is used for closing a TCP connection?
 It is a double two-way handshake.
37. How IP header checksum is calculated?
 Header bytes are grouped as 16-bit numbers that are added using one's complement arithmetic.
38. Why IP service is unreliable?
 Because there is not a built-in acknowledge for received datagrams: Those lost will go unnoticed.
39.What does
Maximum Segment Size
(MSS) mean?
 It is the maximum size of the data part of a segment.
40. How is the
Maximum Segment Size
(MSS) determined?
 It is determined by each end of a connection at the beggining of it by the use of a TCP option.
41. What is the minimum size (in bytes) of a TCP header?
20 bytes
42. What is the purpose of TCP's flow control?
To prevent a fast transmitter to overwhelm a slow receiver.
43. What is the way TCP retransmission timeout is determined?

You're Reading a Free Preview

Download
/*********** DO NOT ALTER ANYTHING BELOW THIS LINE ! ************/ var s_code=s.t();if(s_code)document.write(s_code)//-->