>>> SOLUTIONS <<< Answer the following questions regarding the basics principles and concepts of networks.

Size: px
Start display at page:

Download ">>> SOLUTIONS <<< Answer the following questions regarding the basics principles and concepts of networks."

Transcription

1 Midterm Exam for Computer Networks (CNT 4004) Fall 2015 >>> SOLUTIONS <<< Welcome to the Midterm Exam for Computer Networks. Read each problem carefully. There are eight required problems (each worth 12 points you get 4 points for correctly following these instructions). There is also an additional extra credit question worth 10 points. You may have with you a calculator, pencils and/or pens, erasers, blank paper, and one 8.5 x 11 inch formula sheet. On this formula sheet you may have anything you want (definitions, formulas, homework answers, old exam answers, etc.) as handwritten by you in pencil or ink on both sides of the sheet. Photocopies, scans, or computer generated and/or printed text are not allowed on this sheet. Note to tablet (ipad, etc.) users you may not print-out your handwritten text for the formula sheet. You have 75 minutes for this exam. Please use a separate sheet of paper for the answer to each question. Good luck and be sure to show your work! Problem #1 Each sub-problem worth 3 points. Answer the following questions regarding the basics principles and concepts of networks. a) Sketch the five-layer Internet protocol stack as described in the book and class. Describe in one sentence (for each layer) the services that each layer provides. Identify by name and location (in the stack) the key API used for writing Internet applications 5 Application -- Where network application and application protocols reside =============== -- Sockets interface 4 Transport -- Transports appl layer messages between appl endpoints (end to end) 3 Network -- Moves network layer packets from host to host (point to point) 2 Link -- Actually moves packets from node to node (point to point) 1 Physical -- Moves the individual bits from node to node (point to point) b) Name two popular protocols for each of layers 5, 4, 2, and 1. Name the key (only?) Internet protocol for layer 3. Layer 5 = HTTP and SMTP Layer 4 = TCP and UDP Layer 3 = IP Layer 2 and 1 = Ethernet and Wi-Fi c) Define protocol and interface. Explain what is the hard part in designing a protocol (or interface). Give an example of this (we discussed one example in class from your readings). Protocol = Complete set of rules regarding information exchange between same level layers between sites. Interface = Complete set of rules regarding information exchange between adjacent layers within a site. The hard part in designing a protocol is to get the rules complete that is, to consider all possible situations that your protocol will need to handle in order to provide the service it was designed to provide. An example of the difficulty of this is the 1841 Clayton tunnel train wreck we studied in class (and was your assigned reading). In this case the protocol was incomplete in that it was unable to handle the not unreasonable case of two trains in a tunnel.

2 d) What are the typical causes of delay and of packet loss in a packet switched network? Which cause of delay typically predominates for highly utilized multi-hop networks? Which cause of packet loss is the most common in highly utilized wired networks? The four typical causes of delay are processing, transmission, propagation, and queueing. The two causes of packet loss are electrical noise corrupting packets and buffer overflows dropping packets. For a highly utilized multi-hop network it is most likely that queueing delay predominates. However, propagation delay could also predominate depending on the span (size) of network, number of hops, and congestion level). Buffer overflow is the most common loss mechanism in wired networks. Problem #2 Each sub-problem worth 3 points. Answer the following questions about security and HTTP. a) What are the five malicious things that a bad guy can do with respect to (or using) a network as discussed in class and in the textbook. 1. Use the network to put malware on your host (be it server or client) 2. Attack servers and clients to deny service (Denial of Service we call this) 3. Sniff packets and read the contents 4. Masquerade as someone else (spoofing) 5. Modify and delete messages b) An HTTP server typically can determine the browser type (Firefox, Chrome, etc.) of the client sending a request to it. How is this possible? The HTTP header typically contains a field for user-agent, this identifies the browser used at the client. c) If the following webpage is accessed by a client using a browser than implements HTTP 1.1, will there be a significant (or any) performance improvement over using HTTP 1.0? What is the measure of performance we are interested in here? Explain your answer. <html><body> Here are some pictures of cats: <img src= > <img src= > <img src= > <img src= > <img src= > <img src= > <img src= > </body></html> There will be no significant performance improvement if HTTP 1.1 is used over 1.0. The reason for this is that HTTP 1.1 gains a performance improvement over 1.0 in situations where a single persistent connection can be used to download multiple objects. For the above web page all the images are on different hosts and so multiple connections are needed in any case HTTP 1.1 thus gains no advantage over HTTP 1.0. The measure of performance of interest here is the response time to display (or render) the complete web page consisting of some text and (probably) seven cat pictures.

3 d) What is wrong with the following HTTP request header (read it very carefully)? GETSTUFF /~christen/index.html HTTP/1.1 There is no such request (or method) as GETSTUFF (there is, however, GET). Problem #3 Blocking definition is 6 pts, each example is 3 pts. We speak of sockets functions that block. What do we mean by this? Give an example of a streams (TCP) sockets function that blocks (and explain what it is blocking on) and an example of a datagram (UDP) sockets function that blocks (and, again, explain what it is blocking on). Functions do not return until they complete. Functions in sockets that wait on some event to complete, typically from the other side (so, client side if server or vise versa), are considered to be blocking. For TCP the accept() function blocks until a connect() is issued by the other side. For UDP the recvfrom() function blocks until a datagram is received. There are other possible examples (for example, recv() for TCP). Problem #4 1 pt for each bug found. Appendix A contains our tcpserver.c program with many errors. The program compiles and links successfully, but it will not run successfully. Identify the errors (there are 10 errors that I know about). The errors are not subtle, they are quite significant and (I would argue) blatant. You may write your answer on the code listing in the appendix, if you wish. The errors are: 1. PORT_NUM should be an integer value, not a string ( mickey mouse ) 2. welcome_s should be an interger and not a double 3. if (welcome_s > 0)... should be if (welcome_s < 0) 4. server_addr.sin_port = htons(port_num); is missing 5. Should bind welcome_s and not the non-existent connect_s 6. listen(wecome_s, 1); is missing 7. The client port number in the accept() printf() message is surely not PORT_NUM (it is ntohs(client_addr.sin_port)) 8. Using in_buf, not out_buf, in the send() 9. Using out_buf, not in_buf, in recv() 10. Using retcode, not in_buf, in the recv() printf() message Problem #5 6 pts for sequence number. 6 pts for walk through. This question is about the RDT protocol developed in the textbook in Chapter 3 and described in the career fair online lecture on protocol design. Appendix B contains the RDT 2.2 receiver FSM for the textbook. Consider that there may be two duplicate packets in flight in the network to the receiver if an early time-out has occurred in the sender. How does the RDT 2.2 receiver prevent duplicate data from being delivered to layer 5 in this situation? Give an example considering two packets with sequence number 0 (SN = 0) being received consecutively one immediately after the other. The short answer is sequence numbers. Consider two packets with SN = 0. The first packet received will advance the FSM from Wait for 0 state to Wait for 1 state with the actions of delivering the received data to Layer 5 and sending an ACK0. Then in the Wait for 1 when the second packet with SN = 0 arrives, it will result in a second ACK0 being sent, but no (redundant) data being delivered to Layer 5.

