COMPUTER NETWORK. Homework #3. Due Date: May 22, 2017 in class

Similar documents
COMPUTER NETWORK. Homework #3. Due Date: May 22, 2017 in class

Transport Layer PREPARED BY AHMED ABDEL-RAOUF

ECE 610: Homework 4 Problems are taken from Kurose and Ross.

Review for Chapter 4 R1,R2,R3,R7,R10,R11,R16,R17,R19,R22,R24, R26,R30 P1,P2,P4,P7,P10,P11,P12,P14,P15,P16,P17,P22,P24,P29,P30

Networking: Network layer

Problem Set 8 Due: Start of Class, November 16

Question Points Score total 100

CSE 473 Introduction to Computer Networks. Exam 2. Your name here: 11/7/2012

CS 421: COMPUTER NETWORKS SPRING FINAL May 24, minutes. Name: Student No: TOT

Problem 7. Problem 8. Problem 9

CSE 473 Introduction to Computer Networks. Final Exam. Your name here: 12/17/2012

COM-208: Computer Networks - Homework 6

b. Suppose the two packets are to be forwarded to two different output ports. Is it

Problem Set 7 Due: Start of Class, November 2

Review Questions for Midterm Exam-2 Fall 2016

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

King Fahd University of Petroleum and Minerals College of Computer Sciences and Engineering Department of Computer Engineering

a) Adding the two bytes gives Taking the one s complement gives

Network Layer PREPARED BY AHMED ABDEL-RAOUF

II. Principles of Computer Communications Network and Transport Layer

Student ID: CS457: Computer Networking Date: 3/20/2007 Name:

c) With the selective repeat protocol, it is possible for the sender to receive an ACK for a packet that falls outside of its current window.

Last time. Transitioning to IPv6. Routing. Tunneling. Gateways. Graph abstraction. Link-state routing. Distance-vector routing. Dijkstra's Algorithm

Chapter 09 Network Protocols

Chapter 3 Review Questions

Initial motivation: 32-bit address space soon to be completely allocated. Additional motivation:

Examination 2D1392 Protocols and Principles of the Internet 2G1305 Internetworking 2G1507 Kommunikationssystem, fk SOLUTIONS

CS 421: COMPUTER NETWORKS FALL FINAL January 12, minutes

EECS 3214: Computer Network Protocols and Applications. Final Examination. Department of Computer Science and Engineering

Inter-Autonomous-System Routing: Border Gateway Protocol

Inter-AS routing and BGP. Network Layer 4-1

HY 335 Φροντιστήριο 8 ο

Topics for This Week

Exercise Sheet 4. Exercise 1 (Routers, Layer-3-Switches, Gateways)

CS321: Computer Networks Congestion Control in TCP

15-441: Computer Networks Spring 2017 Homework 3

Chapter 4: Network Layer

Inter-Autonomous-System Routing: Border Gateway Protocol

Lecture 19: Network Layer Routing in the Internet

Tutorial 9. SOLUTION Since the number of supported interfaces is different for each subnet, this is a Variable- Length Subnet Masking (VLSM) problem.

Da t e: August 2 0 th a t 9: :00 SOLUTIONS

UNIT IV -- TRANSPORT LAYER

Chapter 4: outline. Network Layer 4-1

CS164 Final Exam Winter 2013

Chapter 4: Network Layer, partb

Computer Networking Introduction

CS 421: COMPUTER NETWORKS SPRING FINAL May 16, minutes

Chapter 4: Network Layer. Lecture 12 Internet Routing Protocols. Chapter goals: understand principles behind network layer services:

CPSC 826 Internetworking. The Network Layer: Routing & Addressing Outline. The Network Layer

Test2: Solutions. Silvia Giordano ICA, EPFL. t2-1

Hierarchical Routing. Our routing study thus far - idealization all routers identical network flat not true in practice

CSC 4900 Computer Networks: Routing Protocols

Basic Idea. Routing. Example. Routing by the Network

EE-311 Data Communication & Networks

Department of Computer Science and Engineering. Final Examination. Instructor: N. Vlajic Date: April 15, 2011

Routing by the Network

cs/ee 143 Communication Networks

Inter-AS routing. Computer Networking: A Top Down Approach 6 th edition Jim Kurose, Keith Ross Addison-Wesley

CSCI Computer Networks Fall 2016

Example questions for the Final Exam, part A

Quiz. Segment structure and fields Flow control (rwnd) Timeout interval. Phases transition ssthresh setting Cwnd setting

cs144 Midterm Review Fall 2010

Computer Networks Spring 2017 Homework 2 Due by 3/2/2017, 10:30am

Chapter 4: Network Layer

Why dynamic route? (1)

