===================================================================== Exercises =====================================================================

Similar documents
Expected Time: 90 min PART-A Max Marks: 42

CS 421: COMPUTER NETWORKS SPRING FINAL May 16, minutes

CS 421: COMPUTER NETWORKS FALL FINAL January 10, minutes

Chapter 2 - Part 1. The TCP/IP Protocol: The Language of the Internet

Data Communication & Networks Final Exam (Fall 2008) Page 1 / 13. Course Instructors: Engr. Waleed Ejaz. Marks Obtained Marks

TCP/IP THE TCP/IP ARCHITECTURE

5105: BHARATHIDASAN ENGINEERING COLLEGE NATTARMPALLI UNIT I FUNDAMENTALS AND LINK LAYER PART A

FINAL Wednesday, 30 th July 2008

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

Subject Name: Computer Network Subject Code:

NETWORK PROBLEM SET Due Date 6/28/2014

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.

70 CHAPTER 1 COMPUTER NETWORKS AND THE INTERNET

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

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

CS164 Final Exam Winter 2013

Q U E S T I O N 3 In the current version of IP (IPv4), the use of TCP and UDP headers differ in which of the following ways?

MODULE: NETWORKS MODULE CODE: CAN1102C. Duration: 2 Hours 15 Mins. Instructions to Candidates:

Course 6. Internetworking Routing 1/33

PLEASE READ CAREFULLY BEFORE YOU START

PLEASE READ CAREFULLY BEFORE YOU START

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

SIDDHARTH GROUP OF INSTITUTIONS :: PUTTUR Siddharth Nagar, Narayanavanam Road QUESTION BANK (DESCRIPTIVE)

Fundamental Questions to Answer About Computer Networking, Jan 2009 Prof. Ying-Dar Lin,

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

Review of Important Networking Concepts

NETWORK PROBLEM SET Solution

TSIN02 - Internetworking

Introduction to Internetworking

THE OSI MODEL. Application Presentation Session Transport Network Data-Link Physical. OSI Model. Chapter 1 Review.

Date: June 4 th a t 1 4:00 1 7:00

(a) Client server model (b) MAN (c) Interfaces and services. [4+6+6] FirstRanker

CSCI Networking Name:

Code No: RR Set No. 1

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

THE HONG KONG POLYTECHNIC UNIVERSITY. Department of Computing. This is an open-book examination.

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

PLEASE READ CAREFULLY BEFORE YOU START

Chapter 09 Network Protocols

Computer Networking. Introduction. Quintin jean-noël Grenoble university

Introduction... xiii Chapter 1: Introduction to Computer Networks and Internet Computer Networks Uses of Computer Networks...

CS 421: COMPUTER NETWORKS SPRING FINAL May 21, minutes

CS/ECE 438: Communication Networks for Computers Spring 2018 Midterm Examination Online

TSIN02 - Internetworking

ICS 351: Networking Protocols

a. (4pts) What general information is contained in a LSR-PDU update that A might send?

3. (a) What is bridge? Explain the operation of a LAN bridge from to (b) Explain the operation of transparent bridge.

CHAPTER 15 LOCAL AREA NETWORKS ANSWERS TO QUESTIONS

Defining Networks with the OSI Model. Module 2

ECE4110 Internetwork Programming. Introduction and Overview

BVRIT HYDERABAD College of Engineering for Women Department of Information Technology. Hand Out

Computer Networks (Introduction to TCP/IP Protocols)

Session Exam 1. EG/ES 3567 Worked Solutions. (revised)

EECS 122: Introduction to Communication Networks Final Exam Solutions

Networks Homework # 2

No, the bogus packet will fail the integrity check (which uses a shared MAC key).!

Review. Error Detection: CRC Multiple access protocols. LAN addresses and ARP Ethernet. Slotted ALOHA CSMA/CD

CCNA MCQS with Answers Set-1

Paper solution Subject: Computer Networks (TE Computer pattern) Marks : 30 Date: 5/2/2015

ET4254 Communications and Networking 1

UNIVERSITY OF TORONTO FACULTY OF APPLIED SCIENCE AND ENGINEERING

ECE 544 Computer Networks II Mid-Term Exam March 29, 2002 Profs. D. Raychaudhuri & M. Ott

Common Protocols. The grand finale. Telephone network protocols. Traditional digital transmission

