Instructor Notes for Lab 3 Do not distribute instructor notes to students! Lab Preparation: Make sure that enough Ethernet hubs and cables are available in the lab. The following tools will be used in this lab: ttcp, tcpdump, and ethereal, ping, netstat, ifconfig. Make sure that the tools are running on all machines and familiarize yourself with them. Before each lab: Ensure that the IP addresses are reset. Hints: The following are possible sources of problems for this lab: 1. IP forwarding disabled on the machines 2. Changing the IP address, automatically changes the setting of the netmask Changing IP addresses of a Class A address 10.0.x.y leaves the netmask as 0xff000000. This will create a problem in packet forwarding since machines will be confused as to who is on the same network. Recall that we are using /24 prefixes. So, students must also change the netmask to 0xffffff00 when they change the IP address. ITL LAB 3 - PAGE 17 SPRING 2001
Answers to Prelab 3 1.1 When is static routing advantageous over dynamic routing? Static routing is advantageous because it allows very precise control over routing behavior of a network. Sometimes only a single connection exists to a single ISP. Rather than learning all of the global Internet routes, a single default static route to the ISP is used. A disadvantage of static routing is that every time the topology of the network is changed, the routing table must also be updated. 2.1How does a router know that a particular host is reachable through one of its interfaces? The router uses the IP addresses and the netmasks of its interfaces to determine if the network or host is reachable through one of its interfaces. 1.2 If you compare IP routers and hosts, what is the defining characteristic of an IP router? The defining characteristic of a router is that it forwards incoming packets onto an outgoing interface. A host that receives an IP packet for which it is not the destination, will drop this IP packet. 2. Who can generate ICMP Redirect messages? Routers, hosts, or both? Only a router may generate an ICMP redirect datagram. 3.1 Use the textbook as a source, and describe how traceroute and ping Rv gather information. Traceroute utilizes the IP protocol `time to live' field and attempts to elicit an ICMP TIME_EXCEEDED response from each gateway along the path to some host. The ping command with Rv option causes every router processing the datagram to add its IP address to a list in the options field. The destination will send an ICMP echo reply, including the list of the IP addresses of the routers along the path, to the ping sender. 3.2 What is the default maximum TTL (time to live) field used by traceroute in outgoing probe packets? The default maximum time to live field used in the probe packets is 30. 3.3 Why does traceroute print this output and what does it mean? *** has the following meaning: 1. The hop does not send a time exceeded packet, or 2. The hop sends the time exceeded packets with a TTL value that is too small to reach the sender. In old versions of Sun (Sun 3.x) and DEC s Ultrix, the systems use the TTL value of the arriving datagram as the TTL value of its ICMP reply. In such a situation, exactly half of hops are missing. 4 What is the difference between an Ethernet Switch and a hub? Which is better? ITL LAB 3 - PAGE 18 SPRING 2001
A hub forwards an incoming Ethernet frame immediately (without buffering) to all output ports. If multiple frames arrive simultaneously on different input ports, a collision of Ethernet frames will occur An Ethernet switch buffers incoming Ethernet frames, and performs a routing table lookup for the destination address. If a frame arrives at an input port it is buffered. Then a routing table lookup is performed which yields the output port for the destination address (If no routing table is found, then the Ethernet frame will be forwarded to all output ports). After the routing table lookup, the frame is forwarded from an input port to an output port over the backplane of the switch. The forwarding is done without collisions. 5.1 What is a network prefix? The network prefix are the leftmost bits of an IP address which identify the network. The length of the network prefix is either given explicitly or is implied by the class of the IP address. 5.2 What is subnetting? What is a subnetmask? Subnetting refers to the partitioning of the host ID of a Class A, B or C IP address into a subnet and a host number. With subnetting, the network prefix and the subnet number identify an IP network. The subnet mask is the network address plus the bits reserved for identifying the subnetwork. (By convention, the bits for the network address are all set to 1, though it would also work if the bits were set exactly as in the network address.) 5.3 Why does a router need to know the subnetmask of a destination address? A router needs the subnet mask to determine the extended network prefix so that it can forward the packets among different subnets. 5.4 What is the network prefix of IP address 192.110.50.3/24? 192.110.50.0/24 5.5 If one host has IP address 192.110.50.3/24, what can you say about the maximum number of hosts on the network? 254 ( 0x00 identifies the network and 0xff is the broadcast address) 5.6 An organization has been assigned the network number 140.25.0.0/16 and it needs to create subnets that supports up to 60 hosts on each subnet. What is the maximum number of subnets which can be setup? Explain your answer. 2^10 = 1024 subnets can be set up. Round 60 to the nearest 2 s power, we get 64 = 2^6. Therefore, 6 bits are needed for host address. Since the network prefix is 16 bit, therefore there are 32-16 = 16 bit available. 2^16 / 2 ^ 6 = 2 ^ 10 = 1024 As a result 1024 subnet can be setup. 5.7 Consider the IP address 10.0.2.0 /24. Since the IP address has a 0 in the highest significant bit, we are dealing with a Class A address? However, the ITL LAB 3 - PAGE 19 SPRING 2001
network prefix of a Class A address is only 8 bits long. Is this inconsistent? Explain. No, it is not inconsistent. With the introducing of CIDR, the length of network prefix in the IP address an be kept arbitrary. Conventionally, 10.0.2.0 is a A class IP address and its network prefix is 8 bit. However, with CIDR, we can keep the network prefix arbitrary, therefore, 10.0.2.0/24 can be used to refer a network prex of 10.0.2. Lab Answers Answer to Lab report for Exercise 2-2 (in 2.) Did your neighbor successfully ping your machine. If not, why not? The first ping is successful since the alias is in the same network as the source host. The second fails since the alias is in a different network and there is no routing table for the network. Answer to Lab report for Exercise 3-1 Routing loop will decrease the performance of the network because the packet will be routed in the network until its TTL becomes zero. Answer to Lab report for Exercise 3-2 Multiple matches are resolved by longest-prefix match. If an exit interface is specified instead of a next hop IP address, the route is entered in the routing table as being directly connected. Answer to Lab report for Exercise 3-6 Explain how vintpc6 knows that packets destined to network 10.0.4.1 should be forwarded to 10.0.1.4? The router knows the packet should be forwarded to a different router from its routing table entries and knows the packet is sent out through the same interface that it arrived. Answer to Lab report for Exercise 3-7 From vintpc1 s perspective, vintpc2 and vintpc3 are on the same network. From vintpc2 s perspective, vintpc1 is on the same network, but not vintpc3. From vintpc3 s perspective, vintpc1 and vintpc2 are not on the same network ITL LAB 3 - PAGE 20 SPRING 2001
Therefore, vintpc1 can ping vintpc2, but not vintpc3 since vintpc3 can not send out reply. Vintpc2 can ping vintpc1, but not vintpc3 since vintpc2 can not send out a request. Vintpc3 can not ping either machines since it thinks all the machines are in the different networks. ITL LAB 3 - PAGE 21 SPRING 2001