
In this Free CCNP Lab you will configure OSPF routing on two Cisco 3660 routers using a class B network address of 131.108.0.0 subneted with a class C subnet mask of 255.255.255.0. . You will also configure a number of loopback interfaces to populate the routing table. I have included an un-configured GNS3 topology and the routers startup configuration files.
OSPF (Open Shortest Path First) is a router protocol used within larger autonomous system networks in preference to the Routing Information Protocol (RIP), an older routing protocol that is installed in many of today’s corporate networks. Like RIP, OSPF is designated by the Internet Engineering Task Force (IETF) as one of several Interior Gateway Protocols (IGP).
Using OSPF, a host that obtains a change to a routing table or detects a change in the network immediately multicasts the information to all other hosts in the network so that all will have the same routing table information. Unlike the RIP in which the entire routing table is sent, the host using OSPF sends only the part that has changed. With RIP, the routing table is sent to a neighbor host every 30 seconds. OSPF multicasts the updated information only when a change has taken place.
Rather than simply counting the number of hops, OSPF bases its path descriptions on “link states” that take into account additional network information. OSPF also lets the user assign cost metrics to a given host router so that some paths are given preference. OSPF supports a variable network subnet mask so that a network can be subdivided. RIP is supported within OSPF for router-to-end station communication. Since many networks using RIP are already in use, router manufacturers tend to include RIP support within a router designed primarily for OSPF.
Configuring OSPF:
OSPF is one of the most widely used dynamic routing protocols. Cisco’s version of OSPF is compatible with non-Cisco routers. If your network is large, jump into Multiple-Area OSPF configuration. Single area OSPF is suitable for small-to-medium internetworks.
Single area OSPF configuration is as follows:
1. Since OSPF best route calculations relies solely on Bandwidth, you need to setup the bandwidth of the serial interface involved in the routing process using the following command on the interface:
Router(config-if)#bandwidth XX
where XX is the bandwidth of the connection in kilobytes.
Remeber that this command does not change the actual bandwidth; it only changes the bandwidth being seen by the routing protocol for the purpose of best path calculation.
2. Instruct the router to activate the OSPF routing process:
Router(config)#router ospf YY
where YY is the process number of OSPF. This process number is of local significance. It does not have to be the same on all routers.
3. Instruct the router to advertise the directly-connected networks:
Router(config-router)#network NNN.NNN.NNN.NNN WWW.WWW.WWW.WWW area 0
wehre, NNN.NNN.NNN.NNN is the network ID of the directly connected network. WWW.WWW.WWW.WWW is the wildcard mask of the network address.
Note: If you are not familiar with the wildcard mask, just invert the subnet mask and you will get the wildcard mask (ex: S/N Mask of 255.255.255.0 becomes Wildcard Mask of 0.0.0.255, S/N Mask of 255.255.255.192 becomes 0.0.0.63)
Since we are setting a single area OSPF, we should always use “area 0”.
4. Repeat step 3 for every network that is directly connected to the router.
If you finished the first four steps on all the routers involved in the process, everything should work just fine. If you want to do more configurations, there are a few advanced steps to go through:
* To change the selection process of the DR (Designated Router) and BDR (Backup Designated Router) use the following command to change the router’s OSPF priority on a certain interface:
Router(config)#ip ospf priority PP
Where PP is the priority (0-255) the router with the highest priority becomes the DR. A priority of 0 means that this router will never be elected as DR.
* To restart the whole process of DR and BDR elections, use the command:
Router#clear ip ospf process *
* To change the cost of a certain link in the OSPF process, use the following command:
Router(config-if)#ip ospf cost CC
where CC is the suggested cost (0 to 65,535)
Troubelshooting:
You can use the following commands in troubelshooting:
- Router#show ip ospf.
- Router#show ip ospf database.
- Router#show ip ospf interface.
- Router#show ip ospf neighbor.
- Router#debug ip ospf events.
Download this lab now:
OSPF-Single-Area (62.5 KiB, 1,778 hits)

