ECE 4415/6035: Intro to Computer Networks 1 ECE 4415/6035 – Introduction to Computer Networks Spring 2021 Homework 1 Solutions Assigned: 2/1/’21 Due: 2/8/’21 Prof. Suresh Subramaniam Total points: 50 Reading Assignment: Sections 1.1 – 1.3, 2.1 – 2.3, 3.1 1. (10 points) Suppose a 10 MB file is sent from node A to node B over a link. Assume that the propagation speed of signals on the link is 2×108 m/s. Find the total delay (also called latency) from the start of transmission at A to the end of the reception at node B for the following cases: a. Length of link = 50 km; link rate = 1 Mbps b. Length of link = 100 km; link rate = 500 Mbps c. Length of link = 50 km; link rate = 2 Gbps File size, L = 10 MB = 10 × 220 bytes = 10 × 220 × 8 bits = 83,886,080 bits Signal propagation speed = 2×108 m/s Latency = L/R + d/v a. Distance, d = 50 km = 0.5x105 m; Link rate, R = 106 bps Latency = 83,886,080 /106 + (0.5x105)/(2×108) = 83.88608 + 0.00025 seconds = 83.88633 seconds b. Distance, d = 100 km = 105 m; Link rate, R = 5x108 bps Latency = 83,886,080 /(5x108) + 105/(2×108) = 0.16775 + 0.0005 seconds = 0.16825 seconds c. Distance, d = 50 km = 0.5x105 m; Link rate, R = 2x109 bps Latency = 83,886,080 /(2x109) + (0.5x105)/(2×108) = 0.04194 + 0.00025 seconds = 0.04219 seconds 2. (5 points) Give one sentence descriptions of the main functions of the following layers: a. Network layer: Transfers packets from a host to another host across multiple links b. Data link layer: Transfers frames over a link c. Transport layer: Transfers bytes (or segments) from a process in one host to a process in another host d. Physical layer: Converts bits to signals and transfers them over a link 3. (10 points) An 8x10 image color image has a resolution of 400 pixels per inch for each of the three color frames (R, G, B), and 16 bits/pixel are used. a. What is the size of the image in bytes? ECE 4415/6035: Intro to Computer Networks 2 # of pixels in one color frame = 8×10×400×400 = 12,800,000 pixels # of pixels in all 3 colors = 12,800,000 × 3 = 38,400,000 pixels Since 16 bits/pixel are used, the number of bits would be 16 times the above number, but when converted to bytes, we divide by 8, so: Number of bytes in image = 38,400,000 x 2 bytes = 76,800,000 bytes = 8,533,334 /220 MB ≈ 73.2421875 MB. b. How long does it take to download the image over a: (i) 10 Mbps link, (ii) 1 Gbps link, and (iii) 10 Gbps link? Download time = Size of image / Bit rate (i) Download time = 76,800,000 × 8 / 107 = 61.44 seconds. (ii) Download time = 76,800,000 × 8 / 109 = 0.6144 seconds. (iii) Download time = 76,800,000 × 8 / 1010 = 0. 06144 seconds. That’s better! 4. (5 points) An email message of size 10 KB is sent from host A to host B over a direct link. The various headers have the following sizes (in bytes): AH: 5, TH: 20, NH: 20, DH: 16, and the data-link layer trailer (CRC) is 4 bytes long. How many bits are transmitted over the link (including all overhead bits) from A to B? Also calculate the % of overhead bits. # of bytes in message = 10240. Total size of overhead in bytes = 5 + 20 + 20 + 16 + 4 = 65. Thus, total # of bits transmitted = (10240 + 65) x 8 = 82,440 bits. % of overhead bits = (65/10,305) x 100 = 0.63%. 5. (10 points) A source transmits a signal of power 2 W. The signal traverses a link of length 50 km and is received with a power of P. a. Find the total attenuation over the entire length of the link for P = 0.2 W and P = 0.5 W. P = 0.2W: Attenuation = 10 log (Power at transmitter / Power at receiver) = 10 log (2/0.2) = 10 dB P = 0.5W: Attenuation = 10 log (Power at transmitter / Power at receiver) = 10 log (2/0.5) = 6.02 dB ECE 4415/6035: Intro to Computer Networks 3 b. If the attenuation per unit length is 0.2 dB/km, calculate the received power. Attenuation = 0.2 dB/km × 50 km = 10 dB Power at transmitter = 10 log (2) = 3 dBW Power at receiver = Power at transmitter – Attenuation = -7 dBW 6. (10 points) Find the Shannon capacity for the following channels: a. Bandwidth = 10 MHz, SNR = 40 dB SNR (absolute value) = 10SNR(dB)/10 = 104 = 10000 C = 10 x 106 log2 (1 + 10000) bps = 132.8 x 106 bps = 132.8 Mbps b. Bandwidth = 100 MHz, SNR = 20 dB SNR (absolute value) = 10SNR(dB)/10 = 102 = 100 C = 100 x 106 log2 (1 + 100) bps = 6.65 x 108 bps = 665 .8 Mbps c. Bandwidth = 100 MHz, SNR = 5000 C = 100 x 106 log2 (1 + 5000) bps = 1228 x 106 bps = 1228 Mbps
欢迎咨询51作业君