TCPIP协议族第四版第五章答案
CHAPTER 5
IPv4 Addresses
Exercises
1.
a.28 = 256 addresses
b.216 = 65536 addresses
c.264 = 1.846744737 × 1019 addresses
3.310=59,049 addresses
5.
a.0x72220208
b.0x810E0608
c.0xD022360C
d.0xEE220201
7.
a.(8 bits) / (4 bits per hex digits) = 2 hex digits
b.(16 bits) / (4 bits per hex digits) = 4 hex digits
c.(24 bits) / (4 bits per hex digits) = 6 hex digits
9.We use Figure 5.6 (the right table) to find the class:
a.The first byte is 208 (between 192 and 223) →Class C
b.The first byte is 238 (between 224 and 299) →Class D
c.The first byte is 242 (between 240 and 255) →Class E
d.The first byte is 129 (between 000 and 127) →Class A
11.
a.Class is A →netid: 114 and hostid: 34.2.8
b.Class is B →netid: 132.56 and hostid: 8.6
c.Class is C → netid: 208.34.54 and hostid: 12
1
d.Class is E → The address is not divided into netid and hostid.
13.We first change the number of addresses in the range (minus 1) to base 256
2,048 ? 1 = (0.0.7.255)256
We add this number to the first address to find the last address:
First Address:122.12.7.0
Difference (base 256)0.0.7.255
Last Address:122.12.14.255
15.
a.We can apply the first short cut to all bytes here. The result is (22.14.0.0).
b.We can apply the first short cut to all bytes here. The result is (12.0.0.0).
c.We can apply the first short cut to bytes 1and 4; we need to apply the second
short cut to bytes 2 and 3. The result is (14.72.0.0).
d.We can apply the first short cut to bytes 1 and 4; we need to apply the second
short cut to bytes 2 and 3. The result is (28.0.32.0).
17.The first address can be found by ANDing the mask with the IP address as shown
below:
IP Address:25.34.12.56
Mask:255.255.0.0
First Address25.34.0.0
The last address can be found by either adding the number of addresses in the sub-net 232 ? n = 216 or by ORing the complement of the mask with the IP address (see the section on classless addressing because classful addressing is a special case of classless addressing) as shown below:
IP Address:25.34.12.56
Mask Complement:0.0.255.255
Last Address25.34.255.255 19.The first address can be found by ANDing the mask with the IP address as shown
below:
IP Address:202.44.82.16
Mask:255.255.255.192
First Address202.44.82.0
Note that we use the first short cut on the first three bytes. We use the second short cut on the fourth bytes:
16→0+0+0+16+0+0+0+0
192→128+64+32+0+0+0+0+0
0→0+0+0+0+0+0+0+0 The last address can be found by ORing the complement of the mask with the IP address (see the section on classless addressing because classful addressing is a special case of classless addressing) as shown below:
IP Address:202.44.82.16
Mask Complement:0.0.0.63
Last Address202.44.82.127 Note that we use the first short cut on the first three bytes. We use the second short cut on the fourth byte:
在tcpip参考模型中tcp协议工作在16→0+64+32+16+0+0+0+0
63→0+0+32+16+8+4+2+1
127→0+64+32+16+8+4+2+1 21.With the information given, the first address is found by ANDing the host address
with the mask 255.255.0.0 (/16).
Host Address:25.34.12.56
Mask:255.255.0.0
Network Address (First): 25.34.0.0 The last address can be found by ORing the host address with the mask comple-ment 0.0.255.255.
Host Address:25.34.12.56
Mask Complement: 0.0.255.255
Last Address: 25.34.255.255 However, we need to mention that this is the largest possible block with 216 addresses. We can have many small blocks as long as the number of addresses divides this number.
23.
See below. The number of created subnets are equal to or greater than required.
a.log22 = 1Number of 1’s = 1Number of created subnets: 2
b.log262 = 5.95Number of 1’s = 6Number of created subnets: 64
c.log2122 = 6.93Number of 1’s = 7Number of created subnets: 128
d.log2250 = 7.96Number of 1’s = 8Number of created subnets: 256
25.
a.log21024 = 10 Extra 1s = 10 Possible subnets: 1024 Mask: /26
b.232? 26 = 64 addresses in each subnet
c.
First subnet:
The first address is the beginning address of the block.
first address in subnet 1: 130.56.0.0
To find the last address, we need to write 63 (one less than the number of addresses in each subnet) in base 256 (0.0.0.63) and add it to the first address (in base 256).
first address in subnet 1: 130.56.0.0
number of addresses: 0.0.0.63
last address in subnet 1: 130.56.0.63 d.
Last subnet (Subnet 1024):
To find the first address in subnet 1024, we need to add 65,472 (1023 × 64) in base 256 (0.0.255.92) to the first address in subnet 1.

版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系QQ:729038198,我们将在24小时内删除。