Você está na página 1de 9

JAYPEE INSTITUTE OF INFORMATION TECHNOLOGY

COMPUTER NETWORKS (10B11CI611)


BTECH 6TH SEM 2016
TUTORIAL-2
NOTE: The solutions have been formed with help from solutions available @internet. The group assigned the responsibility of submitted the
soft copy/hard copy failed to submit and therefore the correctness of the solutions has not been checked. Pl compare with lecture
notes/solutions as well.

Q1.

Q2.

Hosts A and B are each connected to a switch S via 10-Mbps links as shown above. The
propagation delay on each link is 20s. S is a store-and-forward device that can send and
receive bits simultaneously; it begins retransmitting a received packet 35s after it has
finished receiving it (if it can). Calculate the total time in milliseconds required to transmit
12,000 bits from host A to host B

Consider an application that transmits data at a steady rate (for example, the sender generates
an Nbit unit of data every k time units, where k is small and fixed). Also, when such an
application starts, it will continue running for a relatively long period of time. Answer the
following questions, briefly justifying your answer:
a. Would a packetswitched network or a circuitswitched network be more appropriate
for this application? Why?
b. Suppose that a packetswitched 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?
Solution 2: a. Circuit--switched network would be preferred because the application involves long
sessions with predictable bandwidth requirement. Since the transmission rate is known, bandwidth
could be reserved for each application session without much waste. In addition, since the application
Running period is relatively long, we dont need to worry about the overhead of building circuit
connection. If the network traffic is predicted to be bursty, then we should use packet--switched
Network to prevent network from wasting unused time sessions.

b. Congestion control algorithm is still needed in situations such as TCP protocol runs on a poorly
connected network. In such case, a large amount of retransmission is required which may exceed
the capacity of each and every link.
Q3.

In this problem, we consider sending realtime voice from Host A to Host B over a packet
switched network (VoIP). Host A converts analogue voice to a digital 64 kbps bit stream on
the fly. Host A then groups the bits into 56byte packets. There is one link between Hosts A
and B; its transmission rate is 2 Mbps and its propagation delay is 10 msec. As soon as Host
A gathers a packet, it sends it to Host B. As soon as Host B receives an entire packet, it
converts the packets bits to an analogue signal. How much time elapses from the time a bit is
created (from the original analogue signal at Host A) until the bit is decoded (as part of the
analogue signal at Host B)?

Q4.

Suppose there is exactly one packet switch between a sending host and a receiving host. The
transmission rates between the sending host and the switch and between the switch and the
receiving host are R1 and R2, respectively. Assuming that the switch uses store-and-forward
packet switching, what is the total end-to-end delay to send a packet of length L? (Ignore
queuing, propagation delay, and processing delay.)
Solution 4: At time t0 the sending host begins to transmit. At time t1 = L/R1, the sending
host completes transmission and the entire packet is received at the router (no
propagation delay). Because the router has the entire packet at time t1, it can begin to
transmit the packet to the receiving host at time t1. At time t2 = t1 + L/R2, the router
completes transmission and the entire packet is received at the receiving host (again, no
propagation delay). Thus, the end-to-end delay is L/R1 + L/R2.

Q5. 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. (See the discussion of
statistical multiplexing in Section 1.3.)
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.
Solution 5: a) 2 users can be supported because each user requires half of the link bandwidth.
b) Since each user requires 1Mbps when transmitting, if two or fewer users transmit
simultaneously, a maximum of 2Mbps will be required. Since the available bandwidth of the
shared link is 2Mbps, there will be no queuing delay before the link. Whereas, if three users
transmit simultaneously, the bandwidth required will be 3Mbps which is more than the available
bandwidth of the shared link. In this case, there will be queuing delay before the link.
c) Probability that a given user is transmitting = 0.2

d) Probability that all three users are transmitting simultaneously =


= (0.2)3 = 0.008. Since the queue grows when all the users are transmitting, the
fraction of time during which the queue grows (which is equal to the probability that
all three users are transmitting simultaneously) is 0.008.
OR

Q6.

Q7.

Suppose end system A wants to send a large file to end system B. At a very high level,
describe how end system A creates packets from the file. When one of these packets arrives to
a packet switch, what information in the packet does the switch use to determine the link onto
which the packet is forwarded? Why is packet switching in the Internet analogous to driving
from one city to another and asking directions along the way?
Solution 6: End system A breaks the large file into chunks. To each chunk it adds a header,
generating multiple packets from the file. The header in each packet includes the address of
the destination: end system B. The packet switch uses the destination address to determine
the outgoing link. Asking which road to take is analogous to a packet asking which outgoing
link it should be forwarded on, given the packets address. (The driving analogy is discussed
on page 23 of your textbook.)
Equation 1.1 gives a formula for the end-to-end delay of sending one packet of length L over
N links of transmission rate R. Generalize this formula for sending P such packets back-toback over the N links. P3. Consider an application that transmits data at a steady rate (for
example, the sender generates an N-bit unit of data every k time units, where k is small and
fixed). Also, when such an application starts, it will continue running 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-switched 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?
Solution 7: The general case of sending one packet from source to destination over a path
consisting of N links each of rates R. so, the end-to-end delay (d) = N(L/R)
one packet = the end-to-end delay (d) = N(L/R)
P packets = d1
one packet x d1 = d x p
1 x d1 = [N(L/R)] x P

