$35
Homework 1
CECS 474 - Homework 1
1. Problem Set (Chapter 1)
Problem 1: Consider two hosts A and B separated by 2 nodes (switches or routers), A wants to send a file of size M = 15
Mbits over to B. Each link has the same data rate C = 1.5 Mb/s.
a) Assume message switching, how long would it take for the whole file to be received by B? Explain your
assumptions. Comment. Write first the formula giving the time in terms of C, M, and possibly other parameters.
b) Assume packet switching and that all packets have the same size L=1500 bits, how long would it take for the
whole file to be received by B? Explain your assumptions. Write first the formula giving the time in terms of C, M,
and possibly other parameters. Comment and compare.
Problem 2: Consider two hosts A and B connected via n hops (n≥2):
A ↔ R1 ↔ R2 ↔ …↔ Rn-1 ↔B
That is, R1, …, Rn-1 are routers, and A is connected to R1 by a point-to-point link, R1 is connected to R2 by a point-to-point
link, and so on. Assume all links have the same capacity C (in bps). Also assume the propagation delay of the links to be
negligible and that no packets from other hosts exist on the path from A to B (this is a very unrealistic assumption). Consider
a file of size S (in bits) to be transmitted from A to B.
a) How much time does it take to transmit a packet of size L from A to B?
b) The optimal way to break up the file into packets, in order to minimize the total delay, is to divide it into a number
of equal-sized packets (believe us!). How many packets is optimum? (Notice that when the packet is split into smaller
packets, separate headers/trailers are added to each of the smaller packets. Assume the size of headers/trailers to be
H for packets of any size.) Comment.
Problem 3: In the following 6 questions, we are sending a 30 Mbit MP3 file from a source host to a destination host. All
links in the path between source and destination have a transmission rate of 10 Mbps. Assume that the propagation speed is
2 * 10
8 meters/sec, and the distance between source and destination is 10,000 km.
1) Initially suppose there is only one link between source and destination. Also suppose that message switching
is used, with the message consisting of the entire MP3 file. The transmission delay is:
a) 50 milliseconds
b) 3 seconds
c) 3.05 seconds
d) none of the above.
California State University Long Beach CECS 474 - Homework 1 Spring 2022
2
2) Referring to the above question, the end-to-end delay (transmission delay plus propagation delay) is
a) 6 seconds
b) 3.05 seconds
c) 3 seconds
d) none of the above.
3) Referring to the above question, how many bits will the source have transmitted when the first bit arrives at the
destination?
a) 50,000 bits
b) 1 bit
c) 30,000,000 bits
d) none of the above.
4) Now suppose there are two links between source and destination, with one router connecting the two links. Each link
is 5,000 km long. Again suppose the MP3 file is sent as one message. Suppose there is no congestion, so that the message
is transmitted onto the second link as soon as the router receives the entire message. The end-to-end delay is
a) 6.05 seconds
b) 6.1 seconds
c) 3.05 seconds
d) none of the above
5) Now suppose that the MP3 file is broken into 3 packets, each of 10 Mbits. Ignore headers that may be added to these
packets. Also ignore router processing delays. Assuming store and forward packet switching at the router, the total delay
is
a) 3.05 seconds
b) 4.05 seconds
c) 6.05 seconds
d) none of the above
6) Now suppose there is only one link between source and destination, and there are 10 FDM channels in the link. The
MP3 file is sent over one of the channels. The end-to-end delay is
a) 30.05 seconds
b) 30 seconds
California State University Long Beach CECS 474 - Homework 1 Spring 2022
3
c) 300 microseconds
d) none of the above
Problem 4: Consider two hosts, Hosts 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 Host B.
a. Express the propagation delay, dprop in terms of m and s.
b. Determine the transmission time of the packet, dtrans 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 = dtrans, where is the last bit of the packet?
e. Suppose dprop is greater than dtrans. At time t = dtrans, where is the first bit of the packet?
f. Suppose dprop is less than dtrans. At time t = dtrans, where is the first bit of the packet?
g. Suppose s = 2.5*108
, L = 1000 bits, and R = 284 kbps. Find the distance m so that dprop equals dtrans.
Problem 5: Suppose users share a 2-Mbps link. Also suppose each user requires 300 Kbps when transmitting, but each user
only transmits 12 percent of the time.
a. When circuit switching is used, how many users can be supported?
b. For the remainder of this problem, suppose packet switching is used. Find the probability that a given user is
transmitting.
c. Suppose there are M users. Find the probability that at any given time, n users are transmitting simultaneously.
d. Find the probability that there are 7 or more users transmitting simultaneously.
e. Assume M=10. Find the probability that there are 7 or more users transmitting simultaneously.
f. What would be a “reasonable” value for M?
Problem 6: Suppose Host A wants to send a large file to Host B. The path from Host A to Host B has three links, of rates
R1 = 500 kbps, R2 = 2 Mbps, and R3 = 1 Mbps.
a. Assuming no other traffic in the network, what is the throughput for the file transfer. Try the following 3 cases: a
“fluid” (water-like) case, a message switching case and a packet switching case.
b. Suppose the file is 4 million bytes. Roughly, how long will it take to transfer the file to Host B for each of these
California State University Long Beach CECS 474 - Homework 1 Spring 2022
4
3 cases?
Problem 7: Suppose users share a 2 Mbps link. Also suppose each user transmits continuously at 1 Mbps when
transmitting, but each user transmits only 20 percent of the time.
a. When circuit switching is used, how many users can be supported?
b. For the remainder of this problem, suppose packet switching is used. Why will there be essentially no queuing
delay before the link if two or fewer users transmit at the same time? Why will there be a queuing delay if three users
transmit at the same time?
c. Find the probability that a given user is transmitting.
d. Suppose now there are three users. Find the probability that at any given time, all three users are transmitting
simultaneously. Find the fraction of time during which the queue grows.
Problem 8: Suppose N packets arrive simultaneously to a link at which no packets are currently being transmitted or
queued. Each packet is of length L and the link has transmission rate R. What is the average queuing delay for the N
packets?
2. Solution Submission and Deadline
You only need to submit the solutions to problems 2, 3, and 5 (which are marked through red text color) to BeachBoard.
Submission Deadline: Feb. 20, 2022, 11:00 pm