06-27-2007 06:22 PM - edited 03-03-2019 05:38 PM
Hi Sir,
I ask question of OSPF cost.
I want to know when add OSPF cost of interface.
When I configure 'ip ospf cost' on router's interface,
is OSPF cost added by incoming interface or outgoing interface?
Ryusuke.
Solved! Go to Solution.
06-27-2007 11:12 PM
Hi Rick,
The OSPF cost is the outgoing cost for packets transmitted from this interface (used when executing the SPF tree by adding it to the cost of relevant path to the destination), do you mean with your statement that it is added to the cost of the incoming interface to calculate the whole path cost.
BR,
Mohammed Mahmoud.
06-27-2007 07:33 PM
Ryusuke
The cost is added on the incoming interface.
HTH
Rick
06-27-2007 08:44 PM
Rick
Your answer is best.
Thank you.
Ryusuke
06-27-2007 11:12 PM
Hi Rick,
The OSPF cost is the outgoing cost for packets transmitted from this interface (used when executing the SPF tree by adding it to the cost of relevant path to the destination), do you mean with your statement that it is added to the cost of the incoming interface to calculate the whole path cost.
BR,
Mohammed Mahmoud.
05-31-2018 10:09 PM
Why is it that the cost is added at the outgoing interface in routing and ingress interface in switches.. Is there any logic or any theory behind this ?
02-21-2020 10:02 PM
You mean the incoming interface on which we learn the route or what.
R1-a-----b-R2-c-------d-R3-e--------f-R4-g-----PC1
When R1 learns the prefix of PC1 via ospf while learning the cost is used right so R4s f and R3's d and R2' b cost is used. am i right.
02-22-2020 12:08 AM
06-27-2007 07:40 PM
Hi Ryusuke,
Why would you want to override the ospf cost on an interface? By default OSPF automatically calculates its matrics on interfaces participating in OSPF
based on the formula 100 Mbps devided by the interface total bandwidth.. a 64k link gets a metric of 1562, another example is a T1 1.544 gets a metric of 64 , 100 Megs link gets a metric of 1 and so on, the higher the bandwidth the lowest its cost and therefore prefered path and that matrics gets propagated through the OSPF domain . It is posible with the command you indicated to manipulate/override the default calculation on an interface, I have yet not seen a scenario where you would need to override the default behavior.
In the event you do need to change this
I would pay close attention which interfaces
participating in OSPF you need to change it,
remember that by chnaging the value to lower or higer it would inpact OSPF traffic desitions in chosing optimal path.
OSPF reference
http://www.cisco.com/en/US/tech/tk365/tk480/tsd_technology_support_sub-protocol_home.html
Q&A
http://www.cisco.com/en/US/tech/tk365/technologies_q_and_a_item09186a0080094704.shtml
HTH, please rate if this helps
Jorge
06-27-2007 09:15 PM
Hi Jorge
Thank you.
I configure it carefully.
This scenario is route control on same bandwidth interface.
Because,
there is different reliability network of same bandwidth in Japan.
My customer's policy don't use low reliability network for normal use.
Low reliability network is used for redundancy.(for backup route)
Ryusuke
06-17-2019 11:34 AM
06-17-2019 01:30 AM
It can illustrate like this:
The Routing table on R1 will see the route from R3 + Cost 100, right?
Thank you very much.
06-17-2019 11:31 AM
01-28-2020 09:54 AM
Yes, if you are looking at the direction of the route update (incoming interfaces) or as RFC 2328 states, "a cost is associated with the output side of each router interface"
e.g.
The route update from R3 would add the advertised cost from R3 + R2 (incoming interface cost) + R1 (incoming interface cost)
or
R1 would have the cost of its R1 (output interface cost) + R2 (output interface cost) + R3 (output interface cost)
01-28-2020 03:32 PM
01-29-2020 11:42 AM
Well, I guess we are telling the same thing, however lets try to visualize a bit to clear off the inbound / outbound interface part.
R11- 1.1.1.1
R13 - 3.3.3.3
With default Costs :-
R11#sh ip rou 3.3.3.3
Routing entry for 3.3.3.3/32
Known via "ospf 1", distance 110, metric 3, type intra area
Last update from 10.1.1.1 on GigabitEthernet0/0, 00:03:15 ago
Routing Descriptor Blocks:
* 10.1.1.1, from 10.1.1.2, 00:03:15 ago, via GigabitEthernet0/0
Route metric is 3, traffic share count is 1
Why metric 3 ? 1 for each Gig interface and 1 for the loopback,
i.e. the route update from R13 has Cost of loopback + Cost of R12 Gig 0/1 + Cost of R11 Gig 0/0 (look at the direction of the LSA)
or
look at the direction of the path computation from the perspective of R11 to 3.3.3.3/32. It has to reach out via R11 Gig 0/0 + R12 Gig 0/1 and R13 lo1.
Let's look at R13 also
R13#sh ip rou 1.1.1.1
Routing entry for 1.1.1.1/32
Known via "ospf 1", distance 110, metric 3, type intra area
Last update from 10.1.1.2 on GigabitEthernet0/0, 00:03:58 ago
Routing Descriptor Blocks:
* 10.1.1.2, from 1.1.1.1, 00:03:58 ago, via GigabitEthernet0/0
Route metric is 3, traffic share count is 1
Same logic in the reverse way.
Next, adding Cost 8 to Gi0/1 on R12 only
The same route update / lsa for 3.3.3.3/32 on it's way accumulated the cost of 8 from R13 to R11 (look at the direction of the udpate or computation as above)
R11#sh ip rou 3.3.3.3
Routing entry for 3.3.3.3/32
Known via "ospf 1", distance 110, metric 10, type intra area
Last update from 10.1.1.1 on GigabitEthernet0/0, 00:01:30 ago
Routing Descriptor Blocks:
* 10.1.1.1, from 10.1.1.2, 00:01:30 ago, via GigabitEthernet0/0
Route metric is 10, traffic share count is 1
The most important output, let's check whether the cost made any difference on R13
The update from R11 (1.1.1.1/32) crosses the interface of R12 Gig 0/1 to reach R13 so there could be a doubt ;)
R13#sh ip rou 1.1.1.1
Routing entry for 1.1.1.1/32
Known via "ospf 1", distance 110, metric 3, type intra area
Last update from 10.1.1.2 on GigabitEthernet0/0, 00:06:39 ago
Routing Descriptor Blocks:
* 10.1.1.2, from 1.1.1.1, 00:06:39 ago, via GigabitEthernet0/0
Route metric is 3, traffic share count is 1
No change, it's the same ! Why? Look at the direction, is it ingress/inbound or egress/outbound ? It's always good to leave some thought to the readers.
Computation in link state algorithm is like perspective taking.
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide