Go back

Making Changes to OSPF Without Fear

NB author by Phillip Gervasi Mar 19, 2018

Changing octal small form-factor pluggable (OSPF) settings can be a high-stakes task. Even if you have all the understanding and experience, you can’t be sure how a change might affect the network. Changes can cause ripple effects, impacting performance and availability.

Understanding the output of commands such as show internet protocol (IP) OSPF database, show IP route, and show IP common event format (CEF) can provide a very skilled engineer with an immediate sense of what the entire OSPF graph looks like. But how can anyone operating large networks paint a mental picture of how OSPF is selecting paths across an entire network?

Thankfully, network automation removes much of the uncertainty with clear, real-time visibility into the network. This transparency minimizes the risk of human error and shrinks change windows, which is mission-critical in the daily network operations of many large organizations.

The Risks of OSPF Changes in Complex Networks

Even experienced engineers can make mistakes or overlook critical OSPF details, especially in complex environments. Without granular, real-time visibility into the network — before and after making changes — it’s easy to lose control and create issues. Detailed, real-time visibility is essential for making safe, predictable OSPF changes because OSPF dynamically recalculates routes based on network changes, device configurations, and link states.

A single misconfiguration or overlooked detail can trigger unexpected routing loops, suboptimal paths, or outages in complex environments. Without immediate insight into how changes affect the entire OSPF domain, problems can go undetected until they impact users or critical services. Real-time visibility allows engineers to monitor the network’s response, quickly identify unintended consequences, and ensure every change produces the desired outcome — minimizing risk and downtime.

Reduce OSPF Change Risk With Network Automation

In a small network, OSPF can be as simple as enabling it on an interface and letting SPF handle the rest. But even straightforward changes become more involved when you start adjusting default times, modifying link costs, or influencing path selection across multiple routers. Updating each device individually stretches change windows, increases the chance of mistakes, and provides little to no real-time network visibility.

Network automation is the solution. A programmatic approach to making several changes to an OSPF config on dozens of routers:

  • Decreases the length of a change window
  • Reduces risk associated with human errors
  • Provides instant network-wide visibility before, during, and after a change

Here’s a real-world example showing the concepts we talked about above:

Real-World OSPF Change Management Example

Years ago, I needed to configure routing so one egress path was preferred over another, as the secondary route passed through a site slated for decommissioning. The region’s network was a mix of aging infrastructure with low-speed links, and newly upgraded sites with modern hardware and high-speed connections… all within the same OSPF area!

A Problematic Approach

During my change window, here’s what I did:

  • Scanned the OSPF configuration, the routing table on the two autonomous system boundary routers (ASBR), and the local security authority (LSA) database
  • Hardcoded a low OSPF cost on one link
  • Adjusted the reference bandwidth in order to influence how that router calculated its metrics

Then, I waited for my various persistent pings and traceroutes to look the way I wanted, but they never did, instead creating a small crisis. I forgot that all routers in an OSPF domain must agree on the reference bandwidth because the cost is inversely related to the bandwidth of a link. I thought decreasing the cost made the link more preferred. But changing the reference bandwidth incorrectly made the link less preferred.

Behind these two ASBRs was an entire OSPF domain being run by a variety of router platforms. After SPF was recalculated in the area, traffic patterns changed enough that the less preferred egress was being used and traffic was being tromboned among several old routers using very low bandwidth links.

The bottom line? I had no idea what was going on. Everything was slow and weird. I needed granular real-time visibility before and after my change.

OSPFNetBrain Dynamic Maps give you end-to-end visibility of your entire OSPF configuration.

Rollback Plan With Long Change Window

The rollback plan for my network change was simple:

  • I removed the cost configuration and reference bandwidth.
  • After bouncing a few interfaces to force SPF to run again, traffic patterns returned to the pre-change-window state.

In my next change window, I altered my strategy. The change window needed to be longer because I anticipated longer downtime. Here’s what I did:

  • Changed the reference bandwidth on all the routers in that OSPF area
  • Changed the cost on several interfaces
  • Modified the description of almost all the interfaces running OSPF in that area and its adjacent area.
  • Copied and pasted snippets of config from Notepad on my left screen into the appropriate terminal windows on my right screen

Thankfully, I made few mistakes putting the wrong config onto the wrong router and didn’t lose device connectivity as a result. Ideally, I should have had zero mistakes and a much shorter change window.

ospf in networking

An Executable Runbook checks the current OSPF running status. The command set that the Runbook executes is shown on the right. 

A Better Approach  — OSPF Change Automation

NetBrain’s built-in Executable Runbooks make running show commands across many devices at once a matter of a single click of a button. Realistically, a Runbook will have more in it than just one simple show command. The power of NetBrain Runbooks is in how a variety of commands can be run at once or triggered to run automatically.

In my case, an Executable Runbook could have been configured with the appropriate show commands to gather a significant amount of OSPF-specific and routing information. With one click, NetBrain would have gathered this information across many devices without the need for me to log into one router at a time.

ospf runbook cli commands

Automated OSPF Configuration

Staring at pages of output isn’t really what I needed, though. Instead, I could have let NetBrain’s Dynamic Network Maps take that output and represent it in an interactive real-time snapshot of how routing is operating on the network. I would have immediately seen path selection and clicked on suspect routers.

ospf runbook results 2 1The Runbook highlights the neighbor count and the routes of OSPF and displays it right on the Dynamic Map. 

Pushing configuration changes across all devices is relatively easy, but NetBrain provides deep functionality with their Dynamic Maps such as the Path function which graphically presents traffic patterns after each configuration push. The Compare function is a built-in diff tool that provides a one-click mechanism to identify differences in configuration among devices.

comparison of ospf configuration changesAn engineer can immediately see the OSPF configuration differences between routers 2 and 4.

No more getting anxious before changes. Programmatic monitoring and configuration of a network at a device level help you advance confidently, with an understanding of how each change affects the network in real time. NetBrain’s Runbook Automation and Dynamic Mapping technologies offer engineers this type of programmable environment to make changes to routing without fear.

Get Automated One-Click Insight Into Entire OSPF Domain With NetBrain

Making OSPF changes across multiple devices doesn’t have to be risky or time-consuming. With NetBrain’s executable runbooks, you can gather detailed network data, apply changes, and validate results, all in one coordinated workflow. These capabilities mean fewer mistakes, shorter change windows, and complete visibility into the impact of every update.

NetBrain also enables proactive troubleshooting, seamless compliance reporting, and rapid rollback if needed, empowering teams to manage even the most dynamic enterprise networks confidently. See how it works in your environment — request a demo today and experience how NetBrain can make complex network changes more straightforward and predictable.

Related