General configuration steps for OSPF
To begin using OSPF on the routing switch:
Procedure
- In the global config context,
use
ip routing
to enable routing (page Enabling IP routing.) - Execute
router ospf
to place the routing switch in theospf
context and to enable OSPF routing (page A-21.) - Change theOSPF RFC 1583 compliance, if needed. (See Changing the RFC 1583 OSPF compliance setting.)
- Use
area
to assign the areas to which the routing switch will be attached (page A-25.) - Assign interfaces to the
configured areas per-VLAN or per-subnet by moving to each VLAN context
and using one of the following commands:
ip ospf area ospf-area-id
assigns all interfaces in the VLAN to the same area. Use this option when there is only one IP address configured on the VLAN or you want all subnets in the VLAN to belong to the same OSPF area.
ip ospf ip-address area ospf-area-id
assigns an individual subnet to the specified area.
- Optional: Assign loopback
interfaces to OSPF areas by using the
ip ospf area
command at the loopback interface configuration level. (See Assigning loopback addresses to an area.) - Optional: On each
routing switch used as an ASBR in your OSPF domain, configure redistribution
to enable importing the routes you want to make available in the domain.
On an ASBR in a backbone, normal, or NSSA area where you want to import external routes, configure redistribution filters to define the external routes you do not want imported.
Enable redistribution.
See Configuring external route redistribution in an OSPF domain (optional).
- Optional: Configure ranges on ABRs to reduce inter-area route advertising.
- Optional: Use administrative distance to influence route choices.
- Optional: Change OSPF trap generation.
- Optional: Reconfigure default
parameters in the interface context, if needed. Includes
cost
,dead-interval
,hello-interval
,priority
, and others. - Optional: Configure OSPF interface authentication.
- Configure virtual links for any areas not directly connected to the backbone.