/
protocols ospf4 area interface vif address interface-cost

protocols ospf4 area interface vif address interface-cost

To configure the cost of an OSPF interface, use the set protocols ospf4 area interface vif address interface-cost command in L2/L3 configuration mode.

Command Syntax

set protocols ospf4 area area-id interface interface-name vif vif-name address ip-address interface-cost cost

Parameters

area-idOSPF area identifier. Use the dotted decimal notation. For exmaple, use 0.0.0.0 for area 0.
interface-nameInterface name.
vif-nameVirtual interface name.
ip-addressVirtual interface IP address used for OSPF.
costOSPF cost. The range is 1-65,535.

Example

The following example sets the interface cost for address 10.2.2.1 to 3:

admin@Switch# set protocols ospf4 area 0.0.0.0 interface vlan2 vif vlan2 address 10.2.2.1 interface-cost 3

Copyright © 2025 Pica8 Inc. All Rights Reserved.