OSPF (Open Shortest Path First) is an Interior Gateway Protocol (IGP). How to configure the OSPF? We collect 11 basic configuration commands here.
1. Configure LOOPBACK Port Address
ROUTER(config)#interface loopback 0
ROUTER(config)#ip address IP Address Mask
2. OSPF Area Configuration
router ospf 100
network 192.168.1.0 0.0.0.255 area 0
router-id 192.168.2.1 Manual Setting router-id
area 1 default-cost 50 Manual Setting Cost
#clean ip ospf process
3. Configure OSPF Cleartext authentication
Interface s0
ip ospf authentication
ip ospf authentication-key <; password>
4. Configure OSPF Ciphertext Authentication
interface s0
ip ospf authentication
ip ospf message-digest-key 1 md5 7 <; password>
5. debug ip ospf adj Enable ospf Debugging
show ip protocols
show ip ospf interface s0
6. Manually configure interface costs, bandwidth, priority
inter s0
ip ospf cost 200
bandwidth 100
ip ospf priority 0
7. Virtual Link Configuration
router ospf 100
area <area-id> virtual-link <router-id>
show ip ospf virtual-links
Show ip ospf border-routers
Show ip ospf process-id
Show ip ospf database
show ip ospf database nssa-external
8. OSPF Route induction
Router ospf 1\\ Routing summary of routes outside the ASBR
Summary-address 200.9.0.0 255.255.0.0
Router ospf 1\\ Perform route summary from AREA1 to AREA0
Area 1 range 192.168.16.0 255.255.252.0
9. Configure Stub Area
IR area <area-id> stub
ABR area <area-id> stub
10. Configure Completely Stub Area
IR area <area-id> stub
ABR area <area-id> stub no-summary
11. Configure NSSA
ASBR router ospf 100
area 1 nssa
ABR router ospf 100
area 1 nssa default-information-orrginate
Learn more about OSPF: