Configuring OSPF router id
21-24 Routing Protocol Configuration
Example
ThisexampleshowshowtoconfigureIPaddress182.127.62.10.0.0.31as OSPFarea0:
Matrix>Router(config)#router ospf 1
Matrix>Router(config-router)#network 182.127.62.1 0.0.0.31 area 0
router id
UsethiscommandtosettheOSPFrouterIDforthedevice.
Syntax
router id ip-address
no router id
Parameters
Defaults
None.
Mode
Routercommand,Routerconfiguration:Matrix>Router(config‐router)#
Usage
TheOSPFprotocolusestherouterIDasatie‐breakerforpathselection.Ifnotspecified, thiswill
besettothelowestIPaddressoftheinterfacesconfiguredforIProuting.
The“no”formofthiscommandresetstherouterIDtothefirstinterfaceconfiguredforIProuting.
Example
ThisexampleshowshowtosettheOSPFrouterIDtoIPaddress182.127.62.1:
Matrix>Router(config-router)#router id 182.127.62.1
ip ospf cost
UsethiscommandtosetthecostofsendinganOSPFpacketonaninterface.
Syntax
ip ospf cost cost
no ip ospf cost
Parameters
Defaults
None.
ip‐address SpecifiestheIPaddressthatOSPFwilluseastherouterID.
cost Specifiesthecostofsendingapacket.Validvaluesrangefrom1to
65535.