Duke University CS 356 Midterm Spring 2014

Similar documents
RARP: Reverse Address Resolution Protocol

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)

Networking Test 4 Study Guide

Instructor Notes for Lab 3

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

Computer Networks. Lecture 3: IP Protocol. Marcin Bieńkowski. Institute of Computer Science University of Wrocław

Lecture Computer Networks

Technical Support Information Belkin internal use only

Exercises TCP/IP Networking. Solution. With Solutions

Internet Control Protocols Reading: Chapter 3

CS335 Sample Questions for Exam #2

Lecture 15. IP address space managed by Internet Assigned Numbers Authority (IANA)

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

ICS 351: Today's plan

Final for ECE374 05/06/13 Solution!!

Transport and Network Layer

Computer Networks I Laboratory Exercise 1

Network Layer IPv4. Dr. Sanjay P. Ahuja, Ph.D. Fidelity National Financial Distinguished Professor of CIS. School of Computing, UNF

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

Interconnection of Heterogeneous Networks. Internetworking. Service model. Addressing Address mapping Automatic host configuration

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

CSE 123: Computer Networks Fall Quarter, 2014 MIDTERM EXAM

20. Switched Local Area Networks

IP - The Internet Protocol

Ethernet. Ethernet. Network Devices

CCNA Discovery Networking for Homes and Small Businesses Student Packet Tracer Lab Manual

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

LAB THREE STATIC ROUTING

Route Discovery Protocols

Unix System Administration

Transport Layer Protocols

Internet Protocols Fall Lectures 7-8 Andreas Terzis

Subnetting,Supernetting, VLSM & CIDR

Internet Protocol Address

Internet Protocol: IP packet headers. vendredi 18 octobre 13

Network Security TCP/IP Refresher

Distance Vector Routing Protocols. Routing Protocols and Concepts Ola Lundh

VXLAN: Scaling Data Center Capacity. White Paper

Network Layer: Network Layer and IP Protocol

GATE CS Topic wise Questions Computer Network

First Midterm for ECE374 03/09/12 Solution!!

Internetworking. Problem: There is more than one network (heterogeneity & scale)

Course Overview: Learn the essential skills needed to set up, configure, support, and troubleshoot your TCP/IP-based network.

Outline. CSc 466/566. Computer Security. 18 : Network Security Introduction. Network Topology. Network Topology. Christian Collberg

Introduction to Analyzer and the ARP protocol

Network layer: Overview. Network layer functions IP Routing and forwarding

Troubleshooting Tools

EECS 489 Winter 2010 Midterm Exam

Exam 1 Review Questions

Written examination in Computer Networks

IP address format: Dotted decimal notation:

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

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

8.2 The Internet Protocol

CS268 Exam Solutions. 1) End-to-End (20 pts)

Chapter 4. Distance Vector Routing Protocols

Internet Working 5 th lecture. Chair of Communication Systems Department of Applied Sciences University of Freiburg 2004

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

DG Forwarding Algorithm

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

04 Internet Protocol (IP)

Guide to TCP/IP, Third Edition. Chapter 3: Data Link and Network Layer TCP/IP Protocols

HOST AUTO CONFIGURATION (BOOTP, DHCP)

Advanced Networking Routing: RIP, OSPF, Hierarchical routing, BGP

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

CHAPTER 3 STATIC ROUTING

NETWORK LAYER/INTERNET PROTOCOLS

Mobile IP Network Layer Lesson 02 TCP/IP Suite and IP Protocol

IP addressing and forwarding Network layer

IP Addressing Introductory material.

Mobile IP. Bheemarjuna Reddy Tamma IIT Hyderabad. Source: Slides of Charlie Perkins and Geert Heijenk on Mobile IP

Chapter 4 Network Layer

CCNA Exploration 4.0: (II) Routing Protocols and Concepts. Chapter 1: Introduction to Routing and Packet Forwarding

Additional Information: A link to the conference website is available at:

How To Understand and Configure Your Network for IntraVUE

IP Subnetting and Addressing

What is VLAN Routing?

Networking Basics for Automation Engineers

NetFlow Subinterface Support

IP Filter/Firewall Setup

