You are on page 1of 12

Advanced Internetworking

IK2215
Lab 2 – Dynamic Routing
rev 1.1

Markus Hidell <mahidell@kth.se>


Voravit Tanyingyong <voravit@kth.se>

Royal Institute of Technology (KTH)


Telecommunication Systems Lab (TSlab)
Isafjordsgatan 39
164 40 Kista

Name: _______________________________________________

Date: _______________________________________________

Lab assistant signature: __________________________________

IK2215: Lab 2 – Dynamic Routing Page 1 of 12


1. Introduction
In this lab, you will get practical experience of configuring and running
dynamic routing protocols and to understand the mechanism of different
routing algorithm concepts associated with different dynamic routing
protocols. You will look into two main types of distributed routing
algorithm i.e. Distance Vector Routing and Link State Routing.

Distance vector routing protocol is based on calculating the direction and


distance to any link in a network. The cost of reaching a destination is
performed by using mathematical calculations such as the metrics of the
route. In a distance vector protocol, updates are performed periodically
where all or part of a router’s routing table is sent to all its neighbors that
are configured to use the same routing protocol. A router uses this
information to amend its own routing table to reflect the changes and then
inform its neighbors of the changes.

Link state routing protocol is, on the other hand, based on the concept
that every node receives a map of the connectivity of the network, in the
form of a graph showing which nodes are connected to which other nodes.
Each node then independently calculates the best next hop from it for
every possible destination in the network. It does this using only its local
copy of the map, and without communicating in any other way with any
other node. The collection of best next hops forms the routing table for
the node.

References:
http://en.wikipedia.org/wiki/Distance_vector_routing
http://en.wikipedia.org/wiki/Link-state_protocol

2. Overview
• Preparation
• Lab setup
• Distance Vector Routing
• Link State Routing
• Practical example

3. Preparation
3.1. Reading Material
In order to be able to complete the lab on schedule you need to prepare.
Below is a list of reading material that you must complete before coming
to the lab.

1. Course book: Read about Routing Algorithm Concepts, RIP, OSPF


(chapter 4 section 4.5, 4.6).

IK2215: Lab 2 – Dynamic Routing Page 2 of 12


2. Stril networks router guide: Read the whole document. Make
sure you understand the different between DCE and DTE and know
how to configure it.
3. CISCO document:

• RIP
http://www.cisco.com/en/US/docs/internetworking/technology
/handbook/RIP.html
• OSPF
http://www.cisco.com/en/US/docs/internetworking/technology
/handbook/OSPF.html

4. CISCO Configuration Guide (optional):

• RIP
http://www.cisco.com/en/US/docs/ios/12_0/np1/configuration
/guide/1crip.html
• OSPF
http://www.cisco.com/en/US/docs/ios/12_0/np1/configuration
/guide/1cospf.html

5. Wireshark documentation (optional): Extensive information


