Homework 1

CMPS 4750/6750 Computer Networks – Fall 17
Homework 1
1. (8 points) Consider the circuit-switched network in Figure 1.13 in Kurose & Ross’s book.
Recall that there are 4 circuits on each link. Label the four switches A, B, C, and D, going
in the clockwise direction.
(a) (2 points) What is the maximum number of simultaneous connections that can be in
progress at any one time in the network?
Solution: Between the switch in the upper left and the switch in the upper right we
can have 4 connections. Similarly we can have four connections between each of the 3
other pairs of adjacent switches. Thus, this network can support up to 16 connections.
(b) (2 points) Suppose that all connections are between switches A and C. What is the
maximum number of simultaneous connections that can be in progress?
Solution: We can have 4 connections passing through the switch in the upper-righthand corner and another 4 connections passing through the switch in the lower-left-hand
corner, giving a total of 8 connections.
(c) (4 points) Suppose we want to make four connections between switches A and C, and
another four connections between switches B and D. Can we route these calls through
the four links to accommodate all eight connections?
Solution: Yes. For the connections between A and C, we route two connections through
B and two connections through D. For the connections between B and D, we route two
connections through A and two connections through C. In this manner, there are at
most 4 connections passing through any link.
2. (4 points) Review the car-caravan analogy in Section 1.4. Assume that tollbooths are 100
km apart, and the cars propagate at 100km/hr. A tollbooth services a car at a rate of one
car every 12 seconds. Suppose the caravan (with 10 cars) begins in front of one tollbooth,
passing through a second toolbooth, and finishing just after a third toolbooth. What is the
end-to-end delay? (As we did in class, suppose that whenever the first car of the caravan
arrives at a toolbooth, it waits at the entrance until the other nine cars have arrived and lined
up behind it.)
Solution: There are ten cars. It takes 120 seconds, or 2 minutes, for the first tollbooth to
service the 10 cars. Each of these cars has a propagation delay of 60 minutes (travel 100 km)
before arriving at the second tollbooth. Thus, all the cars are lined up before the second
tollbooth after 62 minutes. The whole process repeats itself for traveling between the second
and third tollbooths. It also takes 2 minutes for the third tollbooth to service the 10 cars.
Thus the total delay is 126 minutes.
3. (6 points) In this problem, we consider sending real-time voice from Host A to Host B over a
packet-switched network (VoIP). Host A converts analog voice to a digital 64 kpbs bit stream
1
on the fly. Host A then groups the bits into 56-byte packets. There is one link between Hosts
A and B; its transmission rate is 2 Mpbs and its propagation delay is 10 msec. As soon as
Host A gathers a packets, it sends it to Host B. As soon as Host B receives an entire packet,
it converts the packet’s bits to an analog signal. How much time elapses from the time a bit
it created (from the original analog signal at Host A) until the bit is decoded (as part of the
analog signal at Host B)?
Solution: Consider the first bit in a packet. Before this bit can be transmitted, all of the
56·8
bits in the packet must be generated. This requires 64·10
3 sec = 7msec. The time required to
56·8
transmit the packet is 2·106 sec = 0.224msec. The propagation delay = 10 msec. Thus, the
delay until decoding is 7msec + 0.224msec + 10msec = 17.224msec. A similar analysis shows
that all bits experience a delay of 17.224 msec.
4. (2 points) A packet switch receives a packet and determines the outbound link to which the
packet should be forwarded. When the packet arrives, one other packet is halfway done being
transmitted on this outbound link and four other packets are waiting to be transmitted.
Packets are transmitted in order of arrival. Suppose all packets are 1,500 bytes and the link
rate is 2 Mbps. What is the queueing delay for the packet?
Solution: The arriving packet must first wait for the link to transmit 4.5 · 1, 500 bytes =
6,750 bytes or 54,000 bits. Since these bits are transmitted at 2 Mbps, the queuing delay is
27 msec.
5. (4 points) Consider a route buffer preceding an outbound link. In this problem, you will use
Little’s formula, a famous formula from queueing theory. Let N denote the average number
of packets in the buffer plus the packet being transmitted. Let a denote the rate of packets
arriving at the link. Let d denote the average total delay (i.e., the queueing delay plus the
transmisstion delay) experienced by a packet. Little’s formula is N = a · d. Suppose that on
average, the buffer contains 10 packets, and the average packet queueing delay is 10 msec.
The link’s transmission rate is 100 packets/sec. Using Little’s formula, what is the average
packet arrival rate, assuming there is no packet loss?
Solution: The total number of packets in the system includes those in the buffer and the
packet that is being transmitted. So, N =10+1. Using Little’s law, we then have (10 + 1) =
a×(queuing delay + transmission delay). That is, 11 = a × (0.01 + 1/100) = a × (0.01 + 0.01).
Thus, a = 550 packets/sec.
6. (5 points) Suppose two hosts, A and B, are separated by 20,000 kilometers and are connnected
by a direct link of R = 2 Mpbs. Suppose the propagation speed over the link is 2.5 · 108
meters/sec. Consider sending a file of 800,000 bits from Host A to Host B.
(a) (2 points) Suppose the file is sent continously as a large message. How long it takes to
send the file?
Solution: ttrans + tprop =
800000
sec
2×106
+
20000×103
sec=
2.5×108
400 msec + 80 msec = 480 msec.
(b) (3 points) Suppose now the file is broken up into 20 packets with each packet containing
40,000 bits. Suppos that each packet is acknowledged by the receiver and the transmission time of an acknowledgement packet is neligible. Finally, assume that the sender
2
cannot send a packet until the preceeding one is acknolwedged. How long it takes to
send the file?
Solution: 20 × (ttrans + 2tprop ) = 20 × (20 msec + 2 × 80 msec) = 3.6 sec.
7. (6 points) Consider sending a large file of F bits from Host A to Host B. There are three links
(and two switches) between A and B, and the links are uncongested (that is, no queueing
delays). Host A segments the file into segments of S bits each and add 80 bits of header to
each segment, forming packets of L = 80 + S bits. Each link has a transmission rate of R
bps. Disregard progagation delay.
(a) (3 points) What is the delay of moving the file from Host A to Host B?
Solution: There are F/S packets. Each packet is S +80 bits. Since there are three links
between the A and B, the time at which the first packet is received by B is S+80
R ×3
S+80
sec. After that, one packet is received by B every R sec. Thus delay in sending the
S+80
S+80
whole file is S+80
R × 3 + R × (F/S − 1) = R × (F/S + 2) sec.
(b) (3 points) Find the value of S that minimizes the above delay.
Solution: To find the value of S that minimizes the above delay, one can either take
the derivative of the delay function with respect
to S, or apply the arithmetic mean√
geometric mean inequality, that is, a + b ≥ 2 ab for any non-negative a and b, where the
eqation holds when a = b. Here we use the second approach. We have S+80
R ×(F/S +2) =
√
1
1
(F
+
160
+
2S
+
80F/S)
≥
(F
+
160
+
2
160F
)
where
the
mininum
is achieved at
R
R
√
2S = 80F/S, or S = 40F .
3