KillTest ᦝ䬺 䬽䭶䭱䮱䮍䭪䎃䎃䎃ᦝ䬺 䬽䭼䯃䮚䮀 㗴 㓸 NZZV ]]] QORRZKYZ PV ٶ瀂䐘މ悹伥濴瀦濮瀃瀆ݕ 濴瀦

Chapter 12 Network Protocols

Just enough TCP/IP. Protocol Overview. Connection Types in TCP/IP. Control Mechanisms. Borrowed from my ITS475/575 class the ITL

Computer Networks Principles LAN - Ethernet

Goals and topics. Verkkomedian perusteet Fundamentals of Network Media T Circuit switching networks. Topics. Packet-switching networks

Computer Communication Networks Midterm Review

IP - The Internet Protocol. Based on the slides of Dr. Jorg Liebeherr, University of Virginia

Department of Information Technology. CS6551 Computer Networks. Anna University - Two Mark Questions

RAJIV GANDHI COLLEGE OF ENGINEERING AND TECHNOLOGY

Internetwork Protocols

CCNA Exam File with Answers. Note: Underlines options are correct answers.

COM-208: Computer Networks - Homework 1

Computer Network 2015 Mid-Term Exam.

INSTITUTE OF AERONAUTICAL ENGINEERING Autonomous Dundigal, Hyderabad

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

Switching and Forwarding Reading: Chapter 3 1/30/14 1

Module 2 Overview of Computer Networks

Module 2 Overview of. Computer Networks

Indian Institute of Technology, Kharagpur

Outline. Routing. Introduction to Wide Area Routing. Classification of Routing Algorithms. Introduction. Broadcasting and Multicasting

Cisco Cisco Certified Network Associate (CCNA)

TSIN02 - Internetworking

Last time. Wireless link-layer. Introduction. Characteristics of wireless links wireless LANs networking. Cellular Internet access

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

Networking for Data Acquisition Systems. Fabrice Le Goff - 14/02/ ISOTDAQ

CS1302 / Computer Networks

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

7010INT Data Communications Lecture 7 The Network Layer

B.Sc. (Hons.) Computer Science with Network Security B.Eng. (Hons) Telecommunications B.Sc. (Hons) Business Information Systems

TCP /IP Fundamentals Mr. Cantu

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

Faculty of Science and IT Course title. Pre-requisite/corequisite

Concept Questions Demonstrate your knowledge of these concepts by answering the following questions in the space provided.

TSIN02 - Internetworking

Concept Questions Demonstrate your knowledge of these concepts by answering the following questions in the space that is provided.

CompSci 356: Computer Network Architectures. Lecture 8: Spanning Tree Algorithm and Basic Internetworking Ch & 3.2. Xiaowei Yang

EXAM TCP/IP NETWORKING Duration: 3 hours

Transcription:

===================================================================== Exercises ===================================================================== 1

Chapter 1 1) Design and describe an application-level protocol to be used between an automatic teller machine (ATM) and a bank s centralized computer. Your protocol should allow a user s card and password to be verified, the account balance (which is maintained at the centralized computer) to be queried, and an account withdrawal to be made (that is, money disbursed to the user). Your protocol entities should be able to handle all-toocommon case in which there is not enough money in the account to cover the withdrawal. Specify your protocol by listing the messages exchanged and the action taken by the ATM or the bank s centralized computer on transmission and receipt of the messages. Sketch the operation of your protocol for the case of a simple withdrawal with no errors, using a diagram with arrows. Explicitly state the assumptions made by your protocol about the underlying end-to-end transport service. 2) Consider an application that transmits data at a steady rate (for example, the sender generates a N-bit unit of data every k time units, where k is small ans fixed). Also, when such an application starts, it will stay on for a relatively long period of time. Answer the following questions, briefly justifying your answer: a. Would a packet-switched network or a circuit-switched network be more appropriate for this application? Why? b. Suppose that a packet-switching network is used and the only traffic in this network comes from such applications as described above. Furthermore, assume that the sum of the application data rates is less than the capacities of each and every link. Is some form of congestion control needed? Why? 3) Consider sending a file of F=M*L bits over a path of Q links. Each link transmits at R bps. The network is lightly loaded so that there are no queuing delays. When a form of packet-switching is used, the M*L bits are broken up into M packets, each packet with L bits. Propagation delay is negligible. a. Suppose the network is a packet-switched virtual circuit network. A virtual circuit (VC) consists of (1) a path (that is, a series of links and packet switches) between the source and destination hosts, (2) virtual circuit numbers, one number for each link along the path, and (3) entries in VC-number translation tables in each packet switch along the path. Once a VC is established between source and destination, packets can be sent with the appropriate VC numbers. Denote the VC set-up time by t s seconds. Suppose the sending layers add a total of h bits of header to each packet. How long does it take to send the file from source to destination? b. Suppose the network is a packet-switched datagram network. In a datagram network, each packet that traverses the network contains in its header the address of the destination. A connectionless service is used. Now suppose each packet has 2h bits of header, how long does it take to send the file? c. Repeat (b), but assume message switching is used (that is, 2h bits are added to the message and the message is not segmented). 4) Consider two hosts, Host A and B, connected by a single link of rate R bps. Suppose that the two hosts are separated by m meters, and suppose the propagation speed along the link is s meters/sec. Host A is to send a packet of size L bits to B. a. Express the propagation delay, d prop, in terms of L and R. 2