about how to use Wireshark network protocol analyzer can be found
at Wireshark’s home page (http://www.wireshark.org/docs/)

6. Radia Perlman’s video lectures (optional):


• Routing Algorithm
• Distance vector routing
• Link state routing
• Details on link state routing
• Distance vector vs Link state
• RIP-like protocols
• Link state protocols

3.2. Preparation Questions


Below are a number of preparation questions that you must complete
before coming to the lab. The lab assistants will go over your answers
before the lab starts and if you have not completed them in a satisfactory
way you will be sent home so you can prepare in a proper way.

Question 1 What is the benefit of using distance-vector routing protocol


over link-state protocol.
Answer:

IK2215: Lab 2 – Dynamic Routing Page 3 of 12


Question 2 Briefly explain the process of how distance vector protocols
and link state vector protocols select the best routes.
Answer:

Question 3 What kind of behaviour does the OSPF Designated Router


election scheme use, deterministic or sticky?
Answer:

Figure 1: Scenario for question 4-5

Question 4 Given a scenario as shown in Figure 1, show how to configure


both RTA and RTB in the case that you run RIP between the two routers.
Answer:

Question 5 Given a scenario as shown in Figure 1, show how to configure


both RTA and RTB in the case that you run OSPF between the two routers.
Answer:

IK2215: Lab 2 – Dynamic Routing Page 4 of 12


4. Lab setup
There are 4 groups in total, 4-6 persons per group. Each group should
have the following equipment:

• 4 Cisco routers (Router A-D, 1 cisco 2514 and 3 cisco 2501)


• 3 V35 DTE-DCE cables
• 4 console (roll-over) cables
• 1 hub
• 5 straight cables
• 1 cross cable
• 5 laptops (You are encouraged to use your own laptops!)

For information on how to configure the serial interfaces on the Cisco, see
the paper provided by Stril Networks on the course website. Pay special
attention on how to configure the synchronous serial ports.

The Cisco routers configuration interface is based on a tree-like structure.


When you first enter the router you are in a user or EXEC mode where you
can look at parameters in the router but no change anything. By issuing
the command enable, you enter the privileged exec mode where you can
change parameters in the router. To configure the router in the privileged
exec mode the command is configure terminal, which brings you into
global configuration mode. To exit one can type exit to back up one step
into the mode hierarchy or end to exit to the privileged mode directly. This
can look like:

Router> enable
Router#
Router# configure terminal
Router(config)#exit
If you want to configure router A’s interface eth1 this is the procedure:

Router> enable
Router#
Router#configure terminal
Router(config)#interface eth1
Router(config-if)#ip address 10.1.1.2 255.255.255.0
Router(config-if)#exit
Router(config)#exit
Router#copy running-config startup-config (save configuration)

IMPORTANT! Before you start configuring the router, do the following:

1. Erase startup configuration using erase startup-config command


in privileged EXEC mode
2. Restart the router using reload command (Do not save
configuration!)
3. After reboot, do not enter to the initial configuration dialog

IK2215: Lab 2 – Dynamic Routing Page 5 of 12


5. Distance Vector Routing
In this first part of the lab you will take a closer look at the distance vector
algorithm. You will be configuring and running the Routing Information
Protocol (RIP) as the distance vector routing protocol and observe it using
router debugging feature of the router. You will work in groups of 4-6
students during this part.

5.1. Basic RIP

Figure 2: Basic RIP

Now do the following:

1. Before you start, make sure that you reset the router configuration
as stated in section 4 (Lab setup) of this instruction.
2. Each group will be using IP addresses from different network as
depicted in Figure 2. (You should replace “x” with your group
number. For example, 192.168.x1.0/24 would be 192.168.11.0/24
for group 1, 192.168.21.0/24 for group 2, and so forth.) Configure
the Router interface’s IP address and the communication between
DCE-DTE interfaces as show in Figure 2.
3. Verify that the interfaces are up and you can ping the adjacent
routers.
4. Now turn on RIP debugging feature on the router by entering the
privilege mode and then run commands “debug ip rip” and “debug
ip rip events”.
5. Enable rip routing process by running the command “router rip” at
the global configuration mode. Then associate both of your
connected networks with a RIP routing process by running a
command “network <your-connected-network>”. Carefully
observe at the debugging messages each time you enter the
network command!

IK2215: Lab 2 – Dynamic Routing Page 6 of 12


6. You can run “show ip protocols” command to verify that RIP is up
and running. You will also be able to see RIP parameters and
statistic. In addition, run “show ip route” command to see IP
routing table of your router and observe routes you learn via RIP.
7. After successfully running RIP, observe the debugging messages for
a few minutes.
8. Turn off debugging with “undebug all” command at the privilege
mode. You can repeat step 6 again to observe RIP parameters.
9. Answer all the question below
10. Call lab assistant to show your setup and result.

Question: When you first start the RIP process, what address does it
send a request to?
Answer:

Question: Why do you think that RIP process sends a request once it
starts? What would be the benefit of doing so?
Answer:

5.2. Path selection in RIP

Now do the following:

1. Continue from in the previous section.


2. On RTA and RTC, set bandwith of Ethernet 0 interface to 256 Kbits
by running command “bandwidth 256” at the interface configuration
level.
3. On RTA and RTC, check and compare the speed (bandwidth) of your
serial and Ethernet interfaces using command “show interface
<router-interface>”.
4. On RTD, configure an interface loopback 0 with ip address
192.168.x5.1/24, where x is your group number. Also associate this
network with RIP process on RTD.
5. Make sure all other routers learn this network via RIP.
6. Observe the routing table on each router.
7. Answer all the questions below.
8. Call lab assistant to show and explain your debugging messages.

Question: Which path would RTC use to reach to 192.168.x5.0 network?


Explain why does it select this path and not the other?
Answer:

IK2215: Lab 2 – Dynamic Routing Page 7 of 12


5.3. Analysing network changes in RIP
Now do the following:

1. Continue from in the previous section.


2. Turn on debugging feature with commands “debug ip rip” and
“debug ip rip events” on all routers.
3. On RTD, remove ip address on the Serial0 interface by running “no
ip address” command at the serial0 interface configuration level.
4. On RTA, RTB, RTC, observe carefully at the debugging messages. It
will take time before you start seeing the changes, so be patient!
5. Answer all the questions below.
6. Turn off debugging with “undebug all” command.
7. Call lab assistant to show and explain your debugging messages.

Question: How long does it take before you can see that the route
192.168.x5.0 is inaccessible? Is the route removed from the routing table
once it is inaccessible?
Answer:

Question: There should still be a count to infinity problem in this scenario.


Why do you think that it didn’t happen?
Answer:

6. Link State Routing


In this first part of the lab you will take a closer look at the link state
algorithm. You will be configuring and running OSPF as the link state
routing protocol and observe it using router debugging feature of the
router. You will work in groups of 4-6 students during this part.

6.1. Basic OSPF with 1 adjacent neighbour

Figure 3: Basic OSPF with 1 adjacent neighbour

IK2215: Lab 2 – Dynamic Routing Page 8 of 12


Now do the following:

1. Continue from in the previous section. Do the following:

• Remove RIP configuration by running “no router rip” at the


global configuration level.
• Disable all interfaces except the serial 0 interface. You can do this
by running “shutdown” command at the interface configuration
level.
• On RTD, configure IP address of serial 0 as show in Figure 3.
• Verify that the serial 0 interface on each router is up and you can
ping the adjacent router.

2. Now turn on OSPF debugging feature on the router by entering the


privilege mode and then run following commands:

• debug ip ospf adj


• debug ip ospf flood
• debug ip ospf events

3. Enable OSPF routing process by running the command “router


ospf <process-id>” at the global configuration mode. Then run
OSPF backbone on your serial0 interface by running a command
“network <your-serial0-network> <OSPF-wild-card-bits> area
0”. (NOTE: There will be lots of debugging messages after entering
the network command!)
4. Once you started to see hello message in the debugging messages,
turn off debugging with “undebug all” command at the privilege
mode. Carefully observe the debugging messages that you received.
5. Run “show ip ospf neighbor” to verify that your router has
successfully established OSPF with your neighbour. Also run
command “show ip ospf interface serial 0” to see OSPF
parameters on your serial0 link.
6. Answer all the question below
7. Call lab assistant to show and explain your debugging messages.

Question: At the neighbour initialization, you will see a message saying


that either you are a “MASTER” or a “SLAVE”. What do you think does this
master/slave mean?
Answer:

Question: Once OSPF is at FULL state, which address does the router
sends update to? Explain what could be the benefit of using this address?
Answer:

IK2215: Lab 2 – Dynamic Routing Page 9 of 12


Question: According to the OSPF concept, the designated router (DR) and
backup designated router (BDR) should be elected. But if you run
command “show ip ospf neighbour detail” you will see that they are
not elected. Why do you think they are not elected?
Answer:

6.2. Path selection in OSPF

Figure 4: Path selection in OSPF

Now do the following:

1. Continue from in the previous section. Enable serial 1 interface on


RTA and RTB as well as Ethernet 0 interface on RTA and RTC by
running “no shutdown” command at the interface configuration level.
2. On RTA and RTB, run OSPF backbone on your serial 1 interface by
running a command “network <your-serial1-network> <OSPF-
wild-card-bits> area 0”.
3. On RTA and RTC, run OSPF backbone on your Ethernet 0 interface.
4. Now, you should have a setup as shown in Figure 4.
5. On RTD, enable loopback 0 interface. Then, run OSPF backbone on
loopback 0 interface.
6. Make sure all other routers learn all networks via OSPF.
7. Observe the routing table on each router.
8. Answer all the question below
9. Call the lab assistant to show your result.

Question: Which path would RTC use to reach to 192.168.x5.0 network


(192.168.15.1)? Explain why does it select this path and not the other?
Answer:

IK2215: Lab 2 – Dynamic Routing Page 10 of 12


6.3. Analyzing network changes in OSPF
Now do the following:

1. Continue from in the previous section. On all routers, turn on OSPF


debugging feature on the router by entering the privilege mode and
then run following commands:

• debug ip ospf events


• debug ip ospf lsa
• debug ip ospf spf intra

2. On RTD, remove ip address on the Serial0 interface by running “no


ip address” command at the serial0 interface configuration level.
3. Carefully observer the debugging messages especially on RTA.
4. Answer all the questions below.
5. Turn off debugging with “undebug all” command.
6. Call the lab assistant to show your result.

Question: How long does it take OSPF to converge? Compare it to RIP.


Answer:

6.4. OSPF Designated router election scheme

Figure 5: Analyzing network changes in OSPF

Now do the following:

1. On all routers, remove OSPF configuration by running a command


“no router ospf <process-id>” at the global configuration level.

IK2215: Lab 2 – Dynamic Routing Page 11 of 12


Then, run “no cdp run” command at the global configuration level
as well.
2. Configure your routers Ethernet interface’s IP address as shown in
Figure 5. Make sure you do not connect the router to the hub!
3. Connect the monitoring host to the hub and start wireshark to
monitor the traffic. (Make sure no DHCP client is running on it!)
4. Assign OSPF area 0 to Ethernet0 interface in all routers.
5. Make sure that Ethernet0 is not shutdown. Then, connect RTA, RTB,
and RTC to the hub at the same time!
6. Verify that OSPF is FULL in all routers. Observe which routers are DR
and BDR. On the monitoring host, observe link state messages. Also
answer the first question below.
7. Now connect RTD to the hub and assign OSPF area 0 to the
Ethernet0 interface.
8. Answer the rest of the questions below
9. Call the lab assistant to show your result.

Question: At step 6, does the router elect DR/BDR on the Ethernet


interface? Explain how does OSPF elect the DR/BDR?
Answer:

Question: After step 7, which routers become DR and BDR? Explain your
reason.
Answer:

Question: What would happen if you run command “no ip address” on the
Ethernet0 interface of the DR. Which routers are the new DR and BDR?
Answer:

6.5. Last step

Now do the following:

1. On all routers, run “erase startup-config”. Confirm the erase.


Once it’s done, turn off the routers.
2. On all laptops, switch user to root and run “sudo shutdown –h now”
at the shell terminal. Wait until the machine is completely turned off
before closing the lid.
3. Put all equipment back in the right boxes.
4. Thank you!

End of Lab 2

IK2215: Lab 2 – Dynamic Routing Page 12 of 12

You might also like