Virginia Tech

Department of Computer Science

CS4254 Computer Network Architecture and Programming

Spring 2006

 

Homework 1 (Total 60 pts)

Due in class on Thursday February 2nd, 2006

 

Please hand in a hardcopy of your homework in a folder, which has your name and course number, in class on Thursday Feb. 2nd, 2006. (Always keep a copy of the homework you hand in). Each solution must include all calculations and an explanation of why the given solution is correct. In particular, write complete sentences. A correct answer without an explanation is worth no credit. No late homework will be accepted. Electronic preparation of your solutions is mandatory.

 

Q1. (10 pts) Consider an application that transmits data at a constant rate, say at N bits/second, across a single connection. Also assume that the application runs for long periods of time.

a)     Would a packet-switched network be more appropriate than a circuit-switched network? Why or why not?

b)     If the application data rate varied widely, would circuit-switching be preferable? Why or why not?

c)     If the application transferred a constant amount of data over a set of connections c1, c2, .., and cn where n is not constant, which type of switching would be preferable?

 

 

Q2. (15 pts) Consider a file of length M*L bits sent over a path consisting of Q links. Each link along the path transmits at R bits/second. The network is lightly loaded, so there are no queuing delays. Also, assume that the propagation delay is negligible and can be ignored. Also assume that a packet switched network is used which splits the file into M packets, each of length L bits. In all cases, there are Q links between the source and the destination.

a)     Suppose we use a connection oriented network, where the connection setup time is t seconds. Also, suppose that the sending layer adds h bits of header per packet. How long will it take to send the entire file? Give your answer as an equation.

b)     Suppose we use a connectionless network, where the sending layer adds 2h bits of header to each packet. How long will it take to transmit the file?

c)     Repeat b. assuming that we are using message switching. 2h bits are added to the entire message, i.e., the entire file. How long will it take to transmit the file?

 

Q3. (25 pts) Imagine that you are developing a new P2P file-sharing system. Each system acts as both server and client, so for K hosts sharing N files.

a)     Explain how you would plan the system to scale up to the internet. What protocols would you use? How would you set up connections? Who would you connect to when a client first starts up? Would there be encryption?

b)     Draw a graph showing some nodes connected, with a new node connecting to the network. How many connections does each node need if there are K nodes?

c)     How would you support multiple file requests from one machine to another?

 

Q4. (5 pts) Encode a stream of 10 alternating 0s and 1s using Manchester encoding. Draw a graph depicting your encoding.

 

Q5. (5 pts) What is the bit interval for a signal with a bit rate of 5 Mbps?