Hà Nội: NTT03, Line 1, Thống Nhất Complex, 82 Nguyễn Tuân, Thanh Xuân, Hà Nội. ● HCM: Số 31B, Đường 1, Phường An Phú, Quận 2 (Thủ Đức), TP HCM. ===> Đơn Vị Hàng Đầu Trong Lĩnh Vực Cung Cấp Thiết Bị Security - Network - Wifi - CCTV - Conference - Máy chủ Server - Lưu trữ Storge.
Danh mục sản phẩm

Configure Basic OSPF Functions

Before configuring OSPF functions, you must first enable the OSPF protocol before the other functions can take effect.

Configuration Conditions

Before configuring the basic OSPF functions, ensure that:

  • The link layer protocol has been configured to ensure normal communication at the link layer.
  • Interface IP addresses have been configured so that neighbor nodes are reachable at the network layer.

Enable OSPF

To enable OSPF, you must create an OSPF process, specify the address range of the networks with which the process is associated, and specify the area to which the address range belongs. If the IP address of an interface is in the network segment of an area, the interface belongs to the area and the OSPF function is enabled, and OSPF advertises the direct route of the interface.

A device that runs OSPF must have a Router ID, which is used to uniquely identify a device in an OSPF AS. You must ensure that the Router IDs are unique in an AS; otherwise, setup of neighbors and route learning are affected. A Router ID can be specified when the OSPF process is created. If the Router ID is not specified, it can be elected according to the following rules:

  • Select the biggest IP address from loopback interface IP addresses as the Router ID.
  • If no loopback interface is configured with an IP address, select the biggest IP address from the IP addresses of other interfaces as the Router ID.
  • Only when an interface is in the UP status can the IP address of the interface be elected as the Router ID.

OSPF supports multiple processes, which are identified by different process numbers. The processes are independent of each other, and they do not affect each other.

Table 7-2 Enabling OSPF

Step

Command

Description

Enter the global configuration mode.

configure terminal

-

Create an OSPF process and enter the OSPF configuration mode.

router ospf process-id [ vrf vrf-name ]

Mandatory.

Enable the OSPF process or enable the OSPF process from VRF. By default, OSPF is disabled.

If you enable OSPF from VRF, the OSPF process that belongs to a VRF can manage only interfaces under the VRF.

Configure network segments that are covered by an OSPF area.

network ip-address wildcard-mask area area-id

Mandatory.

By default, an interface does not belong to any OSPF process or area.

An interface can only belong to an OSPF process and area.

Configure the Router ID of the OSPF process.

router-id ip-address

Optional.

By default, generate the Router ID according to the election rule.

Modifying Router ID will not make the OSPF neighbor become invalid. To make the new Router ID take effect, you need tore-set the process manually.