>>> SOLUTIONS <<< c) The OSI Reference Model has two additional layers. Where are these layers in the stack and what services do they provide?



Similar documents
Transport and Network Layer

First Midterm for ECE374 02/25/15 Solution!!

Final for ECE374 05/06/13 Solution!!

Internet Firewall CSIS Packet Filtering. Internet Firewall. Examples. Spring 2011 CSIS net15 1. Routers can implement packet filtering

EECS 489 Winter 2010 Midterm Exam

What is CSG150 about? Fundamentals of Computer Networking. Course Outline. Lecture 1 Outline. Guevara Noubir noubir@ccs.neu.

Zarząd (7 osób) F inanse (13 osób) M arketing (7 osób) S przedaż (16 osób) K adry (15 osób)

Technical Support Information Belkin internal use only

Written examination in Computer Networks

Based on Computer Networking, 4 th Edition by Kurose and Ross

THE UNIVERSITY OF AUCKLAND

Internet Control Protocols Reading: Chapter 3

Internet Packets. Forwarding Datagrams

Note! The problem set consists of two parts: Part I: The problem specifications pages Part II: The answer pages

EINDHOVEN UNIVERSITY OF TECHNOLOGY Department of Mathematics and Computer Science

Procedure: You can find the problem sheet on Drive D: of the lab PCs. 1. IP address for this host computer 2. Subnet mask 3. Default gateway address

Note! The problem set consists of two parts: Part I: The problem specifications pages Part II: The answer pages

CSE 473 Introduction to Computer Networks. Exam 2 Solutions. Your name: 10/31/2013

Communications and Networking

CSE331: Introduction to Networks and Security. Lecture 6 Fall 2006

Agenda. Distributed System Structures. Why Distributed Systems? Motivation

IP Networking. Overview. Networks Impact Daily Life. IP Networking - Part 1. How Networks Impact Daily Life. How Networks Impact Daily Life

Computer Networks and the Internet

TCP/IP Fundamentals. OSI Seven Layer Model & Seminar Outline

SSVP SIP School VoIP Professional Certification

Troubleshooting Tools

Candidates should attempt FOUR questions. All questions carry 25 marks.

Life of a Packet CS 640,

Exam 1 Review Questions

Networking Test 4 Study Guide

Computer Networks CS321

Layered Architectures and Applications

Operating Systems and Networks Sample Solution 1

OSBRiDGE 5XLi. Configuration Manual. Firmware 3.10R

2. What is the maximum value of each octet in an IP address? A. 28 B. 255 C. 256 D. None of the above

Exercises TCP/IP Networking. Solution. With Solutions

8.2 The Internet Protocol

architecture: what the pieces are and how they fit together names and addresses: what's your name and number?

LANs. Local Area Networks. via the Media Access Control (MAC) SubLayer. Networks: Local Area Networks

Network layer" 1DT066! Distributed Information Systems!! Chapter 4" Network Layer!! goals: "

Module 15: Network Structures

Computer Networks Homework 1

Assignment 6: Internetworking Due October 17/18, 2012

Computer Networks. Definition of LAN. Connection of Network. Key Points of LAN. Lecture 06 Connecting Networks

TCP/IP Protocol Suite. Marshal Miller Chris Chase

Lecture 2.1 : The Distributed Bellman-Ford Algorithm. Lecture 2.2 : The Destination Sequenced Distance Vector (DSDV) protocol

1 Data information is sent onto the network cable using which of the following? A Communication protocol B Data packet

CS 5480/6480: Computer Networks Spring 2012 Homework 4 Solutions Due by 1:25 PM on April 11 th 2012

Names & Addresses. Names & Addresses. Hop-by-Hop Packet Forwarding. Longest-Prefix-Match Forwarding. Longest-Prefix-Match Forwarding

Datagram-based network layer: forwarding; routing. Additional function of VCbased network layer: call setup.

ESSENTIALS. Understanding Ethernet Switches and Routers. April 2011 VOLUME 3 ISSUE 1 A TECHNICAL SUPPLEMENT TO CONTROL NETWORK

Subnetting,Supernetting, VLSM & CIDR

SSVVP SIP School VVoIP Professional Certification

Guide to Network Defense and Countermeasures Third Edition. Chapter 2 TCP/IP

How To Understand The Layered Architecture Of A Network

Operating System Concepts. Operating System 資 訊 工 程 學 系 袁 賢 銘 老 師

IP address format: Dotted decimal notation:

COMPUTER NETWORK TECHNOLOGY (300)

IP Network Layer. Datagram ID FLAG Fragment Offset. IP Datagrams. IP Addresses. IP Addresses. CSCE 515: Computer Network Programming TCP/IP

