You are on page 1of 22

King Abdulaziz University Boys Campus Computer Science Department Course Number and Name: CS 701 Advanced Topics

in Networking Title of Experiment: OSPF: Open Shortest Path First A Routing Protocol Based on the Link-State Algorithm Semester and Year: Fall 2013

Names of Team: Ebraheem M.Alhaddad & Naif Aljabery

Date of Report Submitted: 27/1/1434

Name of Lab Instructor: Prof.Mohammed Madkor

Names of Group Members: 2

Experiment Number: 2

Objectives The objective of this lab is to configure and analyze the performance of the Open Shortest Path First (OSPF) routing protocol. Theory and Experimental Methods Theory: OSPF introduces another layer of hierarchy into routing by allowing a domain to be partitioned into areas. This means that a router within a domain does not necessarily need to know how to reach every network within that domainit may be sufficient for it to know how to get to the right area. Thus, there is a reduction in the amount of information that must be transmitted to and stored in each node. In addition, OSPF allows multiple routes to the same destination to be assigned the same cost and will cause traffic to be distributed evenly over those routers.

Experimental Method: In this lab we experimented the OSPF routing protocol using three scenarios namely, No_Areas, Areas and Balanced scenarios. No_Areas: Figure 1 depicts the network design of this scenario. The scenario consists of eight routers connected using PPP3 links. The routing protocol is set to be OSPF. The cost of transition using links between routers is configured as shown in figure 2.

Figure 1: NO_Area scenario.

Figure 2: link costs.

Areas Scenario: Here we define two new areas in addition to the backbone area. The first area consists of Routers A,B and C while Routers F,G and H form the second area, and Routers D and E work as backbone area. The link costs is the same as NO_Area scenario. Figure 3 depicts this scenario.

Figure 3: Areas scenario.

Balanced Scenario: in this scenario the balancing option is enabled. All other parameters are the same as NO_Areas scenarios. Figure 4 show the design of the network.

Figure 4: Balanced scenario.

Equipment Description and Specification

Devices: The ethernet4_slip8_gtwy node model represents an IP-based gateway supporting four Ethernet hub interfaces, and eight serial line interfaces. IP packets arriving on any interface are routed to the appropriate output interface based on their destination IP address. The Routing Information Protocol (RIP) or the Open Shortest Path First (OSPF) protocol may be used to dynamically and automatically create the gateway's routing tables and select routes in an adaptive manner. This gateway requires a fixed amount of time to route each packet as determined by the "IP Routing Speed" attribute of the node. Packets are routed on a first-come-first-serve basis and may encounter queuing at the lower protocol layers, depending on the transmission rate of the corresponding output interface. Protocols: IP, UDP, RIP, Ethernet (IEEE 802.3), OSPF, SLIP Interconnections: 1) 4 Ethernet hub connections at selectable data rates. 2) 8 Serial Line IP connections at selectable data rates.

Links: PPP_DS3: Connects two nodes running IP. Packet Formats: ip3_dgram Data Rate: DS3 (44.736 Mbps)

Result and Discussion

A. The route for the traffic demand between Router A and Router C:

Areas Scenario.

Balanced Scenario.

No_Areas Scenario. Figure 5: Comparing the route between Router A and Router C in the three scenarios.

B. The route for the traffic demand between Router B and Router H:

Areas Scenario.

Balanced Scenario.

NO_Areas Scenario. Figure 6: Comparing the route between Router Band Router H in the three scenarios.

Questions: Q1) Explain why, for the same pair of routers, the Areas and Balanced scenarios result in different routes than those observed in the No_Areas scenario. Answer: As we can see in figures 5 and 6 that the routes in the scenarios Areas and Balanced are different from the ones in the scenario No_Areas for the same pair of routers. In No_Areas scenario the cost of the path from Router A to Router C through Router D and Router E is the least (15), so this route is selected. Now there are two least cost (40) paths between Router B and Router H as shown in figure 6 and any one of these routes is selected. But, in scenario Areas, the routers first look for destination in their area itself even if there is other alternative which is better. Here, Router A, Router B and Router C fall in the same area. So, a direct route from Router A to Router C is selected even though its cost (20) is more than the one in the No_Areas scenario. In the third scenario, that is, Balanced all the best routes are selected and the traffic or load is balanced between all these routes. In our case from Router B to Router H there are two least cost paths (40) as seen above and hence the load is shared by both the routes. Hence, the routes in scenarios Areas and Balanced are different than the ones in scenario No_Areas for the same pair of routers.

