20.2. OSPF Setup

20.2.1. Overview

To enable OSPF on all Ethernet interfaces, simply create the OSPF configuration object. With no settings it will operate OSPF (unauthenticated) on all Ethernet interfaces as the backbone (0.0.0.0) area.

More complex configurations allow use of OSPF within a specific area, and authentication of OSPFv2 (for IPv4) using a password. It is also possible to configure various system timers to fit in with other devices' configuration, but the defaults will match in most cases.

Most networking configuration settings, e.g. network, static routes, subnets, etc, allow an OSPF setting to be defined which causes the routes for the configuration to be included in OSPF. This is default for many things such as subnets, and means that once you connect to an OSPF network you tell all other devices all of the subnets you have available for routing.

It is however possible to lock down OSPF to work only on some interfaces. You can also make multiple OSPF configurations so that different interfaces have different settings.

20.2.2. Standards

The key features supported are:-

  • Internal OSPF router (passing routes within one OSPF area)
  • OSPFv2 (IPv4) and OSPFv3 (IPv6)
  • AS-Border OSPF router (passing routes from routing table to OSPF, and allowing OSPF routes to go to BGP)

Note

Note that this does not operate as an inter-area router.

Note

Note that this does not yet provide equal cost multi-path routing.

Note

Note that this does not yet offer OSPF via interfaces (e.g. tunnels) other than Ethernet.

20.2.3. Simple example setup

<ospf/>

Yes, that is all you need for an unauthenticated OSPF setup working on all Ethernet interfaces and announcing all connected subnets!

20.2.4. <ospf> config element

Table 20.1. OSPF config attributes

AttributeMeaning
area-idArea ID (default is backbone area 0.0.0.0)
router-idRouter ID (default is an IP address)
tableYou need different OSPF entries for each routing table.
interfacesYou can lock a config to specific interfaces - the first matching config is used so you can have multiple configurations for different interfaces and even a final default if you wish.
priorityRouter priority setting - impacts choice of designated router on a network.
instanceOSPFv3 instance value.
passwordOSPFv2 MD5 based password or simple authentication.
key-idOSPFv2 MD5 key-id (or -1 for simple auth instead of MD5).
localprefBase localpref for OSPF routes, to which a type 2 external value can be added (up to 16777216).
spiThe SPI to use for AH/ESP for OSPFv3 authentication
bgpIf OSPF routes are announced into BGP (and what community tag applies).

Other settings define timeouts and logging, etc.

Note

For OSPFv3 authentication a manual keyed IPsec configuration must be defined for transport mode.