Docsity

Dynamic Routing Protocols-Computer Network Managment and Protocols-Lab Manual, Exercises of Computer Network Management and Protocols

Partial preview of the text

Download Dynamic Routing Protocols-Computer Network Managment and Protocols-Lab Manual and more Exercises Computer Network Management and Protocols in PDF only on Docsity!

Dynamic Routing Protocols (RIP and OSPF)

Lab

Table of Content

  • ITL LAB 5 - PAGE 2 SPRING
  • Prelab 5............................................................................................................…………
  • Lab 5...................................................................................................................................
  • Setup for Lab 5...........................................................................................................................
  • Part 1. Setting up the network (in a ring configuration)
  • Part 2 Setting up RIP routing
  • Part 3 Reconfiguring the Topology (RIP)....................................................................................
  • Part 4. Setting up OSPF Routing
  • Part 5. Reconfiguring the Topology (OSPF)..............................................................................
  • Part 6. Count-to-Infinity in RIP..................................................................................................
  • Appendix A. Disabling Split-horizon and triggered updates on Cisco 7000................................
  • Check List for Lab 5.........................................................................................
  • Feedback Form for Lab 5........................................................................

ITL LAB 5 - PAGE 4 SPRING 2001

  1. At URL http://www.freebsd.org/cgi/man.cgi, select "Redhat Linux/i386 6.2" and read the man pages of the commands rsh and netstat. Answer the following questions: 7.1. Provide the syntax of the command, which continuously reports any changes to the routing table on the local host. 7.2. Provide the syntax of the command, which displays the routing table of a remote host.
  2. Read Appendix A of this Lab manual. 8.1. What happens at the router if the hold-down of RIP is set to X seconds (for a Cisco 7000 router)? 8.2. Explain the meaning of the flash-update-threshold in RIP (for a Cisco 7000 router).

Deliverables: Answer all problems and turn the answers in at the beginning of the lab.

ITL LAB 5 - PAGE 5 SPRING 2001

Lab 5

For Parts 1, 2, 3, 4, 5 you will setup the PCs in a ring configuration.

vintpc

vintpc

vintpc4 vintpc

vintpc

vintpc

10.0.14.

10.0.36.

10.0.14.

10.0.56.

10.0.56.

10.0.45.

10.0.45.

10.0.36.2 10.0.23.

10.0.23.

10.0.12.

10.0.12.

Figure 1: Network Topology in Lab 5 (Parts 1 – 5).

Setup for Lab 5

  • Parts 1- 5 only involves the six PCs. The machines will be configured in a ring configuration as shown in Figure 1.
  • The goal of this lab is to observe how the dynamic routing protocols RIP and OSPF work.
  • First, you will setup the PCs as RIP routers.
    • You will observe how the routing tables are dynamically modified, and eventually find the shortest path to all machines.
    • Then you will “break” the ring topology and observe how the routing tables adapt to this change.
  • After this, you will run the same experiments with the OSPF routing protocol.
    • You will configure the machines as OSPF routers.
    • You will observe how the OSPF protocol floods the link state information of each router across the whole network.
    • You will observe the modification in the link state database of the routers when there is a break in the ring topology.
  • Finally, we include an experiment which lets you observe the count-to-infinity problem when using the RIP protocol. You will observe how triggered updates solve the count-to-infinity problem of a RIP router, which uses split-horizon only. In this last experiment, you work with the configuration shown in Figure 2.

ITL LAB 5 - PAGE 7 SPRING 2001

Part 2 Setting up RIP routing

In this exercise, you will set up your PC as a RIP router. This is done by editing the following configuration files.

  • /etc/sysconfig/network-scripts/ifcfg-eth /etc/sysconfig/network-scripts/ifcfg-eth

To change the IP address permanently, edit the above files. The IP addresses in the files are assigned whenever the machine is rebooted.

  • /etc/sysconfig/network

This file needs to be edited for enabling IP forwarding. If IP forwarding is enabled, a machine boots up as a router.

Note: From Lab 3 (Static Routing), you know that a host/router can have IP forwarding enabled, but not execute a dynamic routing protocol. To execute a dynamic routing protocol, a routing daemon (routed or gated), which is a user-level process, should be started. In this Lab, we will use the gated routing daemon which is able to run several routing protocols.

  • /etc/gated.conf

If the gated daemon is started, it reads the configuration file /etc/gated.conf by default. The file e /etc/gated.conf has information on the routing protocol to be run.

Exercise 2 -1. File Configuration and Preparation

  • In the directory /etc we have stored a sample configuration file /etc/gated.conf.rip. The configuration information in this file sets parameters and starts the RIP routing protocol.
  • Copy the file /etc/gated.conf.rip to /etc/gated.conf. View the /etc/gated.conf file to convince yourself that gated has been configured to run RIP.
  • Configure the IP addresses in the files /etc/sysconfig/network-scripts/ifcfg-eth0 and /etc/sysconfig/network-scripts/ifcfg-eth1 according to the table in Part 1.
  • Edit /etc/sysconfig/network and enable IP forwarding.
  • Reboot your machine. If your machine boots up, your machine will be configured to perform IP forwarding and the interface address will be configured properly.