DHCP, ICMP, IPv6. Computer Networking: A Top Down Approach 6 th edition Jim Kurose, Keith Ross Addison-Wesley DHCP. DHCP UDP IP Eth Phy

- IPv4 Addressing and Subnetting -

Objectives. Router as a Computer. Router components and their functions. Router components and their functions

EINDHOVEN UNIVERSITY OF TECHNOLOGY Department of Mathematics and Computer Science

Lab Creating a Logical Network Diagram

2. IP Networks, IP Hosts and IP Ports

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

PT Activity 8.1.2: Network Discovery and Documentation Topology Diagram

Cisco Data Centre: Introducing Cisco Data Center Networking

Troubleshooting IP Routing

Network Layer: and Multicasting Copyright The McGraw-Hill Companies, Inc. Permission required for reproduction or display.

IP Multicasting. Applications with multiple receivers

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

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

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

Chapter 3: Review of Important Networking Concepts. Magda El Zarki Dept. of CS UC Irvine

Network Troubleshooting

Transcription:

Duke University CS 356 Midterm Spring 2014 Name (Print):, (Family name) (Given name) Student ID Number: Date of Exam: March 6, 2014 Time Period: 3:05pm-4:20pm Number of Exam Pages: 14 (including this cover sheet) Exam Type: closed book/notes Additional Materials Allowed: One sheet of your own notes Marking Scheme: Question Score 1 /20 2 /31 3 /12 4 /10 5 /18 6 /5 Survey /4 Total /100

For your convenience, this page includes figures that describe packet formats for Ethernet, ARP, IP, and ICMP. CS 356 Midterm, March 6, 2014 2 Page 2 of 14

1. (20pt) Short answers. (a) (3pt) Use a simple diagram to briefly describe what the Internet architecture looks like. Application Transport Network Link Physical (b) (2pt) Which fields of an IP header (not including the option fields) will be updated as a packet is forwarded from a router to another router? TTL, checksum (c) (3pt) Four hosts (H1, H2, H3 and H4) are connected by an Ethernet switch and there is no router in the local area network. Unfortunately, their IP addresses are misconfigured as follows: H1 s IP address is 152.3.110.7/16; H2 s IP address is 152.3.7.33/24; H3 s IP address is 152.3.7.43/16; H4 s IP address is 152.3.168.2/28. Which pair of hosts can ping each other? (Hint: since there is no router present, each host does not have a default route, but it knows its directly connected network via its IP address configuration.) H1-H3 (H2 and H3 have different network mask. H2 cannot send any packet to H3.) (d) (2pt) A router with the following forwarding table receives a packet with destination 128.195.3.10. Which will be the outgoing interface of the packet? eth0 128.195.0.0/8 eth2 128.195.0.0/16 eth0 128.195.0.0/24 eth1 0.0.0.0/0 eth3 (e) (2pt) What is the network mask of an IP address 192.168.2.100/24? 255.255.255.0 (f) (4pt) A path from a sender to a receiver usually consists of multiple links, each having a different maximum transmission unit (MTU). When a sender sends a packet to a receiver, how can it figure out the MTU of the path? Prepare a large packet, set the DF tag, send it. If the packet is dropped, reduce the packet size and try until the packet is send successfully. CS 356 Midterm, March 6, 2014 3 Page 3 of 14

(g) (4pt) Describe how traceroute works. In particular, describe how the command determines the routers enroute, and how it determines that the path is complete, i.e., no more routers on the path. Send TCP SYN packet, ICMP or UDP packet with a large port number. Set TTL to 1, 2, 3,... n. Each router along the route will reply with ICMP message. CS 356 Midterm, March 6, 2014 4 Page 4 of 14