therefore, the end-to-end delay is


d1 = [N(L/R)] x P

Q8.

Consider the circuit-switched network in Figure 1.13. Recall that there are 4 circuits on each
link. Label the four switches A, B, C and D, going in the clockwise direction.

a. What is the maximum number of simultaneous connections that can be in progress at any one
time in this network?
b. Suppose that all connections are between switches A and C. What is the maximum number of
simultaneous connections that can be in progress?
c. 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 8: a. 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. We can 4
connections passing through the switch in the upper-right-hand corner and another 4
connections passing through the switch in the lower-lefthand corner, giving a total of 8
connections. c. 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.
Q9.

In modern packet-switched networks, including the Internet, the source host segments long,
application-layer messages (for example, an image or a music file) into smaller packets and
sends the packets into the network. The receiver then reassembles the packets back into the
original message. We refer to this process as message segmentation. Figure 1.27 illustrates
the end-to-end transport of a message with and without message segmentation. Consider a
message that is 8 106 bits long that is to be sent from source to destination in Figure 1.27.
Suppose each link in the figure is 2 Mbps. Ignore propagation, queuing, and processing
delays.

a. Consider sending the message from source to destination without message segmentation. How
long does it take to move the message from the source host to the first packet switch?
Keeping in mind that each switch uses store-and-forward packet switching, what is the total
time to move the message from source host to destination host?
b. Now suppose that the message is segmented into 800 packets, with each packet being 10,000
bits long. How long does it take to move the first packet from source host to the first switch?
When the first packet is being sent from the first switch to the second switch, the second
packet is being sent from the source host to the first switch. At what time will the second
packet be fully received at the first switch?
c. How long does it take to move the file from source host to destination host when message
segmentation is used? Compare this result with your answer in part (a) and comment.
d. In addition to reducing delay, what are reasons to use message segmentation?

Q10. Suppose users share a 3 Mbps link. Also suppose each user requires 150 kbps when
transmitting, but each user transmits only 10 percent of the time. (See the discussion of packet
switching versus circuit switching in Section 1.3.)
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 120 users. Find the probability that at any given time, exactly n users
are transmitting simultaneously. (Hint: Use the binomial distribution.)
d. Find the probability that there are 21 or more users transmitting simultaneously.
Solution 10:

Q11. Consider the discussion in Section 1.3 of packet switching versus circuit switching in which
an example is provided with a 1 Mbps link. Users are generating data at a rate of 100 kbps
when busy, but are busy generating data only with probability p = 0.1. Suppose that the 1
Mbps link is replaced by a 1 Gbps link.
a. What is N, the maximum number of users that can be supported simultaneously under
circuit switching?
b. Now consider packet switching and a user population of M users. Give a formula (in
terms of p, M, N) for the probability that more than N users are sending data.
Q12. Consider a packet of length L which begins at end system A and travels over three links to a
destination end system. These three links are connected by two packet switches. Let di, si, and
Ri denote the length, propagation speed, and the transmission rate of link i, for i = 1, 2, 3. The
packet switch delays each packet by dproc. Assuming no queuing delays, in terms of di, si,
Ri, (i = 1,2,3), and L, what is the total end-to-end delay for the packet? Suppose now the
packet is 1,500 bytes, the propagation speed on all three links is 2.5 108 m/s, the
transmission rates of all three links are 2 Mbps, the packet switch processing delay is 3 msec,
the length of the first link is 5,000 km, the length of the second link is 4,000 km, and the
length of the last link is 1,000 km. For these values, what is the end-to-end delay?

Q13. In the above problem, suppose R1 = R2 = R3 = R and dproc = 0. Further suppose the packet
switch does not store-and-forward packets but instead immediately transmits each bit it
receives before waiting for the entire packet to arrive. What is the end-to-end delay?
Solution 13: Because bits are immediately transmitted, the packet switch does not introduce
any delay; in particular, it does not introduce a transmission delay. Thus,

Q14.

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 queuing delay for the packet? More generally, what is the queuing delay
when all packets have length L, the transmission rate is R, x bits of the currently-beingtransmitted packet have been transmitted, and n packets are already in the queue?
Solution 14: (Solved for 1000bytes and 1mbps link rate )The arriving packet must first wait
for the link to transmit 3,500 bytes or 28,000 bits. Since these bits are transmitted at 1

Mbps, the queuing delay is 28 msec. Generally, the queuing delay is


Q15. 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 queuing delays). Host A
segments the file into segments of S bits each and adds 80 bits of header to each segment,
forming packets of L = 80 + S bits. Each link has a transmission rate of R bps. Find the value
of S that minimizes the delay of moving the file from Host A to Host B. Disregard
propagation delay.

Reference: The questions have been prepared from homework exercises of Computer
Networking a Top down Approach, Sixth Edition

Você também pode gostar