Ethernet. Ethernet Frame Structure. Ethernet Frame Structure (more) Ethernet: uses CSMA/CD

Computer Network. Interconnected collection of autonomous computers that are able to exchange information

First Workshop on Open Source and Internet Technology for Scientific Environment: with case studies from Environmental Monitoring

Final Exam. Route Computation: One reason why link state routing is preferable to distance vector style routing.

The OSI and TCP/IP Models. Lesson 2

Network Performance: Networks must be fast. What are the essential network performance metrics: bandwidth and latency

Overview of Computer Networks

1. The Web: HTTP; file transfer: FTP; remote login: Telnet; Network News: NNTP; SMTP.

Midterm Exam CMPSCI 453: Computer Networks Fall 2011 Prof. Jim Kurose

Internet Protocol: IP packet headers. vendredi 18 octobre 13

BASIC ANALYSIS OF TCP/IP NETWORKS

Chapter 14: Distributed Operating Systems

Hands On Activities: TCP/IP Network Monitoring and Management

Transport Layer Protocols

Using IPM to Measure Network Performance

Slide 1 Introduction cnds@napier 1 Lecture 6 (Network Layer)

Chapter 4 Network Layer

QoS issues in Voice over IP

Dynamic Host Configuration Protocol (DHCP) 02 NAT and DHCP Tópicos Avançados de Redes

CSE 3461 / 5461: Computer Networking & Internet Technologies

Network-Oriented Software Development. Course: CSc4360/CSc6360 Instructor: Dr. Beyah Sessions: M-W, 3:00 4:40pm Lecture 2

Introduction to Computer Networks

Architecture and Performance of the Internet

Load Balancing. Final Network Exam LSNAT. Sommaire. How works a "traditional" NAT? Un article de Le wiki des TPs RSM.

CCNA R&S: Introduction to Networks. Chapter 5: Ethernet

Introduction to LAN/WAN. Network Layer (part II)

Chapter 16: Distributed Operating Systems

Question 1. [7 points] Consider the following scenario and assume host H s routing table is the one given below:

First Midterm for ECE374 03/24/11 Solution!!

Ethernet. Ethernet. Network Devices

Network Security TCP/IP Refresher

The exam has 110 possible points, 10 of which are extra credit. There is a Word Bank on Page 8. Pages 7-8 can be removed from the exam.

Networking 4 Voice and Video over IP (VVoIP)

Random Access Protocols

Chapter 6 Using Network Monitoring Tools

EKSAMEN / EXAM TTM

CSE 123: Computer Networks Fall Quarter, 2014 MIDTERM EXAM

COMP 361 Computer Communications Networks. Fall Semester Midterm Examination

Lab 2. CS-335a. Fall 2012 Computer Science Department. Manolis Surligas

Assignment #3 Routing and Network Analysis. CIS3210 Computer Networks. University of Guelph

Transcription:

Midterm Exam for Computer Networks (CNT 4004) Fall 2013 >>> SOLUTIONS <<< Welcome to the Mid-Term Exam for Computer Networks. Read each problem carefully. There are eight required problems (each worth 12 points you get 4 points just for submitting the exam). There is also an additional extra credit question worth 10 points. You may have with you a calculator, pencils and/or pens, erasers, 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. Please answer the problems on the available sheets. If you need extra space, use the back side of the page of the problem that you are answering. You have 75 minutes for this exam. Good luck and be sure to show your work! Problem #1 4 points for each sub-problem. a) Sketch the five-layer Internet protocol stack and describe in one sentence (for each layer) the services that each layer provides. Application -- Where network application and application protocols reside Transport -- Transports appl layer messages between appl endpoints (end to end) Network -- Moves network layer packets from host to host (point to point) Link -- Actually moves packets from node to node (point to point) Physical -- Moves the individual bits from node to node (point to point) b) Sketch a packet (i.e., show the headers and trailers) that would result from this five-layer model. Be sure to show all header and trailers that could be present (even if you know that they are not present in a real Internet packet). -------------- PHY hdr Link hdr Network hdr Transport hdr Application hdr... -------------- --... data Appl trlr Transport trlr Network trlr Link trlr Phy trlr -- c) The OSI Reference Model has two additional layers. Where are these layers in the stack and what services do they provide? The two additional layers are the Session layer (layer 5 above the Transport layer and below the Presentation layer) and the Presentation layer (layer 6 above the Session layer and below the Application layer the Application layer is now layer 7). From the textbook (age 53), The role of the presentation layer is to provide services that allow communicating applications to interpret the meaning of data exchanged. And, The session layer provide for delimiting and synchronization of data exchange, including the means to build a checkpointing and recovery scheme.