4 Problem #6 6 pts for each sub-problem. Majority of credit for correct formulas. Consider the following scenario. Distance from sender to receiver is 3000 miles Data rate between sender and receiver is 1 Mbps Data packet length is 1250 bytes ACK packet length is 64 bytes Sender always has packets queued to send a) What is the link utilization if an SAW protocol is used and you assume no bit errors (i.e., lost packets or lost ACKs never occur)? For T_proc and T_ack negligible (here ACK is about 20x smaller than a data packet) we know that: U = T_fr / (2*T_pr + T_fr) T_fr = (1250 * 8) / = 10 ms T_pr = 3000 * 5 us/mile = 15 ms So U = 10 / (2 * ) = 25% b) What is the link utilization if an SAW protocol is used and you assume a bit error rate of 10-5 (you may assume that only data packets will have errors and that all errors are detectable at the receiver, ACK packets never contain bit errors). We first solve for the probability of a packet error, p = 1 (1 10-5)1250*8 = We know that U = ((1 p) * T_fr) / (2*T_pr + T_fr) So, U = (( ) * 10) / (2 * ) = 22.6% Problem #7 Notion of sampling and smoothing is 6 pts. Notion of estimating variability and using it is 6 pts. Explain in words (and not just regurgitate formulas that you may have written on your formula sheet) how modern TCP determines the time-out value that it uses for implicit packet loss detection and recovery. No more than about 100 words, please. TCP times (that is, samples) the RTT for each non-retransmitted segment sent and ACKed. The sampled RTT is then smoothed by using exponential smoothing weighting both the previous smoothed value and the current sample value. TCP also determines the variability in RTT values by looking at the magnitude of difference in sampled values and the smoothed values of RTT. The time-out value is then the smooth RTT value plus an estimate of the variability in RTT. For the case of a time-out and retransmit, the time-out value is always backed-off (or doubled) until a successful (ACKed) transmission occurs and no sampling takes place.

5 Problem #8 Each sub-problem worth 3 points. Answer the following general questions about Layer 3. a) What are the two general functions of Layer 3? The two general functions of Layer 3 are 1) forwarding of packets (i.e., choosing which port to forward a packet to within a router that has many possible egress ports and 2) routing (i.e., choosing the path or route to be taken by packets from sender to receiver). b) We talk of a least cost route as being the best route from a sender A to a receiver B. What are some possible metrics for route cost? Which of these metrics are static and which are dynamic? Hops, link speed, congestion, delay, security, and many others. Hops and link speed are static. Congestion and delay are dynamic. Security is most likely static. c) What are the criteria for a good routing algorithm? Fast, simple, not generate much network traffic (overhead), not create loops, stable, and converge to optimum solution. d) Routers change which protocol header? Explain what is changed and why. Routers alter the MAC (Layer 2) header to insert the destination MAC address of the host (or router port) that a packet is being sent to (also the source address is changed to that of the sending router port). Extra Credit RTT is 4 pts, utilization is 3 pts, solution is 3 pts. The average distance to Mars is 141 million miles. What is the approximate RTT to Mars? For a 1 Mb/s data rate, how many bytes can be in flight from Earth to Mars (that is, how many bytes can fill-up the pipe in one direction)? TCP has a 16-bit window size expressed in bytes this is a field in the TCP header. What is the maximum link utilization that can be achieved with the maximum window size in bytes? Can you propose a relatively simple fix (the fix may not require changing the format of the TCP header)? We know that one foot = one nanosecond, 5280 feet in a mile so 5.28 microseconds per mile. For 141 million miles this is 745 seconds or about 12.4 minutes. RTT is then twice this, or about 25 minutes. For 1 Mb/s link we have: 745 s * 1.0*10^6 b/s = 745*10^6 b (or about 89 Mbytes). 2^16 is so the maximum utilization would be ((65536 * 8) / 1.0 * 10^6) / (2 * 745) = 0.035%. So, much less than 1% utilization. One solution could be to consider each increment of the window size to be more than 1 byte. If each increment was 1 Mbyte (instead of 1 byte) than a 100% utilization could be achieved. So, this does not require changing the format of the TCP header, only interpreting the current field in a different way.

6 Appendix A Code listing for problem #3 #define WIN #include <stdio.h> #include <string.h> #include <stdlib.h> #include <windows.h> #ifdef BSD #include <sys/types.h> #include <netinet/in.h> #include <sys/socket.h> #include <arpa/inet.h> #include <fcntl.h> #include <netdb.h> #define PORT_NUM "mickey mouse" int main() WORD wversionrequested = MAKEWORD(1,1); WSADATA wsadata; double welcome_s; struct sockaddr_in server_addr; int connect_s; struct sockaddr_in client_addr; struct in_addr client_ip_addr; int addr_len; char out_buf[4096]; char in_buf[4096]; int retcode; WSAStartup(wVersionRequested, &wsadata); welcome_s = (double) socket(af_inet, SOCK_STREAM, 0); if (welcome_s > 0) printf("*** ERROR socket() failed \n");