b. Determine the transmission time of the packets, d trans, in terms of L and R. c. Ignoring processing and queuing delays, obtain an expression for the end-to-end delay. d. Suppose Host A begins to transmit the packet at time t = 0. At time t = d trans, where is the last bit of the packet? e. Suppose d prop is greater than d trans. At time t = d trans, where is the last bit of the packet? f. Suppose d prop is less than d trans. At time t = d trans, where is the last bit of the packet? g. Suppose s = 2.5 * 10 8, L = 100 bits, and R = 28 kbps. Find the distance m so that d prop equals d trans 5) Explain in few lines the following concepts: 1. functions of the physical layer 2. functions of the link layer 3. functions of the network layer 4. functions of the transport layer 5. circuit switching 6. packet switching 7. connection oriented communication 8. intermediate systems 9. switch 10. reliable transport 11. congestion avoidance 12. client-server computing 13. router 14. protocol 15. error recovery 16. flow control 17. PDU 3

Chapter 2 6) Suppose within your Web browser you click on a link to obtain a Web page. Suppose the IP address for the associated URL is not known and its IP address has to be searched with the DNS (Domain Name Server) protocol. Suppose that n DNS servers are visited before your host receives the IP address and that the successive visits incur a round-trip time of RTT1, RTT2,.., RTTn. The round-trip time (RTT), which is the time it takes for a small packet to travel from client to server and then back to the client. The RTT includes packet-propagation delays, packet-queuing delays in intermediate routers and switches, and packet-processing delays. Further suppose that the web page associated with the link contains exactly one object, a small amount of HTML text. Let RTT0 denote the RTT between the local host and the server containing the object. Assuming zero transmission time of the object, how much time elapses from when the client clicks on the link until the client receives the object? 7) Referring to the previous problem, suppose the HTML file indexes three very small objects on the same server. We can use both persistent or non-persistent connections.with persistent connections, the server leaves the TCP connection open after sending a response. Subsequent requests and responses between the same client and server can be sent over the same connection. With non-persistent connections, a new connection must be open each time. Neglecting transmission times, how much time elapses with a. non persistent HTTP with no parallel TCP connections b. non persistent HTTP with parallel TCP connections c. persistent HTTP with pipelining (the HTTP client does not wait to receive the previous response for issuing a new request, but issues the request as soon as it encounters a reference.) 8) Install the TCPclient and TCPserver on one host and UDPclient and UDPserver on another host. a. Suppose you run TCPclient before TCPserver What happens and why? b. Suppose you run UDPclient before UDPserver What happens and why? c. What happens if you use different port numbers for the client and server sides? 9) True or False? a. Suppose a user request a Web page that consists of some text and two images. For this page the client will send one request message and receive three response messages. b. Two distinct Web pages can be sent over the same persistent connection. c. With nonpersistent connections between browser and origin server, it is possible for a single TCP segment to carry two distinct HTTP request messages. d. The Date: header in the HTTP response indicate when the object in the response was last modified. 4

