router id
20-12 IPv4 Routing Protocol Configuration
router id
UsethiscommandtosettheOSPFrouterIDforthedevice.ThisIPaddressmustbesetmanually
inordertorunOSPF.ThenoformofthiscommandremovestherouterIDforthedevice.
Syntax
router id ip-address
no router id
Parameters
Defaults
None.
Mode
Globalconfiguration:C2(su)‐>router(Config)#
Usage
ThiscommandsetstheOSPFrouterID.TheOSPFareaIDofaroutedVLANisconfiguredoneach
interfacewiththeinterfacecommand“ipospfareaid”onpage20‐14.Ifyoudonotconfigurean
areaIDonaroutedinterfacerunningOSPF,thedefaultareaIDof
0.0.0.0willbeused.
Example
ThisexampleshowshowtosettheOSPFrouterIDtoIPaddress182.127.62.1:
C2(su)->router(Config-router)#router id 182.127.62.1
• Define an area as a stub area. “area stub” on page 20-22
• Set the cost value for the default route that
is sent into a stub area.
“area default cost” on page 20-23
• Define an area as an NSSA. “area nssa” on page 20-23
Create virtual links. “area virtual-link” on page 20-24
Enable redistribution from non-OSPF
routes.
“redistribute” on page 20-25
Monitor and maintain OSPF. “show ip ospf” on page 20-26
“show ip ospf neighbor” on page 20-30
“show ip ospf interface” on page 20-28
“show ip ospf neighbor” on page 20-30
“show ip ospf virtual-links” on page 20-31
“clear ip ospf process” on page 20-31
Table 20-2 OSPF Configuration Task List and Commands (Continued)
To do this... Use these commands...
ip‐address SpecifiestheIPaddressthatOSPFwilluseastherouterID.