department of electrical and computer engineering€¦  · web viewlike samuel morse on morse...

21
Department of Electrical and Computer Engineering University of Massachusetts Dartmouth ECE 369 Computer Networks Prof. Hong Liu Final Practice Exam for ECE369 Spring 2015 Your Name: Student ID: (Kurose & Ross: v6) (Open-Book In-Class Test, Individual Work Required) Instructions:

Upload: vocong

Post on 17-Jul-2018

213 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Department of Electrical and Computer Engineering€¦  · Web viewLike Samuel Morse on Morse code, Alexander Graham Bell on telephone, Guglielmo Marconi on radio, Philo Farnsworth

Department of Electrical and Computer Engineering

University of Massachusetts Dartmouth

ECE 369 Computer Networks

Prof. Hong Liu

Final Practice Exam for ECE369 Spring 2015

Your Name:

Student ID:

(Kurose & Ross: v6)

(Open-Book In-Class Test, Individual Work Required)

Instructions:

1. Print your name and ID on this cover page above.

2. Do all ten problems, each worth of 10 points.

3. Write your answers clearly (illegible writing will not be graded).

Page 2: Department of Electrical and Computer Engineering€¦  · Web viewLike Samuel Morse on Morse code, Alexander Graham Bell on telephone, Guglielmo Marconi on radio, Philo Farnsworth

Destination

SourceRouter

1. nodal processing2. queuing

3. transmission

4. propagation

1. [Ch.1 Computer Networks and the Internet] the Internet Protocol Stack

a) For the five layers in the Internet protocol stack, end systems (such as web server) and

intermediate nodes (such as switch) involve different layers. Demonstrate your

understanding how the Internet Protocol Stack works by completing the diagram below to

show the layers involved at each component and the way in which data flow from Source

to Destination via Router.

b) Fill in the blanks about the name in convention that each layer calls its data:

Application-layer is passed onto the transport layer, which might

break down the data and encapsulates each piece in transport-layer by

adding a header, which in turn gets encapsulated in network-layer ,

and the link layer adds a header and a tail to form link-layer before the

physical layer transmits the bits across the link.

Page 3: Department of Electrical and Computer Engineering€¦  · Web viewLike Samuel Morse on Morse code, Alexander Graham Bell on telephone, Guglielmo Marconi on radio, Philo Farnsworth

2. [Ch.1 Computer Networks and the Internet] Performance Issues

In packet-switched networks, a source host might segment application-layer messages into

packets and sends the packets via the network. A destination then reassembles the packets

back into the original message. Consider a message of 16×106 bits to be sent from Source to

Destination via one Router as shown in the figure of the previous problem. Assume each of

the two links is 2 Mbps (2×106 bits per second, for convenience). Ignore propagation,

queuing, and processing delays. Also ignore transmission overhead due to encapsulation.

a) What is the total time to move the message without segmentation from Source to

Destination?

b) What is the total time to move the message with segmentation from Source to

Destination? Assume each packet is 4,000 bits long.

Hint: Remember store-and-forward fashion in packet-switch networks.

Page 4: Department of Electrical and Computer Engineering€¦  · Web viewLike Samuel Morse on Morse code, Alexander Graham Bell on telephone, Guglielmo Marconi on radio, Philo Farnsworth

3. [Ch.2 Application Layer] Issues and Network Programming

a) For the pseudo code of UDPserver below, write its client side code that gets a line from a

file (until end-of-file), sends to the server, and then puts the server’s response on screen:

UDPserver() /* server name: portal.ece.umassd.edu */{

sock_fd = Socket(AF_INET, SOCK_DGRAM, 0)Bind(sock_fd, 8888) /* server port#: 8888 */for (;;) {

n = Recvfrom(sock_fd, msg, &clientAddress, &clientPort)/* process request */Sendto(sock_fd, msg, n, clientAddress, clientPort)

}}

b) Suppose that in the UDPserver code above, we replace the line

