1. Computer Networks (CIE 447)
Problem set – Chapter 5
Dr. / Samy Soliman
T. A. :Eng. Menna Mohamed
:Eng. Nourhan Tarek
CIE 447- SPRING 2020
2. Chapter 1 - Additional problem 2
In a network, a host sends bits at a rate of 100 Kbps. The host’s modem uses 4-FSK.
1) Find the signaling rate and the required bandwidth
Bit rate = signaling rate * bits per signal element
100000 = 𝑆 ∗ log2 4
∴ 𝑆 = 50000 𝑠𝑖𝑔𝑛𝑎𝑙𝑠 𝑝𝑒𝑟 𝑠𝑒𝑐𝑜𝑛𝑑
2) Find the channel capacity if it is noise-free
∵ 𝐵 =
𝑀
2𝑇𝑠
=
𝑀
2
∗ 𝑆 =
4
2
∗ 50000 = 100000 𝑏𝑝𝑠
𝐶 = 2 𝐵 log2 𝑀 = 2 ∗ 100000 ∗ log2 4 = 400000 bps
CIE 447- SPRING 2020 2
3. Chapter 1 - Additional problem 2
In a network, a host sends bits at a rate of 100 Kbps. The host’s modem uses 4-FSK.
3) Find the channel capacity if the SNR = 20 dB
∵ 𝑆𝑁𝑅𝑑𝐵 = 10 log 𝑆𝑁𝑅
∵ 20 = 10 log 𝑆𝑁𝑅
∴ 𝑆𝑁𝑅 = 102
= 100
𝐶 = 𝐵 log2(1 + SNR) = 100000 ∗ log2(1 + 100) = 665821 bps
CIE 447- SPRING 2020 3
4. Chapter 1 - Additional problem 3
Consider a communication link with a length of 10 Km, attenuation of 2.5 dB/Km, bandwidth of
10 MHz, propagation speed of 200m/µs and noise PSD of 10−8
Watt/Hz. A signal of power 1
Watt was transmitted over the link. Find:
1) The maximum bit rate of the signal
i. ∵ 𝑃𝑠 = 10 log
𝑃𝑡𝑥
𝑃𝑟𝑥
2.5 ∗ 10 = 10 ∗ log
1
𝑃𝑟𝑥
∴ 𝑃𝑟𝑥 = 3.16 ∗ 10−3 𝑊𝑎𝑡𝑡
ii. ∵ 𝑃𝑛𝑜𝑖𝑠𝑒 = 10−8
∗ 10 ∗ 1000 = 10−4
Watt
iii. ∵ 𝑆𝑁𝑅 =
𝑃𝑟𝑥
𝑃𝑛𝑜𝑖𝑠𝑒
=
3.16 ∗10−3
10−4 = 31.6
∴ 𝐶 = 𝐵 log2 1 + SNR = 10 ∗ 1000 ∗ log2 1 + 31.6 = 50268 𝑏𝑝𝑠
CIE 447- SPRING 2020 4
5. Chapter 1 - Additional problem 3
Consider a communication link with a length of 10 Km, attenuation of 2.5 dB/Km, bandwidth of
10 MHz, propagation speed of 200m/µs and noise PSD of 10−8
Watt/Hz. A signal of power 1
Watt was transmitted over the link. Find:
2) The propagation delay for one-way trip
𝑑𝑝𝑟𝑜𝑝 =
𝑙𝑒𝑛𝑔𝑡ℎ
𝑠𝑝𝑒𝑒𝑑
=
10 ∗1000
200 ∗1∗106 = 5 ∗ 10−5𝑠𝑒𝑐𝑜𝑛𝑑𝑠.
CIE 447- SPRING 2020 5
6. Chapter 1 - Additional problem 3
Consider a communication link with a length of 10 Km, attenuation of 2.5 dB/Km, bandwidth of
10 MHz, propagation speed of 200m/µs and noise PSD of 10−8
Watt/Hz. A signal of power 1
Watt was transmitted over the link. Find:
3) The transmission delay of a 20 MByte message
𝑑𝑡𝑟𝑎𝑛𝑠 =
𝑠𝑖𝑧𝑒 𝑜𝑓 𝑡ℎ𝑒 𝑝𝑎𝑐𝑘𝑒𝑡
𝑡𝑟𝑎𝑛𝑠𝑚𝑖𝑠𝑠𝑖𝑜𝑛 𝑟𝑎𝑡𝑒
=
20 ∗1024 ∗1024 ∗8
𝐶
= 3337.5 𝑠𝑒𝑐𝑜𝑛𝑑𝑠
4) The total delay that the previous message experiences
𝑑𝑡𝑜𝑡𝑎𝑙 = 𝑑𝑝𝑟𝑜𝑐 + 𝑑𝑞𝑢𝑒𝑢𝑒 + 𝑑𝑡𝑟𝑎𝑛𝑠 + 𝑑𝑝𝑟𝑜𝑝 = 0 + 0 + 5 ∗ 10−5 + 3337.5 = 3337.5 seconds
CIE 447- SPRING 2020 6
8. Problem 2
Show (give an example other than the one in Figure 5.5) that two-dimensional parity checks
can correct and detect a single bit error. Show (give an example of) a double-bit error that can be
detected but not corrected.
CIE 447- SPRING 2020 8
9. Problem 3
Suppose the information portion of a packet (D in
Figure 5.3) contains 10 bytes consisting of the 8-bit
unsigned binary ASCII representation of string
“Networking.” Compute the Internet checksum for this
data.
CIE 447- SPRING 2020 9
N e t w o r k i n g
078 101 116 119 111 114 107 105 110 103
0100 1110 0110 0101 0111 0100 0111 0111 0110 1111 0111 0010 0110 1011 0110 1001 0110 1110 01100111
10. Problem 3
Suppose the information portion of a packet (D in
Figure 5.3) contains 10 bytes consisting of the 8-bit
unsigned binary ASCII representation of string
“Networking.” Compute the Internet checksum for this
data.
CIE 447- SPRING 2020 10
078 101 116 119 111 114 107 105 110 103
0100 1110 0110 0101 0111 0100 0111 0111 0110 1111 0111 0010 0110 1011 0110 1001 0110 1110 01100111
11. Problem 3
Suppose the information portion of a packet (D in
Figure 5.3) contains 10 bytes consisting of the 8-bit
unsigned binary ASCII representation of string
“Networking.” Compute the Internet checksum for this
data.
CIE 447- SPRING 2020 11
078 101 116 119 111 114 107 105 110 103
0100 1110 0110 0101 0111 0100 0111 0111 0110 1111 0111 0010 0110 1011 0110 1001 0110 1110 01100111
12. Problem 4 (*)
Consider the previous problem, but instead suppose these 10 bytes contain
a. the binary representation of the numbers 1 through 10.
b. the ASCII representation of the letters B through K (uppercase).
c. the ASCII representation of the letters b through k (lowercase).
Compute the Internet checksum for this data.
CIE 447- SPRING 2020 12
13. Problem 5(*)
Consider the 7-bit generator, G=10011, and suppose that D has the value 1010101010. What is
the value of R?
CIE 447- SPRING 2020 13
14. Problem 6(*)
Consider the previous problem, but suppose that D has the value
a. 1001010101.
b. 0101101010.
c. 1010100000.
CIE 447- SPRING 2020 14
15. Problem 8
a. Recall that when there are N active nodes, the efficiency of slotted ALOHA 𝑁𝑝(1 – 𝑝)𝑁−1 . Find
the value of p that maximizes this expression.
b. Using the value of p found in (a), find the efficiency of slotted ALOHA by letting N approach
infinity.
Hint: (1 – 1/𝑁)𝑁 approaches 1/e as N approaches infinity
CIE 447- SPRING 2020 15
16. Problem 9(*)
Show that the maximum efficiency of pure ALOHA is 1/(2e).
Note: the efficiency of pure ALOHA 𝑁𝑝(1 – 𝑝)2(𝑁−1)
CIE 447- SPRING 2020 16
17. Problem 10
Consider two nodes, A and B, that use the slotted ALOHA protocol to contend for a channel.
Suppose node A has more data to transmit than node B, and node A’s retransmission probability
𝑝𝐴 is greater than node B’s retransmission probability, 𝑝𝐵 .
a. Provide a formula for node A’s average throughput. What is the total efficiency of the protocol
with these two nodes?
b. If 𝑝𝐴 = 2 𝑝𝐵, is node A’s average throughput twice as large as that of node B?
Why or why not? If not, how can you choose 𝑝𝐴 and 𝑝𝐵 to make that happen?
c. In general, suppose there are N nodes, among which node A has retransmission probability 2p
and all other nodes have retransmission probability
Provide expressions to compute the average throughputs of node A and of any other node.
CIE 447- SPRING 2020 17
18. Problem 11(*)
Suppose four active nodes—nodes A, B, C and D—are competing for access to a channel using
slotted ALOHA. Assume each node has an infinite number of packets to send. Each node
attempts to transmit in each slot with probability p. The first slot is numbered slot 1, the second
slot is numbered slot 2, and so on.
a. What is the probability that node A succeeds for the first time in slot 5?
b. What is the probability that some node (either A, B, C or D) succeeds in slot 4?
c. What is the probability that the first success occurs in slot 3?
d. What is the efficiency of this four-node system?
CIE 447- SPRING 2020 18
19. Problem 12(*)
Graph the efficiency of slotted ALOHA and pure ALOHA as a function of p for the following
values of N:
a. N = 15.
b. N = 25.
c. N = 35.
CIE 447- SPRING 2020 19
20. Problem 14
Consider three LANs interconnected by two routers.
a. Assign IP addresses to all of the interfaces. For Subnet 1 use addresses of the form
192.168.1.xxx; for Subnet 2 uses addresses of the form 192.168.2.xxx; and for Subnet 3 use
addresses of the form 192.168.3.xxx.
b. Assign MAC addresses to all of the adapters.
CIE 447- SPRING 2020 20
22. Problem 14
Consider three LANs interconnected by two routers.
c. Consider sending an IP datagram from Host E to Host B. Suppose all of the ARP tables are up
to date. Enumerate all the steps.
d. Repeat (c), now assuming that the ARP table in the sending host is empty
(and the other tables are up to date).
CIE 447- SPRING 2020 22
23. Problem 17
Recall that with the CSMA/CD protocol, the adapter waits K * 512 bit times after a collision,
where K is drawn randomly. For K = 100,
how long does the adapter wait until returning to Step 2 for a 10 Mbps broadcast channel?
For a 100 Mbps broadcast channel?
CIE 447- SPRING 2020 23