Cisco routers: configuring OSPF
In a previous post we talked about RIP. Today I’m going to show you how to configure OSPF. OSPF is a dynamic link-state routing protocol used in IP networks. OSPF is perhaps the most widely used interior gateway protocol (IGP) in large enterprise networks. OSPF exceeds RIP in many aspects:
- It has very low convergence times.
- When no topology changes occur, OSPF is very quiet.
- OSPF enables network subdivision into areas.
- Supports authentication.
- Uses multicast.
- Only routing changes are propagated, not the full routing table like in the RIP case.
- …
To configure OSPF in your cisco router you should follow these steps:
fry> enable fry# configure terminal fry(config)#router ospf 1 fry(config-router)#network 192.168.2.0 0.0.0.255 area 0 fry(config-router)#network 192.168.3.0 0.0.0.255 area 0 fry(config-router)#network 192.168.4.0 0.0.0.255 area 0
You have to specify all the interfaces in which you want to run OSPF with network commands. 0.0.0.255 is a wildcard and means that OSPF will run in any interface with an IP address belonging to the 192.168.2.0/24 network. You can also indicate a specific IP address. If the interface’s IP address changes (e.g. from 192.168.4.1 to 192.168.4.2), OSPF will stop running. The configuration is as follows:
fry(config-router)#network 192.168.4.1 0.0.0.0 area 0
To propagate a default route you can execute this command:
fry(config-router)#default-information originate always
One OSPF drawback could be the configuration complexity. However, if the network topology is point-to-point and we only have one area (like in this case) configuration is pretty straightforward.
Get Jorge Martinez de Salinas delivered by email