Single-Area OSPF Configuration – Detailed Explanation
✅ Introduction to Single-Area OSPF
Concept and Advantages:
Single-Area OSPF is a basic OSPF deployment where all routers belong to the same area, typically Area 0,
also called the backbone area.
- Simple to configure and manage.
- Ideal for small to medium-sized networks.
- Faster convergence due to fewer LSAs.
- No need to deal with inter-area summarization.
✅ When and Where It Is Used
- Campus networks.
- Small branch office networks.
- Test labs or classroom simulations.
- Any network with fewer than 50 routers.
✅ Basic OSPF Terminology
| Term |
Description |
| Router ID (RID) |
Unique 32-bit ID (often highest IP or manually set). |
| Area |
Logical grouping of routers; all routers in single-area use same area ID. |
| Autonomous System (AS) |
The entire OSPF domain under common administrative control. |
| OSPF Process ID |
Locally significant ID to differentiate OSPF instances on a router. |
✅ OSPF Network Types in Single Area
| Type |
Description |
Example Use Case |
| Broadcast |
Supports multiple routers; uses DR/BDR election |
Ethernet LANs |
| Point-to-Point |
One router directly connects to another |
Serial or PPP links |
| NBMA |
No broadcast support; manual neighbor setup |
Frame Relay, ATM |
✅ Enabling OSPF on Routers
Router(config)# router ospf 1
Router(config-router)# network 192.168.1.0 0.0.0.255 area 0
✅ Setting the Router ID
Manual:
Router(config-router)# router-id 1.1.1.1
Automatic (default): Highest loopback interface IP. If no loopback, highest active
interface IP.
✅ Interface-Level OSPF Configuration (Alternative Method)
Router(config)# interface GigabitEthernet0/0
Router(config-if)# ip ospf 1 area 0
✅ Understanding and Calculating Wildcard Masks
| Subnet Mask |
Wildcard Mask |
Purpose |
| 255.255.255.0 |
0.0.0.255 |
Used in OSPF ACLs, etc. |
| 255.255.254.0 |
0.0.1.255 |
Used to match ranges |
Wildcard = Inverse of subnet mask
✅ Verifying OSPF Configuration
Router# show ip ospf
Router# show ip ospf neighbor
Router# show ip ospf interface
Router# show ip route ospf
✅ Passive Interfaces in OSPF
Router(config-router)# passive-interface GigabitEthernet0/1
✅ Default Route Advertisement
Router(config)# ip route 0.0.0.0 0.0.0.0 192.168.1.1
Router(config)# router ospf 1
Router(config-router)# default-information originate
✅ OSPF Timers (Optional)
| Timer |
Default |
Purpose |
| Hello |
10 sec |
Interval between Hello packets |
| Dead |
40 sec |
Time to declare neighbor down |
Router(config-if)# ip ospf hello-interval 10
Router(config-if)# ip ospf dead-interval 40
✅ Must match on both sides for neighbor adjacency to form!
✅ LSA Types Used in Single-Area OSPF
| LSA Type |
Name |
Description |
| Type 1 |
Router LSA |
Lists links of the router in the area |
| Type 2 |
Network LSA |
Generated by DR on broadcast networks |
✅ Troubleshooting Single-Area OSPF
- Mismatched area IDs
- Missing or incorrect wildcard masks
- Router ID conflict
- Interface not enabled for OSPF
Router# debug ip ospf adj
Router# ping [neighbor IP]
Router# traceroute [destination]
✅ Redistribution (if needed)
Router(config)# router ospf 1
Router(config-router)# redistribute static subnets
✅ Configuration on Multi-Vendor Platforms
| Vendor |
Command Differences |
| Cisco IOS |
router ospf, network, area |
| Juniper |
Uses edit protocols ospf, and set area 0.0.0.0 interface |
| MikroTik |
Configured via WinBox or CLI under /routing ospf |
✅ Basic Network Design for Single-Area OSPF
| Topology |
Description |
| Hub-and-Spoke |
One central router, many branches |
| Full Mesh |
All routers interconnected |
| Linear |
Routers connected one after another |
✅ Sample Configuration – Cisco Example
R1(config)# router ospf 10
R1(config-router)# router-id 1.1.1.1
R1(config-router)# network 10.0.12.0 0.0.0.255 area 0
R1(config-router)# network 192.168.1.0 0.0.0.255 area 0
On another router:
R2(config)# router ospf 10
R2(config-router)# router-id 2.2.2.2
R2(config-router)# network 10.0.12.0 0.0.0.255 area 0
✅ Summary Table
| Task |
Command/Description |
| Enable OSPF |
router ospf [process-id] |
| Assign networks to area |
network [IP] [wildcard] area [ID] |
| Set RID |
router-id [X.X.X.X] |
| Verify neighbor |
show ip ospf neighbor |
| Make interface passive |
passive-interface [int] |
| Advertise default route |
default-information originate |
Single-Area OSPF Configuration Quiz