2. (31pt) Figure?? shows a simple network. Your task is to configure this network. You are given a network prefix 192.168.1.0/24. (a) (3pt) The first step is to assign network prefixes to each LAN. LAN1 has at most 100 hosts, and LAN2 and LAN3 each has at most 50 hosts. Assign a network prefix to each LAN. Network Prefix LAN1 192.168.1.0/25 LAN2 192.168.1.128/26 LAN3 192.168.1.192/26 (b) (7pt) The second step is to assign IP addresses and network masks to each PC and routers. Your address assignment must be consistent with your network prefix assignment. Interface Address/prefixLength eth0 of P C 1 192.168.1.1/25 eth0 of R1 192.168.1.0/25 eth1 of R1 192.168.1.128/26 eth0 of P C 2 192.168.1.129/26 eth0 of R2 192.168.1.130/26 eth1 of R2 192.168.1.192/26 eth0 of P C 3 192.168.1.193/26 (c) (6pt) The third step is to configure each PC s and router s routing table. Suppose you have configured the routing tables correctly, and your network is ready to work! When all PCs and routers ARP caches are empty, a ping is sent from P C 1 to P C 3. Before P C 1 can send the ping packet, it must send an ARP request. Fill the content of the ARP request. You may use MAC x marked in the figure to represent the Ethernet address of an interface, and use IP x to represent the IP address you allocate to the interface. For instance, use IP P C1 to represent the IP address you allocate to P C 1, and IP R10 to CS 356 Midterm, March 6, 2014 5 Page 5 of 14

represent the IP address you allocate to eth0 of R 1. Destination address in the Ethernet header Source address in the Ethernet header Source hardware address in the ARP request Source protocol address in the ARP request Target hardware address in the ARP request Target protocol address in the ARP request FFFFFFFFFFFF MAC P C1 MAC P C1 IP P C1 FFFFFFFFFFFF IP R10 (d) (1pt) Who will respond to the ARP request? (e) (6pt) What is the content of the ARP reply? Use the notations defined in (c). Destination address in the Ethernet header Source address in the Ethernet header Source hardware address in the ARP reply Source protocol address in the ARP reply Target hardware address in the ARP reply Target protocol address in the ARP reply MAC P C1 MAC R10 MAC R10 IP R10 MAC P C1 IP P C1 CS 356 Midterm, March 6, 2014 6 Page 6 of 14

(f) (4pt) When the ping packet is on LAN1, what are the source and destination addresses in the IP header? What are the source and destination addresses in the Ethernet header? Use the notations defined in (c). Source address in the IP header Destination address in the IP header Source address in the Ethernet header Destination address in the Ethernet header IP P C1 IP P C3 MAC P C1 IP R10 (g) (4pt) When the ping packet is on LAN2, what are the source and destination addresses in the IP header? What are the source and destination addresses in the Ethernet header? Use the notations defined in (c). Source address in the IP header Destination address in the IP header Source address in the Ethernet header Destination address in the Ethernet header IP P C1 IP P C3 IP R11 IP R20 CS 356 Midterm, March 6, 2014 7 Page 7 of 14

3. (12pt) Suppose a sliding window protocol uses three-bit sequence numbers. The nth frame s sequence number will be (n 1) mod 8. Both the sending and receiving window sizes are three. Acknowledgments are cumulative. Similar to the system you implemented in Lab 1, once a receiver has received data reliably, it would output to the upper-level application. Answer the following questions. (a) (2pt) Suppose the sender sends frame 0. Before it receives the acknowledgment for frame 0, what is the highest sequence number x the sender can send? 2 (b) (2pt) Suppose the sender sends frames with sequence numbers 0, 1,..., x, where x is your answer above. What acknowledgements will the receiver send? 1 2 3 (c) (2pt) Suppose all acknowledgments are lost. Which frames will the sender retransmit? 0 1 2 (d) (2pt) What acknowledgment(s) will the receiver send when it receives the retransmitted frames? 3 3 3 (e) (2pt) Which frames will the sender send after it receives the receiver s acknowledgment(s) sent in the previous step (d)? 3 4 5 (f) (2pt) When the receiver receives the sender s frames sent in the previous step (e), what frames will the receiver deliver to the upper-level application?. 3 4 5 CS 356 Midterm, March 6, 2014 8 Page 8 of 14