Q2) Using the simulation log, examine the generated routing table in Router A for each one of the three scenarios. Explain the values assigned to the Metric column of each route. Answer:

Figure 7: Routing table of Router A in NO_Areas Scenario.

First we need to know the IP addresses and the interfaces of each router in the network. To do so, we used the Lab 6 guidelines in order to configure the simulator to export the IP addresses assigned to each router interface. Figure 8 show the configuration of the simulator and figure 9 show a sample of the IP address information of NO_Areas scenario.

10

Figure 8: Simulator configuration.

Figure 9: IP address information NO_Areas scenario.


11

Let as trace the packet at fifth entry in figure 7. The destination address is 192.0.12.0, by checking figure 9 we know that it is a sub-network belong to Router E. The next hop address is 192.0.7.1 which belongs to Router D, this mean that Router A will send this packet to Router D. The total cost of the rout is 10; which is: Router A to Router D (cost 5) then to Router D to Router E (cost 5); the total cost = 5 + 5 = 10. Let us take another example; the thirteenth entry in figure 7, the destination address is 192.0.2.0 which belongs to a sub-network of Router B. A very important not here is that this IP is of interface 11 which connects Router B and C and thats why Router A cannot sent the packet through the direct connection between them, which is 192.0.1.1 an interface 10 with only 20 cost. The next hop address is 192.0.7.1 which belongs to Router D and the total cost is 35. The full rout is: Router A to Router D (cost 5) then to Router E (cost 5) then to Router C (cost 5) finally to Router B (cost 20); the total cost = 5 + 5 + 5 + 20 = 35.

Figure 10: Routing table of Router A in Areas Scenario.

12

Figure 11: IP address information Areas scenario.

In this scenario, if a router needs to send packets to another router, it first checks if the router is in its own area, if yes then it sends it to that router within that area, even though there was a better alternative. Let as trace the packet at eighth entry in figure 10. The destination address is 192.0.2; by checking figure 11 we know that this is a sub-network belongs to Router B with interface 11 that connect Router B with Router C. The next hop address is 192.0.8.1 which belongs to Router C, this mean that Router A will send this packet to Router C. The total cost of the rout is 40; which is: Router A to Router C (cost 20) then to Router B (cost 20); the total cost = 20 + 20 = 40. We can see that Router A could have followed the least cost path through Router D and Router E to reach Router C with cost 35, but since Router B and Router C fall in the same area as that of Router A, it selects these two routers to send the packets.

13

Figure 12: Routing table of Router B in Balanced Scenario.

Figure 10 show the routing table of Router B at Balanced scenario. When configuring this scenario we choose Routers B and H to be balanced. As we can see that the routing table is balanced between the two destinations attached to Router B. As shown in figure 12, the nest hop column is equally distributed between the two IP address 192.0.1.2 and 192.0.2.1 which correspond to routers A and C.

14

Figure 13: Routing table of Router A in Balanced Scenario. Figure 13 depicts the routing table of Router A. The reason being, both select the least cost paths, but the difference is that in balanced scenario a router can send packets to other routers through more than one path if those paths have same cost. This is done to balance the load. Hence the metric values for all the entries are calculated in the same way as that for the No_Areas scenario. Q3) OPNET allows you to examine the link-state database that is used by each router to build the directed graph of the network. Examine this database for Router A in the No_Areas scenario. Show how Router A utilizes this database to create a map for the topology of the network and draw this map (This is the map that will be used later by the router to create its routing table.) Answer: Figure 14 show a sample of the IP address information of all routers of the network. We used this to know which router is sending router of the advertisement message. In addition, we used this figure to now each cost in an advertisement message belongs to which link.

15

Figure 14: sample of IP address information NO_Areas scenario.

