Configuration procedure

To enable OSPF on a router, create an OSPF process and specify areas with which the process is associated, and the network segments contained in each area. If an interface’s IP address resides on a network segment of an area, the interface belongs to the area and is enabled with OSPF, and OSPF advertises the direct route of the interface.

To run OSPF, a router must have a router ID, which is the unique identifier of the router in the AS. Following is additional information about router IDs:

OSPF can run multiple processes and supports VPNs as follows:

To enable OSPF:

Step

Command

Remarks

1. Enter system view.

system-view

N/A

2. Configure a global router ID.

router id router-id

Optional.

Not configured by default.

If no global router ID is configured, the highest loopback interface IP address, if any, is used as the router ID. If no loopback interface IP address is available, the highest physical interface IP address is used, regardless of the interface status.

3. Enable an OSPF process and enter OSPF view.

ospf [ process-id | router-id router-id | vpn-instance vpn-instance-name ] *

Not enabled by default.

4. Configure a description for the OSPF process.

description description

Optional.

Not configured by default.

5. Configure an OSPF area and enter OSPF area view.

area area-id

Not configured by default.

6. Configure a description for the area.

description description

Optional.

Not configured by default.

7. Specify a network to enable OSPF on the interface attached to the network.

network ip-address wildcard-mask

Not configured by default.

A network segment can only belong to one area.