Creating an OSPF Process
Context
To run OSPF, a switch needs to have a router ID. A router ID is a 32-bit unsigned integer, which uniquely identifies a switch in an AS. To ensure stability of OSPF, you need to manually configure a router ID for each device during network planning.
Procedure
- Run system-view
The system view is displayed.
- Run ospf [ process-id | router-id router-id | vpn-instance vpn-instance-name ] *
An OSPF process is created, and the OSPF view is displayed.
-
The parameter process-id specifies the ID of an OSPF process. The default value is 1.
The switch supports OSPF multi-process. You can create different processes for different types of services. The OSPF process ID is valid only in the local area, and does not affect packet exchange with other switches. Therefore, different switches can also exchange packets even though they have different process IDs.
-
The parameter router-id router-id specifies the router ID of a switch.
By default, the system automatically selects the IP address of an interface on the current device as the router ID. The largest IP address among loopback addresses is selected as the router ID preferentially. If no loopback interface is configured, the largest IP address among interfaces is selected as the router ID. When manually setting a router ID, ensure that the router ID of each device is unique in the AS. Typically, you can use the IP address of an interface on the device as the router ID.
The router ID of each OSPF process must be unique on the OSPF network; otherwise, OSPF neighbor relationships cannot be set up and the problem of incorrect routing information will occur. Configuring a unique router ID for each OSPF process on each OSPF device is recommended to ensure stability. -
The parameter vpn-instance vpn-instance-name specifies the name of a VPN instance.
If a VPN instance is specified, the OSPF process belongs to the specified VPN instance; otherwise, the OSPF process belongs to a public network instance.
-
- Run commit
The configuration is committed.