4. (10pt) A simple two-node network topology is shown in Figure??. Node A is sending a 20GB file to Node B using the sliding window protocol. Suppose each data frame s size is 1K bytes and the ACK size is 40 bytes. Answer the following questions. (a) (3pt) What is the round trip latency of the connection from A to B? 200ms (b) (3pt) Suppose A s sending window size is 4K bytes or four frames, and the receiver s receiving window size is 10MB, or 10,000 frames. How long will it take for A to send the 20GB file? What is A s throughput? 1000s 20MB /s (c) (4pt) As you can see, A s throughput is much less than the link bandwidth. To improve performance, node A can increase its sending window size. What s A s minimum sending window size that allows it to achieve the maximum throughput? 251 CS 356 Midterm, March 6, 2014 9 Page 9 of 14

5. (18pt) Figure?? shows a simple network with four routers. Each router R i attaches to a /24 subnet, and routers are connected via point-to-point serial links. The network uses a distance vector routing protocol. All link costs are specified in the figure. All links have cost 1 except the link between R 3 and R 4. Answer the following questions. (a) (1pt) After the distance vector routing protocol converges, which next hop does R 3 uses to reach the network 10.0.1.0/24? R2 (b) (2pt) Suppose split horizon is enabled. What is the distance vector R 3 advertises to R 2? (10.0.4.0/24, 2) (c) (2pt) A distance vector routing protocol sends both periodic and triggered routing updates. Suppose the link from R 1 to the network 10.0.1.0/24 fails. What routing update regarding the network 10.0.1.0/24 will R 1 send to its neighbors R 2 and R 4? (10.0.1.0/24, ) (d) (2pt) What will R 2 and R 4 do when they receive R 1 s latest update regarding 10.0.1.0/24? (Hint: specify both how R 2 and R 4 update their routing tables and what messages they send to their neighbors.) R2 updates (10.0.1.0/24, ) and sends to R3. R4 updates (10.0.1.0/24, ) and sends to R3 (e) (1pt) Suppose R 4 sends a periodic update regarding 10.0.1.0/24 to R 3 before it receives R 1 s latest update regarding 10.0.1.0/24 after R 1 s link to 10.0.1.0/24 fails. What is the content of this periodic update? (10.0.1.0/24, 1) CS 356 Midterm, March 6, 2014 10 Page 10 of 14

(f) (4pt) Can the count-to-infinity problem occur in this topology with split horizon enabled? If so, explain the update sequence that leads to count-to-infinity. If not, explain why. No. R1 R4, (10.0.1.0/24, ), R3 R4 (10.0.1.0/24, 2), R4 R4 (10.0.1.0/24, 4), R1 R2(10.0.1.0/24,5), R2 R3 (10.0.1.0/24, 6) (g) (2pt) Suppose poison reverse is also enabled. Before the link from R 1 to 10.0.1.0/24 fails, what is the distance vector R 3 sends to R 2? (10.0.1.0/24, ) (10.0.3.0/24, 0) (10.0.4.0/24, 2) (h) (2pt) Will the count-to-infinity problem occur in this network topology with both split horizon and poison reverse enabled? Explain why. Yes (i) (2pt) Suppose we modify the distance vector protocol such that each router prepends its own IP address to each routing update it sends to its neighbors. Can this modification help fix the count-to-infinity problem? Explain why. Yes. Discard update message with own IP in it. CS 356 Midterm, March 6, 2014 11 Page 11 of 14

6. (5pt) In a network of multiple routers and hosts, how would you design a reliable broadcasting protocol such that 1) a broadcast message will reach all nodes in the network, and 2) no message will traverse the same network/link more than once. Your design can assume that routers do not corrupt messages, but network links may introduce transmission errors. Build spanning tree and uses ACK to confirm CS 356 Midterm, March 6, 2014 12 Page 12 of 14

Survey (4pt) We, the course staff of CS356, would like to hear what you think of the course. Please provide your feedback for the following questions. You will tear off this page from your exam papers so that your opinions will remain anonymous. We will write down your name when you turn in the survey and credit you for your feedback. Thank you! 1. Has the course met your expectations of an undergraduate networking class so far? If not, please explain the areas where the course has not met your expectations. 2. Do you have any suggestion on how the course materials might be improved? 3. Do you have any suggestion on how the instructor might improve her teaching quality? 4. Do you have any suggestion on how the TA might improve his teaching quality? CS 356 Midterm, March 6, 2014 13 Page 13 of 14

Scratch page CS 356 Midterm, March 6, 2014 14 Page 14 of 14