PermitANY
AristaConfig634 downloads

Arista EOS OSPF Configuration

OSPFv2 configuration for Arista EOS: process, router-id, multi-area support, BFD, passive interfaces, and redistribution.

↓ example.txt

What is it?

Arista OSPF uses per-interface configuration (like Juniper) rather than Cisco IOS 'network' statements. Interfaces are added directly with 'ip ospf <process-id> area <area>' on the interface. BFD (Bidirectional Forwarding Detection) integration is a key Arista advantage — it is a tiny hello protocol that runs beside OSPF and notices a dead link in milliseconds, cutting convergence from 40 seconds (the OSPF dead timer) to under one second. EOS gives you two separate knobs for it and they are not the same thing: 'bfd default' under 'router ospf' turns BFD on for every OSPF interface in that instance, while 'ip ospf bfd' on an interface turns it on for that one link only. This generator asks which model you want, because the choice matters: 'bfd default' is one line and cannot be forgotten on a new link, but it also lights up BFD on interfaces where you may not want it — a slow WAN circuit, or a vEOS lab link that will flap. In that case stay on the instance default and switch the exception off with 'no ip ospf bfd'. Arista OSPF is the standard underlay IGP for VXLAN EVPN data center fabrics.

When to use

  • ·Data center underlay routing between leaf and spine switches in VXLAN EVPN fabric — with BFD set to 'All OSPF interfaces', since every link in the fabric is a fibre point-to-point and wants sub-second detection
  • ·Campus or branch networks needing dynamic routing between Arista switches
  • ·Any multi-switch Arista deployment requiring loop-free path selection and fast convergence
  • ·Redistributing connected loopback interfaces for BGP next-hop reachability

When NOT to use

  • ·ISP or inter-AS routing — use BGP for external routing
  • ·Large-scale DC fabrics with 100+ devices — consider IS-IS for better scalability
  • ·Do not enable BFD on 'All OSPF interfaces' when the instance includes a leased line, a tunnel or a vEOS/virtual link. Those paths have jitter that the default 300 ms BFD timers read as failure, and a flapping BFD session tears the OSPF adjacency down with it. Use the per-interface mode, or set BFD off on that one interface
  • ·Do not use BFD as a substitute for a sane dead timer on a link with no hardware-assisted BFD — on a platform that runs BFD in software, aggressive timers under control-plane load produce false failures

How it compares

vs Cisco IOS OSPFIOS uses 'network <ip> <wildcard> area <id>'. Arista uses 'ip ospf <pid> area <id>' per interface. Arista's per-interface syntax is more explicit and avoids accidentally enabling OSPF on unintended interfaces.
vs Cisco NX-OS OSPFNX-OS uses named OSPF instances ('router ospf UNDERLAY'). Arista uses numeric process IDs. Both support per-interface config. Arista's BFD integration is simpler to configure than NX-OS.

Prerequisites

  • →Interfaces must have IP addresses configured before enabling OSPF
  • →Loopback interface should be configured and added to OSPF as passive
  • →Router ID should be set to a stable loopback address
  • →For VXLAN EVPN fabric: use 'ip ospf network point-to-point' on fabric links to avoid DR/BDR election
  • →BFD must be enabled on BOTH ends of a link. One side alone leaves the session in Down and OSPF keeps using its own 40-second dead timer, so you get the configuration without the convergence
  • →EOS 4.15 or later for OSPF BFD integration ('bfd default' and 'ip ospf bfd')

Config Generator

Verification commands

show ip ospf neighbor

Verify OSPF adjacency state with all neighbors

ExpectedNeighbors should show 'Full' state. 'Init' or '2Way' means adjacency not fully formed.

show ip route ospf

Show OSPF routes in the routing table

ExpectedRoutes marked 'O' (intra-area) or 'O IA' (inter-area) with next-hop and metric

show ip ospf interface brief

Verify which interfaces are running OSPF and their state

ExpectedLists all OSPF interfaces with area, network type, cost, and neighbor count

Debug commands

show ip ospf

Show OSPF process details including BFD status

Common mistakes & fixes

SymptomOSPF neighbors not forming on fabric links
CauseInterface type is 'broadcast' — DR/BDR election slows adjacency on point-to-point links
FixSet 'ip ospf network point-to-point' on all fabric (spine-leaf) links. This eliminates DR/BDR election and speeds up adjacency formation.
Symptom'show ip ospf' says BFD is enabled but 'show bfd peers' lists no session, or the session sits in Down
CauseBFD is only on one end of the link, or it is on at the instance level on one side and switched off per-interface on the other. BFD needs both ends to agree
FixRun 'show bfd peers detail' on both switches. If one side shows AdminDown, something set 'no ip ospf bfd' on that interface — check whether the instance uses 'bfd default' and the interface is an exception
SymptomBFD sessions flapping — OSPF adjacencies dropping frequently
CauseBFD timers too aggressive for the link (especially over virtual/vEOS links)
FixIncrease BFD timers on the interface: 'ip ospf bfd interval 300 min-rx 300 multiplier 3'. Virtual links need higher timers than physical links.
SymptomLoopback routes not appearing in OSPF neighbors' routing tables
CauseLoopback not added to OSPF, or added but not as passive
FixAdd loopback to OSPF: 'ip ospf <pid> area 0' on the loopback interface. Set 'ip ospf passive' to prevent OSPF from sending hellos on the loopback.

Further learning

Recommended books to go deeper on this topic.

OSPF: Anatomy of an Internet Routing Protocol

John T. Moy · Addison-Wesley · The protocol from its author: LSA types, flooding, SPF and the design reasoning behind them

Routing TCP/IP, Volume 1

Jeff Doyle & Jennifer Carroll · Cisco Press · The definitive OSPF and IS-IS reference — essential for CCNP/CCIE

CCNP Enterprise Core ENCOR 350-401 Official Cert Guide

Brad Edgeworth et al. · Cisco Press · OSPF single-area, multi-area, LSA types, route summarization

Related configs