Friday, May 10, 2024

Cisco 114 - OSPF Part 2

R3#show ip ospf interface f2/0
^ Displays OSPF info about interface f2/0. Includes cost info.

R3(config-router)#auto-cost reference-bandwidth <mbps>
^ Sets the reference bandwidth for better cost calculations.
The default reference bandwidth is 100 mbps which is the speed of Fast Ethernet.
On all your routers, set the reference-bandwidth to higher than your highest link.  This allows for later growth.

R1(config)#int g0/0
R1(config-if)#ip ospf cost 10000
^ Manually sets the ospf cost of an interface to 10000

Not recommended:
Another way to change the OSPF cost of an interface is with the bandwidth command.  Recall the formula to calculate OSPF cost is:
reference bandwidth / interface bandwidth

R1(config-if)#bandwidth <kbps>
^The interface speed does not actually change, but costs calculated with OSPF metrics use the bandwidth number.

R3#show ip ospf interface brief
^ Displays OSPF costs for each interface

R1#show ospf neighbor
^ Displays info about ospf neighbors

R1(config)#int g0/0
R1(config-if)#ip ospf 1 area 0
R1(config-if)#int g1/0
R1(config-if)#ip ospf 1 area 0
^ These commands specifically go into two interfaces and activates OSPF on them

R1(config-router)#passive-interface default
^ Configure ALL interfaces as OSPF passive interfaces

R1(config-router)#no passive-interface <int-id>
^ Turns off passive interface for specified interface

show ip protocols
^ Displays OSPF info




[These are my notes from Jeremy's excellent CCNA course which can be viewed here.]