set protocols ospf interface area


To enable OSPF on an interface and assign the interface to an area, use the set protocols ospf interface area command in L2/L3 configuration mode. The interface will send and accept OSPF LSAs (link-state advertisements). Optional parameter instance-id can be included to specify the OSPFv2 multi-instance ID in the default VRF.

Run the command delete protocols ospf interface area to remove this configuration from the system.


Command Syntax

set protocols ospf [instance-id <instance-id>] interface <interface-name>  area {<ipv4>|<area-id>}

delete protocols ospf [instance-id <instance-id>] interface <interface-name>  area {<ipv4>|<area-id>}


Parameters

ParameterDescription
instance-id <instance-id>Optional. Specifies the OSPF instance ID in the default VRF. The value is an integer that ranges from 1 to 8.
interface <interface-name>Specifies the VLAN interface name, the loopback interface name, the routed interface or the sub-interface name.

area {<ipv4>|<area-id>}

Specifies the OSPF area in IPv4 format or an integer in the range of 0 to 4294967295.


Usage Guidelines

The OSPF commands set protocols ospf interface area and set protocols ospf network area cannot be configured simultaneously. The user can enable OSPF for either an interface or netowrk, but not both. If one of the two commands has been configured on the device and the user tries to commit the different method of enabling OSPF will result in commit failed error message.

The user must delete the configuration method previously committed before trying to commit the different method and keep the following points in mind:

  • If set protocols ospf network area has been configured on the device first, you have to delete it before configuring command set protocols ospf interface area.
  • If set protocols ospf interface area has been configured on the device first, and if the configuration is in a specified VRF, you have to delete all OSPF configurations under the specified VRF before configuring the command set protocols ospf vrf network area. Or if these configurations are in the default VRF, you have to delete all OSPF configurations of all VRFs on the device by using command delete protocols ospf before configuring set protocols ospf network area.


Example

  •  Enable OSPF on interface vlan200 and assign it to area 1.1.1.1 for instance ID 1.
admin@XorPlus# set protocols ospf instance-id 1 interface vlan200 area 1.1.1.1
admin@Xorplus# commit

Copyright © 2024 Pica8 Inc. All Rights Reserved.