12.07.2015 Views

Comprehensive Final Exam for Computer Networks

Comprehensive Final Exam for Computer Networks

Comprehensive Final Exam for Computer Networks

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

<strong>Comprehensive</strong> <strong>Final</strong> <strong>Exam</strong> <strong>for</strong> <strong>Computer</strong> <strong>Networks</strong> Spring 2006Name: ______________________________________Welcome to the comprehensive final exam <strong>for</strong> <strong>Computer</strong> <strong>Networks</strong>. Read each problem carefully. Thereare ten required problems each worth 10 points and one extra credit problem worth 10 points. You mayhave with you a calculator, pencils, blank paper, lucky rabbit's foot, and one 8.5 x 11 inch “<strong>for</strong>mulasheet”. On this <strong>for</strong>mula sheet you may have anything you want (definitions, <strong>for</strong>mulas, homeworkanswers, old exam answers, etc.) as handwritten by you on both sides of the sheet. Photocopies, scans,or computer generated text are not allowed on this sheet. You have 120 minutes <strong>for</strong> the exam. Unlessotherwise stated in the problem, start the answer <strong>for</strong> each new problem on a separate sheet of paper andwrite only on one side of each sheet. Good luck and be sure to show your work!Problem #1Answer the following questions regarding the basics of computer networks and the Internet.a) What are the fundamental measures of interest <strong>for</strong> a communications system?b) Briefly describe circuit switching and packet switching.c) What are the four causes of packet delay?d) Roughly, what is the signal propagation delay from here to Atlanta (about 400 miles)?e) Define the open concept.Problem #2Describe how email works. Describe the key components and flows. Identify key standards that apply.Use figures as needed. About 150 words should be sufficient.Problem #3Attached are server.c and client.c with some “bugs”. Identify the bugs and explain how to fixthem.Problem #4Derive the <strong>for</strong>mula <strong>for</strong> link utilization (U) <strong>for</strong> the stop-and-wait protocol. You may assume that a senderalways has packets to send and that packets are never lost or in error. If other assumptions are needed tocomplete a reasonable derivation, state them.


Problem #5Answer the following questions about TCP:a) Describe how TCP sets its retransmission time-out (RTO) value.b) Show the packet flows <strong>for</strong> TCP connection establishment and termination.Problem #6Below are the first 60 bytes of a TCP/IP packet captured using Ethereal on an Ethernet network. On thelast pages of this exam are packet header templates. Decode the packet <strong>for</strong> the following fields:- Ethernet MAC source and destination addresses (hexadecimal)- IP source and destination addresses (in standard dotted-decimal <strong>for</strong>mat)- TCP source and destination port numbers (decimal)- Type of TCP segment (e.g., SYN, FIN, ACK, etc.)- Application layer protocol (and command, if applicable)08 00 20 f7 88 7d 00 11 43 b7 92 43 08 00 45 00 .. ..}..C..C..E.02 4b 1f f8 40 00 80 06 ca 9b 83 f7 03 2a 83 f7 .K..@........*..03 01 08 68 00 50 e0 5a 79 da 38 0b ef 53 50 18 ...h.P.Zy.8..SP.ff ff 80 d7 00 00 47 45 54 20 2f 7e 63 68 72 69 ......GET /~chri73 74 65 6e 2f 63 68 72 69 73 74 65 6e 2e 68 74 sten/christen.ht6d 6c 20 48 54 54 50 2f 31 2e 31 0d 0a 48 6f 73 ml HTTP/1.1..HosProblem #7Answer the following questions about LANs (wired and wireless):a) What is a LAN? Define it precisely.b) Describe CSMA/CD and BEB as used in IEEE 802.3 Ethernet.c) Describe CSMA/CA as used in IEEE 802.11 WiFi.Problem #8Answer the following questions bridges and switches:a) What is a bridge? What is a switch? What are the motivations to use bridges and switches?b) Describe (give) the <strong>for</strong>warding and learning algorithm <strong>for</strong> transparent bridges.c) What is “media speed” or “wire speed” (in packets per second) <strong>for</strong> 1500 byte packets on a 1 Gb/sEthernet link.


Problem #9IEEE 802.11 WiFi uses three address fields in its frame <strong>for</strong>mat to <strong>for</strong>ward packets from a host in a hotspotto the Internet and from the Internet to a host in a hotspot. Assume that a WiFi access point (AP) isconnected to a router port via an Ethernet link. Describe the packet flow from WiFi host to Internet andfrom Internet to WiFi host. Carefully identify the contents of all WiFi and Ethernet addresses fields.Problem #10Answer the following questions about multimedia networking and security:a) What is a jitter buffer? How does it work? Why is it needed?b) If we were to design a next generation network that would give QoS guarantees, what are the four basicprinciples (or pillars) needed <strong>for</strong> this network?c) What are the three desirable properties of secure communications? Describe each property in onesentence.Extra CreditGive 40 networking-related acronyms (covered in this class, or in the textbook) and define them. Forexample, TCP = Transmission Control Protocol is good. MCSE = Microsoft Certified SystemsEngineering is not good (we did not cover this topic or acronym in class).


