Dynamic OSPF activation and configuration

OSPF automatically activates when enabled with router ospf. All configuration commands affecting OSPF (except reconfiguring the router ID) are dynamically implemented and can be used without restarting OSPF routing. (To reconfigure the router ID, see Changing the router ID".)


[NOTE: ]

NOTE: OSPF is automatically enabled without a system reset.


General configuration steps for OSPF

To begin using OSPF on the routing switch:

  1. In the global config context, use ip routing to enable routing (page Enabling IP routing.)

  2. Execute router ospf to place the routing switch in the ospf context and to enable OSPF routing (page A-21.)

  3. Change theOSPF RFC 1583 compliance, if needed. (See Changing the RFC 1583 OSPF compliance setting.)

  4. Use area to assign the areas to which the routing switch will be attached (page A-25.)

  5. 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-idassigns an individual subnet to the specified area.

  6. 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.)

  7. 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.

    1. 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.

    2. Enable redistribution.

      See Configuring external route redistribution in an OSPF domain (optional).

  8. Optional: Configure ranges on ABRs to reduce inter-area route advertising.

  9. Optional: Use administrative distance to influence route choices.

  10. Optional: Change OSPF trap generation.

  11. Optional: Reconfigure default parameters in the interface context, if needed. Includes cost, dead-interval, hello-interval, priority, and others.

  12. Optional: Configure OSPF interface authentication.

  13. Configure virtual links for any areas not directly connected to the backbone.

Configuration rules

  • If the switch is to operate as an ASBR, you must enable redistribution (step Step 7. When you do that, ASBR capability is automatically enabled. For this reason, you should first configure redistribution filters on the ASBR. Otherwise, all possible external routes will be allowed to flood the domain. (See Configuring external route redistribution in an OSPF domain (optional).)

  • Each VLAN interface on which you want OSPF to run must be assigned to one of the defined areas. When a VLAN interface is assigned to an area, the IP address is automatically included in the assignment. To include additional addresses, you must enable OSPF on them separately, or use the "all" option in the assignment.

OSPF global and interface settings

When first enabling OSPF, you may want to consider configuring ranges and restricting redistribution (if an ASBR is used) to avoid unwanted advertisements of external routes. You may also want to enable the OSPF trap and authentication features to enhance troubleshooting and security. However, Hewlett Packard Enterprise generally recommends that the remaining parameters with non-null default settings be left as-is until you have the opportunity to assess OSPF operation and determine whether any adjustments to non-default settings is warranted.


[NOTE: ]

NOTE: Set global level parameters in the ospf context of the CLI. To access this context level, ensure that routing is enabled, then execute router ospf at the global CONFIG level. For example:

HP Switch (config)# router ospf 
HP Switch (ospf)#

Use the VLAN interface context to set interface level OSPF parameters for the desired VLAN. To access this context level, use vlan vid either to move to the VLAN context level or to specify that context from the global config level. For example, both of the following command sets achieve the same result:

HP Switch(config)# vlan 20 
HP Switch(vlan-20)# cost 15
HP Switch(config)# vlan 20 cost 15