Got it

Ospf cost on S5710EI

Latest reply: Nov 26, 2014 10:54:25 2570 2 0 0 0

The bandwidth-reference command sets the bandwidth reference value that is used when the system automatically calculates the interface cost.

ospf 1 

undo silent-interface Vlanif3004

bandwidth-reference 100000

After the bandwidth-reference command is configured we have following information:

dis int Eth-Trunk1
Eth-Trunk1 current state : UP
Line protocol current state : UP
Switch Port, Link-type : hybrid,
PVID : 3004, Hash arithmetic : According to SIP-XOR-DIP,Maximal BW: 20G, Current BW: 20G, The Maximum Frame Length is 9216

display ospf brief

Interface: X.X.X.X (Vlanif3004)

Cost: 100     State: DR        Type: Broadcast    MTU: 9216

Interface cost = Bandwidth reference value/Interface bandwidth
5 = 100 000 / 20 000

Why is ospf cost 100?

  • x
  • convention:

Created Nov 26, 2014 09:09:43

Hi Stingo,


This is basically because the Eth-Trunk interface is a layer 2 interface and will not necessarily be related to a single VLAN. It could be configured as a trunk port carrying multiple VLANs. If it was a L3 Eth-Trunk, then the software would automatically adjust the cost. You will find if you check that VLAN interfaces have a fixed cost based around 1 Gbps.

Remember that on a switch, a VLAN could and probably will be asociated with multiple physical interfaces, so the bandwidth assigned to it cannot logically be taken from any one single physical interface.


If you have a specific case where the VLAN is just used across one physical link then you can manually change the OSPF cost to represent the actual bandwidth of that link. The switch cannot make any assumptions about this and it could make the network very unstable if the switch were to try and automatically calculate the costs based on the L2 interfaces that a particular VLAN is associated with.


Regards Nigel


View more
  • x
  • convention:

Created Nov 26, 2014 10:54:25


I changed cost manually,but I thought, may be it could work at L2.. 

it isn't really comfortable in my case.

View more
  • x
  • convention:


You need to log in to comment to the post Login | Register

Notice: To protect the legitimate rights and interests of you, the community, and third parties, do not release content that may bring legal risks to all parties, including but are not limited to the following:
  • Politically sensitive content
  • Content concerning pornography, gambling, and drug abuse
  • Content that may disclose or infringe upon others ' commercial secrets, intellectual properties, including trade marks, copyrights, and patents, and personal privacy
Do not share your account and password with others. All operations performed using your account will be regarded as your own actions and all consequences arising therefrom will be borne by you. For details, see " User Agreement."

My Followers

Login and enjoy all the member benefits


Are you sure to block this user?
Users on your blacklist cannot comment on your post,cannot mention you, cannot send you private messages.
Please bind your phone number to obtain invitation bonus.