This article describes how to enable OSPF and configure an OSPF network. For information on configuring OSPF filter policies, refer to KB16617 - SRX Getting Started - Configure Routing Policy to export Local, Static and Direct routes for OSPF [juniper.net] .
For other topics, go to the SRX Getting Started main page.
This section contains the following:
The following example enables OSPF on the ge-0/0/0.0 and lo0.0 interfaces and configures an OSPF network.
user@host#
set protocols ospf area 0.0.0.0 interface ge-0/0/0.0
set security zones security-zone trust interfaces ge-0/0/0.0 host-inbound-traffic protocols ospf
set interfaces lo0 unit 0 family inet address 192.168.1.2/32
user@host# set protocols ospf area 0.0.0.0 interface lo0.0 passive
set routing-options router-id 192.168.1.2
set protocols ospf area 0.0.0.0 interface vlan.100 passive
OSPF Feature Guide for Security Devices
To verify the OSPF configuration, use the following operational command:
user@host> show ospf neighbor Address Interface State ID Pri Dead 10.222.2.2 ge-0/0/11.0 Full 192.168.36.1 128 36
For sample output, see Verifying OSPF Neighbors .
traceoptions
set protocols ospf traceoptions file ospf.debug size 5m files 5
set protocols ospf traceoptions flag all
This file collected via traceoptions is saved in /var/log and can be viewed as follows:
file list detail /var/log | match ospf.debug show log ospf.debug
2020-03-25: Article reviewed for accuracy; it is valid and accurate