To configure OSPF on a PicOS device, complete the tasks described in the following sections.
Configuring OSPF Router ID
The OSPF router ID is a 32-bit value similar to an IP address by which the OSPF router or switch is uniquely identified within the OSPF domain.
Use the following command to configure OSPF router ID:
set protocols ospf4 router-id <router-id>
The following example configures 220.127.116.11 as the OSPF router ID:
Do not change the router ID after completing the configuration.
Configuring OSPF Areas
Divide an OSPF domain into areas, which contains the flow of most routing protocol traffic within a single area and reduces the impact of protocol on CPU and memory.
Use the following command to configure OSPF areas:
set protocols ospf4 area <area-id> area-type <type>
Area ID 0.0.0.0 is reserved for the backbone and each OSPF domain should have the backbone area. All traffic between two non-backbone areas must pass through the backbone. OSPF area types supported by PicOS are: normal, stub, and NSSA.
The example that follows demonstrates configuration of three different areas:
|Area ID||Area Type|
Configuring OSPF Interfaces
After configuring an OSPF area, assign a switch interface to the area. Once an interface is assigned to an OSPF area, it will start sending OSPF hello messages.
Use the following command to assign a Layer 3 interface to an OSPF area:
set protocols ospf4 area <area-id> interface <interface-name> vif <interface-name> address <ip-address>
The following commands create Layer 3 VLAN interfaces vlan-2 and vlan-3. The interfaces are given IP addresses and switch ports are assiged to them. Finally, both interfaces are configured to be in the OSPF backbone area according to the table shown below.
|VLAN Interface||IP Address / Mask Length||Assigned Switch Interface(s)||OSPF Area|
|vlan-2||10.10.60.10 / 24||ge-1/1/1||0.0.0.0|
|vlan-3||10.10.61.10 / 24||ge-1/1/2||0.0.0.0|
Configuring Additional OSPF Parameters
Fine-tune OSPF operation by configuring additional OSPF interface parameters including hello interval, interface cost, passive interface, priority, retransmit interval, router dead interval, and transmit delay.
The following example demonstrates how to configure some of the OSPF interface parameters: