- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-02-2017 10:13 PM - edited 03-08-2019 09:10 AM
Hi folks,
Could someone please share some thoughts on "auto-cost reference-bandwidth" vs" ip ospf cost value"
I'm thinking this isn't quite necessary to configure, could you tell if it's best practice not to change the bandwidth at all? Is there any significant difference between both commands?
Solved! Go to Solution.
- Labels:
-
Other Switching
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-03-2017 03:29 AM
Hi
Ospf assigns different costs per bandwidth of interface, the formula is:
Cost = Reference bandwidth / Interface Bandwidth
By default the reference is 100Mbps
Ospf cost table: http://www.watchguard.com/help/docs/wsm/xtm_11/en-us/content/en-us/dynamicrouting/ospf_interface_cost_c.html
But what happens if you include on your network a interface of 10G, it will be considered with a cost of 1G, so you should execute the following command under the ospf process:
router ospf X
auto-cost reference-bandwidth 10000
So the idea is to create a difference between the kind of interfaces. Once implemented the change above the router will recalculate the OSPF cost for its interfaces.
Now the ip opsf cost <value> is used to configure a desired ospf cost value or modify the current cost value on a specific interface to manipulate the traffic.
**Take in consideration if you modify the auto-cost reference-bandwidth you must configure it on the rest of your routers.
You can use the following command to see the current cost under a interface:
show ip ospf interface Giga X/Y for example.
Hope it is useful.
>> Marcar como útil o contestado, si la respuesta resolvió la duda, esto ayuda a futuras consultas de otros miembros de la comunidad. <<
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-03-2017 06:16 AM
There's quite a difference between the two commands.
The IP OSPF cost statement, allows you to set a specific OSPF metric cost for the interface. BTW, on some other vendors, all OSPF interfaces OSPF's cost defaults to 1, and so if you want to prefer one path vs. another you need to set one or more interface OSPF costs.
On Cisco platforms, they set a default OSPF cost based on what the device "believes" the interface bandwidth to be. But default, Cisco platforms divide 100 Mbps by interface "bandwidth". 100 Mbps interfaces would have a default cost of 1, 10 Mbps interfaces a cost of 10, 1 Mbps interfaces a cost of 100, etc.
As the other posters have noted, this allows Cisco OSPF to pick the path with the least cost, i.e. "better" bandwidth sums. (Remember, cost to a destination is the sum of all the hop costs, so for example, 1 hop at 100 Mbps would be considered the same as two hops of 50 Mbps.)
Cisco picked 100 Mbps as the reference default back when 100 Mbps FDDI was about the fastest you would find. Today we have gig, 10g, and even faster. Unfortunately, as also noted by other posters, the 100 Mbps reference bandwidth means Cisco OSPF will consider a 10g interface the same as an 100 Mbps interface; which you probably don't want. So also today, best practice would be to set all your Cisco devices such that your "best" bandwidth will be the reference value.
A side impact of pushing the auto reference bandwidth up to something like 100g, if you have a network that contains 100g and low bandwidth WAN links, OSPF might now be unable to tell the difference between a T1 and a fractional T1, or between one path and another, as the OSPF metric hits its max.
Also note, again, some other vendors do not provide an auto reference using bandwidth to calculate the OSPF metric. Those that do, generally have a higher bandwidth base, often gig or 10g. Normally you want all devices, when using bandwidth to auto calculate OSPF metric, to use the same calculation. They don't have to, but if they don't, it usually causes confusion.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-03-2017 12:46 AM
Hi
you need auto-cost ref so ospf can distinguish between say 10 and 1gb links and which is the better path , this is more for the routing protocol itself to understand the physical topology in place and determine the best link state path , ospf by default can only judge up to 100mb links you wouldn't want your 100mb FE link n be treated the same as a 10GB link , Ip ospf cost allows you to override the path even if auto cost was in place as you can manually set it and force ospf to believe a bad link is the best by manually setting the cost , my opinion is yes there very similar commands in what they do adjusting the path for the protocol but definitely they go about it differently. Auto cost should always be set these days due to link speeds and cost should only be set when required to force the protocol to use certain backup or primary paths
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-06-2017 02:54 AM
Thanks everyone for all the great information!
I would like to gain clarity on the below:
1) Both commands are only used to manipulate SFP calculation and will not actually change the link speed, is that correct?
2) I now understand that Reference bandwidth is used to convey distinction between interfaces that use 100Mbps so that they won't be treated equally, but I'm curious if both ends of the link are different in speed (for example; a 1g port connecting to a 10GE port in an OSPF environment) what happens to the cost of the link in this occasion?
3) In relation to the ip opsf cost <value> command, if I used this, I don't need to configure the reference bandwidth, is that correct? if not necessary, what's the best preference in terms of efficiency on a large scale network " ip opsf cost" or the "reference bandwidth"?
4) Is the "cost" in the ip opsf cost command, can be a made up value, or there's a suggested values to set?
Thank you again for all the help!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-06-2017 05:24 PM
#1 Correct.
#2 100 Mbps by default, and its to OSPF based on bandwidth.
Normally if you have a 1g port directly connecting to a 10g port, both ports would need to run at gig. However, if there was a switch in between, you could do that. Regardless, OSPF cost is egress cost, SPF is done from point of view of that device.
#3 Correct.
Generally the common option is to use reference bandwidth to avoid the extra configuration requirement and on-going maintenance.
You can still use interface OSPF cost to override the auto calculated cost, if you have a need to do so.
# 4 It's "made up" based on how you want to cost your links. For example, although Cisco auto calculates based on bandwidth, perhaps you need to cost links based on physical cost to use, or perhaps latency, or perhaps whether is an on-demand circuit. Remember the point of the metric is for the routing protocol to chose the best path, but that's based on what you consider "best".
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-07-2017 02:41 AM
everything I needed to know has been cleared, thanks a ton for the help! This is great information to everyone.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-03-2017 03:29 AM
Hi
Ospf assigns different costs per bandwidth of interface, the formula is:
Cost = Reference bandwidth / Interface Bandwidth
By default the reference is 100Mbps
Ospf cost table: http://www.watchguard.com/help/docs/wsm/xtm_11/en-us/content/en-us/dynamicrouting/ospf_interface_cost_c.html
But what happens if you include on your network a interface of 10G, it will be considered with a cost of 1G, so you should execute the following command under the ospf process:
router ospf X
auto-cost reference-bandwidth 10000
So the idea is to create a difference between the kind of interfaces. Once implemented the change above the router will recalculate the OSPF cost for its interfaces.
Now the ip opsf cost <value> is used to configure a desired ospf cost value or modify the current cost value on a specific interface to manipulate the traffic.
**Take in consideration if you modify the auto-cost reference-bandwidth you must configure it on the rest of your routers.
You can use the following command to see the current cost under a interface:
show ip ospf interface Giga X/Y for example.
Hope it is useful.
>> Marcar como útil o contestado, si la respuesta resolvió la duda, esto ayuda a futuras consultas de otros miembros de la comunidad. <<
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-03-2017 06:16 AM
There's quite a difference between the two commands.
The IP OSPF cost statement, allows you to set a specific OSPF metric cost for the interface. BTW, on some other vendors, all OSPF interfaces OSPF's cost defaults to 1, and so if you want to prefer one path vs. another you need to set one or more interface OSPF costs.
On Cisco platforms, they set a default OSPF cost based on what the device "believes" the interface bandwidth to be. But default, Cisco platforms divide 100 Mbps by interface "bandwidth". 100 Mbps interfaces would have a default cost of 1, 10 Mbps interfaces a cost of 10, 1 Mbps interfaces a cost of 100, etc.
As the other posters have noted, this allows Cisco OSPF to pick the path with the least cost, i.e. "better" bandwidth sums. (Remember, cost to a destination is the sum of all the hop costs, so for example, 1 hop at 100 Mbps would be considered the same as two hops of 50 Mbps.)
Cisco picked 100 Mbps as the reference default back when 100 Mbps FDDI was about the fastest you would find. Today we have gig, 10g, and even faster. Unfortunately, as also noted by other posters, the 100 Mbps reference bandwidth means Cisco OSPF will consider a 10g interface the same as an 100 Mbps interface; which you probably don't want. So also today, best practice would be to set all your Cisco devices such that your "best" bandwidth will be the reference value.
A side impact of pushing the auto reference bandwidth up to something like 100g, if you have a network that contains 100g and low bandwidth WAN links, OSPF might now be unable to tell the difference between a T1 and a fractional T1, or between one path and another, as the OSPF metric hits its max.
Also note, again, some other vendors do not provide an auto reference using bandwidth to calculate the OSPF metric. Those that do, generally have a higher bandwidth base, often gig or 10g. Normally you want all devices, when using bandwidth to auto calculate OSPF metric, to use the same calculation. They don't have to, but if they don't, it usually causes confusion.