Inter-Domain Routing: BGP

Lecture 16: Network Layer Overview, Internet Protocol

Internetworking Part 2

Announcements. CS 5565 Network Architecture and Protocols. Project 2B. Project 2B. Project 2B: Under the hood. Routing Algorithms

Homework 4. Problems: 3, 10.a, 13, 16, 18, 19, 27a, 28, 35. Question: 3

Answers to Sample Questions on Transport Layer

CS 43: Computer Networks Internet Routing. Kevin Webb Swarthmore College November 16, 2017

Lecture 8. Network Layer (cont d) Network Layer 1-1

CSc 450/550 Computer Networks Internet Routing

CS118 Discussion Week 7. Taqi

Master Course Computer Networks IN2097

COMPUTER NETWORK. Homework #2. Due Date: April 12, 2017 in class

Transmission Control Protocol. ITS 413 Internet Technologies and Applications

Homework 3 50 points. 1. Computing TCP's RTT and timeout values (10 points)

Internetworking/Internetteknik, Examination 2G1305 Date: August 18 th 2004 at 9:00 13:00 SOLUTIONS

Lecture 4 The Network Layer. Antonio Cianfrani DIET Department Networking Group netlab.uniroma1.it

CS 421: Computer Networks SPRING MIDTERM II May 5, minutes

CSCI Topics: Internet Programming Fall 2008

CSCI Topics: Internet Programming Fall 2008

Chapter IV: Network Layer

Outline. Internet. Router. Network Model. Internet Protocol (IP) Design Principles

CSCI 466 Midterm Networks Fall 2011

TCP Congestion Control

TCP Congestion Control

interface Question 1. a) Applications nslookup/dig Web Application DNS SMTP HTTP layer SIP Transport layer OSPF ICMP IP Network layer

The Transport Layer Congestion control in TCP

CS Lecture 1 Review of Basic Protocols

EXAM TCP/IP NETWORKING Duration: 3 hours

Guide To TCP/IP, Second Edition UDP Header Source Port Number (16 bits) IP HEADER Protocol Field = 17 Destination Port Number (16 bit) 15 16

Network Layer/IP Protocols

What is the difference between unicast and multicast? (P# 114)

Routing in the Internet

CS 421: COMPUTER NETWORKS FALL FINAL January 10, minutes

Prof. Shervin Shirmohammadi SITE, University of Ottawa. Internet Protocol (IP) Lecture 2: Prof. Shervin Shirmohammadi CEG

Department of Computer and IT Engineering University of Kurdistan. Computer Networks II Border Gateway protocol (BGP) By: Dr. Alireza Abdollahpouri

Transcription:

Computer Network Homework#3 COMPUTER NETWORK Homework #3 Due Date: May 22, 2017 in class Question 1 Host A and B are communicating over a TCP connection, and Host B has already received from A all bytes up through byte 126. Suppose Host A then sends two segments to Host B back-to-back. The first and second segments contain 80 and 40 bytes of data, respectively. In the first segment, the sequence number is 127, the source port number is 302, and the destination port number is 80. Host B sends an acknowledgment whenever it receives a segment from Host A. a. In the second segment sent from Host A to B, what are the sequence number, source port number, and destination port number? b. If the first segment arrives before the second segment, in the acknowledgment of the first arriving segment, what is the acknowledgment number, the source port number, and the destination port number? c. If the second segment arrives before the first segment, in the acknowledgment of the first arriving segment, what is the acknowledgment number? d. Suppose the two segments sent by A arrive in order at B. The first acknowledgment is lost and the second acknowledgment arrives after the first timeout interval. Draw a timing diagram, showing these segments and all other segments and acknowledgments sent. (Assume there is no additional packet loss.) For each segment in your figure, provide the

sequence number and the number of bytes of data; for each acknowledgment that you add, provide the acknowledgment number. a) In the second segment from Host A to B, the sequence number is 207, source port number is 302 and destination port number is 80. b) If the first segment arrives before the second, in the acknowledgement of the first arriving segment, the acknowledgement number is 207, the source port number is 80 and the destination port number is 302. c) If the second segment arrives before the first segment, in the acknowledgement of the first arriving segment, the acknowledgement number is 127, indicating that it is still waiting for bytes 127 and onwards. d) Question 2 Consider Figure 3.58. Assuming TCP Reno is the protocol experiencing the behavior shown above, answer the following questions. In all cases, you should provide a short discussion justifying your answer. a. Identify the intervals of time when TCP slow start is operating. b. Identify the intervals of time when TCP congestion avoidance is operating. c. After the 16 th transmission round, is segment loss detected by a triple

