OSPF Multi-Instance Support
OSPFv2 supports multiple instances of OSPF to run simultaneously on the device. Each instance is identified by an Instance ID which is a non-zero positive integer and must be provided when creating an instance.
Limitations of Multi-Instance OSPF
Multi-Instance OSPF can not coexist with single instance OSPF. If the user wants to configure multi-instance OSPF on a device which already has the single instance version of OSPF running then the user must first remove all the configuration related to single instance OSPF before configuring multi-instance OSPF.
Multiple instances of OSPFv2 can only be created in the default VRF. Multiple instances of OSPFv2 in the user defined (non-default) VRFs are not supported.
There are a maximum of 8 instances of OSPF allowed on a device.
The OSPF feature of enabling OSPF using the network command is not allowed under the multi-instance OSPF. Only by specifying a specific interface can the user enable OSPF on network interfaces.
Basic OSPF Multi-Instance Configuration
First of all we need to enable multi-instance OSPF on the device, run the command below to achieve this.
admin@Xorplus# set protocols ospf multi-instance disable false admin@Xorplus# commit
To create an OSPF instance and configure the router ID, run the command below.
admin@Xorplus# set protocols ospf instance-id 5 router-id 1.1.1.1 admin@Xorplus# commit
Specify the backbone area for this instance and choose area-type as stub.
admin@Xorplus# set protocols ospf instance-id 5 area 0.0.0.0 area-type stub admin@Xorplus# commit
Add a VLAN interface vlan200 to the backbone area for instance ID 5. This command enables OSPF on the interface.
admin@Xorplus# set protocols ospf instance-id 5 interface vlan200 area 0.0.0.0 admin@Xorplus# commit
Usually, OSPF will try to form adjacencies with other routers on all interfaces that match the network prefix of an OSPF enabled interface. It is desirable to stop OSPF from forming adjacencies on interfaces facing the end users. To stop OSPF from forming adjacency on interface vlan10, run the command below.
admin@Xorplus# set protocols ospf instance-id 5 passive-interface vlan10 admin@Xorplus# commit
To redistribute BGP routes through an OSPF instance, run the command below.
admin@Xorplus# set protocols ospf instance-id 5 redistribute bgp admin@Xorplus# commit
To configure OSPF SPF timers, run the commands shown below. This example configures the initial delay to 20ms, initial hold time to 100ms and the maximum hold time to 1000ms.
admin@Xorplus# set protocols ospf instance-id 5 timers throttle spf delay 20 admin@Xorplus# set protocols ospf instance-id 5 timers throttle spf initial-holdtime 100 admin@Xorplus# set protocols ospf instance-id 5 timers throttle spf maximum-holdtime 1000 admin@Xorplus# commit
And finally, to enable debugging information, run the below commands. These three commands enable debugging for Interface State Machine (ISM) events, the Link State Advertisement (LSA) flooding and the zebra module. For a full list of debugging options, please refer to the OSPFv2 command reference.
admin@Xorplus# set protocols ospf instance-id 5 traceoption ism events admin@Xorplus# set protocols ospf instance-id 5 traceoption lsa flooding admin@Xorplus# set protocols ospf instance-id 5 traceoption zebra admin@Xorplus# commit
Copyright © 2024 Pica8 Inc. All Rights Reserved.