ITL LAB 5 - PAGE 8 SPRING 2001

Exercise 2 -2. Start RIP and measure RIP traffic

Start ethereal on both Ethernet interfaces of your machine, and then start the gated daemon. Recall that /etc/gated.conf has been configured to run RIP routing protocol. Your objective is to capture all RIP packets.

  • From the prelab you know that the gdc command is used to set the operation of the gated daemon. Verify that gated is not already running, by issuing the command:

gdc running

  • Wait until all groups have completed the previous exercises. If some groups are behind, coordinate and help each other.
  • Launch a number of windows (xterm’s) and start measurement tools to measure the exchange of routing information. - Monitor RIP traffic (UDP port 520) on the interfaces with ethereal. - Monitor changes to the local routing table (netstat -crn).

For the postlab report, you need to save your measurements. Make sure that you establish the time correlation between the measurements taken in each window. Save the measurement data into files. While saving the data captured by ethereal into a plain text file, remember to select "Print hex data" in the "Ethereal: Print" window.

Your task is to observe how the local and remote routing tables converge to the shortest paths. Pay attention to the frequency at which messages are transmitted. Observe the speed of convergence. How can you tell that the routing tables have converged?

  • Wait until all groups have completed the previous exercises, before your start gated. This experiment assumes that all machines start the routing daemon at approximately the same time.
  • Start gated daemon with the command gdc start.
  • Query the remote routing tables with the command: rsh netstat -rn
  • Capture the routes to all machines with the command traceroute.

Lab Report : Include the measurements in your report and provide a detailed description of the convergence of the routing tables. Select one (!) RIP message captured with ethereal and provide an explanation of all fields of this message. Do not include the listing of all captured routing messages in your report.

Get a check-off when you are done with this exercise.

ITL LAB 5 - PAGE 10 SPRING 2001

  • The identical link state database maintained by each router.

You will use ospf_monitor to query the gated daemon for the link state database, link state advertisements from all the routers in the network

ethereal will be used to capture the different types of OSPF packets and to analyze the payload of the captured packets in details.

Exercise 4 -1.

In the following exercise, you configure the gated daemon to run OSPF. The directory /etc contains a sample file gated.conf.ospf which is used to configure gated to run ospf.

  • Stop the gated daemon on your machine using gdc stop.
  • View the file /etc/gated.conf.ospf and note the commands used to configure the PC as an OSPF router.
  • Copy the file /etc/gated.conf.ospf to /etc/gated.conf. Now, when you start the gated daemon, the daemon will run the OSPF routing protocol.

Exercise 4 -2.

In the following exercise, you will start OSPF routing. Before that, you need to start ethereal to capture the packets being transmitted by OSPF when it gets started. As mentioned previously you will capture the raw packets into a file using ethereal so that you can use both ethereal and tcpdump to parse the raw packets later.

  • Start ethereal measurement on both interfaces

ethereal –i interfacename

You will analyze the captured OSPF packets using ethereal. Make sure that you save the data on floppy.

  • Start the gated daemon with the gdc command. Gated will now run OSPF since the /etc/gated.conf file has been modified:

gdc start

All groups should start the OSPF protocol at about the same time.

  • Use netstat -cr to observe the routing table changes.
  • When the routing table has stabilized (How can you tell?), run the ospf_monitor:

ospf_monitor /labdata/mon_db

The mon_db file contains an entry for your local machine.

  • Use the ospf_monitor to view the link state database of your local machine.

ITL LAB 5 - PAGE 11 SPRING 2001

Hint : If you type d at the prompt of the ospf_monitor you obtain the index of the configured routers. Then you can use @ index l to display the link state database.

  • Add an entry for your neighbor in mon_db. (You know the syntax of the entry in the file from the prelab.) Use ospf_monitor to view the link state database of your neighbor.
  • Save the link state database to a file.
  • Stop capturing packets. Use ethereal to analyze the OSPF packets. Note the fields in the Link State Update packets.
  • Use ospf_monitor to view and save the link state advertisements from all routers in the network.

Hint : Use the command @ index a 0.0.0.1 1 ls_id router_id. You can find the link state id (ls_id) and the router id (router_id) with ethereal.

Lab Report : Answer the questions in the exercise.

  1. Include the ethereal measurement in your report showing the different types of OSPF packets. Only include one packet from each type. Do not include all packets that you have captured!
  2. Answer the following questions:

a. Which type of packets is used for flooding the link state information?

b. What is the area-id of the network in the experiment?

c. Explain the fields in the link state advertisements.

d. Explain the fields in the link-state database?

e. Does OSPF use TCP or UDP to transmit packets?

f. Use ethereal to describe the fields of a particular link state update packet.

g. Use ethereal to describe the fields in a particular link state advertisement.

Get a check-off when you are done.

ITL LAB 5 - PAGE 13 SPRING 2001

Part 6. Count-to-Infinity in RIP

In this experiment, you will observe the convergence problems in RIP. The network configuration for this experiment is shown in Figure 2.

itl-7000-1 itl-7000-2 itl-7000-

