Tutorial 1

Chapter 1 - Computer networks and the internet

Question 1

Compare and contrast packet switching and circuit switching.

Answer

Packet switching and circuit switching represent two fundamentally different approaches to data transmission in networks. In packet switching, as used in the Internet data is broken into smaller packets that can travel independently through the network. These packets share network resources with other users’ data, making efficient use of available capacity.When I send an email, for example, the message might be split into several packets, each finding its own path to the destination.

Circuit switching, on other hand, establishes a dedicated path between sender and receiver before any data transfer begins - much like traditional telephone calls. This path remains reserved for the entire duration of the communication, whether data is being transmitted or not. Think of it as having private highway lane reserved just for you, even if you are not using it continuously.

The key differences manifest in several ways. Packet switching tends to be more efficient for bursty data traffic, as resources are only used when needed. However, this can lead to variable delay and possible packet loss during congestion. Circuit switching provides guaranteed quality once a connection is established but can be less efficient since resources remain allocated even during silent periods.

From a cost perspective, packet switching generally proves more economical for data networks because it allows statistical multiplexing - essentially sharing resource among many users. Circuit switching, while more expensive due to dedicate resource allocation, excels in applications requiring constant data rates and minimal delay variation, like traditional voice calls.

Question 2

Do you agree that a traffic intensity of greater than 0.8 indicates congestion? Explain your answer.

Answer

No, I wouldn’t necessarily agree that a traffic intensity above 0.8 automatically indicates congestion. While it is true that 0.8 is often used as a warning threshold in network planning.

Question 3

This elementary problem begins to explore propagation delay and transmission delay, two central concepts in data networking. Consider two hosts, AA and BB, connected by a single lik of rate RR bps. Suppose that the two hosts are separated by mm meters, and suppose the propagation speed along the link is ss meters/sec. Host A is to send a packet of size LL bits to Host BB

Question 3a

Express the propagation delay, ddropd_{drop}, in terms of LL and RR

Answer

The propagation delay dpropd_{prop} is time taken for a bit to travel from source to destination over a distance mm at propagation speed ss. Therefore, dprop=ms d_{prop} = \frac{m}{s}

Question 3b

Determine the transmission time of packet, dtransd_{trans}, in terms of LL and RR

Answer

The transmission time dtransd_{trans} is the time needed to push all LL bits of the packet into the link at rate RR bits per seconds. Therefore, dtrans=LR d_{trans} = \frac{L}{R}

Question 3c

Ignoring processing and queuing delays, obtain an expression for the end-to-end delay.

Answer

The total end-to-end delay is simply the sum of propagation delay and transmission time dtotal=dprop+dtrans=ms+LRd_{total} = d_{prop} + d_{trans} = \frac{m}{s} + \frac{L}{R}

Question 3d

Suppose Host AA begins to transmit the packet at time t=0t = 0. At time t=dtranst=d_{trans}, where is the last bit of the packet?

Answer

At the time t=dtranst = d_{trans}, the last bit has just been transmitted and is at the beginning of the link at Host AA’s end. It hasn’t started its propagation journey yet.

Question 3e

Suppose dpropd_{prop} is greater than dpropd_{prop}. At time t=dtranst = d_{trans}, where is the first bit of the packet

Answer

When dprop>dtransd_{prop} > d_{trans}, the first bit is still traveling along the link and hasn’t reached Host BB yet. The exact position would be at (sdtranss \cdot d_{trans}) meters from the source.

Question 3f

Suppose dpropd_{prop} is less than dtransd_{trans}. At the time t=dtranst = d_{trans}, where is first bit of the packet?

Answer

When dprop<dtransd_{prop} < d_{trans}, at the time t=dtranst = d_{trans}, the first bit has already arrived at the Host BB, while the last bit is just begging its journey from Host AA

Question 3g

Suppose s=2.5108,L=120:bits,:and:R=56:kbpss = 2.5 \cdot 10^{8}, L = 120 : bits,:and:R = 56:kbps. Find the distance mm so that dpropd_{prop} equals dtransd_{trans}.

Answer

Since we want dprop=dtransd_{prop} = d_{trans}, we can write ms=LR\frac{m}{s} = \frac{L}{R}. Solving for mm: m=(sL)R m = \frac{(s \cdot L)}{R} Substitute values: m=2.510812056103=535714.285714 meters or 536 km m = \frac{2.5 \cdot 10^{8} \cdot 120}{56 \cdot 10^{3}} = \text{535714.285714 meters or 536 km}

Question 4

Suppose that there a M{M} client-server pairs. Denote Rs,RcR_s, R_c and RR for the rates of the server links, client links, and network link. Assume all other links have abundant capacity and that there is no other traffic in the network besides the traffic generated by MM client-server pairs. Derive general expression for throughput in terms of Rc,RcR_c, R_c

Answer

The key here is to understand that bottleneck could occur at three different points:

  1. The server’s upload link (RsR_s)
  2. The client’s download link (RcR_c)
  3. The network link that all traffic must share RM\frac{R}{M} since M{M} pairs share it

The throughput will be limited by the minimum of three rates min(Rs,Rc,RM)\min({R_s},{R_c},{\frac{R}{M}}) This is because:

  • Each server can upload at rate RsR_s
  • Each client can download at rate RcR_c
  • The network link with capacity RR must be share among MM pairs, so each pair gets RM\frac{R}{M}

Question 5

Suppose two host, AA and BB, are separated by 20 000 kilometers and connected by a direct link of R=2:MbpsR = 2:Mbps. Suppose, the propagation speed over link is 2.51082.5 \cdot 10^{8} meters/sec

Question 5a

Calculate the bandwidth-delay product, Rdprop{R \cdot d{prop}}

Answer

First, let’s calculate dpropd_{prop} dprop=distancespeed d_{prop} = \frac{distance}{speed} therefore dprop=20,000,0002.5108=0.08 seconds d_{prop} = \frac{20,000,000}{2.5 \cdot 10^{8}} = \text{0.08 seconds}