duplicate ACK or by a timeout? d. After the 22 nd transmission round, is segment loss detected by a triple duplicate ACK or by a timeout? e. What is the initial value of at the first transmission round? f. What is the value of at the 18 th transmission round? g. What is the value of at the 24 th transmission round? h. During what transmission round is the 70 th segment sent? i. Assuming a packet loss is detected after the 26 th round by the receipt of a triple duplicate ACK, what will be the values of the congestion window size and of? j. Suppose TCP Tahoe is used (instead of TCP Reno), and assume that triple duplicate ACKs are received at the 16 th round. What are the and the congestion window size at the 19 th round? k. Again suppose TCP Tahoe is used, and there is a timeout event at 22 nd round. How many packets have been sent out from 17 th round till 22 nd round, inclusive? a) TCP slowstart is operating in the intervals [1,6] and [23,26] b) TCP congestion avoidance is operating in the intervals [6,16] and [17,22] c) After the 16th transmission round, packet loss is recognized by a triple duplicate ACK. If there was a timeout, the congestion window size would have dropped to 1.

d) After the 22nd transmission round, segment loss is detected due to timeout, and hence the congestion window size is set to 1. e) The threshold is initially 32, since it is at this window size that slow start stops and congestion avoidance begins. f) The threshold is set to half the value of the congestion window when packet loss is detected. When loss is detected during transmission round 16, the congestion windows size is 42. Hence the threshold is 21 during the 18th transmission round. g) The threshold is set to half the value of the congestion window when packet loss is detected. When loss is detected during transmission round 22, the congestion windows size is 29. Hence the threshold is 14 (taking lower floor of 14.5) during the 24th transmission round. h) During the 1st transmission round, packet 1 is sent; packet 2-3 are sent in the 2nd transmission round; packets 4-7 are sent in the 3rd transmission round; packets 8-15 are sent in the 4th transmission round; packets 16-31 are sent in the 5th transmission round; packets 32-63 are sent in the 6th transmission round; packets 64 96 are sent in the 7th transmission round. Thus packet 70 is sent in the 7th transmission round. i) The threshold will be set to half the current value of the congestion window (8) when the loss occurred and congestion window will be set to the new threshold value + 3 MSS. Thus the new values of the threshold and window will be 4 and 7 respectively. j) threshold is 21, and congestion window size is 1. k) round 17, 1 packet; round 18, 2 packets; round 19, 4 packets; round 20, 8 packets; round 21, 16 packets; round 22, 21 packets. So, the total number is 52. Question 3 Consider sending a large file from a host to another over a TCP connection that has no loss. a. Suppose TCP uses AIMD for its congestion control without slow start. Assuming increases by 1 MSS every time a batch of ACKs is received and assuming approximately constant round-trip times, how long does it take for increase from 6 MSS to 12 MSS (assuming no loss events)? b. What is the average throughout (in terms of MSS and RTT_ for this connection up through time = 6RTT? a) It takes 1 RTT to increase CongWin to 6 MSS; 2 RTTs to increase to 7 MSS; 3 RTTs to increase to 8 MSS; 4 RTTs to increase to 9 MSS; 5 RTTs to increase to 10 MSS; 6 RTTs to increase to 11 MSS; and 7 RTTs to increase to 12MSS. b) In the first RTT 5 MSS was sent; in the second RTT 6 MSS was sent; in the third RTT 7 MSS was sent; in the fourth RTT 8 MSS was sent; in the fifth RTT, 9 MSS was sent; and in the sixth RTT, 10 MSS was sent. Thus, up to time 6 RTT, 5+6+7+8+9+10 = 45 MSS were sent (and acknowledged). Thus, we can say that the average throughput up to time 6 RTT was (45 MSS)/(6 RTT) = 7.5 MSS/RTT.

Question 4 Compare and contrast the IPv4 and the IPv6 header fields. Do they have any fields in common? IPv6 has a fixed length header, which does not include most of the options an IPv4 header can include. Even though the IPv6 header contains two 128 bit addresses (source and destination IP address) the whole header has a fixed length of 40 bytes only. Several of the fields are similar in spirit. Traffic class, payload length, next header and hop limit in IPv6 are respectively similar to type of service, datagram length, upper-layer protocol and time to live in IPv4. Question 5 Consider the network below. a. Show the forwarding table in router A, such that all traffic destined to host H3 is forwarded through interface 3. b. Can you write down a forwarding table in router A, such that all traffic from H1 destined to host H3 is forwarded through interface 3, while all traffic from H2 destined to host H3 is forwarded through interface 4? (Hint: This is a trick question.) a) Data destined to host H3 is forwarded through interface 3 Destination Address H3 Link Interface 3 b) No, because forwarding rule is only based on destination address.