Following is the first advertisement message in the link-state database of Router A. The Adv Router ID: 192.0.12.1 is the IP address of the sender of this adv. message. We used information in figure 14 to figure out the name of sending router and it is Router E. We can see that the first cost is of the loopback interface which normally zero for all routers. Every next two lines are for the cost of one link. The next two lines are for the link between Router E and D with cost of 5. The next lines belong to the link between Routers E and C with cost of 5. The final two lines of the adv. message are for the cost of the final link between Routers E and G with cost of 5.

LSA Type: Router Links, Link State ID: 192.0.12.1, Adv Router ID: 192.0.12.1 Sequence Number: 46, LSA Age: 4 LSA Timestamp: 22.501 Link Type: Stub Network, Link ID: 192.0.12.1, Link Data: 255.255.255.0, Link Cost: 0, Link Type: Point-To-Point, Link ID: 192.0.13.1, Link Data: 192.0.9.1, Link Cost: 5, Link Type: Stub Network, Link ID: 192.0.9.0, Link Data: 255.255.255.0, Link Cost: 5, Link Type: Point-To-Point, Link ID: 192.0.14.1, Link Data: 192.0.3.1, Link Cost: 5, Link Type: Stub Network, Link ID: 192.0.3.0, Link Data: 255.255.255.0, Link Cost: 5, Link Type: Point-To-Point, Link ID: 192.0.17.1, Link Data: 192.0.4.1, Link Cost: 5, Link Type: Stub Network, Link ID: 192.0.4.0, Link Data: 255.255.255.0, Link Cost: 5,
16

Table 1 show the cost between links after receiving the advertisement send by Router E. The diagonal of the table represent a Loopback like which normally has a cost equals to zero for all routers. This sign (-) indicate that no direct link between corresponding routers. We put the information about the links from the adv. message in the table.

Table 1: link cost between all routers and Router A after adv. by Router E.

A B C D E F G H

A 0

B 0 -

D 0 5 -

E -

0 5 -

F 0

0 -

G 5 0

H -

As another example, let us trace the second adv. message. The message is shown below: LSA Type: Router Links, Link State ID: 192.0.17.1, Adv Router ID: 192.0.17.1 Sequence Number: 47, LSA Age: 7 LSA Timestamp: 22.501 Link Type: Stub Network, Link ID: 192.0.17.1, Link Data: 255.255.255.0, Link Cost: 0, Link Type: Point-To-Point, Link ID: 192.0.18.1, Link Data: 192.0.10.1, Link Cost: 10, Link Type: Stub Network, Link ID: 192.0.10.0, Link Data: 255.255.255.0, Link Cost: 10, Link Type: Point-To-Point, Link ID: 192.0.12.1, Link Data: 192.0.4.2, Link Cost: 5, Link Type: Stub Network, Link ID: 192.0.4.0, Link Data: 255.255.255.0, Link Cost: 5, Link Type: Point-To-Point, Link ID: 192.0.19.1, Link Data: 192.0.5.1, Link Cost: 10, Link Type: Stub Network, Link ID: 192.0.5.0, Link Data: 255.255.255.0, Link Cost: 10, The router correspond to the Adv Router ID: 192.0.17.1 is Router G. Thus the sending router of this adv. message is Router G. The first line is the cost of the loopback link which is zero. The second two links are for the link between Router G and F with cost of 10. The second two lines are for the link connecting Routers G and E with cost 5. Finally, the last two lines belong to the link connecting Routers G and H with cost of 10. Table 2 show the cost between links connecting all routers after receiving the advertisement send by Router E and G.

17

Table 2: link cost between all routers and Router A after adv. by Router G.

A B C D E F G H

A 0

B 0 -

D 0 5 -

E -

0 5 -

F 0 10

0 5 -

G 5 0

H 10 0

Following the method that we have just descried we have Table 3. To verify this result we can check figure 2.

Table 3: link cost between all routers and Router A all adv. messages.

A B C D E F G H

A 0 20 20 5 -

B 20 0 20 -

C 20 20 0 5 -

D 5 0 5 5 -

E 5 5 0 5 -

F 5 0 10 10

G 5 10 0 10

H 10 10 0

