OSPF Configuration

Basic OSPF configuration involves enabling the OSPF process, defining the router ID, and advertising networks into the OSPF domain.

Example Configuration:

router ospf 1
 router-id 1.1.1.1
 network 192.168.1.0 0.0.0.255 area 0
 passive-interface GigabitEthernet0/0
  • router ospf [process-id]: Enables OSPF routing.
  • router-id [ip-address]: Manually sets the router ID.
  • network [ip-address] [wildcard-mask] area [area-id]: Advertises networks into an OSPF area.
  • passive-interface [interface-type] [interface-number]: Prevents OSPF hellos on an interface.