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