Q4) Create another scenario as a duplicate of the No_Areas scenario. Name the new scenario Q4_No_Areas_Failure. In this new scenario simulate a failure of the link connecting Router D and Router E. Have this failure start after 100 seconds. Rerun the simulation. Show how that link failure affects the content of the link-state database and routing table of Router A. (You will need to disable the global attribute OSPF Sim Efficiency. This will allow OSPF to update the routing table if there is any change in the network.) Answer: Figure 15 depicts the new scenario.

18

Figure 15: Q4_No_Areas_Failure scenario.

The routing table of Router A of Q4_No_Areas_Failure scenario is shown in figure 16.Comparing this table with the one shown in figure 7 we realize that the costs associated with the entries of figure 15 are more than those of figure 7. This is a result of giving away of the link between Router D and E. For example, the eighth entry has a destination address of 192.0.5.0 which belong to Router H IF(10) and the cost is 30. The rout is: Router A to Router D cost(5) then Router D to Router F cost(5) next Router F to router G cost(10) finally Router G to Router H with cost (10). So the total cost = 5 + 5 + 10 + 10 = 30.

If there is no failure at the link of Routers D and E the rout is: Router A to Router D with cost(5) then Router D to Router F with cost(5) finally Router F to Router H with cost(10),so the total cot = 5 + 5 + 10 = 20 which is considerably more that the

19

Figure 16: Routing table of Router A in Q4_No_Areas_Failure Scenario. Regarding the link-State database, let us remember that in this scenario we added a link failure between Routers D and E but we did not add a recovery for that failure. Therefore, the link will not back again to work. As a result, we expect that Routers D and E will not send an update about the status of this like. The following two messages were extracted from the link-state database generated for this scenario. The adv. messages belong to Routers D and E respectively. We can see that Router D sends update about the like connecting Router D and A and link connecting Routers D and F. Likewise, Router E sends update of the like between Router E and C and link between Routers E and G.

LSA Type: Router Links, Link State ID: 192.0.13.1, Adv Router ID: 192.0.13.1 Sequence Number: 303, LSA Age: 3 LSA Timestamp: 105.000 Link Type: Stub Network, Link ID: 192.0.13.1, Link Data: 255.255.255.0, Link Cost: 0, Link Type: Point-To-Point, Link ID: 192.0.16.1, Link Data: 192.0.7.1, Link Cost: 5, Link Type: Stub Network, Link ID: 192.0.7.0, Link Data: 255.255.255.0, Link Cost: 5, Link Type: Point-To-Point, Link ID: 192.0.18.1, Link Data: 192.0.6.1, Link Cost: 5, Link Type: Stub Network, Link ID: 192.0.6.0, Link Data: 255.255.255.0, Link Cost: 5,

20

LSA Type: Router Links, Link State ID: 192.0.12.1, Adv Router ID: 192.0.12.1 Sequence Number: 304, LSA Age: 4 LSA Timestamp: 105.000 Link Type: Stub Network, Link ID: 192.0.12.1, Link Data: 255.255.255.0, Link Cost: 0, Link Type: Point-To-Point, Link ID: 192.0.14.1, Link Data: 192.0.3.1, Link Cost: 5, Link Type: Stub Network, Link ID: 192.0.3.0, Link Data: 255.255.255.0, Link Cost: 5, Link Type: Point-To-Point, Link ID: 192.0.17.1, Link Data: 192.0.4.1, Link Cost: 5, Link Type: Stub Network, Link ID: 192.0.4.0, Link Data: 255.255.255.0, Link Cost: 5,

Q5) For both No_Areas and Q4_No_Areas_Failure scenario, collect the Traffic Sent (bits/sec) statistic (one of the Global Statistics under OSPF). Rerun the simulation for these two scenarios and obtain the graph that compares the OSPFs Traffic Sent (bits/sec) in both scenarios. Comment on the obtained graph.

Answer:

Figure 17: Traffic Sent (bits/sec) comparison No_Areas vs. Q4_No_Areas_Failure scenario

21

Figure 17: Traffic Sent (bits/sec) comparison No_Areas vs. Q4_No_Areas_Failure scenario Time average.

22

You might also like