CCIE Pursuit Blog

May 19, 2008

Question Of The Day: 19 May, 2008

Topic: OSPF

You’ve rolled out your new OSPF auto-cost command to your network.  It looks like you’ve missed a router.  r1 is peered with r2 over an Ethernet connection.  r1 has been updated with the new reference bandwidth, but r2 has not.

r1
router ospf 100
 auto-cost reference-bandwidth 100000
 network 10.1.12.1 0.0.0.0 area 0
!
interface FastEthenet 0/0
 ip address 10.1.12.1 255.255.255.0

r2
router ospf 100
 network 10.1.12.2 0.0.0.0 area 0
!
interface FastEthenet 0/0
 ip address 10.1.12.2 255.255.255.0

Will these routers form an OSPF neighbor adjacency?

Click Here For The Answer


Yesterday’s Question

Question Of The Day: 15 May, 2008 

Topic: OSPF

You are rolling out 10 Gigabit links across your core network.  You are running OSPF in your core.  You’ve noticed that the OSPF cost for the new 10 Gigabit links is 1.  This is the same as your FastEthernet and Gigabit links.  You are tasked with configuring the core routers so that the 10 Gigabit links will have a default OSPF cost of 10.

Answer:

router ospf 100
 auto-cost reference-bandwidth 100000

OSPF uses an equation of 100,000,000/Bandwidth (in bits per second) to determine the OSPF interface cost.  With this equation a FastEthernet interfaces has an OSPF cost of 1.  Since 1 is the lowest allowable cost value, anything with a bandwidth higher that 100Mbps also has a cost of 1.  In order to change this, you could manually set all of the OSPF costs on each interface to whatever you like, but that would be incredible inefficient.  Or you could change the numerator in the equation from the default 100,000,000 to something that gives you the results that you require.  Basically, you want to set the numerator to the bandwidth value of whatever type of interface you wish to have an OSPF cost of 1.  The command to make all of this magic happen?  Auto-cost, baby!

auto-cost

The OSPF metric is calculated as the ref-bw value divided by the bandwidth, with mbps equal to 108 by default, and bandwidth determined by the bandwidth (interface) command. The calculation gives FDDI a metric of 1.

If you have multiple links with high bandwidth (such as FDDI or ATM), you might want to use a larger number to differentiate the cost on those links.

In our example we want our 10 Gigabit interfaces to have an OSPF cost of 10.  We’ll need to scour our memories for some basic algebra skills:

ref-bw/10,000,000,000 = 10
ref-bw = 10 * 10,000,000,000
ref-bw = 100,000,000,000

100,000,000,000/10,000,000,000 = 10

Or we can do this in our head.  We know that we want the 10 Gig interfaces to have a cost of 10.  We can simply multiply 10 by the 10,000,000,000 to get our numerator.

The command line wants the reference-bandwidth in Mbps:

r1(config-router)#auto-cost reference-bandwidth ?
  <1-4294967>  The reference bandwidth in terms of Mbits per second

That means the we need to divide our ref-bw value by 1,000,000…just drop the last 6 zeros (100,000).

r1(config-router)#auto-cost reference-bandwidth 100000
% OSPF: Reference bandwidth is changed.
        Please ensure reference bandwidth is consistent across all routers.

To verify our

r1#show ip ospf interface brief
Interface    PID   Area            IP Address/Mask    Cost  State Nbrs F/C
Fa0/0        100   0               173.26.5.5/24      1000   DR    0/0
Se0/0.503    100   0               173.26.0.5/24      6476  DROTH 1/1
Se0/1        100   45              173.26.45.5/24     6476  DOWN  0/0

We don’t have any 10 Gigabit interfaces, but we can see that our FastEthernet interface’s cost has changed from 1 to 1000.  Since a 10 Gigabit interface is 100 times faster than our 100Mbps interface, we know that we have configured this correctly (1000/100 = 10 = the cost we want for our 10 Gig links).

 

Advertisements

5 Comments »

  1. […] by Question Of The Day: 19 May, 2008 « CCIE Pursuit — May 19, 2008 @ 9:00 […]

    Pingback by Question Of The Day: 15 May, 2008 « CCIE Pursuit — May 19, 2008 @ 9:01 am | Reply

  2. Yes it will form neighborship irrespective of your reference bandwidth…………

    Comment by Arun — May 19, 2008 @ 11:01 am | Reply

  3. […] Question Of The Day: 19 May, 2008  […]

    Pingback by Question Of The Day: 20 May, 2008 « CCIE Pursuit — May 20, 2008 @ 6:51 am | Reply

  4. […] Question Of The Day: 20 May, 2008  […]

    Pingback by Question Of The Day: 22 May, 2008 « CCIE Pursuit — May 22, 2008 @ 8:52 am | Reply

  5. […] Question Of The Day: 22 May, 2008  […]

    Pingback by Question Of The Day: 23 May, 2008 « CCIE Pursuit — May 23, 2008 @ 4:10 pm | Reply


RSS feed for comments on this post. TrackBack URI

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Blog at WordPress.com.

%d bloggers like this: