CompNetMidtermFall11

CompNetMidtermFall11 - Computer Networks - Midterm Prof....

Info iconThis preview shows pages 1–4. Sign up to view the full content.

View Full Document Right Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: Computer Networks - Midterm Prof. J.-P. Hubaux and Dr. M. Jadliwala November 8, 2011 Duration: 1:45 hours, closed book. Please write your answers on these sheets in a readable way. Poorly written answers will not be corrected. Use extra sheets if necessary (put your name on them). You may write your answers in English or in French. The total number of points is 40. This document contains 16 pages. Full Name (Nom et Pr´enom): SCIPER No: Division: 2 Communication Systems 2 Computer Science 2 Other (mention it): . . . . . . . . . Year: 2 Bachelor Year 2 2 Bachelor Year 3 2 Other (mention it): . . . . . . . . . (answers to the questions are shown in italic and blue) 1 Short questions (5 points) For each question, please circle a single best answer . 1. Sort the following physical media based on their maximum throughput, from lowest to highest. (a) Twisted Pair Category 5, IEEE 802.11g, Fiber Optic (b) Twisted Pair Category 5, Fiber Optic, IEEE 802.11g (c) IEEE 802.11g, Twisted Pair Category 5, Fiber Optic CORRECT (d) Fiber Optic, IEEE 802.11g, Twisted Pair Category 5 2. Packet-switching versus circuit-switching: Which of the following is correct? (a) Packet-switching is more flexible, circuit-switching is more robust to link failures (b) Packet-switching is more secure, circuit-switching is more efficient (c) Packet-switching and circuit-switching offer the same bandwidth guarantees (d) Packet-switching allows more users to access the network, circuit-switching provides quality- of-service guarantees CORRECT 3. Consider the following Java code: 1: try { 2: ServerSocket ss = new ServerSocket(2011); 3: Socket s1 = ss.accept(); 4: Socket s2 = ss.accept(); 5: DataInputStream is = new DataInputStream(s1.getInputStream()); 6: DataOutputStream os = new DataOutputStream(s2.getOutputStream()); 7: while (true) { 8: os.writeByte(is.readByte()); 9: } 10: } catch (Exception e) { 11: // crash! 12: } What does this code do? (a) Does not compile, because the ServerSocket constructor takes no parameters. (b) Always crashes in line 4, because you can only call accept() once. (c) Creates an “echo” program that responds to the client with the exact same bytes he sent. (d) Creates a “relay” program that sends the bytes received from one client to another client. CORRECT 4. An organization’s Web server and mail server: (a) can have exactly the same alias for a hostname (for example, foo.com). CORRECT (b) cannot have exactly the same alias for a hostname (for example, foo.com). (c) must run on the same machine. (d) can run on the same machine only if they share one DNS record. 2 5. Assume that the following lines are inserted at the DNS server: (midterm.edu, service1.edu, CNAME) (midterm.edu, service2.edu, MX) (service1.edu, 8.11.11.101, A) (service2.edu, 8.11.11.104, A) As a consequence, when you open midterm.edu in your browser: (a) the request is served by the server with IP 8.11.11.101. CORRECT (b) the request is served by the server with IP 8.11.11.104....
View Full Document

Page1 / 16

CompNetMidtermFall11 - Computer Networks - Midterm Prof....

This preview shows document pages 1 - 4. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online