Chapter 3 10) Suppose client A initiates a Telnet session with server S. AT about the same time, client B also initiates a Telnet session with server S. Provide possible source and destination port number for: a. the segment sent from A to S. b. the segment sent from B to S. c. the segment sent from S to A. d. the segment sent from S to B. e. if A and B are different hosts, is it possible that the source port number in the segments from A to S is the same as that from B to S? f. how about if they are the same host? 11) UDP and TCP use 1 s complement for their checksums. Suppose you have the following three 8-bit words: 01010101, 01100000, 11001100. What is the 1 s complement of the sum of these words? Why is that UDP takes the 1 s complement of the sum and not just the sum? With the 1 s complement scheme, how does the receiver detect errors? Is it possible that a 1-bit error will go undetected? How about a 2-bit error? 12) Consider the Go-Back-N protocol with a sender window size of 3 and a sequence number range of 1,024. Suppose that at time t, the next in-order packet that the receiver is expecting has a sequence number of k. Assume that the medium does not reorder messages. Answer the following questions: a. What are the possible sets of sequence numbers inside the sender s window at time t? b. What are all possible values of the ACK field in the message currently propagating back to the sender at time t? 13) Consider the scenario of RTT = 100 msec, the size of the objects O = 5 Kbytes, the segment size S = 536 bytes and the number of objects M + 1 = 11. Construct a chart that compares the response times for nonpersistent and persistent connections for 28 Kbps, 100 Kbps, 1 Mbps and 10 Mbps. Note that persistent HTTP has substantially lower response time than nonpersistent HTTP for all the transmissions rate except 28 Kbps. 14) True and False 1. When an application receives data from UDP, the application knows that the data was sent as one message by the source. 2. With a sliding window protocol, the window size is the maximum amount of unacknowledged data that can be sent by the source. 3. TCP congestion control aims at avoiding congestion in the Internet. 4. When an application receives a block of data from TCP, the application knows that the data was sent as one message by the source. 5. The congestion window size is given to the source in the window field of the TCP segment. 6. It is possible for a UDP source A to send data to a destination process P1 on host B1, using source port a and destination port b, and at the same time send (different) data to another destination process P2 on a different host B2, still using the same source port a and destination port b. 5

7. One effect of flow control in TCP is to avoid buffer over flow in bridges. 8. With TCP, the goal of silly window syndrome avoidance is to avoid that out of sequence data is delivered to the application. 9. With a sliding window protocol and for a constant round trip time, increasing the window size increases the throughput if there is no loss, up to a certain limit. 6

Chapter 4 15) Connection-oriented versus connectionless architecture: a. Suppose that in a network layer, routers were subjected to stressful conditions that might cause them to fail fairly often. At a high level, what actions would need to be taken on such router failure. Does this argue for connection-oriented or connectionless environment? b. Suppose that in order to provide a guarantee regarding the level of performance (e.g. delay) that would be seen along a source-to-destination path, the network requires a sender to declare its peak traffic rate. If the declared peak traffic rate and the existing declared traffic rate that have been declared are such that there is no way to get traffic from the source to the destination that meets the declared delay requirements, the source is not allowed to access the network. Would such an approach be more easily accomplished within a connection-oriented or connectionless environment? 16) Consider the network shown below and assume that each node initially knows the costs to each of its neighbours. Consider the distance vector algorithm. The distance vector (DV) algorithm is an iterative, asynchronous, and distributed routing algorithm. It is distributed in that each node receives some information from one or more of its directly attached neighbours, performs a calculation, and may then distribute the results of its calculation back to its neighbours. It is iterative in that this process continues on until no more information is exchanged between neighbours. The algorithm is asynchronous in that it does not require all of the nodes to operate in lock step with each other. The principal data structure in the DV algorithm is the distance table maintained at each node. Each node's distance table has a row for each destination in the network and a column for each of its directly attached neighbours. Consider a node X that is interested in routing to destination Y via its directly attached neighbor Z. Node X's distance table entry, D x (Y,Z) is the sum of the cost of the direct one-hop link between X and Z, c(x,z), plus neighbor Z's currently known minimum-cost path from itself (Z) to Y. That is: D x (Y,Z) = c(x,z) + min w {D z (Y,w)} 7 A 1 B 8 E 1 2 C 2 D Show the distance table entries at node E. (Ex. RIP) 7

