Networking::STPInstance::get_interface_path_cost

Introduced : BIG-IP_v9.0
Gets the path costs for the specified network interfaces in the specified spanning tree instances. An interface path cost represents the relative cost of sending network traffic through that interface. In calculating the spanning tree, the algorithm tries to minimize the total path cost between each point and the root bridge. By manipulating the path costs of different interfaces, it&aposs possible to steer traffic toward paths that are faster, more reliable, and/or more economical. Path costs have a range of 1-200,000,000, and the default path cost for an interface is based on the interface&aposs maximum speed (not the actual speed). Max interface speed Default path cost 10 Gb/s 2,000 1 Gb/s 20,000 100 Mb/s 200,000 10 MB/s 2,000,000 The default path cost is a function of the interface&aposs maximum speed, not its actual speed, so the default path cost of a 10/100/1000 Mb/s interface will be 20,000 even if the interface is running at 10 Mb/s. Changes in link speed don&apost cause path costs to change. Link aggregation doesn&apost affect the default path cost, i.e. a trunk of four 1 Gb/s interfaces will still have a default path cost of 20,000. In STP or RSTP mode, only STP intance 0 is valid.

Prototype

InterfacePathCost [] [] get_interface_path_cost(
    in long [] stp_instances,
    in String [] [] interfaces,
    in PathCostType [] [] path_cost_types
);

Parameters

Parameter Type Description
stp_instances long [] The spanning tree instances identified by instance numbers.
interfaces String [] [] The interfaces from which to get the interface path costs.
path_cost_types PathCostType [] [] The types of path costs (internal/external) to query.

Return Type

Type Description
InterfacePathCost [] [] The path costs of the specified interfaces in the spanning tree instances.

Exceptions

Exception Description
Common::AccessDenied Raised if the client credentials are not valid.
Common::InvalidArgument Raised if one of the arguments is invalid.
Common::OperationFailed Raised if an operation error occurs.

See Also

Warning

The links to the sample code below are remnants of the old DevCentral wiki and will result in a 404 error. For best results, please copy the link text and search the codeshare directly on DevCentral.

Sample Code


The BIG-IP API Reference documentation contains community-contributed content. F5 does not monitor or control community code contributions. We make no guarantees or warranties regarding the available code, and it may contain errors, defects, bugs, inaccuracies, or security vulnerabilities. Your access to and use of any code available in the BIG-IP API reference guides is solely at your own risk.