Sendto(sock_fd, msg, n, clientAddress, clientPort)

with

Sendto(sock_fd, msg, n, clientAddress, 5432)

Will it become necessary to change your UDPclient code?

Page 5: Department of Electrical and Computer Engineering€¦  · Web viewLike Samuel Morse on Morse code, Alexander Graham Bell on telephone, Guglielmo Marconi on radio, Philo Farnsworth

4. [Ch.2 Application Layer & Project A. Router Experiments]

Part of this course involves lifelong learning: Knowing where and how to look for the

protocol specifications that you need for your project. It is an important skill for you to

retrieve and comprehend RFCs. Obtain the HTTP/1.1 specification (RFC 2616) from the

Internet and then answer the following questions.

a) What is the URL where you can retrieve RFC 2616?

b) When is RFC 2616 published?

c) What is the major contribution by Tim Berners-Lee, the last of RFC 2616 co-authors?

d) RFC 2616 states that "Clients that use persistent connections should limit the number of simultaneous connections that they maintain to a given server. A single-user client SHOULD NOT maintain more than two connections with any server or proxy." Give the section # and title where you find this answer. Why does RFC 2616 recommend it?

e) You come out a brilliant idea on a real time protocol for your video application; you want to check out if you are re-inventing a wheel before you try to publish it as RFC, where would you go? Hint: http://www.ietf.org/rfc.html is useless since you don't know RFC#.

Page 6: Department of Electrical and Computer Engineering€¦  · Web viewLike Samuel Morse on Morse code, Alexander Graham Bell on telephone, Guglielmo Marconi on radio, Philo Farnsworth

5. [Ch.3 Transport Layer] Value Added Services

Though you have not been taught explicitly (I only briefly mentioned the formula if you

recall), try to explore how TCP estimates RTT with a weighted-average procedure. This

procedure is a common way used in many areas of computer engineering such as in operating

system for task scheduling.

a) Compute the estimated RTT at each round with given RTT samples:

Sample RTT Estimated RTT

= 0.1

Estimated RTT

= 0.2

0 200 milliseconds 200 milliseconds 200 milliseconds

1 190 milliseconds

2 300 milliseconds

3 210 milliseconds

b) Based on your computations, comment what affect parameter generates?

Page 7: Department of Electrical and Computer Engineering€¦  · Web viewLike Samuel Morse on Morse code, Alexander Graham Bell on telephone, Guglielmo Marconi on radio, Philo Farnsworth

6. [Ch.3 Transport Layer] TCP: true or false and why

a) This is the Sender’s view of sequence numbers in Go-Back-N (GBN) protocol. Assume

“1” starting at the leftmost green packet.

Where would the window slide if the Sender gets ACK #10 from the Receiver?

TRUE or FALSE?Suppose Sender is sending Receiver a large file over a TCP connection. If Receiver has no data to send back, Receiver will not send acknowledgments to Sender because Receiver has no data to piggyback its acknowledgments.

b) This is a simplified version of rdt2.1 receiver: CORRECT or WRONG?

TRUE or FALSE?The rdt protocol series in our textbook introduce sequence numbers for the purpose of eliminating duplicate packets that was caused by immature time out that was introduced for the purpose of handling packet loss.

Page 8: Department of Electrical and Computer Engineering€¦  · Web viewLike Samuel Morse on Morse code, Alexander Graham Bell on telephone, Guglielmo Marconi on radio, Philo Farnsworth

7. [Ch.4 The Network Layer] Routing vs. Forwarding

a) This is the result of Dijkstra's shortest-path algorithm that you did in your homework

with me explicitly teaching. As you know, this routing information represented in a pair

of arrays, D() and p(), cannot be deployed directly at a router due to different formats.

Convert this information into the format of a forwarding table at the node x.

Step N’ D(t),p(t) D(u),p(u) D(v),p(v)

D(w),p(w) D(y),p(y) D(z),p(z)