Question 6 Consider a datagram network using 8-bit host addresses. Suppose a router uses longest prefix matching and has the following forwarding table: For each of the four interfaces, give the associated range of destination host addresses and the number of addresses in the range. number of addresses for interface 0 = 2 6 = 64 number of addresses for interface 1 = 2 6 = 64 number of addresses for interface 2 = 2 5 = 32 number of addresses for interface 3 = 2 6 +2 5 =96

Question 7 Consider sending a 1,600-byte datagram into a link that has an MTU of 500 bytes. Suppose the original datagram is stamped with the identification number 291. How many fragments are generated? What are the values in the various fields in the IP datagram(s) generated related to fragmentation? The maximum size of data field in each fragment = 480 (because there are 20 bytes IP header). Thus the number of required fragments = 1600 20 = 4 480 Each fragment will have Identification number 291. Each fragment except the last one will be of size 500 bytes (including IP header). The last datagram will be of size 160 bytes (including IP header). The offsets of the 4 fragments will be 0, 60, 120, 180. Each of the first 3 fragments will have flag=1; the last fragment will have flag=0. Question 8 What is the count to infinity problem in distance vector routing? A centralized routing algorithm computes the least-cost path between a source and destination by using complete, global knowledge about the network. The algorithm needs to have the complete knowledge of the connectivity between all nodes and all links costs. The actual calculation can be run at one site or could be replicated in the routing component of each and every router. A distributed routing algorithm calculates the lease-cost path in an iterative, distributed manner by the routers. With a decentralized algorithm, no node has the complete information about the costs of all network links. Each node begins with only the knowledge of the costs of its own directly attached links, and then through an iterative process of calculation and information exchange with its neighboring nodes, a node gradually calculates the least-cost path to a destination or a set of destinations. OSPF protocol is an example of centralized routing algorithm, and BGP is an example of a distributed routing algorithm. Question 9 Why are different inter-as and intra-as protocols used in the Internet? Policy: Among ASs, policy issues dominate. It may well be important that traffic originating in a given AS not be able to pass through another specific AS. Similarly, a given AS may want to control what transit traffic it carries between other ASs. Within an AS, everything is nominally under the same administrative control and thus policy issues a much less important role in choosing routes with in AS.

Question 10 What is meant by an area in an OSPF autonomous system? Why was the concept of an area introduced? An area in an OSPF autonomous system is refers to a set of routers, in which each router broadcasts its link state to all other routers in the same set. An OSPF AS can be configured hierarchically into multiple areas, with each area running its own OSPF link-state routing algorithm. Within each area, one or more area border routers are responsible for routing packets outside the area. The concept of area is introduced for scalability reason, i.e., we would like to build a hierarchical routing for a large scale OSPF AS, and an area is an important building block in hierarchical routing. Question 11 Define and contrast the following terms: subnet, prefix, and BGP route. A subnet is a portion of a larger network; a subnet does not contain a router; its boundaries are defined by the router and host interfaces. A prefix is the network portion of a CDIRized address; it is written in the form a.b.c.d/x ; A prefix covers one or more subnets. When a router advertises a prefix across a BGP session, it includes with the prefix a number of BGP attributes. In BGP jargon, a prefix along with its attributes is a BGP route (or simply a route). Question 12 True or false: When a BGP router receives an advertised path from its neighbor, it must add its own identify to the received path and then send that now path on to all of its neighbors. Explain. False. A BGP router can choose not to add its own identity to the received path and then send that new path on to all of its neighbors, as BGP is a policy-based routing protocol. This can happen in the following scenario. The destination of the received path is some other AS, instead of the BGP router s AS, and the BGP router does not want to work as a transit router.

Question 13 Consider the following network. With the indicated link costs, use Dijkstra s shortest path algorithm to compute the shortest path from x to all network nodes. Show how the algorithm works by computing a table similar to Table 5.1. Question 14 Consider the network shown below, and assume that each node initially knows the costs to each of its neighbors. Consider the distance-vector algorithm and show the distance table entries at node z.

Question 15 Consider the network shown below. Suppose AS3 and AS2 are running OSPF for

their intra-as routing protocol. Suppose AS1 and AS4 are running RIP for their intra-as routing protocol. Suppose ebgp and ibgp are used for the intra-as routing protocol. Initially suppose there is no physical link between AS2 and AS4. a. Router 3c learns about prefix x from which routing protocol: OSPF, RIP, ebgp, or ibgp? b. Router 3a learns about x from which routing protocol? c. Router 1c learns about x from which routing protocol? d. Router 1d learns about x from which routing protocol? a) ebgp b) ibgp c) ebgp d) ibgp