Difference between revisions of "EVE OSPF Routing"
(Created page with "File:EVE_OSPF_Route_Topology.png EVE Topology file for download<br> This lab is substantially based on Cisco Systems 11.6.1 Basic OSPF Con...") |
|||
(One intermediate revision by the same user not shown) | |||
Line 78: | Line 78: | ||
*Sep 8 16:08:09.631: %OSPF-5-ADJCHG: Process 1, Nbr 192.168.5.2 on Serial1/0 from LOADING to FULL, Loading Done | *Sep 8 16:08:09.631: %OSPF-5-ADJCHG: Process 1, Nbr 192.168.5.2 on Serial1/0 from LOADING to FULL, Loading Done | ||
− | =OSPF | + | ==Newer and maybe preferable approach== |
+ | An alternative approach to advertising OSPF interfaces is to configure the command directly on each interface. The configuration below achieves the same objective as the approach using the network statement. | ||
+ | Router(config-router)# interface Ethernet 0/0 | ||
+ | Router(config-if)# ip ospf 1 area 0 | ||
+ | Router(config-router)# interface Ethernet 0/1 | ||
+ | Router(config-if)# ip ospf 1 area 0 | ||
+ | |||
+ | |||
− | |||
+ | =OSPF Routing - Costs and path selection= | ||
OSPF is a link state protocol. It uses cost as its metric and cost is inversely proportional to bandwidth. You can determine the cost metric by dividing 10^8 (100,000,000) by the bandwidth in bits per second. | OSPF is a link state protocol. It uses cost as its metric and cost is inversely proportional to bandwidth. You can determine the cost metric by dividing 10^8 (100,000,000) by the bandwidth in bits per second. | ||
*From Core2 you can check the bandwidth of both the Ethernet and the Serial interface using the '''show interface <e0/0 or s1/0>''' commands. | *From Core2 you can check the bandwidth of both the Ethernet and the Serial interface using the '''show interface <e0/0 or s1/0>''' commands. |
Latest revision as of 04:33, 8 September 2020
EVE Topology file for download
This lab is substantially based on Cisco Systems 11.6.1 Basic OSPF Configuration Lab.
Contents
- 1 Learning Objectives
- 2 Scenario
- 3 Steps
- 4 Basic Testing
- 5 Configuring OSPF
- 6 OSPF Routing - Costs and path selection
- 7 Examining the Routing Table
- 8 OSPF Database
- 9 OSPF Router ID
- 10 OSPF Designated Routers (DR)
- 11 Verifying OSPF configuration
- 12 Configuring OSPF costs
- 13 Redistributing an OSPF Default Route
- 14 Configure auto cost
- 15 Tuning OSPF timers
Learning Objectives
Upon completion of this lab, you will be able to:
- Configure OSPF routing
- Configure OSPF router IDs
- Verify OSPF routing using show commands
- Configure a static default route
- Propagate default route to OSPF neighbors
- Configure OSPF Hello and Dead Timers
- Configure OSPF on a Multi-access network
- Configure OSPF priority
- Understand the OSPF election process
- Document the OSPF configuration
Scenario
In this lab activity, you will configure the Open Shortest Path First (OSPF) routing protocol for a single area. The IP addressing and subnetting has been predesigned and the focus of the lab is on the OSPF configuration and operation.
The lab topology has several features that you should take time to consider and clarify with your tutor if you don't understand.
- The network address is displayed next to each link and access layer switch. The host portion of that same network address is indicated for each layer 3 (router) interface as a single digit representing the last octet.
- There two types of links and speeds in use. The blue links are Ethernet (10 Mbps) while the yellow link is a slower Serial connection. You should note the impact that these have on the OSPF costs and the preferred routes.
- There are a mix of broadcast based (Ethernet) and point-to-point links (serial) you should note how this effects the use of DR (Designated Routers) and BDR (Backup Designated Routers).
Steps
Hostnames
Apply hostnames to each of your routers:
Interface IP addresses
- Apply IP addresses to each of your router's interfaces and activate the interface.
Remember that the network address is provided for each link and the last octet is provided for each interface.
Basic Testing
Once the interfaces have been configured, you should be able to ping from your router to its directly-connected neighbours.
- Verify local configuration with the command:
Router# show ip interface brief
- Verify connectivity between neighbours with the ping command.
- Note that you can not ping beyond your directly connected neighbour.
- Rectify any problems before proceeding.
Focus Question:
Why can't you ping any further than your directly connected neighbours? _______________________________________________________________________________________________________
Hint, look at show ip route on each of the routers. At this stage they are only aware of the networks in which they have a configured interface. IE directly connected networks.
Configuring OSPF
- On each router turn on OSPF. Enter a process ID of 1 for the process-ID parameter. The process ID number is not critical and it can vary between routers. It is customary to use the number 1 and I recommend you do the same.
Router#conf t Enter configuration commands, one per line. End with CNTL/Z. Router(config)#router ospf 1 Router(config-router)#
Once you are in the Router OSPF configuration sub-mode, configure your directly connected networks to be included in the OSPF updates that are sent out to neighbouring routers.
The OSPF network command uses a combination of network-address and wildcard-mask. We will look at wildcard masks in detail when we cover the ACL topic. For the moment, know that if you invert the subnetmask (255.255.255.0 netmask becomes a 0.0.0.255 wild card mask) you will have a wildcard mask that advertises the interface that is configured
Use an area ID of 0 for the OSPF area-id parameter. 0 will be used for the OSPF area ID in all of the network statements in this topology.
An example only:
Router(config)#router ospf 1 Router(config-router)#network 192.168.1.4 0.0.0.3 area 0 Router(config-router)#network 192.168.1.8 0.0.0.3 area 0 Router(config-router)#^Z Router# %SYS-5-CONFIG_I: Configured from console by console
Note that whenever two OSPF routers communicate for the first time you will receive a message similar to this:
*Sep 8 16:08:09.631: %OSPF-5-ADJCHG: Process 1, Nbr 192.168.5.2 on Serial1/0 from LOADING to FULL, Loading Done
Newer and maybe preferable approach
An alternative approach to advertising OSPF interfaces is to configure the command directly on each interface. The configuration below achieves the same objective as the approach using the network statement.
Router(config-router)# interface Ethernet 0/0 Router(config-if)# ip ospf 1 area 0 Router(config-router)# interface Ethernet 0/1 Router(config-if)# ip ospf 1 area 0
OSPF Routing - Costs and path selection
OSPF is a link state protocol. It uses cost as its metric and cost is inversely proportional to bandwidth. You can determine the cost metric by dividing 10^8 (100,000,000) by the bandwidth in bits per second.
- From Core2 you can check the bandwidth of both the Ethernet and the Serial interface using the show interface <e0/0 or s1/0> commands.
- From Core2 you can check the OSPF cost for both the Ethernet and Serial interfaces using the show ip ospf interface <e0/0 or s1/0> commands.
- For each link record the OSPF cost on the paper based topology diagram provided by your tutor.
- Now look at Distribution2, which path do you predict traffic will take in order to get to the 192.168.1.4/30 network?
Remember OSPF will take the shortest path based on the lowest cumulative cost.
Examining the Routing Table
- Once your network entries are complete (on all routers), check the routing table on each router and verify that every router has an entry for all five networks.
You should see something like this:
Core2#show ip route Codes: L - local, C - connected, S - static, R - RIP, M - mobile, B - BGP D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2 E1 - OSPF external type 1, E2 - OSPF external type 2 i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2 ia - IS-IS inter area, * - candidate default, U - per-user static route o - ODR, P - periodic downloaded static route, H - NHRP, l - LISP a - application route + - replicated route, % - next hop override Gateway of last resort is not set 192.168.1.0/24 is variably subnetted, 5 subnets, 2 masks O 192.168.1.0/30 [110/20] via 192.168.1.5, 00:01:44, Ethernet0/0 C 192.168.1.4/30 is directly connected, Ethernet0/0 L 192.168.1.6/32 is directly connected, Ethernet0/0 C 192.168.1.8/30 is directly connected, Serial1/0 L 192.168.1.9/32 is directly connected, Serial1/0 O 192.168.4.0/24 [110/30] via 192.168.1.5, 00:01:44, Ethernet0/0 O 192.168.5.0/24 [110/30] via 192.168.1.5, 00:01:44, Ethernet0/0
The O indicates the routing table entry was learned via OSPF from a neighbouring router.
Focus Question: What does the 110 represent in the routing table?
______________________________________________________________________________
OSPF Database
Recall that as OSPF is a link state protocol each OSPF router must carry the full topology for the area in memory.
- Examine this database with the show ip ospf database command:
Core1#sh ip ospf database OSPF Router with ID (192.168.1.5) (Process ID 1) Router Link States (Area 0) Link ID ADV Router Age Seq# Checksum Link count 192.168.1.5 192.168.1.5 124 0x80000004 0x005225 2 192.168.1.9 192.168.1.9 140 0x80000004 0x00E28A 3 192.168.5.1 192.168.5.1 149 0x80000005 0x00E59A 3 192.168.5.2 192.168.5.2 92 0x80000004 0x00D0A6 4 Net Link States (Area 0) Link ID ADV Router Age Seq# Checksum 192.168.1.1 192.168.5.1 149 0x80000002 0x00D4AD 192.168.1.6 192.168.1.9 140 0x80000002 0x00BABA 192.168.4.2 192.168.5.2 92 0x80000002 0x00BBBD 192.168.5.2 192.168.5.2 92 0x80000002 0x00B0C7
- Confirm that other routers share the same database.
OSPF Router ID
Focus question: Which IP address forms the router ID and why?
Focus question: What is the downside to using a physical interface IP address as an OSPF router ID?
The OSPF router ID is used to uniquely identify the router in the OSPF routing domain. A router ID is an IP address. Cisco routers derive the Router ID in one of three ways and with the following precedence:
- IP address configured with the OSPF router-id command.
- Highest IP address of any of the router’s loopback addresses.
- Highest active IP address on any of the router’s physical interfaces.
Setting OSPF router ID with a loopback interface
- Use loopback addresses to change the router IDs of the routers in the topology.
Core1(config)#interface loopback 0 Core1(config-if)#ip address 10.1.1.1 255.255.255.255
Core2(config)#interface loopback 0 Core2(config-if)#ip address 10.2.2.2 255.255.255.255
Distribution1(config)#interface loopback 0 Distribution1(config-if)#ip address 10.3.3.3 255.255.255.255
Distribution2(config)#interface loopback 0 Distribution2(config-if)#ip address 10.4.4.4 255.255.255.255
Focus question: What feature of a loopback interface makes it a better choice than a physical interface IP address as an OSPF router ID?
OSPF router IDs are set when the router reboots.
- Save your configuration on each router. In EVE use [More Actions] -> [Export all CFGs], if you were using a physical router you would use the copy run start command.
- Reboot your routers.
- In EVE use [More Actions] -> [Stop all nodes] to turn the routers off and then:
- [More Actions] -> [Start all nodes] to restart them.
- Examine this database with the show ip ospf database command:
Distribution1#show ip ospf database OSPF Router with ID (10.3.3.3) (Process ID 1) Router Link States (Area 0) Link ID ADV Router Age Seq# Checksum Link count 10.1.1.1 10.1.1.1 4 0x80000003 0x00AE02 2 10.2.2.2 10.2.2.2 4 0x80000003 0x00E2AC 3 10.3.3.3 10.3.3.3 4 0x80000003 0x00C7E1 3 10.4.4.4 10.4.4.4 5 0x80000003 0x0092FD 4 Net Link States (Area 0) Link ID ADV Router Age Seq# Checksum 192.168.1.1 10.3.3.3 3 0x80000001 0x005A44 192.168.1.6 10.2.2.2 4 0x80000001 0x00227D 192.168.4.2 10.4.4.4 5 0x80000001 0x0095F5 192.168.5.2 10.4.4.4 5 0x80000001 0x008AFF
Setting the OSPF router ID with a router-id command
- Use the router-id command to change the router ID on the Core1 router. In this case simply change your router ID to 20.x.x.x
Note: Some IOS versions do not support the router-id command. If this command is not available, ignore this section.
Router(config)#router ospf 1 Router(config-router)#router-id 20.1.1.1 Reload or use clear ip ospf process command, for this to take effect
If this command is used on an OSPF router process which is already active (has neighbors), the new router-ID is used at the next reload or at a manual OSPF process restart. To manually restart the OSPF process, use the clear ip ospf process command.
Core1#(config-router)#end Core1# clear ip ospf process Reset ALL OSPF processes? [no]:yes
- Use the show ip ospf neighbor command on a neighbouring router to verify that the router IDs have been changed.
Core2#show ip ospf neighbor Neighbor ID Pri State Dead Time Address Interface 10.4.4.4 0 FULL/ - 00:00:36 192.168.1.10 Serial1/0 20.1.1.1 1 FULL/BDR 00:00:39 192.168.1.5 Ethernet0/0
- Remove the configured router ID with the no form of the router-id command.
Core1(config)#router ospf 1 Core1(config-router)#no router-id 20.1.1.1 Reload or use “clear ip ospf process” command, for this to take effect
Restart the OSPF process using the clear ip ospf process command
Restarting the OSPF process forces the router to use the IP address configured on the Loopback 0 interface as the Router ID.
Core1# clear ip ospf process Reset ALL OSPF processes? [no]:yes Core1#
OSPF Designated Routers (DR)
An OSPF router forms an adjacency with all of its directly connected neighbours. In the case of a point-to-point WAN link (Serial) each interface will only connect to a single router and thus there will only be one neighbour visible on that link. However, in the case of a broadcast based multi-access network (think Ethernet switch) there is the possibility of multiple neighbours via a single interface. As the size of the region grows the number of conversations relating to adjacencies and routing updates grows exponentially and would unnecessarily limit the size of network that OSPF can support.
To address this issue OSPF elects a Designated Router (DR) and Backup Designated Router (BDR) in each layer 2 (Ethernet) broadcast domain. The DR and BDR (in the event of a DR failure) take over the responsibility for aggregating and distributing OSPF information. Other routers in this region principally exchange information with the DR and consequently the amount of traffic grows more linearly as extra OSPF routers are added.
The DR/BDR election process is based on the Router ID with the highest ID becoming the DR and the second highest ID becoming the BDR.
You can see the role played by each router via the show ip ospf neighbor command.
Distribution1#show ip ospf neighbor Neighbor ID Pri State Dead Time Address Interface 10.4.4.4 1 FULL/DR 00:00:39 192.168.5.2 Ethernet0/2 10.4.4.4 1 FULL/DR 00:00:37 192.168.4.2 Ethernet0/0 20.1.1.1 1 FULL/BDR 00:00:39 192.168.1.2 Ethernet0/1
- Examine the DR/BDR status of each of your routers.
Focus Question: Why do Core2 and Distribution2 not list a role for the Serial link?
It is also possible to manipulate the election process through the use of the interface command ip ospf priority <priority>.
The default OSPF priority is 1 and the router with the highest priority will be elected the DR. If a priority of 0 is specified the router interface is prevented from taking on a DR or BDR role.
- Prevent one of the interfaces that are currently a DR on Distribution2 from becoming the DR or BDR by setting the OSPF priority to 0.
Verifying OSPF configuration
- On your router, use the show ip protocols command to view information about the routing protocol operation.
Notice that the information that was configured in the previous Tasks, such as protocol, process ID, neighbor ID, and networks, is shown in the output. The IP addresses of the adjacent neighbors are also shown.
Core1#show ip protocols Routing Protocol is "ospf 1" Outgoing update filter list for all interfaces is not set Incoming update filter list for all interfaces is not set Router ID 10.1.1.1 Number of areas in this router is 1. 1 normal 0 stub 0 nssa Maximum path: 4 Routing for Networks: 192.168.1.0 0.0.0.3 area 0 192.168.1.4 0.0.0.3 area 0 Routing Information Sources: Gateway Distance Last Update 10.1.1.1 110 00:16:59 10.2.2.2 110 00:17:05 10.3.3.3 110 00:16:54 10.4.4.4 110 00:16:59 Distance: (default is 110)
Configuring OSPF costs
OSPF determines cost by dividing 100,000,000 by the configured bandwidth. For Ethernet interfaces the the bandwidth parameter follows the actual interface speed. However, for some interfaces, such as serial, the bandwidth must be configured manually if OSPF is to accurately select the optimum route.
- Use the show ip route command on the Core2 router to view the OSPF cost and path to reach the 192.168.4.0/24 and 192.168.5.0/24 networks.
Core2#show ip route Codes: L - local, C - connected, S - static, R - RIP, M - mobile, B - BGP D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2 E1 - OSPF external type 1, E2 - OSPF external type 2 i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2 ia - IS-IS inter area, * - candidate default, U - per-user static route o - ODR, P - periodic downloaded static route, H - NHRP, l - LISP a - application route + - replicated route, % - next hop override Gateway of last resort is not set 10.0.0.0/32 is subnetted, 1 subnets C 10.2.2.2 is directly connected, Loopback0 192.168.1.0/24 is variably subnetted, 5 subnets, 2 masks O 192.168.1.0/30 [110/20] via 192.168.1.5, 00:05:24, Ethernet0/0 C 192.168.1.4/30 is directly connected, Ethernet0/0 L 192.168.1.6/32 is directly connected, Ethernet0/0 C 192.168.1.8/30 is directly connected, Serial1/0 L 192.168.1.9/32 is directly connected, Serial1/0 O 192.168.4.0/24 [110/30] via 192.168.1.5, 00:05:24, Ethernet0/0 O 192.168.5.0/24 [110/30] via 192.168.1.5, 00:05:24, Ethernet0/0 Core2#
OSPF is directing packets from Core2 to the LAN (192.168.4 & 5 net) via Core1 rather than seemingly more direct path via Distribution2. This makes sense because as we have seen the bandwidth on the serial link is the default to 1544 Kbits which is much slower than the Ethernet links. If this is not the actual bandwidth of the serial link, the bandwidth will need to be changed so that the OSPF cost can be calculated correctly.
- Use the bandwidth command to change the bandwidth of the serial interfaces of the Core2 and Distribution2 routers to the actual bandwidth. Let's assume that our serial link is really opperating at 8 Mbps. Note that bandwidth is specified in terms of kbps so we multiply by 1000.
Core2(config)#interface serial1/0 Core2(config-if)#bandwidth 8000
Distribution2(config)#interface serial1/0 Distribution2(config-if)#bandwidth 8000
- Use the show ip ospf interface command to verify the cost of the serial links.
The cost of the Serial link is now 12 (100,000,000 / 8,000 kbps).
Core2#show ip ospf interface serial 0/0 Serial1/0 is up, line protocol is up Internet Address 192.168.1.9/30, Area 0, Attached via Network Statement Process ID 1, Router ID 10.2.2.2, Network Type POINT_TO_POINT, Cost: 12 Topology-MTID Cost Disabled Shutdown Topology Name 0 12 no no Base Transmit Delay is 1 sec, State POINT_TO_POINT Timer intervals configured, Hello 10, Dead 40, Wait 40, Retransmit 5 oob-resync timeout 40 Hello due in 00:00:08 Supports Link-local Signaling (LLS) Cisco NSF helper support enabled IETF NSF helper support enabled Index 2/2, flood queue length 0 Next 0x0(0)/0x0(0) Last flood scan length is 1, maximum is 1 Last flood scan time is 0 msec, maximum is 0 msec Neighbor Count is 1, Adjacent neighbor count is 1 Adjacent with neighbor 10.4.4.4 Suppress hello for 0 neighbor(s)
Alternate Method to set costs
An alternative method to using the bandwidth command is to use the ip ospf cost command, which allows you to directly configure the cost.
We won't use it here as the use of the bandwidth command is preferred as all routing protocols will take notice. If you use the ip ospf cost then you only influence OSPF. Other routing protocols would not be affected.
Redistributing an OSPF Default Route
- Configure a loopback address on the Core1 router to simulate a link to an ISP.
Core1#configure terminal Enter configuration commands, one per line. End with CNTL/Z. Core1(config)#interface loopback 1 Core1(config-if)#ip address 1.2.3.4 255.255.255.255
- Configure a static default route on the Core1 router. Use the loopback address that ha been configured to simulate a link to an ISP as the exit interface.
Core1(config)#ip route 0.0.0.0 0.0.0.0 loopback 1
- At this point it is worth verifying that Core1 has a gateway of last resort (default-gateway) set while the other routers do not.
Core1#show ip route Codes: L - local, C - connected, S - static, R - RIP, M - mobile, B - BGP D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2 E1 - OSPF external type 1, E2 - OSPF external type 2 i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2 ia - IS-IS inter area, * - candidate default, U - per-user static route o - ODR, P - periodic downloaded static route, H - NHRP, l - LISP a - application route + - replicated route, % - next hop override Gateway of last resort is 0.0.0.0 to network 0.0.0.0 S* 0.0.0.0/0 is directly connected, Loopback1 1.0.0.0/32 is subnetted, 1 subnets C 1.2.3.4 is directly connected, Loopback1 10.0.0.0/32 is subnetted, 1 subnets C 10.1.1.1 is directly connected, Loopback0 192.168.1.0/24 is variably subnetted, 5 subnets, 2 masks C 192.168.1.0/30 is directly connected, Ethernet0/1 L 192.168.1.2/32 is directly connected, Ethernet0/1 C 192.168.1.4/30 is directly connected, Ethernet0/0 L 192.168.1.5/32 is directly connected, Ethernet0/0 O 192.168.1.8/30 [110/22] via 192.168.1.6, 00:08:12, Ethernet0/0 O 192.168.4.0/24 [110/20] via 192.168.1.1, 00:22:07, Ethernet0/1 O 192.168.5.0/24 [110/20] via 192.168.1.1, 00:22:07, Ethernet0/1
Core2#show ip route Codes: L - local, C - connected, S - static, R - RIP, M - mobile, B - BGP D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2 E1 - OSPF external type 1, E2 - OSPF external type 2 i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2 ia - IS-IS inter area, * - candidate default, U - per-user static route o - ODR, P - periodic downloaded static route, H - NHRP, l - LISP a - application route + - replicated route, % - next hop override Gateway of last resort is not set 10.0.0.0/32 is subnetted, 1 subnets C 10.2.2.2 is directly connected, Loopback0 192.168.1.0/24 is variably subnetted, 5 subnets, 2 masks O 192.168.1.0/30 [110/20] via 192.168.1.5, 00:23:10, Ethernet0/0 C 192.168.1.4/30 is directly connected, Ethernet0/0 L 192.168.1.6/32 is directly connected, Ethernet0/0 C 192.168.1.8/30 is directly connected, Serial1/0 L 192.168.1.9/32 is directly connected, Serial1/0 O 192.168.4.0/24 [110/22] via 192.168.1.10, 00:09:14, Serial1/0 O 192.168.5.0/24 [110/22] via 192.168.1.10, 00:09:14, Serial1/0
- Use the default-information originate command to include the static route in the OSPF updates that are sent from the Core1 router. In this way, any router exchanging routes via OSPF can automatically learn of the default route and hence access the Internet.
Core1(config)#router ospf 1 Core1(config-router)#default-information originate
- Check the routing tables of Core2, Distribution1 and Distribution2 to verify that OSPF is indeed distributing this default route.
Distribution2#sh ip route Codes: L - local, C - connected, S - static, R - RIP, M - mobile, B - BGP D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2 E1 - OSPF external type 1, E2 - OSPF external type 2 i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2 ia - IS-IS inter area, * - candidate default, U - per-user static route o - ODR, P - periodic downloaded static route, H - NHRP, l - LISP a - application route + - replicated route, % - next hop override Gateway of last resort is 192.168.5.1 to network 0.0.0.0 O*E2 0.0.0.0/0 [110/1] via 192.168.5.1, 00:00:30, Ethernet0/0 [110/1] via 192.168.4.1, 00:00:30, Ethernet0/2 10.0.0.0/32 is subnetted, 1 subnets C 10.4.4.4 is directly connected, Loopback0 192.168.1.0/24 is variably subnetted, 4 subnets, 2 masks O 192.168.1.0/30 [110/20] via 192.168.5.1, 00:30:06, Ethernet0/0 [110/20] via 192.168.4.1, 00:30:06, Ethernet0/2 O 192.168.1.4/30 [110/22] via 192.168.1.9, 00:12:19, Serial1/0 C 192.168.1.8/30 is directly connected, Serial1/0 L 192.168.1.10/32 is directly connected, Serial1/0 192.168.4.0/24 is variably subnetted, 2 subnets, 2 masks C 192.168.4.0/24 is directly connected, Ethernet0/2 L 192.168.4.2/32 is directly connected, Ethernet0/2 192.168.5.0/24 is variably subnetted, 2 subnets, 2 masks C 192.168.5.0/24 is directly connected, Ethernet0/0 L 192.168.5.2/32 is directly connected, Ethernet0/0
Configure auto cost
As mentioned, OSPF costs are claculated by dividing 100,000,000 by the bandwidth. This limits the bandwidth that OSPF can uniquely identify.
Focus question: What is the maximum bandwidth OSPF can determine a unique cost for?
- Use the auto-cost reference-bandwidth command to adjust the reference bandwidth value.
Increase the reference bandwidth to 10000 to simulate 10GigE speeds. Configure this command on all routers in the OSPF routing domain.
Core1(config-router)#auto-cost reference-bandwidth 10000 % OSPF: Reference bandwidth is changed. Please ensure reference bandwidth is consistent across all routers.
Core2(config-router)#auto-cost reference-bandwidth 10000 % OSPF: Reference bandwidth is changed. Please ensure reference bandwidth is consistent across all routers.
Distribution1(config-router)#auto-cost reference-bandwidth 10000 % OSPF: Reference bandwidth is changed. Please ensure reference bandwidth is consistent across all routers.
Distribution2(config-router)#auto-cost reference-bandwidth 10000 % OSPF: Reference bandwidth is changed. Please ensure reference bandwidth is consistent across all routers.
Note: This command is not supported in Packet Tracer 6.0.1.
- Examine the routing table on the routers to see the impact on OSPF cost.
Tuning OSPF timers
The convergence time for OSPF can be reduced by increasing the frequency with which hello packets are sent and reducing the Dead Time counter.
- Use the show ip ospf neighbor command to view the Dead Time counter.
The Dead Time counter is counting down from the default interval of 40 seconds.
CRT02#show ip ospf neighbor Neighbor ID Pri State Dead Time Address Interface 10.3.3.3 1 FULL/DR 00:00:35 192.168.5.1 FastEthernet0/0 10.3.3.3 1 FULL/DR 00:00:34 192.168.4.1 Ethernet1/0 CRT02#
Configure the OSPF Hello and Dead intervals
The OSPF Hello and Dead intervals can be modified manually using the ip ospf hello-interval and ip ospf dead-interval interface commands.
- Use these commands to change the hello interval to 5 seconds and the dead interval to 20 seconds on the Serial 1/0 interfaces of the Core2 and Distribution2 routers.
Core2(config)#interface serial1/0 Core2(config-if)#ip ospf hello-interval 5 Core2(config-if)#ip ospf dead-interval 20
This would substantially speed up the time to converge if the Serial link were to fail. The trade-off is that more bandwidth is wasted with the more frequent hello packets.