Computer Network and Communication

Computer Networks

Chapter 1 problems:

Question 1:

Imagine that you have trained your St. Bernard, Bernie, to carry a box of three 8mm tapes instead of a flask of brandy. (When your disk fills up, you consider that an emergency.) These tapes each contain 7 gigabytes. The dog can travel to your side, wherever you may be, at 18 km/hour. For what range of distances does Bernie have a higher data rate than a transmission line whose data rate (excluding overhead) is 150 Mbps?

Answer:

The dog can carry 3 * 7 = 21 gigabytes (168 gigabits)
Speed = 18 km/hour = 0.005 km/sec
Distance: x km
Time: x / 0.005 = 200x sec
Hence, 168 / 200x Gbps or 840 / x Mbps.
For x < 5.6 km, the dog has higher rate than the communication line.

Question 6:

A client-server system uses a satellite network, with the satellite at a height of 40,000 km. What is the best-case delay in response to a request?

Answer:

Request distance: 40000 * 2 = 80000 km
Response distance: 40000 * 2 = 80000 km
Total distance: 80000 + 80000 = 160000 km
The speed of light: 300000 km/sec
Delay: 160000 / 300000 = 533 msec

Question 10:

A disadvantage of a broadcast subnet is the capacity wasted when multiple hosts attempt to access the channel at the same time. As a simplistic example, suppose that time is divided into discrete slots, with each of the n hosts attempting to use the channel with probability p during each slot. What fraction of the slots are wasted due to collisions?

Answer:

There are two situations without collisions.
1. Successful transmission. n * p * (1 - p) ^ (n - 1)
2. All stations are idle. (1 - p) ^ n
Hence, the fraction that are wasted is
1 - n * p * (1 - p) ^ (n - 1) - (1 - p) ^ n

Question 20:

A system has an n-layer protocol hierarchy. Applications generate messages of length M bytes. At each of the layers, an h-byte header is added. What fraction of the network bandwidth is filled with headers?

Answer:

The total number of header bytes: n * h
The total packet size: n * h + M
Hence, the fraction of each packet used by protocol header is 
[n * h / (M + n * h)]

Question 27:

How long was a bit on the original 802.3 standard in meters? Use a transmission speed of 10 Mbps and assume the propagation speed in coax is 2/3 the speed of light in vacuum.

Answer:

The speed of light in coax: 200000 km/sec (200 meter/μsec).
At 10Mbps, it takes 0.1μsec to transmit a bit.
0.1 * 200 = 20 meters.
Hence, a bit is 20 meters long here.

Question 28:

An image is 1024 x 768 pixels with 3 bytes/pixel. Assume the image is uncompressed. How long does it take to transmit it over a 56-kbps modem channel? Over a 1-Mbps cable modem? Over a 10-Mbps Ethernet? Over 100-Mbps Ethernet?

Answer:

The image is 1024 * 768 * 3 = 2359296 bytes = 18874368 bits
a. 56-kbps: 337.042 sec
b. 1-Mbps: 18.874 sec
c. 10-Mbps: 1.887 sec
d. 100-Mbps: 0.189 sec

Data and computer communication

Chapter 2 problems:

Question 2:

a.The French and Chinese prime ministers need to come to an agreement by telephone, but neither speaks the other’s language. Further, neither has on hand a translator that can translate to the language of the other. However, both prime ministers have English translators on their staffs. Draw a diagram similar to Figure 2.12 to depict the situation, and describe the interaction and each level.

b. Now suppose that the Chinese prime minister’s translator can translate only into Japanese and that the French prime minister has a German translator available. A translator between German and Japanese is available in Germany. Draw a new diagram that reflects this arrangement and describe the hypothetical phone conversation.

Answer:

a. Picture

----------------------           ----------------------
|Chinese prime ministers|        |French prime ministers|
-----------------------          ----------------------
|  Chinese Translator   |        |   French Translator  |
-----------------------          ----------------------
|        Telephone      |        |     Telephone        |
---------------------------------------------------------
                       Telephone Line
---------------------------------------------------------

b. Picture

----------------                           -----------------
|China  ministers|                         |French ministers |
 -----------------   -------------------    -----------------
|China Translator|  |Germany Translator |  |French Translator|
 -----------------   -------------------    -----------------
|   Telephone    |  |Telephone|Telephone|  |     Telephone   |
 ------------------------------------------------------------
  Chinese and German                        French and German
    Telephone Line                            Telephone Line
  ------------------                        -----------------

Question 3:

List the major disadvantages with the layered approach to protocols.

Answer:

The layered protocols may cause the processing and data overhead. And with so many layers, it takes a long time to develop and promulgate the standards.

Question 4:

Two blue armies are each poised on opposite hills preparing to attack a single red army in the valley. The red army can defeat either of the blue armies separately but will fail to defeat both blue armies if they attack simultaneously. The blue armies communicate via an unreliable communications system (a foot soldier). The commander with one of the blue armies would like to attack at noon. His problem is this: If he sends a message to the other blue army, ordering the attack, he cannot be sure it will get through. He could ask for acknowledgment, but that might not get through. Is there a protocol that the two blue armies can use to avoid defeat?

Answer:

No. There is no way to be assured that the last message gets through, except by acknowledging it.