FDDI or HSSI or FSI

FDDI or HSSI or FSI

172.16.1.1 172.16.1.2 172.16.6.254 172.16.6.90 Loopback

to Console port

to Console port

to Console port

172.17.19.

vintpc2 vintpc4 vintpc

Figure 2: Configuration to observe count-to-infinity in RIP.

Exercise 6 -1.

The Cisco 7000 routers (itl-7000-1, itl-7000-2, itl-7000-3) are configured as follows:

  • All routers run RIP with split-horizon disabled on all their interfaces.
  • Triggered update is disabled on the routers.
  • The hold-down timer, explained in Appendix A, is set to zero.

Refer to Appendix A for an explanation how to enable/disable split-horizon and triggered updates on the Cisco 7000 routers. The appendix also explains the meaning of the hold- down timer.

In this exercise, you will work in groups of three. The group assignment is as follows:

Machine Group Router

vintpc1, vintpc

Group 1 itl-7000-

vintpc3, vintpc

Group 2 itl-7000-

vintpc5, vintpc

Group 3 itl-7000-

ITL LAB 5 - PAGE 14 SPRING 2001

Moreover, the following table shows the Cisco 7000 router the PC’s are connected to:

Machine Router

vintpc2 itl-7000-

vintpc4 itl-7000-

vintpc6 itl-7000-

The console port of each Cisco 7000 router is connected to the serial port of a PC. Use kermit to access the console port.

[/root] C-Kermit>set line /dev/cua0 (or /dev/cua1)

[/root] C-Kermit>connect

The observations in this exercise will be done by enabling RIP debugging on the Cisco routers. With RIP debugging enabled, all RIP packets received by Cisco routers will be displayed on the console terminal. Each group will capture the RIP debug output. But only on vintpc2 and vintpc4, the count-to-infinity problem can be observed.

RIP debugging on the Cisco 7000 routers, the command is enabled with the command debug ip rip (you must be in privileged EXEC mode to issue this command). To disable RIP debugging, type no debug ip rip.

  1. Use kermit to access the Cisco 7000 router.
  2. Enter the enable mode with enable. The lab instructor will provide you with the enable password.
  3. Save the output of the command show ip protocols to a file.
  4. Turn on RIP debugging.
  5. Wait until the routing tables have converged on the Cisco routers. If the routing tables have not changed after 4 or 5 exchange periods, you can safely assume that the routing tables have converged.
  6. The lab instructor will now disconnect the link between itl-7000-2 and itl-7000-3. The groups on vintpc2 and vintpc4 need to capture the RIP debug output (Copy and paste into a file).
  7. The experiment is over when the routes have stabilized and the routing tables on the routers vintpc2 and vintpc4 show that 172.17.19.0 is unreachable.

Run RIP until the routing tables have stabilized. Then, the link between itl-7000-2 and itl- 7000-3 will be disconnected. You now observe the slow convergence, due to count-to- infinity, of the routing tables.

ITL LAB 5 - PAGE 16 SPRING 2001

Appendix A. Disabling Split-horizon and triggered updates on Cisco 7000

This appendix explains the steps required to enable/disable split-horizon and triggered updates, and to set the holddown timer for RIP routing on Cisco 7000 routers.

Split-horizon is disabled separately for each interface. Triggered updates are disabled on all interfaces (applies globally on the Cisco 7000 RIP process).

To enable or disable split-horizon:

  • Enter the enable mode with enable.
  • Enter the global configuration mode with configure.
  • Enter the interface configuration mode using interface if1.
  • Disable split horizon for the interface if1 with no ip split-horizon.
  • Enable split horizon for the interface if1 with ip split-horizon.

To disable triggered updates:

  • Use show ip protocols to find the update timer value
  • Enter the enable mode with enable.
  • Enter the global configuration mode with configure.
  • Enter the router configuration mode using router rip.
  • Set flash-update-threshold to the value of the update timer value. The syntax is flash-update-threshold time.

The command flash-update-threshold x specifies that if the update is due in x seconds then do not send a triggered update. Thus, if x is set to a value equal to the update timer then we effectively disable triggered updates.

The hold-down timer is a timer used by RIP. Setting the hold-down timer to h seconds means enforces that a routing update which leads to an increase of the cost (hop count) in a routing table entry, will be delayed by h seconds. Setting hold-down timer to 0 means that the RIP process accepts any new modifications to the route immediately. To set the hold-down timer we need to do the following:

  • Enter the enable mode with enable.
  • Enter Global configuration mode using config.
  • Enter router configuration using router rip.
  • The timer values are set using the command timers basic update invalid holddown flush

ITL LAB 5 - PAGE 17 SPRING 2001

Check List for Lab 5

Complete this check list as you work through the laboratory exercises and hand the form in to the lab instructor before you leave

Names (Please Print):__________________________________________

Turn-in Prelab 5 (Pledge your Check-off for Part 4 Prelab.)

Check-off for Part 1 Check-off for Part 5

Check-off for Part 2 Check-off for Part 6

Check-off for Part 3

Turn-in your feedback sheet.

Do not forget to copy your results to your floppy disk.