Solutions to End of Chapter Problems Problem 1: MAC address: No; IP address: Yes. Problem 2: (a) Time to live and Header checksum. (b) HLEN = 5; TOTAL LENGTH = 1024. (c) The time to live field is a number decremented by one on each hop. When the time to live (hop-counter) reaches zero, the packet is discarded. The purpose is to ensure the packet does not wander around the Internet forever; it can only touch the number of routers equal to the initial value in the time to live field. (d) 8 (e) It uses a source address of 0.0.0.0 and a destination address of 255.255.255.255. (f) It is discarded (not routed any further). (a) 10.64.128.192 / 28 (b) 14 (also accept 16) (c) 10.64.128.193 (d) 10.64.128.206 (e) 10.64.128.207 (f) No; this address is in the private address domain (a) (i) /24 (ii) /12 (b) (i) 255.255.0.0 (ii) 255.128.0.0 Problem 3: Problem 4: Problem 5: Answer is (a) Problem 6: (a) Version 4 (b) 83 78 a8 1f = 131.120.168.31 Problem 7: (a) 255.255.224.0 (b) 136.52.96.0 (c) 136.52.127.255 (d) 8192 – 2 = 8190. Problem 8: Every packet is an independent entity, possible traveling over different paths from source to destination Problem 9: False Problem 10: 146.25.128.0 Problem 11: Answer is (b) 7 Problem 12: Answer is (a) Problem 13: 32 ; 8 ; 0 ; 255 Problem 14: To extract the network ID from an IP address (or to extract the network address). Problem 15: (a) 128.32.14.0 (b) 9 (c) 510 (d) 128.32.15.254 Problem 16: software / 32 network / host host / network host / broadcast Problem 17: (a) address: 10011100 10001111 00001010 00110111 mask: AND 11111111 11111111 11111000 00000000 first address: 10011100 10001111 00001000 00000000 156.143.8.0 (b) 232-21-2 = 211-2 = 2046 hosts (c) First address assigned to a host: 10011100 10001111 00001000 00000001 156.143.8.1 last address assigned to a host: 10011100 10001111 00001111 11111110 156.143.15.254 (d) Problem 18: No. These private IPv4 addresses are provided to users to be used internally within private networks. This allows users the ability to have an allotment of IP addresses to use within a private network whose addresses can be distributed by the network administrator rather than the Internet Service Provider. These addresses must be unique within a private network, but do not need to be unique globally. All IP routers know that these addresses are for private networks only. Problem 19: (a) True Problem 20: The valid ones are (b), (d) and (e) Problem 21: (a) 2^5 – 2 = 30 (b) 137.18.129.10000001 = 137.18.129.129 (c) 137.18.129.10011110 = 137.18.129.158 (d) 137.18.129. 10011111 = 137.18.129.159 (b) True (c) False (d) False 8 Problem 22: Compare network address and broadcast address (i.e. 230.8.16.0 and 230.8.31.255). View them in bits. 230.8.16.0 11100110.00001000.00010000.00000000 230.8.31.255 11100110.00001000.00011111.11111111 Count the number of bits that are the same, and this is your prefix. In this example, the prefix is 20. Let the prefix in general be denoted as n. Then the number of addresses available for assignment to hosts is 232n 2 . Problem 23: 85.133.51.31 Problem 24: N = 232-n = 232-14 = 218 = 262,144 total addresses. Of these 262,144 addresses, 262,142 are assignable to hosts. Problem 25: 11111111 11111100 00000000 00000000 => 255.252.0.0 Problem 26: Change the dotted-decimal to binary: 11111111 11110000 We see there are 12 1's, so the prefix is 12. In slash notation: /12. 00000000 00000000 Problem 27: 140.150.16.17/18 First address: address: 10001100 mask: AND 11111111 first address: 10001100 10010110 11111111 10010110 00010000 11000000 00000000 00010001 00000000 00000000 140.150.0.0 10001100 10010110 00010000 00010001 00111111 11111111 address: Set the 32 – n = 14 rightmost bits to 1: 10001100 last address: Problem 28: Problem 29: 10010110 140.150.63.255 (a) No. When TTL is decremented to 0, the packet is discarded. (b) Yes. The TTL field is 8 bits which means the maximum value of TTL is 255. (c) No. The TTL field is 8 bits which means the maximum value of TTL is 255. 4 5 VER HLEN 00 Service Type 004E 0010 Total ID Length 0000 Flag & Frag Offset 12 TTL 06... Protocol (a) There are 5 x 4 = 20 bytes in the header. (b) Size of the data and the 20-bytes header totals to 0x004E which is 78. Thus the size of the data (without the header) is 58 bytes. (c) The TTL field is 0x12 which is 18, so this packet can travel to 18 more routers. The 18th would discard it. Problem 30: The TTL field and the Header checksum. 9