17) In a link state algorithm, the network topology and all link costs are known. Therefore, each node can compute (and does it) the minimal-cost path (shortest path) to each other node for routing. In practice this is accomplished by having each node broadcast the identities and costs of its attached links to all other routers in the network (link state broadcast). The structure that contains all shortest path from one node to all the others is called minimal-cost spanning tree. Show the minimal-cost spanning tree rooted at A. (Ex. OSPF) 18) True and False 1. With IPv4, a router may not fragment a packet if its more bit is equal to 0. 2. With multicast IP, in order to send a packet to a group, a source must first send an IGMP message to its next hop router, unless the destinations are on the same subnet. 3. When an IP host receives an IP packet, the host knows that the packet was sent as one message by the source. 4. A destination host can read a port number in every IP packet it receives. 5. With multicast IP, in order to send a packet to a group, a source creates a packet with destination address = the IP address of the multicast group, and then sends it. 6. With IPv4, a router may re-assemble a datagram only if the more bit is equal to 1 and they don't fragment bit is equal to 0. 7. With IPv4, re-assembly of datagrams can be performed only by the destination of the datagram. 8. Consider an IPv4 host A using the socket interface. When A sends an IP packet to a multicast address, then it must set the socket option IP ADD MEMBERSHIP in order to trigger the IGMP protocol. 9. In an intranet with more than one router, packet sequence is guaranteed by means of the TTL field. 10. In order to use a tunnel, a system encapsulates an original IP packet into a new IP packet with destination IP address = the IP address of the end of the tunnel, and sets the protocol type to IP in the new packet. 11. If a host receives a packet with TTL=1, then it can conclude that the source is on the same subnetwork. 8

Chapter 5 19) Derive the maximum efficiency of ALOHA and slotted ALOHA. 20) Consider three LANs interconnected by two routers, as shown in the diagram below: LAN 1 A B D C LAN 2 E F LAN 3 a. Redraw the diagram to include adapters. b. Assign IP addresses to all of the interfaces. For LAN 1 use addresses 111.111.111.xxx; and for LAN 2 uses addresses of the form 122.222.222.xxx; and for LAN 2 uses addresses of the form 133.333.333.xxx. c. Assign LAN addresses to all of the adapters. d. Consider sending an IP datagram from host A to host F. Suppose all of the ARP tables are up-to-date. Enumerate all the steps for ARP resolution. 21) Suppose nodes A and B are on the same 10 Mbps Ethernet segment, and the propagation delay between the two nodes is 225 bit times. Suppose node A begins transmitting a frame, and before it finishes, node B begins transmitting a frame. Can A finish transmitting before it detects that B has transmitted? 22) True and False 1. With Ethernet, the purpose of the jam bits is to ensure that the collisions last at least as long as the slot time. 2. A bridged network may have temporary forwarding loops. 3. With an Ethernet switch, there is one collision domain per port. 4. Assume host A sends an IP packet to host B via bridge X, and assume all three systems are on the same bridged network. Then 9

the destination MAC address in the packet sent by A is the MAC address of X. 5. On a full duplex Ethernet link, there is no CSMA/CD protocol. 6. With CSMA/CD, a sending station sends jam bits after detecting a collision and waits a random time before trying to send a frame again. 7. In a bridged LAN with more than one bridge and with redundant paths, packet sequence is not guaranteed. 8. A multiport repeater separates collision domains. 9. With ALOHA, for a fixed retransmission probability, and if the number of stations is infinite, then the system is not stable. 10

Chapter 6 1) We wish to configure a router to forbid incoming ftp connections. 1. How can this be done? 2. Is it possible to read the protocol used (UDP, TCP or other) in each IP packet? Is this a problem for a filtering router? 3. To which port are ICMP packets sent? 2) VPI/VCIs can be written in dotted decimal notation. Figure 1 shows a network with three VC switches X1, X2 and X3 and one VP switch Y1. User A has three ATM connections, two to B and one to C. Values of VPI/VCIs are shown on the links. Fill in the label swapping table at X1 and Y1. Port a Port b Port a Port b A 3.0.90 3.0.100 5.0.100 X1 Y1 X2 3.0.90 7.0.90 3.0.100 7.0.100 5.0.100 5.0.90 5.0.92 B 6.0.100 Port c 0.0.69 How many VPCs are there? Where do they terminate? 3) True or False 1. IP can run on top of LAN emulation. 2. An ATM LAN emulates packet collision if LAN emulation is used. 3. Every ATM cell carries the ATM address of the destination. C 11