7 server_addr.sin_family = AF_INET; server_addr.sin_addr.s_addr = htonl(inaddr_any); retcode = bind(connect_s, (struct sockaddr *)&server_addr, sizeof(server_addr)); printf("*** ERROR bind() failed \n"); printf("waiting for accept() to complete... \n"); addr_len = sizeof(client_addr); connect_s = accept(welcome_s, (struct sockaddr *)&client_addr, &addr_len); if (connect_s < 0) printf("*** ERROR accept() failed \n"); memcpy(&client_ip_addr, &client_addr.sin_addr.s_addr, 4); printf("accept completed (IP address of client = %s port = %d) \n", inet_ntoa(client_ip_addr), PORT_NUM); strcpy(out_buf, "This is a message from SERVER to CLIENT"); retcode = send(connect_s, out_buf, (strlen(in_buf) + 1), 0); printf("*** ERROR send() failed \n"); retcode = recv(connect_s, out_buf, sizeof(in_buf), 0); printf("*** ERROR recv() failed \n"); printf("received from client: %s \n", retcode); retcode = closesocket(welcome_s); printf("*** ERROR closesocket() failed \n");

8 retcode = closesocket(connect_s); printf("*** ERROR closesocket() failed \n"); #ifdef BSD retcode = close(welcome_s); printf("*** ERROR close() failed \n"); retcode = close(connect_s); printf("*** ERROR close() failed \n"); // Clean up winsock WSACleanup(); return(0);

9 Appendix B RDT 2.2 Receiver from Kurose and Ross checksum)

CPSC 441 COMPUTER NETWORKS MIDTERM EXAM

CPSC 441 COMPUTER NETWORKS MIDTERM EXAM CPSC 441 COMPUTER NETWORKS MIDTERM EXAM Department of Computer Science University of Calgary Professor: Carey Williamson March 7, 2018 This is a CLOSED BOOK exam. Textbooks, notes, laptops, personal digital

More information

Internet Applications and the Application Layer Material from Kurose and Ross, Chapter 2: The Application Layer

Internet Applications and the Application Layer Material from Kurose and Ross, Chapter 2: The Application Layer Midterm Study Sheet Below is a list of topics that will be covered on the midterm exam. Some topics may have summaries to clarify the coverage of the topic during the lecture. Disclaimer: the list may

More information

Announcements. No book chapter for this topic! Slides are posted online as usual Homework: Will be posted online Due 12/6

Announcements. No book chapter for this topic! Slides are posted online as usual Homework: Will be posted online Due 12/6 Announcements No book chapter for this topic! Slides are posted online as usual Homework: Will be posted online Due 12/6 Copyright c 2002 2017 UMaine Computer Science Department 1 / 33 1 COS 140: Foundations

More information

No book chapter for this topic! Slides are posted online as usual Homework: Will be posted online Due 12/6

No book chapter for this topic! Slides are posted online as usual Homework: Will be posted online Due 12/6 Announcements No book chapter for this topic! Slides are posted online as usual Homework: Will be posted online Due 12/6 Copyright c 2002 2017 UMaine School of Computing and Information S 1 / 33 COS 140:

More information

PLEASE READ CAREFULLY BEFORE YOU START

PLEASE READ CAREFULLY BEFORE YOU START Page 1 of 11 MIDTERM EXAMINATION #1 OCT. 16, 2013 COMPUTER NETWORKS : 03-60-367-01 U N I V E R S I T Y O F W I N D S O R S C H O O L O F C O M P U T E R S C I E N C E Fall 2013-75 minutes This examination

More information

PLEASE READ CAREFULLY BEFORE YOU START

PLEASE READ CAREFULLY BEFORE YOU START MIDTERM EXAMINATION #2 NETWORKING CONCEPTS 03-60-367-01 U N I V E R S I T Y O F W I N D S O R - S c h o o l o f C o m p u t e r S c i e n c e Fall 2011 Question Paper NOTE: Students may take this question

More information

Interprocess Communication Mechanisms

Interprocess Communication Mechanisms Interprocess Communication 1 Interprocess Communication Mechanisms shared storage These mechanisms have already been covered. examples: shared virtual memory shared files processes must agree on a name

More information

Distributed Systems. 02. Networking. Paul Krzyzanowski. Rutgers University. Fall 2017

Distributed Systems. 02. Networking. Paul Krzyzanowski. Rutgers University. Fall 2017 Distributed Systems 02. Networking Paul Krzyzanowski Rutgers University Fall 2017 1 Inter-computer communication Without shared memory, computers need to communicate Direct link Direct links aren't practical

More information

CS 428/528 Computer Networks Lecture 01. Yan Wang

CS 428/528 Computer Networks Lecture 01. Yan Wang 1 CS 428/528 Computer Lecture 01 Yan Wang 2 Motivation: Why bother? Explosive growth of networks 1989, 100,000 hosts on the Internet Distributed Applications and Systems E-mail, WWW, multimedia, distributed

More information

Interprocess Communication Mechanisms

Interprocess Communication Mechanisms Interprocess Communication 1 Interprocess Communication Mechanisms ffl shared storage These mechanisms have already been covered. examples: Λ shared virtual memory Λ shared files processes must agree on

More information

PLEASE READ CAREFULLY BEFORE YOU START

PLEASE READ CAREFULLY BEFORE YOU START Page 1 of 11 MIDTERM EXAMINATION #1 OCT. 13, 2011 COMPUTER NETWORKS : 03-60-367-01 U N I V E R S I T Y O F W I N D S O R S C H O O L O F C O M P U T E R S C I E N C E Fall 2011-75 minutes This examination

More information

Lecture 20 Overview. Last Lecture. This Lecture. Next Lecture. Transport Control Protocol (1) Transport Control Protocol (2) Source: chapters 23, 24

Lecture 20 Overview. Last Lecture. This Lecture. Next Lecture. Transport Control Protocol (1) Transport Control Protocol (2) Source: chapters 23, 24 Lecture 20 Overview Last Lecture Transport Control Protocol (1) This Lecture Transport Control Protocol (2) Source: chapters 23, 24 Next Lecture Internet Applications Source: chapter 26 COSC244 & TELE202

More information

PLEASE READ CAREFULLY BEFORE YOU START

PLEASE READ CAREFULLY BEFORE YOU START Page 1 of 20 MIDTERM EXAMINATION #1 - B COMPUTER NETWORKS : 03-60-367-01 U N I V E R S I T Y O F W I N D S O R S C H O O L O F C O M P U T E R S C I E N C E Fall 2008-75 minutes This examination document