Problem #2 3 points for each sub-problem. Answer the following questions regarding the Application Layer. a) An application layer protocol typically defines four things. What are these four things? Types of messages, syntax of messages, semantics of messages, and timing (when and how). b) What are ping and traceroute used for? Describe the output from each program. Ping is used to determine the presence (liveliness) of a remote host and the RTT to this host. The output is host not found (if the host is not there) or a list of RTTs for each ping packet sent. Traceroute is used to determine the hops (by IP address) from a source to a destination. For each hop listed, three sample RTTs are reported. c) What is the key difference between HTTP 1.0 and HTTP 1.1? HTTP uses a single TCP connection for each GET. HTTP 1.1 has the notion of persistent connections when multiple GETs (to a single server) can take place over a single TCP connection. d) What is DNS and what is it used for? If all DNS servers could be crashed (taken offline), what would happen to the Internet (be precise). DNS is Domain Name Service and is used to associate host names (as in say, www.yahoo.com or christen@csee.usf.edu) with IP addresses. If all DNS servers were to be crashed one would be unable to use hostnames and could only use IP addresses when using Internet services. Problem #3 6 points for each sub-problem. Answer the following questions about sockets a) Sketch the paired flowcharts for a streams (TCP) server and client showing the key sockets function calls (you need not give the arguments to each sockets function call, just identify it by name such as connect(), socket(), and so on). You need not include Winsock-specific calls (such as WSAStartup()). socket() socket() bind() listen() accept() <- - - - - - - - - connect() send() / recv() <- - - - -> send() / recv() close() close()

b) In the following sockets function call identify which arguments are passed-in and which arguments return values on successful completion of the below function. Describe the contents of each argument. connect_s = accept(welcome_s, (struct sockaddr *)&client_addr, &addr_len); The socket handle welcome_s is passed in, also passed in is a pointer to the size of the client_addr structure as &addr_len. On successful completion, the client_addr structure is returned filled-in with the connecting client address. Problem #4 6 points for each sub-problem. Answer the following questions about RDT protocols. a) For the rdt3.0 sender from the textbook (see Appendix A), what will the effect be if the isack(rcvpkt,1) condition in the Wait for ACK0 state is changed to isack(rcvpkt,0) and the isack(rcvpkt,0) condition in the Wait for ACK1 state is changed to isack(rcvpkt,1)? The matching rdt2.2 receiver is also shown in Appendix A for your reference. These two states will now have two transitions that trigger on the same condition, namely receiving the expected (and non-corrupted) ACK from the receiver. The FSM is thus not valid (or legal ). So, either the FSM will get stuck if the self-loop is taken in these states, or it will work correctly if the transition to next state is taken. However, it is unclear/unpredictable which transition will be taken. b) Assume a channel where data packets may be lost or corrupted, but ACKs are never lost and never corrupted. Give the simplest possible FSMs for an RDT sender and receiver for this channel. Use the notation and functions from the book (hint: the above FSMs contain the notation and most, if not all, of the functions you will need). Here is the FSM for the sender: SEND WAIT_ACK ------- ------- call from above send(data) ------------> ---------> make(packet, data), start_timer, udt_send(packet) time-out occurred <--------- recv(rcvpkt) && isack(rcvpkt) <-------- return success message to above Here is the FSM for the receiver. LISTEN ------- call from below rcv(rcvpkt) && notcorrupt(recvpkt) ---------> -----+ data = parsepkt(recvpkt), return data to above packet = makepkt(ack), udt_send(packet) <----+