1. //======================================================= file = server.c =====2. //= A message "server" program to demonstrate sockets programming =3. //= - TCP/IP client/server model is implemented =4. //=============================================================================5. //----- Include files ---------------------------------------------------------6. #include // Needed <strong>for</strong> printf()7. #include // Needed <strong>for</strong> memcpy() and strcpy()8. #include // Needed <strong>for</strong> all Winsock stuff9. //----- Defines ---------------------------------------------------------------10. #define PORT_NUM 1050 // Arbitrary port number <strong>for</strong> the server11. //===== Main program ==========================================================12. void main(void)13. {14. WORD wVersionRequested = MAKEWORD(1,1); // Stuff <strong>for</strong> WSA functions15. WSADATA wsaData; // Stuff <strong>for</strong> WSA functions16. unsigned int welcome_s; // Welcome socket descriptor17. struct sockaddr_in server_addr; // Server Internet address18. unsigned int connect_s; // Connection socket descriptor19. struct sockaddr_in client_addr; // Client Internet address20. struct in_addr client_ip_addr; // Client IP address21. int addr_len; // Internet address length22. char out_buf[100]; // Output buffer <strong>for</strong> data23. char in_buf[100]; // Input buffer <strong>for</strong> data24. // This stuff initializes winsock25. WSAStartup(wVersionRequested, &wsaData);26. // Fill-in server (my) address in<strong>for</strong>mation and bind the welcome socket27. server_addr.sin_family = AF_INET;28. server_addr.sin_port = PORT_NUM;29. server_addr.sin_addr.s_addr = htonl(INADDR_ANY);30. // Listen on welcome socket <strong>for</strong> a connection31. listen(welcome_s, 0);32. // Accept a connection.33. connect_s = accept(welcome_s, (struct sockaddr *)&client_addr, &addr_len);34. // Print an in<strong>for</strong>mational message that accept completed35. printf("Accept completed \n”);36. // Send to the client using the connect socket37. strcpy(out_buf, "Test message from server to client");38. send(welcome_s, out_buf, strlen(out_buf), 0);39. // Receive from the client using the connect socket40. recv(welcome_s, in_buf, sizeof(in_buf), 0);41. printf("Received from client... data = '%s' \n", in_buf);42. // Close sockets and clean-up43. closesocket(connect_s);44. WSACleanup();45. }


1. //======================================================= file = client.c =====2. //= A message "client" program to demonstrate sockets programming =3. //= - TCP/IP client/server model is implemented =4. //=============================================================================5. //----- Include files ---------------------------------------------------------6. #include // Needed <strong>for</strong> printf()7. #include // Needed <strong>for</strong> memcpy() and strcpy()8. #include // Needed <strong>for</strong> all Winsock stuff9. //----- Defines ---------------------------------------------------------------10. #define PORT_NUM 1050 // Port number used at the server11. #define IP_ADDR "127.0.0.1" // IP address of server (*** HARDWIRED ***)12. //===== Main program ==========================================================13. void main(void)14. {15. WORD wVersionRequested = MAKEWORD(1,1); // Stuff <strong>for</strong> WSA functions16. WSADATA wsaData; // Stuff <strong>for</strong> WSA functions17. unsigned int client_s; // Client socket descriptor18. double server_addr; // Server Internet address19. char out_buf[10]; // Output buffer <strong>for</strong> data20. char in_buf[10]; // Input buffer <strong>for</strong> data21. // This stuff initializes winsock22. WSAStartup(wVersionRequested, &wsaData);23. // Create a client socket24. client_s = socket(AF_INET, DATAGRAM, 0);25. // Fill-in the server's address in<strong>for</strong>mation and do a connect with the26. // listening server27. server_addr.sin_family = AF_INET;28. server_addr.sin_port = PORT_NUM;29. server_addr.sin_addr.s_addr = inet_addr(IP_ADDR);30. connect(client_s, (struct sockaddr *)&server_addr, sizeof(server_addr));31. // Receive from the server using the client socket32. recv(client_s, in_buf, sizeof(in_buf), 0);33. printf("Received from server... data = '%s' \n", in_buf);34. // Send to the server using the client socket35. strcpy(out_buf, "Test message from client to server");36. send(client_s, out_buf, strlen(out_buf), 0);37. // Close and clean-up38. closesocket(client_s);39. WSACleanup();40. }


NOTE: Ethereal traces do not contain the Preamble or SFD. All LAN addresses are 6 bytes.


From: W. Stevens, TCP/IP Illustrated, Volume 1 The Protocols, Addison-Wesley, Boston, 1994.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!