TCPIP协议族第四版课后答案.pdf_第1页
TCPIP协议族第四版课后答案.pdf_第2页
TCPIP协议族第四版课后答案.pdf_第3页
TCPIP协议族第四版课后答案.pdf_第4页
TCPIP协议族第四版课后答案.pdf_第5页
已阅读5页,还剩97页未读 继续免费阅读

TCPIP协议族第四版课后答案.pdf.pdf 免费下载

版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领

文档简介

1 CHAPTER 1 Introduction Exercises 1. As of January 2009, the RFC with the highest number is RFC 5459, titled RTP Pay- load Format Update. 3. RFC 2014: This RFC discusses the IRTF working group guidelines and proce- dures. 5. RFC 3692 and RFC 1410 are two examples of experimental RFCs. 7. The main RFC for FTP is RFC 959 that has become the standard STD0009. 9. The main RFC related to TCP is RFC 793 (J. Postel) that has become the standard STD0007. 2 1 CHAPTER 2 The OSI Model and the TCP/IP Protocol Suite Exercises 1. The International Standards Organization (ISO) is a multinational body dedicated to worldwide agreement on international standards. An ISO standard that covers all aspects of network communications is the Open Systems Interconnection (OSI) model. 3. a. Transport layer b. Network layer c. Data link layer d. Application layer e. Physical layer 5. a. Presentation layer b. Session layer c. Data link and transport layers d. Session layer e. Presentation layer 7. If we think about the switch as a passive one (not a bridge), Figure 2.E7 shows the solution. Chapter02.fm Page 1 Saturday, June 13, 2009 8:05 PM 2 9. The header at the transport layer should at least include the source and destination port number. This means the size of the header is at least 2 + 2 = 4 bytes. 11. The header at the data link layer should at least include the physical source and destination addresses. This means the size of the header is at least 6 + 6 = 12 bytes. 13. At the physical layer, the signal representing the bit stream is broadcast to all sta- tions in a network. Every station receives it; there is no need for addresses in this layer. 15. The destination address is needed to define the recipient of the message; the source address is needed if the receiver of the message has to respond or the intermediate nodes has to report any error the source. Figure 2.E7Solution to Exercise 7 A Physical Physical Data link Data link R1 B B Network Network Transport Transport Application Application Message D5D5D5D5 Message AR1 Link 2Link 1 Chapter02.fm Page 2 Saturday, June 13, 2009 8:05 PM 1 CHAPTER 3 Underlying Technologies Exercises 1. We know that D = T V, where D is the distance, T is the time, and V is the veloc- ity or speed. In other words, T = D / V. We insert the corresponding values to find the time needed for a bit to travel the cable. 3. Assume that the minimum frame size is 65 bytes or 520 bits. We have L = T R, where L is the length of the frame, T is the time, and the R is the data rate. We can say T = L / R. The time can be calculated as 5. The padding needs to make the size of the data section 46 bytes. If the data received from the upper layer is 42 bytes, we need 46 42 = 4 bytes of padding. 7. a. Similarities: Each station has an equal right to the medium. Each station senses the medium. b. Differences: CSMA/CD: A station can send if it senses no signal on the line. CSMA/CA: A station needs to inform other stations that it needs the medium for a specific amount of time. CSMA/CD: A collision can occur. CSMA/CA: Collisions are avoided. T = D / V = (2500 meters) / (200,000,000 meters/second) = 0.0000125 s = 12.5 s T = L / R = (520 bits) / (10,000,000) bits/second = 0.000052 s = 52 s 2 8. See Table 3.E8. Table 3.E8Exercise 8 FieldsIEEE 802.3IEEE 802.11 Destination address6 Source address6 Address 16 Address 26 Address 36 Address 46 FC2 D/ID2 SC2 PDU length2 Data and padding1500 Frame body2312 FCS (CRC)4 4 1 CHAPTER 4 Introduction to Network Layer Exercises 1. We mention one advantage and one disadvantage for a connectionless service: a. The connectionless service has at least one advantage. A connectionless service is simple. The source, destination, and the routers need to deal with each packet individually without considering the relationship between them. This means there are no setup and teardown phases. No extra packets are exchanged between the source and the destination for these two phases. b. The connectionless service has at least one disadvantage. The packets may arrive out of order; the upper layer that receive them needs to reorder them. 3. An n-bit label can create 2n different virtual-circuit identifier. 5. Each packet started from the source needs to have a fragmentation identification, which is repeated in each fragment. The destination computer use this identifica- tion to reassemble all fragments belonging to the same packet. 7. The delay in the connection-oriented service is always more than the delay in the connectionless service no matter the message is long or short. However, the ratio of the overhead delay (setup and teardown phases) to the data transfer delay (trans- mission and propagation) is smaller for a long message than a short message in a connection-oriented service. 9. A router is normally connected to different link (networks), each with different MTU. The link from which the packet is received may have a larger MTU than the link to which the packet is sent, which means that router needs to fragment the packet. We will see in Chapter 27 that IPv6 does not allow fragmentation at the router, which means the source needs to do some investigation and make the packet small enough to be carried through all links. 11. A fragment may have been lost and never arrives. The destination host cannot wait forever. The destination host starts a time and after the time-out, it can sends an error message (see Chapter 9) to inform the source host that the packet is lost and, if necessary, should be resent. The time-out duration can be based on the informa- 2 tion the destination host may collect about the status of the Internet. If there are many delays in the previous packet arrivals, it means that the Internet is congested, and the fragment may arrive soon (it is not necessarily lost). 1 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 Chapter05.fm Page 1 Saturday, June 13, 2009 9:50 PM 2 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 = (55)256 We add this number to the first address to find the last address: 15. a. We can apply the first short cut to all bytes here. The result is (). b. We can apply the first short cut to all bytes here. The result is (). 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 (). 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 (). 17. The first address can be found by ANDing the mask with the IP address as shown below: 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: 19. The first address can be found by ANDing the mask with the IP address as shown below: First Address: Difference (base 256)55 Last Address:55 IP Address:6 Mask: First Address IP Address:6 Mask Complement:55 Last Address55 IP Address:6 Mask:92 First Address Chapter05.fm Page 2 Saturday, June 13, 2009 9:50 PM 3 Note that we use the first short cut on the first three bytes. We use the second short cut on the fourth bytes: 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: Note that we use the first short cut on the first three bytes. We use the second short cut on the fourth byte: 21. With the information given, the first address is found by ANDing the host address with the mask (/16). The last address can be found by ORing the host address with the mask comple- ment 55. 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. 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 IP Address:6 Mask Complement:3 Last Address27 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 Host Address:6 Mask: Network Address (First): Host Address:6 Mask Complement: 55 Last Address: 55 a. log22 = 1Number of 1s = 1Number of created subnets: 2 b. log262 = 5.95Number of 1s = 6Number of created subnets: 64 Chapter05.fm Page 3 Saturday, June 13, 2009 9:50 PM 4 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. To find the last address, we need to write 63 (one less than the number of addresses in each subnet) in base 256 (3) and add it to the first address (in base 256). d. Last subnet (Subnet 1024): To find the first address in subnet 1024, we need to add 65,472 (1023 64) in base 256 (2) to the first address in subnet 1. Now we can calculate the last address in subnet 1024 as we did for the first address. 27. We first change the mask to binary to find the number of 1s: a. 11111111 11111111 11111111 00000000 /24 b. 11111111 00000000 00000000 00000000 /8 c. 11111111 11111111 11100000 00000000 /19 d. 11111111 11111111 11110000 00000000 /20 29. If the first and the last addresses are known, the block is fully defined. We can first find the number of addresses in the block. We can then use the relation N = 232 n n = 32 log2N c. log2122 = 6.93Number of 1s = 7 Number of created subnets: 128 d. log2250 = 7.96Number of 1s = 8Number of created subnets: 256 first address in subnet 1: first address in subnet 1: number of addresses: 3 last address in subnet 1: 3 first address in subnet 1 number of addresses: 92 first address in subnet 1024: 92 first address in subnet 500: 92 number of addresses: 3 last address in subnet 500: 55 Chapter05.fm Page 4 Saturday, June 13, 2009 9:50 PM 5 to find the prefix length. For example, if the first address is 4 and the last address is 27, then the number of addresses in the block is 64. We can find the prefix length as n = 32 log2N = 32 log264 = 26 The block is then 4/26. 31. Many blocks can have the same prefix length. The prefix length only determines the number of addresses in the block, not the block itself. Two blocks can have the same prefix length but start in two different point in the address space. For exam- ple, the following two blocks have the same prefix length, but they are definitely two different blocks. The length of the blocks are the same, but the blocks are different. 33. Group 1 For this group, each customer needs 128 addresses. This means the suffix length is log2128 = 7). The prefix length is then 32 7 = 25. The range of addresses are given for the first, second, and the last customer. The range of addresses for other customers can be easily found: Total addresses for group 1 = 200 128 = 25,600 addresses Group 2 For this group, each customer needs 16 addresses. This means the suffix length is log216 = 4. The prefix length is then 32 4 = 28. The addresses are: Total addresses for group 2 = 400 16 = 6400 addresses Group 3 2/274/27 1st customer:/25to27/25 2nd customer:28/25to55/25 . 200th customer:28/25to55/25 1st customer:/28to5/28 2nd customer:6/28to1/28 . 400th customer:40/28to55/28 Chapter05.fm Page 5 Saturday, June 13, 2009 9:50 PM 6 For this group, each customer needs 4 addresses. This means the suffix length is log24 = 2. The prefix length is then 32 2 = 30. The addresses are: Total addresses for group 3 = 2048 4 = 8192 addresses Number of allocated addresses: 40,192 Number of available addresses: 25,344 35. There are actually two choices. If the ISP wants to use subnetting (a router with 32 output ports) then the prefix length for each customer is nsub = 32. However, there is no need for a router and subnetting. Each customer can be directly connected to the ISP server. In this case, the whole set of the customer can be taught of addresses in one single block with the prefix length n (the prefix length assigned to the ISP). 1st customer: /30 to/30 2nd customer: /30 to/30 . 64th customer: 52/30 to55/30 65th customer: /30 to/30 . 2048th customer: 52/30 to55/30 Chapter05.fm Page 6 Saturday, June 13, 2009 9:50 PM 1 CHAPTER 6 Delivery, Forwarding, and Routing of IP Packets Exercises 1. Direct; Both hosts are on the same network (same netid: 137.23). 3. See Table 6.E3. 5. Destination address: 2 Binary: 11000000 00010000 00000111 00101010 Shift copy of address: 00000000 00000000 00000000 00001100 = 1210 Destination network: Class C Network address: Next hop address: 2 Interface: m0 7. Destination address: 0 Binary: 10010011 00011010 00110010 00011110 Shift copy of address: 00000000 00000000 00000000 00001001 = 910 Destination network: Class B Network address: Next hop address: 8 Interface: m0 9. Destination address: 1 Mask: /18 Network address: Next hop address: default Interface: m4 Table 6.E3Solution to Exercise 3 ClassDestinationNext HopInterface Class Am1 Class B0m1 0m1 Class C2m1 Default0default routerm0 2 11. Destination address: 0 Next hop address: 00 (default router) Interface: m2 13. A routing table for a LAN not connected to the Internet and with no subnets can have a routing table with host-specific addresses. There is no next-hop address since all packets remain within the network. 15. If the packet with destination address 94 arrives at R3, it gets sent to interface m0. If it arrives at R2, it gets sent to interface m1 and then to router R3. The only way R1 can receive the packet is if the packet comes from organization 1, 2, or 3; it goes to R1 and is sent out from interface m3. 17. See Table 6.E17. 19. See Table 6.E19. Mask: /26Result: No match Mask: /25Result: No match Mask: /24Result: No match Mask: /22Result: No match Table 6.E17Solution to Exercise 17 MaskNetwork addressNext-hop addressInterface /20m0 /20m2 /20m3 /0default routerm4 Table 6.E19Solution to Exercise 19 MaskNetwork addressNext-hop addressInterface /22m0 /22m1 /22m2 /22m3 /0default routerm4 3 21. See Table 6.E21. Table 6.E21Solution to Exercise 21 MaskNetwork addressNext-hop addressInterface /30m0 /30m1 /30m2 /302m3 /3052m127 /0default routerm128 4 1 CHAPTER 7 Internet Protocol Version 4 (IPv4) Exercises 1. If no fragmentation occurs at the router, then the only field to change in the base header is the time to live field. If any of the multiple-byte options are present, then there will be changes in the option headers as well (to record the route and/or time- stamp). If fragmentation does occur, the total length field will change to reflect the total length of each datagram. The more fragment bit of the flags field and the frag- mentation offset fields may also change to reflect the fragmentation. If options are present and fragmentation occurs, the HLEN field of the base header may also change to reflect whether or not the option was included in the fragments. 3. Advantages of a large MTU: Good for transferring large amounts of data over long distances No fragmentation necessary; faster delivery and no reassembly Fewer lost datagrams More efficient (less overhead) Advantages of a small MTU: Good for transferring time-sensitive data such as audio or video Better suited for multiplexing 5. In this case, we use a Loose Source Route option with only one entry as shown in Figure 7.E5. Figure 7.E5Solution to Exercise 5 00000001 Base Header Op: 01Code:131Length:7 Pointer: 4 100000000010111000001010 00000101 100000110000011100000100 2 7. The value of the header length field of an IP packet can never be less than 5 because every IP datagram must have at least a base header that has a fixed size of 20 bytes. The value of HLEN field, when multiplied by 4, gives the number of bytes contained in the header. Therefore the minimum value of this field is 5. This field has a value of exactly 5 when there are no o

温馨提示

  • 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
  • 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
  • 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
  • 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
  • 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
  • 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
  • 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

评论

0/150

提交评论