Problem #5 6 points for formulas, 4 points for set-up, and 2 points for correct numerical answers. Assume a 24,000 mile long link (this is the distance to a geosynchronous orbit satellite) with data rate of 1 Mb/s. Assume 1250 byte packets (or frames). Assume that processing time and transmission time of ACKs are both negligible. What is the maximum throughput (in b/s) that the sender can achieve given a Stop-and-Wait protocol? Consider two cases 1) no packet loss, and 2) packet loss probability of 0.01. We know that U = t_fr / (t_fr + (2 * t_prop)) for the case of no errors and, U = ((1 p) * t_fr) / (t_fr + (2 * t_prop)) for p = probability of frame error. The throughput for the sender is then simply the utilization of the link multiplied by the line data rate. Solving for t_fr and t_prop: t_fr = (1250 * 8) / 1000000 = 10 ms t_pr = 24000 * 5*10^-6 = 120 ms (for 5 microseconds per mile prop delay) Thus, U = 10 / (10 + (2 * 120)) = 4.00% for no errors (packet loss probability = 0), and U = ((1 0.01) * 10) / (10 + (2 * 120)) = 3.96% for packet loss probability = 0.01 The throughput is then 0.04 * 1 Mb/s = 40 kb/s for the no error case and 0.0396 * 1 Mb/s = 39.6 kb/s for the error case. Problem #6 3 points for each sub-problem Answer the following questions regarding routing: a) What are the criteria for a good routing algorithm? Give at least four major criteria. Fast, simple, not generate much traffic, not create loops, stable, converges to an optimum solution b) Give a one sentence description of Dijkstra s algorithm. Find the shortest path from a given node to all other nodes by developing paths by adding edges in order of increasing path lengths c) Name a routing protocol that uses Dijkstra s algorithm. Name a routing protocol that uses Bellman-Ford algorithm. OSPF uses Dijkstra s algorithm. RIP uses Bellman-Ford. d) Using Dijkstra s algorithm, find the shortest path between nodes A and E. List the hops or links (node tuples) in the order that they are added by the algorithm. A 1 B 3 2 2 2 3 C D E Links are added in the following order: AB, AC, BD, and BE. The shortest path is then ABE

Problem #7 4 points for each sub-problem. Consider the following simplified network with a single router connecting networks 11.11.11 and 22.22.22 (here netid is 24 bits and host id is 8 bits). For a MAC address simply state (for example) MAC address of host A. The router has two ports identified as port 1 and port 2. hostid = 01 02 03 Router 01 02 03 +-+ +-+ +_+ +----------+ +-+ +-+ +-+ ABC 1 2 DEF +++ +++ +++ +-+------+-+ +++ +++ +++ ---+------+------+------+- -+------+------+------+--- netid = 11.11.11 22.22.22 a) Give the routing table in the router. The routing table is quite simple: netid port +----------+----+ 11.11.11 1 22.22.22 2 +----------+----+ b) Give the MAC and IP packet headers (address fields only) for a packet destined from host A to host F as sniffed on network 11.11.11 and network 22.22.22 (so, you are to give two sets of packet headers). On the 11.11.11 network: MAC destination = MAC address of Router port 1 MAC source = MAC address of host A IP source = 11.11.11.01 IP destination = 22.22.222.03 On the 22.22.22 network: MAC destination = MAC address of host F MAC source = MAC address of Router port 2 IP source = 11.11.11.01 IP destination = 22.22.222.03 c) Explain exactly how host A knows to which MAC address it should send a packet destined for a host on network 22.22.22. The ARP protocol in host A will resolve any IP address with netid 22.22.22 to the Router port 1 MAC address. Router port 1 is the MAC address destination that routes (via port 2) to all hosts on network 22.22.22. Problem #8 4 points for each sub-problem. Answer the following questions about Ethernet. a) Give the CSMA algorithm as used in IEEE 802.3 Ethernet. (1) If medium is idle then xmit (2) If medium is busy then wait until idle and then xmit immediately (3) If detect a collision then xmit a brief jam signal, stop xmitting, wait a random period of time, then (1)

b) Give the BEB algorithm as used in IEEE 802.3 Ethernet. while attempts < backoff_limit k := min(attempts, 10) r := rand(0, 2**k) delay := r * slot_time c) Explain how a collision is detected in Ethernet. There are two cases. For old fashioned coax-based Ethernet a collision is detected with a voltage circuit as an over-voltage condition. Two (or more) hosts transmitting at the same time causes a higher voltage on the shared coax that a single host transmitting. For newer UTP based Ethernet with separate TX and RX wires, receiving on the RX wire while transmitting on the TX wire is indication of a collision. Extra Credit History is 2 points, four way message flow is 8 points. Give the history of DHCP and describe how it works at a message flow level. DHCP is the Dynamic Host Configuration Protocol and is used to automatically grant an IP address and other configuration settings to a host. DHCP leases IP addresses to hosts. DHCP is an extension to the BOOTP protocol DHCP was standardized in 1993. DHCP is based on a four-way message exchange as follows. A host needing an IP address broadcasts a DHCP discover message to find all reachable DHCP servers. All DHCP servers receiving the discover message reply with a broadcast DHCP offer message. The host chooses a DHCP server from the, possibly, multiple DHCP offer messages received and broadcasts a DHCP request with a selected server specified. The selected server broadcasts a DHCP acknowledgement containing the IP address (and other configuration settings) for the host to use. The host effectively leases the IP address from the DHCP server and must periodically renew is lease with the DHCP server.

Appendix A RDT FSMs from the textbook