More information

PLEASE READ CAREFULLY BEFORE YOU START

PLEASE READ CAREFULLY BEFORE YOU START Page 1 of 20 MIDTERM EXAMINATION #1 - A COMPUTER NETWORKS : 03-60-367-01 U N I V E R S I T Y O F W I N D S O R S C H O O L O F C O M P U T E R S C I E N C E Fall 2008-75 minutes This examination document

More information

Question Score 1 / 19 2 / 19 3 / 16 4 / 29 5 / 17 Total / 100

Question Score 1 / 19 2 / 19 3 / 16 4 / 29 5 / 17 Total / 100 NAME: Login name: Computer Science 461 Midterm Exam March 10, 2010 3:00-4:20pm This test has five (5) questions. Put your name on every page, and write out and sign the Honor Code pledge before turning

More information

Introduction to Client-Server Model

Introduction to Client-Server Model Preview Introduction to Client-Server Model Motivation of Client-Server Model Terminologies and Concepts in Client-Server Model Connectionless vs. Connection-Oriented Stateless vs. Stateful Server Identify

More information

CS164 Final Exam Winter 2013

CS164 Final Exam Winter 2013 CS164 Final Exam Winter 2013 Name: Last 4 digits of Student ID: Problem 1. State whether each of the following statements is true or false. (Two points for each correct answer, 1 point for each incorrect

More information

UNIT IV -- TRANSPORT LAYER

UNIT IV -- TRANSPORT LAYER UNIT IV -- TRANSPORT LAYER TABLE OF CONTENTS 4.1. Transport layer. 02 4.2. Reliable delivery service. 03 4.3. Congestion control. 05 4.4. Connection establishment.. 07 4.5. Flow control 09 4.6. Transmission

More information

CPSC 441 COMPUTER COMMUNICATIONS MIDTERM EXAM

CPSC 441 COMPUTER COMMUNICATIONS MIDTERM EXAM CPSC 441 COMPUTER COMMUNICATIONS MIDTERM EXAM Department of Computer Science University of Calgary Professor: Carey Williamson November 1, 2005 This is a CLOSED BOOK exam. Textbooks, notes, laptops, personal

More information

14-740: Fundamentals of Computer and Telecommunication Networks

14-740: Fundamentals of Computer and Telecommunication Networks 14-740: Fundamentals of Computer and Telecommunication Networks Fall 2018 Quiz #2 Duration: 75 minutes ANSWER KEY Name: Andrew ID: Important: Each question is to be answered in the space provided. Material

More information

CS 3516: Computer Networks

CS 3516: Computer Networks Welcome to CS 3516: Prof. Yanhua Li Time: 9:00am 9:50am M, T, R, and F Location: AK219 Fall 2018 A-term 1 Some slides are originally from the course materials of the textbook Computer Networking: A Top

More information

Final Exam for ECE374 05/03/12 Solution!!

Final Exam for ECE374 05/03/12 Solution!! ECE374: Second Midterm 1 Final Exam for ECE374 05/03/12 Solution!! Instructions: Put your name and student number on each sheet of paper! The exam is closed book. You have 90 minutes to complete the exam.

More information

UNIVERSITY OF TORONTO FACULTY OF APPLIED SCIENCE AND ENGINEERING

UNIVERSITY OF TORONTO FACULTY OF APPLIED SCIENCE AND ENGINEERING UNIVERSITY OF TORONTO FACULTY OF APPLIED SCIENCE AND ENGINEERING ECE361 Computer Networks Midterm March 06, 2017, 6:15PM DURATION: 80 minutes Calculator Type: 2 (non-programmable calculators) Examiner:

More information

CS457 Transport Protocols. CS 457 Fall 2014

CS457 Transport Protocols. CS 457 Fall 2014 CS457 Transport Protocols CS 457 Fall 2014 Topics Principles underlying transport-layer services Demultiplexing Detecting corruption Reliable delivery Flow control Transport-layer protocols User Datagram

More information

CSE/EE 461 Lecture 14. Connections. Last Time. This Time. We began on the Transport layer. Focus How do we send information reliably?

CSE/EE 461 Lecture 14. Connections. Last Time. This Time. We began on the Transport layer. Focus How do we send information reliably? CSE/EE 461 Lecture 14 Connections Last Time We began on the Transport layer Focus How do we send information reliably? Topics ARQ and sliding windows Application Presentation Session Transport Network

More information

CS519: Computer Networks. Lecture 5, Part 1: Mar 3, 2004 Transport: UDP/TCP demux and flow control / sequencing

CS519: Computer Networks. Lecture 5, Part 1: Mar 3, 2004 Transport: UDP/TCP demux and flow control / sequencing : Computer Networks Lecture 5, Part 1: Mar 3, 2004 Transport: UDP/TCP demux and flow control / sequencing Recall our protocol layers... ... and our protocol graph IP gets the packet to the host Really

More information

Socket Programming. Sungkyunkwan University. Hyunseung Choo Copyright Networking Laboratory

Socket Programming. Sungkyunkwan University. Hyunseung Choo Copyright Networking Laboratory Socket Programming Sungkyunkwan University Hyunseung Choo choo@skku.edu Copyright 2000-2019 Networking Laboratory Contents Goals Client-Server mechanism Introduction to socket Programming with socket on

More information

CCNA 1 Chapter 7 v5.0 Exam Answers 2013

CCNA 1 Chapter 7 v5.0 Exam Answers 2013 CCNA 1 Chapter 7 v5.0 Exam Answers 2013 1 A PC is downloading a large file from a server. The TCP window is 1000 bytes. The server is sending the file using 100-byte segments. How many segments will the

More information

CPSC 441 COMPUTER COMMUNICATIONS MIDTERM EXAM SOLUTION

CPSC 441 COMPUTER COMMUNICATIONS MIDTERM EXAM SOLUTION CPSC 441 COMPUTER COMMUNICATIONS MIDTERM EXAM SOLUTION Department of Computer Science University of Calgary Professor: Carey Williamson March 8, 2013 This is a CLOSED BOOK exam. Textbooks, notes, laptops,

More information

MIDTERM EXAMINATION #2 OPERATING SYSTEM CONCEPTS U N I V E R S I T Y O F W I N D S O R S C H O O L O F C O M P U T E R S C I E N C E

MIDTERM EXAMINATION #2 OPERATING SYSTEM CONCEPTS U N I V E R S I T Y O F W I N D S O R S C H O O L O F C O M P U T E R S C I E N C E MIDTERM EXAMINATION #2 OPERATING SYSTEM CONCEPTS 03-60-367-01 U N I V E R S I T Y O F W I N D S O R S C H O O L O F C O M P U T E R S C I E N C E Intersession 2008 Last Name: First Name: Student ID: PLEASE

More information

Programming with TCP/IP. Ram Dantu

Programming with TCP/IP. Ram Dantu 1 Programming with TCP/IP Ram Dantu 2 Client Server Computing Although the Internet provides a basic communication service, the protocol software cannot initiate contact with, or accept contact from, a

More information

9th Slide Set Computer Networks

9th Slide Set Computer Networks Prof. Dr. Christian Baun 9th Slide Set Computer Networks Frankfurt University of Applied Sciences WS1718 1/49 9th Slide Set Computer Networks Prof. Dr. Christian Baun Frankfurt University of Applied Sciences

More information

Computer Communication Networks Midterm Review

Computer Communication Networks Midterm Review Computer Communication Networks Midterm Review ICEN/ICSI 416 Fall 2018 Prof. Aveek Dutta 1 Instructions The exam is closed book, notes, computers, phones. You can use calculator, but not one from your

More information

Transport Layer Overview

Transport Layer Overview Transport Layer Overview Kai Shen Transport-layer Overview Network layer: host-to-host to logical communication between hosts. Transport layer: logical communication between s. multiple comm. s can reside

More information

Assignment #1. Csci4211 Spring Due on Feb. 13th, Notes: There are five questions in this assignment. Each question has 10 points.

Assignment #1. Csci4211 Spring Due on Feb. 13th, Notes: There are five questions in this assignment. Each question has 10 points. Assignment #1 Csci4211 Spring 2017 Due on Feb. 13th, 2017 Notes: There are five questions in this assignment. Each question has 10 points. 1. (10 pt.) Describe the special properties of the following transmission

More information

Problem 7. Problem 8. Problem 9

Problem 7. Problem 8. Problem 9 Problem 7 To best answer this question, consider why we needed sequence numbers in the first place. We saw that the sender needs sequence numbers so that the receiver can tell if a data packet is a duplicate

More information

Communication Networks

Communication Networks Communication Networks Spring 2018 Laurent Vanbever nsg.ee.ethz.ch ETH Zürich (D-ITET) April 30 2018 Materials inspired from Scott Shenker & Jennifer Rexford Last week on Communication Networks We started

More information

THE UNIVERSITY OF NEW SOUTH WALES

THE UNIVERSITY OF NEW SOUTH WALES Name of Candidate: Student ID: Signature: THE UNIVERSITY OF NEW SOUTH WALES COMP3331/93331 Computer Networks and Applications Sample Mid-session Examination INSTRUCTIONS TO CANDIDATES: (1) Time allowed:

More information

School of Engineering Department of Computer and Communication Engineering Semester: Fall Course: CENG415 Communication Networks

School of Engineering Department of Computer and Communication Engineering Semester: Fall Course: CENG415 Communication Networks School of Engineering Department of Computer and Communication Engineering Semester: Fall 2012 2013 Course: CENG415 Communication Networks Instructors: Mr Houssam Ramlaoui, Dr Majd Ghareeb, Dr Michel Nahas,

More information

CSCD 330 Network Programming Winter 2015

CSCD 330 Network Programming Winter 2015 CSCD 330 Network Programming Winter 2015 Lecture 11a Transport Layer Reading: Chapter 3 Some Material in these slides from J.F Kurose and K.W. Ross All material copyright 1996-2007 1 Chapter 3 Sections

More information

Computer Network 2015 Mid-Term Exam.

Computer Network 2015 Mid-Term Exam. Computer Network 2015 Mid-Term Exam. Question : ``Basic of Computer Networks and the Internet' Please fill into the blanks (15%) a) The amount of time required to push all of a packet s bits into a link

More information

(Refer Slide Time: 1:09)

(Refer Slide Time: 1:09) Computer Networks Prof. S. Ghosh Department of Computer Science and Engineering Indian Institute of Technology, Kharagpur Lecturer # 30 UDP and Client Server Good day, today we will start our discussion

More information

CS 5520/ECE 5590NA: Network Architecture I Spring Lecture 13: UDP and TCP

CS 5520/ECE 5590NA: Network Architecture I Spring Lecture 13: UDP and TCP CS 5520/ECE 5590NA: Network Architecture I Spring 2008 Lecture 13: UDP and TCP Most recent lectures discussed mechanisms to make better use of the IP address space, Internet control messages, and layering

More information

CS307 Operating Systems Processes

CS307 Operating Systems Processes CS307 Processes Fan Wu Department of Computer Science and Engineering Shanghai Jiao Tong University Spring 2018 Process Concept Process a program in execution An operating system executes a variety of

More information

Processes. Process Concept. The Process. The Process (Cont.) Process Control Block (PCB) Process State

Processes. Process Concept. The Process. The Process (Cont.) Process Control Block (PCB) Process State CS307 Process Concept Process a program in execution Processes An operating system executes a variety of programs: Batch system jobs Time-shared systems user programs or tasks All these activities are

More information

PLEASE READ CAREFULLY BEFORE YOU START

PLEASE READ CAREFULLY BEFORE YOU START MIDTERM EXAMINATION #1 NETWORKING CONCEPTS 03-60-367-01 U N I V E R S I T Y O F W I N D S O R - S c h o o l o f C o m p u t e r S c i e n c e Intersession 2009 Question Paper NOTE: Students may take this

More information

ECE 435 Network Engineering Lecture 2

ECE 435 Network Engineering Lecture 2 ECE 435 Network Engineering Lecture 2 Vince Weaver http://web.eece.maine.edu/~vweaver vincent.weaver@maine.edu 6 September 2018 Announcements Homework 1 will be posted. Will be on website, will announce

More information

CSCI 415 Computer Networks Homework 2 Due 02/13/08

CSCI 415 Computer Networks Homework 2 Due 02/13/08 CSCI 415 Computer Networks Homework 2 Due 02/13/08 Saad Mneimneh Computer Science Hunter College of CUNY Problem 1 Consider the following server and client C++ code that we saw in class: server.c #include

More information

Network Management & Monitoring

Network Management & Monitoring Network Management & Monitoring Network Delay These materials are licensed under the Creative Commons Attribution-Noncommercial 3.0 Unported license (http://creativecommons.org/licenses/by-nc/3.0/) End-to-end

More information

Transport Layer. -UDP (User Datagram Protocol) -TCP (Transport Control Protocol)

Transport Layer. -UDP (User Datagram Protocol) -TCP (Transport Control Protocol) Transport Layer -UDP (User Datagram Protocol) -TCP (Transport Control Protocol) 1 Transport Services The transport layer has the duty to set up logical connections between two applications running on remote

More information

CS 485/ECE 440/CS 585 Fall 2013 Midterm

CS 485/ECE 440/CS 585 Fall 2013 Midterm CS 485/ECE 440/CS 585 Fall 2013 Midterm Name: This test is open book and open notes, but closed neighbor and closed everything else except for a pen or pencil. If you are logged into any lab computer or

More information

Your Name: Your student ID number:

Your Name: Your student ID number: CSC 573 / ECE 573 Internet Protocols October 11, 2005 MID-TERM EXAM Your Name: Your student ID number: Instructions Allowed o A single 8 ½ x11 (front and back) study sheet, containing any info you wish

More information

Lecture 13: Transport Layer Flow and Congestion Control

Lecture 13: Transport Layer Flow and Congestion Control Lecture 13: Transport Layer Flow and Congestion Control COMP 332, Spring 2018 Victoria Manfredi Acknowledgements: materials adapted from Computer Networking: A Top Down Approach 7 th edition: 1996-2016,

More information

WinSock. What Is Sockets What Is Windows Sockets What Are Its Benefits Architecture of Windows Sockets Network Application Mechanics

WinSock. What Is Sockets What Is Windows Sockets What Are Its Benefits Architecture of Windows Sockets Network Application Mechanics WinSock What Is Sockets What Is Windows Sockets What Are Its Benefits Architecture of Windows Sockets Network Application Mechanics What Is Sockets Standard API (Application Programming Interface) for

More information

CSC209H Lecture 9. Dan Zingaro. March 11, 2015

CSC209H Lecture 9. Dan Zingaro. March 11, 2015 CSC209H Lecture 9 Dan Zingaro March 11, 2015 Socket Programming (Kerrisk Ch 56, 57, 59) Pipes and signals are only useful for processes communicating on the same machine Sockets are a general interprocess

More information

Computer Science 461 Midterm Exam March 14, :00-10:50am

Computer Science 461 Midterm Exam March 14, :00-10:50am NAME: Login name: Computer Science 461 Midterm Exam March 14, 2012 10:00-10:50am This test has seven (7) questions, each worth ten points. Put your name on every page, and write out and sign the Honor

More information

Midterm Review. EECS 489 Computer Networks Z. Morley Mao Monday Feb 19, 2007

Midterm Review. EECS 489 Computer Networks  Z. Morley Mao Monday Feb 19, 2007 Midterm Review EECS 489 Computer Networks http://www.eecs.umich.edu/courses/eecs489/w07 Z. Morley Mao Monday Feb 19, 2007 Acknowledgement: Some slides taken from Kurose&Ross and Katz&Stoica 1 Adminstrivia

More information

CPSC 213. Introduction to Computer Systems. Inter-Process Communication. Unit 2f

CPSC 213. Introduction to Computer Systems. Inter-Process Communication. Unit 2f CPSC 213 Introduction to Computer Systems Unit 2f Inter-Process Communication 1 Reading For Next Three Lectures Textbook The Client Server Programming Model - Web Servers 2nd ed: 11.1-11.5 1st ed: 12.1-12.5

More information

Application. Transport. Network. Link. Physical

Application. Transport. Network. Link. Physical Transport Layer ELEC1200 Principles behind transport layer services Multiplexing and demultiplexing UDP TCP Reliable Data Transfer TCP Congestion Control TCP Fairness *The slides are adapted from ppt slides

More information

Networks Fall This exam consists of 10 problems on the following 13 pages.

Networks Fall This exam consists of 10 problems on the following 13 pages. CSCI 466 Final Networks Fall 2011 Name: This exam consists of 10 problems on the following 13 pages. You may use your two- sided hand- written 8 ½ x 11 note sheet during the exam and a calculator. No other

More information

Context. Distributed Systems: Sockets Programming. Alberto Bosio, Associate Professor UM Microelectronic Departement

Context. Distributed Systems: Sockets Programming. Alberto Bosio, Associate Professor UM Microelectronic Departement Distributed Systems: Sockets Programming Alberto Bosio, Associate Professor UM Microelectronic Departement bosio@lirmm.fr Context Computer Network hosts, routers, communication channels Hosts run applications

More information

Simple network applications using sockets (BSD and WinSock) Revision 1 Copyright Clifford Slocombe

Simple network applications using sockets (BSD and WinSock) Revision 1 Copyright Clifford Slocombe Simple network applications using sockets (BSD and WinSock) Revision 1 Copyright 2002 - Clifford Slocombe sockets@slocombe.clara.net COPYRIGHT 2002 - CLIFFORD SLOCOMBE PAGE 1 OF 8 Table of Contents Introduction...3

More information

Answers to Sample Questions on Transport Layer

Answers to Sample Questions on Transport Layer Answers to Sample Questions on Transport Layer 1) Which protocol Go-Back-N or Selective-Repeat - makes more efficient use of network bandwidth? Why? Answer: Selective repeat makes more efficient use of

More information

EECS 122, Lecture 19. Reliable Delivery. An Example. Improving over Stop & Wait. Picture of Go-back-n/Sliding Window. Send Window Maintenance

EECS 122, Lecture 19. Reliable Delivery. An Example. Improving over Stop & Wait. Picture of Go-back-n/Sliding Window. Send Window Maintenance EECS 122, Lecture 19 Today s Topics: More on Reliable Delivery Round-Trip Timing Flow Control Intro to Congestion Control Kevin Fall, kfall@cs cs.berkeley.eduedu Reliable Delivery Stop and Wait simple

More information

CSc 450/550 Computer Networks Network Architectures & Client-Server Model

CSc 450/550 Computer Networks Network Architectures & Client-Server Model CSc 450/550 Computer Networks Network Architectures & Client-Server Model Jianping Pan Summer 2007 5/17/07 CSc 450/550 1 Last lectures So far, nuts and bolts views of the Internet Internet evolution and

More information

Question Points Score total 100

Question Points Score total 100 CS457: Computer Networking Date: 3/21/2008 Name: Instructions: 1. Be sure that you have 8 questions 2. Be sure your answers are legible. 3. Write your Student ID at the top of every page 4. This is a closed

More information

Good Ideas So Far Computer Networking. Outline. Sequence Numbers (reminder) TCP flow control. Congestion sources and collapse

Good Ideas So Far Computer Networking. Outline. Sequence Numbers (reminder) TCP flow control. Congestion sources and collapse Good Ideas So Far 15-441 Computer Networking Lecture 17 TCP & Congestion Control Flow control Stop & wait Parallel stop & wait Sliding window Loss recovery Timeouts Acknowledgement-driven recovery (selective

More information

Transport Protocols Reading: Sections 2.5, 5.1, and 5.2. Goals for Todayʼs Lecture. Role of Transport Layer

Transport Protocols Reading: Sections 2.5, 5.1, and 5.2. Goals for Todayʼs Lecture. Role of Transport Layer Transport Protocols Reading: Sections 2.5, 5.1, and 5.2 CS 375: Computer Networks Thomas C. Bressoud 1 Goals for Todayʼs Lecture Principles underlying transport-layer services (De)multiplexing Detecting

More information

Transport Protocols Reading: Sections 2.5, 5.1, and 5.2

Transport Protocols Reading: Sections 2.5, 5.1, and 5.2 Transport Protocols Reading: Sections 2.5, 5.1, and 5.2 CE443 - Fall 1390 Acknowledgments: Lecture slides are from Computer networks course thought by Jennifer Rexford at Princeton University. When slides

More information

Sequence Number. Acknowledgment Number. Data

Sequence Number. Acknowledgment Number. Data CS 455 TCP, Page 1 Transport Layer, Part II Transmission Control Protocol These slides are created by Dr. Yih Huang of George Mason University. Students registered in Dr. Huang's courses at GMU can make

More information

ECE 650 Systems Programming & Engineering. Spring 2018

ECE 650 Systems Programming & Engineering. Spring 2018 ECE 650 Systems Programming & Engineering Spring 2018 Networking Transport Layer Tyler Bletsch Duke University Slides are adapted from Brian Rogers (Duke) TCP/IP Model 2 Transport Layer Problem solved:

More information

Hyo-bong Son Computer Systems Laboratory Sungkyunkwan University

Hyo-bong Son Computer Systems Laboratory Sungkyunkwan University Sockets Hyo-bong Son (proshb@csl.skku.edu) Computer Systems Laboratory Sungkyunkwan University http://csl.skku.edu Client-Server Model Most network application is based on the client-server model: A server

More information

A Client-Server Exchange

A Client-Server Exchange Socket programming A Client-Server Exchange A server process and one or more client processes Server manages some resource. Server provides service by manipulating resource for clients. 1. Client sends

More information

Sockets. Jin-Soo Kim Computer Systems Laboratory Sungkyunkwan University

Sockets. Jin-Soo Kim Computer Systems Laboratory Sungkyunkwan University Sockets Jin-Soo Kim (jinsookim@skku.edu) Computer Systems Laboratory Sungkyunkwan University http://csl.skku.edu Internet Connections (1) Connection Clients and servers communicate by sending streams of

More information

CS244a: An Introduction to Computer Networks

CS244a: An Introduction to Computer Networks Grade: MC: 7: 8: 9: 10: 11: 12: 13: 14: Total: CS244a: An Introduction to Computer Networks Final Exam: Wednesday You are allowed 2 hours to complete this exam. (i) This exam is closed book and closed

More information

Name Student ID Department/Year. Midterm Examination. Introduction to Computer Networks Class#: 901 E31110 Fall 2012

Name Student ID Department/Year. Midterm Examination. Introduction to Computer Networks Class#: 901 E31110 Fall 2012 Name Student ID Department/Year Midterm Examination Introduction to Computer Networks Class#: 901 E31110 Fall 2012 9:30-11:10 Thursday November 8, 2012 Prohibited 1. You are not allowed to write down the

More information

Computer Networks. 19 December This exam consists of 6 questions with subquestions. Every subquestion counts for 10 points.

Computer Networks. 19 December This exam consists of 6 questions with subquestions. Every subquestion counts for 10 points. Computer Networks 19 December 2014 This exam consists of 6 questions with subquestions. Every subquestion counts for 10 points. Mark every page with name and student number. Use of books, additional course

More information

Applied Networks & Security

Applied Networks & Security Applied Networks & Security TCP/IP Protocol Suite http://condor.depaul.edu/~jkristof/it263/ John Kristoff jtk@depaul.edu IT 263 Spring 2006/2007 John Kristoff - DePaul University 1 ARP overview datalink

More information

CS244a: An Introduction to Computer Networks

CS244a: An Introduction to Computer Networks Do not write in this box MCQ 9: /10 10: /10 11: /20 12: /20 13: /20 14: /20 Total: Name: Student ID #: CS244a Winter 2003 Professor McKeown Campus/SITN-Local/SITN-Remote? CS244a: An Introduction to Computer

More information

CSE 461 Connections. David Wetherall

CSE 461 Connections. David Wetherall CSE 461 Connections David Wetherall djw@cs.washington.edu Connections Focus How do we (reliably) connect processes? This is the transport layer Topics Naming processes TCP / UDP Connection setup / teardown

More information

Transport Layer. Gursharan Singh Tatla. Upendra Sharma. 1

Transport Layer. Gursharan Singh Tatla.   Upendra Sharma. 1 Transport Layer Gursharan Singh Tatla mailme@gursharansingh.in Upendra Sharma 1 Introduction The transport layer is the fourth layer from the bottom in the OSI reference model. It is responsible for message

More information

ECE697AA Lecture 3. Today s lecture

ECE697AA Lecture 3. Today s lecture ECE697AA Lecture 3 Transport Layer: TCP and UDP Tilman Wolf Department of Electrical and Computer Engineering 09/09/08 Today s lecture Transport layer User datagram protocol (UDP) Reliable data transfer

More information

ECS 152A Computer Networks Instructor: Liu. Name: Student ID #: Final Exam: March 17, 2005

ECS 152A Computer Networks Instructor: Liu. Name: Student ID #: Final Exam: March 17, 2005 ECS 152A Computer Networks Instructor: Liu Name: Student ID #: Final Exam: March 17, 2005 Duration: 120 Minutes 1. The exam is closed book. However, you may refer to one sheet of A4 paper (double sided)

More information

Announcements Computer Networking. Outline. Transport Protocols. Transport introduction. Error recovery & flow control. Mid-semester grades

Announcements Computer Networking. Outline. Transport Protocols. Transport introduction. Error recovery & flow control. Mid-semester grades Announcements 15-441 Computer Networking Lecture 16 Transport Protocols Mid-semester grades Based on project1 + midterm + HW1 + HW2 42.5% of class If you got a D+,D, D- or F! must meet with Dave or me

More information

Computer Networks - Midterm

Computer Networks - Midterm Computer Networks - Midterm October 30, 2015 Duration: 2h15m This is a closed-book exam Please write your answers on these sheets in a readable way, in English or in French You can use extra sheets if

More information

UDP and TCP. Introduction. So far we have studied some data link layer protocols such as PPP which are responsible for getting data

UDP and TCP. Introduction. So far we have studied some data link layer protocols such as PPP which are responsible for getting data ELEX 4550 : Wide Area Networks 2015 Winter Session UDP and TCP is lecture describes the two most common transport-layer protocols used by IP networks: the User Datagram Protocol (UDP) and the Transmission

More information

Transport Layer Marcos Vieira

Transport Layer Marcos Vieira Transport Layer 2014 Marcos Vieira Transport Layer Transport protocols sit on top of network layer and provide Application-level multiplexing ( ports ) Error detection, reliability, etc. UDP User Datagram

More information

Lecture 9: Transpor Layer Overview and UDP

Lecture 9: Transpor Layer Overview and UDP Lecture 9: Transpor Layer Overview and UDP COMP 332, Spring 2018 Victoria Manfredi Acknowledgements: materials adapted from Computer Networking: A Top Down Approach 7 th edition: 1996-2016, J.F Kurose

More information

PA #2 Reviews. set_name, get_name, del_name. Questions? Will be modified after PA #4 ~

PA #2 Reviews. set_name, get_name, del_name. Questions? Will be modified after PA #4 ~ Sockets Prof. Jin-Soo Kim( jinsookim@skku.edu) TA Dong-Yun Lee(dylee@csl.skku.edu) Computer Systems Laboratory Sungkyunkwan University http://csl.skku.edu PA #2 Reviews set_name, get_name, del_name Will

More information

Review problems (for no credit): Transport and Network Layer

Review problems (for no credit): Transport and Network Layer Review problems (for no credit): Transport and Network Layer V. Arun CS 653, Fall 2018 09/06/18 Transport layer 1. Protocol multiplexing: (a) If a web server has 100 open connections, how many sockets

More information

Lecture 7. Followup. Review. Communication Interface. Socket Communication. Client-Server Model. Socket Programming January 28, 2005

Lecture 7. Followup. Review. Communication Interface. Socket Communication. Client-Server Model. Socket Programming January 28, 2005 Followup symbolic link (soft link): pathname, can be across file systems, replacement of file will be active on all symbolic links, consumes at least an inode. hard link: pointers to an inode, only in

More information

EE 122: IP Forwarding and Transport Protocols

EE 122: IP Forwarding and Transport Protocols EE 1: IP Forwarding and Transport Protocols Ion Stoica (and Brighten Godfrey) TAs: Lucian Popa, David Zats and Ganesh Ananthanarayanan http://inst.eecs.berkeley.edu/~ee1/ (Materials with thanks to Vern

More information

Page 1. Goals for Today" Discussion" Example: Reliable File Transfer" CS162 Operating Systems and Systems Programming Lecture 11

Page 1. Goals for Today Discussion Example: Reliable File Transfer CS162 Operating Systems and Systems Programming Lecture 11 Goals for Today" CS162 Operating Systems and Systems Programming Lecture 11 Reliability, Transport Protocols" Finish e2e argument & fate sharing Transport: TCP/UDP Reliability Flow control October 5, 2011

More information

CS244a: An Introduction to Computer Networks

CS244a: An Introduction to Computer Networks Do not write in this box MCQ 13: /10 14: /10 15: /0 16: /0 17: /10 18: /10 19: /0 0: /10 Total: Name: Student ID #: Campus/SITN-Local/SITN-Remote? CS44a Winter 004 Professor McKeown CS44a: An Introduction

More information

ECE 435 Network Engineering Lecture 2

ECE 435 Network Engineering Lecture 2 ECE 435 Network Engineering Lecture 2 Vince Weaver http://web.eece.maine.edu/~vweaver vincent.weaver@maine.edu 31 August 2017 Announcements Homework 1 will be posted. Will be on website, will announce

More information

Multiple unconnected networks

Multiple unconnected networks TCP/IP Life in the Early 1970s Multiple unconnected networks ARPAnet Data-over-cable Packet satellite (Aloha) Packet radio ARPAnet satellite net Differences Across Packet-Switched Networks Addressing Maximum

More information

CSEP 561 Connections. David Wetherall

CSEP 561 Connections. David Wetherall CSEP 561 Connections David Wetherall djw@cs.washington.edu Connections Focus How do we (reliably) connect processes? This is the transport layer Topics Naming processes TCP / UDP Connection setup / teardown

More information

CS 349/449 Internet Protocols Final Exam Winter /15/2003. Name: Course:

CS 349/449 Internet Protocols Final Exam Winter /15/2003. Name: Course: CS 349/449 Internet Protocols Final Exam Winter 2003 12/15/2003 Name: Course: Instructions: 1. You have 2 hours to finish 2. Question 9 is only for 449 students 3. Closed books, closed notes. Write all

More information