ip ospf cost
16-14 IPv4 Routing Protocol Configuration
Defaults
None.
Mode
Interfaceconfiguration:G3(su)‐>router(Config‐if(Vlan1))#
Example
ThisexampleshowshowtoconfiguretheVLAN 1interfaceasarea0.0.0.31:
G3(su)->router(Config)#interface vlan 1
G3(su)->router(Config-if(Vlan 1))#ip ospf areaid 0.0.0.31
ip ospf cost
UsethiscommandtosetthecostofsendinganOSPFpacketonaninterface.Thenoformofthis
commandresetstheOSPFcosttothedefaultof10.
Syntax
ip ospf cost cost
no ip ospf cost
Parameters
Defaults
None.
Mode
Interfaceconfiguration:G3(su)‐>router(Config‐if(Vlan1))#
Usage
EachrouterinterfacethatparticipatesinOSPFroutingisassignedadefaultcost.Thiscommand
overwritesthedefaultof10.
Example
ThisexampleshowshowtosettheOSPFcostto20fortheVLAN1interface:
G3(su)->router(Config)#interface vlan 1
G3(su)->router(Config-if(Vlan 1))#ip ospf cost 20
ip ospf priority
UsethiscommandtosettheOSPFpriorityvalueforrouterinterfaces.Thenoformofthi s
commandresetsthevaluetothedefaultof1.
Syntax
ip ospf priority number
no ip ospf priority
cost Specifiesthecostofsendingapacket.Validvaluesrangefrom1to65535.