0 x 3, x 6, x 6, x 8, x1 xv 7, v 6, v 6, x 6, x 8, x2 xvu 7, v 6, x 6, x 8, x3 xvuw 7, v 6, x 8, x4 xvuwy 7, v 8, x5 xvuwyt 8, x6 xvuwytz

Local Forwarding TableDestination Node

(header value)Next Node

(output link)

v

u

w

y

t

z

b) Sketch the routes from x to each of the other nodes.

Page 9: Department of Electrical and Computer Engineering€¦  · Web viewLike Samuel Morse on Morse code, Alexander Graham Bell on telephone, Guglielmo Marconi on radio, Philo Farnsworth
Page 10: Department of Electrical and Computer Engineering€¦  · Web viewLike Samuel Morse on Morse code, Alexander Graham Bell on telephone, Guglielmo Marconi on radio, Philo Farnsworth

8. [Ch.4 The Network Layer] Router & other devices

In our Homework, you provided a forwarding table (shown below) that has four entries, uses

longest prefix matching, and forwards packets to the correct link interfaces.

Prefix Match Link Interface11100000 00 #011100000 01000000 #111100001 1 #31110000 #2otherwise #3

a) Assume you reconfigure your router to swap Link #0 and Link #2, i.e., those datagrams

with destination addresses longest-prefix-matching 11100000 00 will be forwarded to

Link #2 instead of Link #0 and vice verse. Show your new forwarding table in the

a.b.c.d/x notation.

Destination Address Link Interface

b) What is the link interface for datagrams with destination address 224.41.41.41 by your

new forwarding table?

Note: Block your human intelligence, act like a router that takes the destination address, accesses the first entry of the forwarding table which masks out the subnet for matching. If matching, forward the datagram to the corresponding link; otherwise, check the next entry.

Page 11: Department of Electrical and Computer Engineering€¦  · Web viewLike Samuel Morse on Morse code, Alexander Graham Bell on telephone, Guglielmo Marconi on radio, Philo Farnsworth

9. [Ch.5 The Link Layer and Local Area Networks] Addressing & Multiple Accessing

a) Recall that with the CSMA/CD protocol, the adapter waits K•512 bit times after a

collision, where K is drawn randomly. For a 1 Gbps Ethernet, how long (in second) does

the adapter possibly wait until returning to Step 2 if a given frame experiences the 2nd

collision in a row?

b) The figure below shows three LANs interconnected by two routers. Fill in the table

below for Host A and Router R1 (the first fields are done for you).

Number of interface IP address ARP module Adapter MAC address

Host A 1

Page 12: Department of Electrical and Computer Engineering€¦  · Web viewLike Samuel Morse on Morse code, Alexander Graham Bell on telephone, Guglielmo Marconi on radio, Philo Farnsworth

Router R1 2

Page 13: Department of Electrical and Computer Engineering€¦  · Web viewLike Samuel Morse on Morse code, Alexander Graham Bell on telephone, Guglielmo Marconi on radio, Philo Farnsworth

10. [Project B. Socket Programming]

a) Like Samuel Morse on Morse code, Alexander Graham Bell on telephone, Guglielmo

Marconi on radio, Philo Farnsworth on television, Bill Gates and Steve Jobs on personal

computer, and Tim Berners-Lee on World Wide Web, here comes another inventor(s) on

communication paradigm shifting -- the Twitter guys: Biz Stone, Evan Williams, and

Jack Dorsey. Twitter is microblog service that restricts each entry to 140 characters,

"tweet." Our Project B "Socket Programming Framework for Multimedia Applications"

claims to be a middleware supporting multimedia applications over the Internet and you

have prototyped such applications as VoIP and YouTube on your framework.

Discuss the possibility of your framework supporting Twitter. Anticipate any technical

difficulties and propose your solutions/prove no solution using the framework.

b) Recall your two team-projects, who is the leader? Would you recommend him for extra

credit?

Leader Recommend? Y/N Comments

Project 1

Project 2