资源描述
For each of the following IP addresses, what does the router do if a packet with that address arrives?
a. 135.46.63.10
b. 135.46.57.14
c. 135.46.52.2
d. 192.53.40.7
e. 192.53.56.7
43. A router has the following (CIDR) entries in its routing table:
Address/mask
Next hop
135.46.56.0/22
Interface 0
135.46.60.0/22
Interface 1
192.53.40.0/23
Router 1
default
Router 2
Solution:
22 = 16 + 6 ; 23 =16 + 7
Interface0 : 56=0011,1000 ~ 0011,10 11 = 59 (56 ~59)
Interface1 : 60=0011,1100 ~ 0011,11 11= 63 (60~63)
Router1 : 40=0010,1000 ~ 0010,10 01=41(40 ~41)
Router2 : Default
A router has the following (CIDR) entries in its routing table:
Address/mask Next hop
135.46.56.0/22 Interface 0 135.46.56 ~135.46.59
135.46.60.0/22 Interface 1 135.46. 60 ~ 135.46.63
192.53.40.0/23 Router 1 192.53.40 ~192.53.41
Default Router 2
(a) Interface 1
(b) Interface 0
(c) Router 2
(d) Router 1
(e) Router 2
17. Sketch the Manchester encoding for the bit stream: 0001110101.
Solution:
17. The signal is a square wave with two values, high (H) and low (L). The pattern is LHLHLHHLHLHLLHHLLHHL.
LH:0 HL:1 X坐标time Y坐标Amplitude
9. Sixteen-bit messages are transmitted using a Hamming code. How many check bits are needed to ensure that the receiver can detect and correct single bit errors? Show the bit pattern transmitted for the message 1101001100110101. Assume that even parity is used in the Hamming code.
2^r>=k+r+1
K为信息位,为16位
r为校验位,则r=5满足条件
在1,2,4,8,16位插入校验位
检查校验位1的个数,为偶数则设置为0,为奇数设置为1
— — 1—1 0 1 — 0 0 1 1 0 0 1— 1 0 1 0 1
共21位
— — 1—1 0 1 — 0 0 1 1 0 0 1— 1 0 1 0 1
第一位 校验 3,5,7,9,11,13,15,17,19,21
1的个数为8,即偶数,则第一位设置为0
— — 1—1 0 1 — 0 0 1 1 0 0 1— 1 0 1 0 1
第二位 校验3, 6,7, 10,11, 14,15, 18,19
1的个数为5,即奇数,则第二位设置为1
— — 1—1 0 1 — 0 0 1 1 0 0 1— 1 0 1 0 1
第四位 校验5, 6,7, 12,13,14,15, 20,21
1的个数为5,即奇数,则第四位设置为1
第八位 校验9, 10,11, 12,13,14,15
— — 1—1 0 1 — 0 0 1 1 0 0 1— 1 0 1 0 1
1的个数为3,即奇数,则第八位设置为1
第十六位 校验 17,18,19,20,21
— — 1—1 0 1 — 0 0 1 1 0 0 1— 1 0 1 0 1
1的个数为3,即奇数,则第十六位设置为1
则校验位为 0 1 1 1 1
发送数据为
0 1 1 1 1 0 1 1 0 0 1 1 0 0 1 1 1 0 1 0 1
(a) Character count. 1+4 —>2#
(b) Flag bytes with byte stuffing. 首位FLAG 中间加ESC
(c) Starting and ending flag bytes, with bit stuffing. 首位FLAG 中间满五1加0
15. A bit stream 10011101 is transmitted using the standard CRC method described in the text. The generator polynomial is . Show the actual bit string transmitted. Suppose the third bit from the left is inverted during transmission. Show that this error is detected at the receiver's end.
Solution
15. The frame is 10011101. The generator is 1001. The message after appending three zeros is 10011101000. The remainder on dividing 10011101000 by 1001 is 100. So, the actual bit string transmitted is 10011101100. The received bit stream with an error in the third bit from the left is 10111101100.Dividing this by 1001 produces a remainder 100, which is different from zero. Thus, the receiver detects the error and can ask for a retransmission.
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?
Solution:
The image is 1024*768*3=2,359,296 bytes=18,874,368bits.
At 56,000 bits/sec, it takes about 337.042 sec. At 1,000,000 bits/sec, it takes about 18.874 sec.
At 10,000,000 bits/sec, it takes about 1.887 sec. At 100,000,000 bits/sec, it takes about 0.189 sec.
28. Ten signals, each requiring 4000 Hz, are multiplexed on to a single channel using FDM. How much minimum bandwidth is required for the multiplexed channel? Assume that the guard bands are 400 Hz wide.
Solution:
28. There are ten 4000 Hz signals. We need nine guard bands to avoid any interference.
The minimum bandwidth required is 4000 *10 +400 *9 =43,600 Hz.
30. What is the percent overhead on a T1 carrier; that is, what percent of the 1.544 Mbps are not delivered to the end user?
Solution:
30. The end users get 7 *24 =168 of the 193 bits in a frame. The overhead is therefore 25/193 = 13%.
1.544Mbps*13%≈0.2Mbps are not delivered to the end user.
53. A CDMA receiver gets the following chips: (-1 +1 -3 +1 -1 -3 +1 +1). Assuming the chip sequences defined in Fig. 2-45(b), which stations transmitted, and which bits did each one send?
Solution:
S=(-1 +1 -3 +1 -1 -3 +1 +1)
A=(-1 -1 -1 +1 +1 –1 +1 +1) B=(-1 –1 +1 –1 +1 +1 +1 -1)
C=(-1 +1 -1 +1 +1 +1 -1 -1) D=(-1 +1 –1 –1 –1 –1 +1 -1)
So
A·S=(+1-1+3+1-1+3+1+1)/8=1 B·S=(+1-1-3-1-1-3+1-1)/8= -1
C·S=(+1+1+3+1-1-3-1-1)/8=0 D·S=(+1+1+3-1+1+3+1-1)/8=1
So, A and D send 1 bit, B send 0 bit, C didn’t send.
14. What is the remainder obtained by dividing by the generator polynomial ?
Solution:
除数被除数换成2# 除数的为数-1 是加在被除数后面0的个数 相除 余数转换成多项式
The remainder is
38. Convert the IP address whose hexadecimal representation is C2 2F 15 82 to dotted decimal notation.
Solution: 16#—>2#—>10#
11000010, 00101111, 00010101, 10000010 —> 194.47.21.130
39. A network on the Internet has a subnet mask of 255.255.240.0. What is the maximum number of hosts it can handle?
Solution: ip—>2# 数0的个数=n the maximum number of hosts is 2^n-2
The mask is 20 bits long, so the network part is 20 bits. The remaining 12 bits are for the host, so 4096 host addresses exist. Normally, the host address is 4096-2=4094. Because the first address be used for network and the last one for broadcast.
40. A large number of consecutive IP address are available starting at 198.16.0.0. Suppose that four organizations, A, B, C, and D, request 4000, 2000, 4000, and 8000 addresses, respectively, and in that order. For each of these, give the first IP address assigned, the last IP address assigned, and the mask in the w.x.y.z/s notation.
Solution:
(1) 211 = 2048 212 = 4096 213 = 8192 ;
12 bits for A , C 32-12 =20 bits for network ID
11bits for B 32-11 =21 bits for network ID
13bits for D 32-13 =19 bits for network ID
(2) Default Class C address 8 bits can hosts 256 host
A: 4000/256 = 15.xxxx —>16 —> 0 ~ 15(0+16-1)
B: 2000/256 = 7.xxxx —>8 —>16 ~ 23(16+8-1)
C: 4000/256 = 15.xxxx —>16—>24 ~ 39(24+16-1)
D: 8000/256 = 31.xxxx —>32 —>40 ~ 71 (40+32-1)
Address scope
A: 198.16.0.0 ~ 198.16.15.255 B: 198.16.16.0 ~ 198.16.23.255
C: 198.16.24.0 ~ 198.16.39.255 D: 198.16.40.0 ~ 198.16.71.255
CIDR Denote
A: 198.16.0.0 / 20 B: 198.16.16.0/21 C: 198.16.24.0/20 D: 198.16.40.0/19
41. A router has just received the following new IP addresses: 57.6.96.0/21, 57.6.104.0/21, 57.6.112.0/21, and 57.6.120.0/21. If all of them use the same outgoing line, can they be aggregated? If so, to what? If not, why not?
Solution:
96 011 0,0000 011 3bits same
104 011 0,1000 57.6. 8+8=16bits same
112 011 1,0000 16 + 3 = 19 same
120 011 1,1000 They can be aggregated to 57.6.96/19.
2-3.Television channels are 6 MHz wide. How many bits/sec can be sent if four-level digital signals are used? Assume a noiseless channel.
Solution:
Maximum data rate = 2 H log2V =2*6 *log 2 4 =24Mbits/s
2-4.If a binary signal is sent over a 3-KHz channel whose signal-to-noise ratio is 20 dB, what is the maximum achievable data rate?
Solution:
signal-to –noise ratio is 20 Db=10lgS/N . S/N=100
Maximum number of bits/sec= H log 2(1+S/N) =3* log 2(1+100)=3*6.658=19.98Kbps
展开阅读全文