EINTE LAB EXERCISES LAB EXERCISE #4 IGP ROUTING PURPOSE AND GOALS This lab assignment will give you a hands-on experience in configuring and managing routers and particularly in setting up IP routing protocols. You will prepare the lab session, perform the practical exercises, and write a lab report, which describes the whole lab, including planning, preparations, and results. The lab report will be assessed; grading will be added to the total course score - check the course home page for details. OVERVIEW The Assignment is divided into preparation, practical part, and documentation. PREPARATIONS The preparations are crucial to the successful execution of the main exercise. Without proper study there is no possibility to fulfill the requirements within the specified time; trial-and-error will not work! During this phase you should read and understand the Router Lab Guide accessible on the course page. You should also study the Cisco routers documentation accessible in the Internet if any additional explanations to relevant IOS commands are required. Finally, you should refresh and expand your knowledge on the topic of the lab exercise. It is advised to take notes related to the course of the exercise (such as the steps needed to fulfill the specified tasks), relevant router configurations and control commands. EXERCISE The main exercise is executed using the department s router lab. The lab is accessible remotely from a computer of your choice via the Internet you don t need to be present in the Lab room during the exercise. To access the lab you only need a PC with Internet access and an ssh protocol client (such as PuTTY). The routers are Cisco devices and so the router operation system is IOS. The lab configuration is fixed on physical level. The topology changes can be only introduced by opening and closing individual router interfaces. Before starting the main lab exercise it is required to reserve the lab resources beforehand using the Resource Reservation system (please refer to the Resource Reservation User Guide accessible at the relevant course home page). The lab can be booked for maximum of 4 hours (this is a total time assigned for completing the lab exercise). Provided that you are well-prepared, this should be enough to execute the main exercise and gather information required to prepare the lab report. The tasks required to pass the exercise are described in detail in Section 3. In case of any technical problems during the exercise (problems with remote access, access to router consoles, instability etc.) please contact the lab supervisor by email, provided on the course home page. The exercise can be repeated in cases justified by the observed technical problems. FINAL REPORT The last phase consists of lab report preparation. You should plan the outline of the report in advance, during the preparation phase to be sure what input is necessary before attempting the main part of the exercise.
The report should contain 2-3 pages of your own text; any printouts from commands etc. are not included in this number. All phases of the exercise and your findings collected during the main practical part should be described in the report. This instruction may also contain questions and remarks (usually marked with different colour) that shall be answered or taken into account in the report. Finally, you should attach the configuration files (running configs) from all routers with the final configurations that you have prepared during the exercise. Please deliver the final report no later than one week after the end of the period assigned to execute this lab assignment (via an email to gajow@tele.pw.edu.pl). Note: If you find any errors or inconsistencies in this document and referenced manuals, please report them to the lab exercise supervisor(s). It will help to improve the lab exercise in the future. LOGGING TO THE LAB Accessing the router consoles requires logging to the faculty network first. This is accomplished by opening the ssh terminal session from your local PC to the gateway server with IP address of 194.29.169.1 accessible form the public Internet. Login credentials are delivered at the beginning of your reserved time slot to the email address registered in the system. Usually this is your student email account (verify email address with the exercise supervisor if needed). From the gateway server it is possible to access router consoles using telnet sessions to the IP address of the terminal server and specific port numbers. The IP address of the terminal server will be provided in an email from the reservation system, sent at the beginning of the reserved time slot. Internet Serwer terminali (terminal server) ztit-gateway 194.29.169.1 (front-end) R1 port 2101 R2 port 2102 R3 port 2103 R4 port 2104 R5 port 2105 Figure 1. Router Lab configuration
The routers are accessible via terminal server in that way that each router s console is mapped to the predefined port: R1 = port 2101, R2 = port 2102, R3 = port 2103, R4 = port 2104, R5 = port 2105 For example, to access router R1 you should use the following command from the gateway server: >> telnet e# <IP address of the terminal server> 2101 After you see the terminal window press ENTER. When prompted with the following questions: Would you like to terminate autoinstall? [yes]: press ENTER, Would you like to enter the initial configuration dialog? [yes/no]: answer no and press ENTER. You can open multiple ssh sessions (e.g. one per router) with the gateway server to ease your work. The details of remote access procedures are provided in the Router Lab Guide that you should study during the lab preparation phase. IMPORTANT: do not use the reload command if you want to restore the initial state of the router during the exercise! Use the procedure described in the Router Lab Guide instead. LAB EXERCISE The main part of the lab exercise is divided into two main sections: Hands on IOS CLI Configuration of OSPF protocol The remainder of this section covers all practical tasks that constitute the scope of this exercise. HANDS ON IOS CLI BASIC CONFIGURATION You do not need to reload initial routers configurations as all routers are restarted between user sessions. You should start with empty router configuration (no routing protocol enabled, no IP addresses assigned to interfaces etc.). If it is not the case, please inform the lab supervisor. You start with configuring the lab according to Figure 1 (note that the physical setup is fixed and you cannot change it). Allocate appropriate network and host IP addresses to the routers. Remember that each router interface must have a unique IP address on the subnet that it belongs to. What addressing scheme will you use? Indicate your addressing scheme in the report. Use the following command to configure the IP address of an interface: ip address <ip address> <mask> Hint: You should plan the addressing scheme during preparation phase. The addressing rules must adhere to the IP standards. You should end this step with IP addresses configured on your routers interfaces. CDP Next use CDP and check your configuration. What information do you get with show cdp neighbors? Try this command on each router in the network.
What information do you get with show cdp neighbors <interface> detail? Try this command on one of the routers R1 or R2. Cut-and-paste examples of output of these commands into your report. PING AND TRACEROUTE Make yourself familiar with IOS ping and traceroute commands. Both commands come in two versions, normal and extended. We are only examining the normal version Ping a neighbour using the command ping <host>. How many packets are sent? Explain the interpretation of the information you get from the output of this command? How long is the router waiting until a ping is declared lost? Which routers can you reach from which routers? Why is it so? Try also the traceroute command. Add output of both ping and traceroute commands to your report. explain the traceroute mechanism CHECK ROUTING TABLE Check the routing table of one of the routers. What command should you use? Interpret the output. Copy the output from the command to the report and give a brief explanation of the results. DEBUG Check the debug command. Make sure that the output from the debug process is written to your terminal by issuing command terminal monitor. Setup debug of all IP packets. What command should you use? Hint: first word in command string is debug. From one router ping one of its neighbours. Copy the output to your report, and give a brief explanation of the results. Before you end this sub-section turn of debugging. Use the command no debug all to turn off all debugging. OSPF START OSPF As you have found in the previous section, you cannot send IP packets via the network, for example from R1 to R3. To do this, a routing protocol such as OSPF has to be added to the network. OSPF is a link state based routing protocol. In OSPF each router has a unique identity. Cisco routers use the largest IP address assigned to any interface on the router as the router id. This method works well until that interface goes down in which case the router id has to change and the OSPF process has to recalculate and resend the relevant information to its neighbours. It is an advantage if the router id could be fixed, and independent of interface status. Therefore, Cisco IOS has given precedence to loopback interfaces in the selection of router id. If there is a loopback interface configured on the router, and the loopback interface has been assigned an IP address, this IP address will be used as the router id. An advantage of a loopback interface is its persistence: it never goes
down unless the whole router is down. The conclusion is that it is good practice to always configure a loopback interface on every Cisco router that runs OSPF. Start with configuring loopback interface 0 on all routers. Give each loopback interface a unique IP host address. What commands should you use? Hint: A host address is assigned if you combine the IP address with a subnet mask with all ones, i.e. 255.255.255.255. Now you can initiate OSPF on the routers using router ospf command should you use? Hint: OSPF needs a process ID. Pick a number from 1 to 65535 of your choice. ADD INTERFACES TO OSPF Router interfaces can be added to the OSPF routing process using a network sub-mode command with appropriate attributes. In case of OSPF you have to add the network address space with a combination of a network id and a so-called wildcard mask. The wildcard mask is the one that complements a subnet mask. Any bit set in the wildcard mask indicates a position in the network id that has no significance. You also use the network command to assign in which area an interface shall reside. In our case we will only use one area, the backbone area, for all networks. We therefore can use the same network command in all routers. The general form of the network command is: network address wildcard-mask area area-id What command will you use to assign all interfaces in one router to OSPF backbone area? When you have configured all five routers, check the routing information in router R1. What command should you use? Copy the output of this command into the report and give a brief explanation of the output. Observe the path cost information (Hint: The path cost is the number following the slash inside the squared brackets. [110/3] means the cost is 3.) Also use command show ip ospf interface to find more information about cost. CHECK PATH Now that you have full routing running in your network you can check if packets are forwarded via the expected paths. You shall compare the routing table of R1 and the result of a traceroute. From the routing table in router R1 find the path to interface f0/0 (ethernet interface) of router R5. What path will packets take? Do a traceroute to this interface. Add the output from this command to the report. Did the packets take the expected path? STUDY OSPF UPDATES AND CONVERGENCE ON FAILURE Go to router R1 and turn on OSPF debugging. In this case you shall study OSPF events. What command do you use? What events occur? How often? What is the purpose of the information sent and received? Turn debugging of OSPF events off, and instead turn on debugging of OSPF flooding. What kind of messages are flooded by OSPF? When, or how often, are these messages sent? Which is the best path from R1 to the target host, the interface f0/0 of router R5? During the last part of the exercise you will study routing convergence on failure. For this you need two active terminal sessions, one to router R1 and one to router R5. First on router R1 traceroute interface f0/1 on router R5 and make sure that the connection is ok and goes over shortest path.
Make a note of the target s network prefix, that is the link between R1 and R5. Shut down interface f0/1 on router R5, and observe the output of the debugging on router R1. What is now the best path to our target network? Check with traceroute that this path is used. Open the interface again, and observe. Estimate the time from the interface status change to arrival of first message and update of the routing table. Now you can turn off debugging on router R1. CLEAN UP There is no need to restore the router initial configuration after the exercise. The basic configs are loaded automatically at the beginning of each reserved timeslot. Remark: do not use the reload command if you want to restore the initial state of the router during the exercise! Use the procedure described in the Router Lab Guide instead. DOCUMENTATION At the course page you should have access to the following two complementary documents: Resource Reservation User Guide Router Lab Guide