Cisco Tips & Tricks

May 9, 2006

OSPF Cost

Filed under: IP Routing, ospf — ciscotips @ 9:38 pm

CISCO uses the formula 108/Bandwidth (of an interface) to calculate the interface cost. This produces the following costs for the interfaces :

Interface Type Bandwidth Cost

T3

45,045,00 2
Ethernet 10,000,000 10
Fast Ethernet 100,000,000 1

This formula is usable for interface speeds up to 100Mb, but with the introduction of high speed SONET and ATM interfaces in the network, this approach is not adequate. The following example will illustrate the problem.

Using a OC-3 interface, the bandwidth for this interface is 155,000,000. Using the formula 108/155,000,000 = 0.645. OSPF will round all decimals to 1, making it equal to the cost of a fast Ethernet interface. The same would hold true for OC-12, OC-48, and Gigabit Ethernet interfaces. Obviously, this would cause routing problems within the network. having interfaces with different bandwidths having the same cost.

CISCO provides a solution within certain router IOS software to be able to control how OSPF calculates the default metrics for an interface. This feature is enabled under the router ospf process using the ospf auto-cost reference-bandwidth ref-bw. Where ref-bw is the rate in megabits per second (bandwidth). The range is 1 to 4294967; the default is 100. The formula is now changed to be Reference-bandwidth/interface bandwidth. This feature allows us to globally change how the costs are determined by interface speed. This command was introduced in CISCO IOS release 11.2.

Conclusion:- If you are using OC-3 and higher links, you should enable ospf auto-cost reference-bandwidth under your router ospf process. Depending on your organizations routing policies you can implement different methods. The best practice here is specifying ip ospf cost manually for every interface. This is a best method to avoid confusion in route selection.

Console log messages on telnet

Filed under: Router — ciscotips @ 12:44 am

The common problem which Cisco newbie’s face is that how to see debug console messages on telnet prompt. I have been asked this question for multiple times, not only from my juniors but also sometimes from my peers.

Command is “terminal monitor”. By enabling this command, all your console messages can be seen on a telnet session. But a word of caution here, if ever you enable terminal monitor, never forget to turn it off. Otherwise every time you will telnet that router/switch, you will see console messages coming on your telnet screen and sometimes these are quiet annoying.

Theme: Silver is the New Black. Blog at WordPress.com.

Follow

Get every new post delivered to your Inbox.