The countdown to Elevate 2026 is on. Join us in Chicago, London, or Sydney.

Register here

Partners

Docs

LM Academy

LM Community

Platform

Solutions

Pricing

Resources

Company

Platform
  • Infrastructure
  • Cloud & Multi-Cloud
  • Log Management
  • Edwin AI
Solution
  • Automation
  • Tool Consolidation
  • Reduce MTTR
  • Cost Optimization
Industry
  • Healthcare
  • Financial Services
  • Public Sector
  • MSP
Role
  • CIO
  • ITOps
  • CloudOps
  • AIOps
There is no result.
Try it free

14-day access to the full LogicMonitor platform

Explore Platform

One platform, one system for observability, intelligence, and action.

Agentic AIOps

Infrastructure Observability

Cloud Observability

Internet Performance Monitoring

Digital Experience Monitoring

Log Management

3,000+ Integrations

Agentic AIOps Overview

Autonomously detect, diagnose, and resolve issues across your environment.

Meet Edwin AI

Turn fragmented cross-domain event noise into explainable, guided action.

AI Agent

Deploy specialized AI agents to handle investigation across the incident lifecycle.

Event Intelligence

Compress raw alert storms into high-fidelity, prioritized insights.

AI Automation

Execute governed, closed-loop remediation across automation playbooks.

ITOps Context Graph

NEW

Unify topology, telemetry, and changes into an AI-ready context layer.

MCP

NEW

Establish traceable, secure governance boundaries for AI tool integrations.

Infrastructure Observability Overview

Full visibility across your entire hybrid estate to eliminate tool sprawl.

Network Monitoring

Accelerate time to innocence with deep network path and device visibility.

Server Monitoring

Track server health, OS metrics, and resource utilization across environments.

Remote Monitoring

Monitor distributed endpoints, branch networks, and remote facility health.

VM Monitoring

Maximize hypervisor performance and streamline compute capacity planning.

SD-WAN Monitoring

Keep multi-site cloud networks connected with real-time edge visibility.

Database Monitoring

Pinpoint database query bottlenecks to keep business applications fast.

Configuration Monitoring

Minimize change failure rates by tracking device configuration drift.

Storage Monitoring

Track SAN/NAS arrays, IOPS bottlenecks, and storage capacity trends.

Cloud Observability Overview

Multi-cloud and hybrid environments unified into a single operational pane.

Container Monitoring

Automated, real-time visibility for Kubernetes and ephemeral microservices.

AWS Monitoring

Track AWS services, scaling, and costs alongside on-premises data.

Google Cloud Monitoring

Monitor native GCP infrastructure, compute, and serverless resources.

Azure Monitoring

Comprehensive visibility into Azure environments, gateways, and workloads.

AI Monitoring

Track LLM infrastructure, GPU utilization, and AI application stack health.

Oracle Cloud Monitoring

Track OCI native compute, enterprise databases, and cloud storage.

SaaS Monitoring

Validate availability and workforce productivity for critical SaaS apps.

Cloud Cost Optimization

Optimize cloud spend, maintain performance, and control budgets.

Internet Performance Monitoring Overview

Understand performance across the full stack wherever users depend on it.

Internet Health

NEW

Use global vantage points to independently validate internet outages.

Real User Monitoring

NEW

Capture actual customer journeys and frontend performance in real time.

Synthetic Monitoring

NEW

Emulate user transactions and SaaS workflows to catch problems early.

Endpoint Monitoring

NEW

Diagnose remote workforce digital experience across devices and networks.

Digital Experience Monitoring

See every dependency, regardless of ownership or location.

Website Monitoring

Protect revenue journeys with proactive synthetic checks and uptime tracking.

CDN Monitoring

NEW

Audit edge performance and latency variance across your CDN providers.

API Monitoring

NEW

Test endpoints and third-party API reliability for critical app integrations.

Application Performance Monitoring

Connect code execution and traces directly to infrastructure health.

DNS Monitoring

NEW

Speed up time-to-innocence by tracking global nameserver resolution times.

DevOps Lifecycle Monitoring

NEW

Protect release velocity by validating dependencies during deployments.

BGP Monitoring

NEW

Trace global routing changes and path leaks to secure internet reachability.

Log Management Overview

Centralize and correlate log data to resolve incidents before they escalate.

Log Analytics & Intelligence

Correlate contextual log data with metrics to speed up root-cause analysis.

WebPageTest Web Performance

Test, compare, and optimize website speed, Core Web Vitals, and performance across real devices and global locations.

Learn more
Explore Solutions

Proactively manage modern hybrid environments with predictive insights, intelligent automation, and full-stack observability.

By Business Outcome

By Role

By Industry

Professional Services

Autonomous IT

Predictive, autonomous IT built

for resilience.

Automation

Eliminate operational toil with safe, policy-governed remediation workflows.

Modernization and Transformation

Accelerate complex technology transitions while protecting core enterprise resilience.

Cloud Migration

Maintain workload performance throughout migration.

Tool Consolidation

Reduce licensing costs and silos by replacing fragmented monitoring tools.

Cost Optimization

Lower your total cost-to-serve by finding cloud waste and underused resources.

Operational Efficiency

Maximize team capacity by reducing alert storms and shift-handoff friction.

Reduce MTTR

Shorten war-rooms by surfacing topology-aware probable cause in mins.

Network Reachability

NEW

Independently audit external BGP, ISP, and SaaS provider connectivity boundaries.

Edge Deployment Optimization

NEW

Monitor SLOs, compare providers, and validate cloud and edge delivery.

Web Performance Optimization

NEW

Maximize digital checkout conversions by tracking global frontend latency metrics.

Application Resilience

NEW

Safeguard business services against transaction failures and costly downtime.

Workforce Productivity

NEW

Troubleshoot remote hardware and network issues to protect productivity.

CIO

Maximize enterprise resilience and align AI investments to measurable business ROI.

AIOps

Compress cross-domain event noise into explainable, automated ops leverage.

DevOps

Speed up releases by protecting engineering roadmaps from toil.

ITOps

Standardize incident response to reduce alert fatigue and after-hours work.

CloudOps

Unify multi-cloud visibility to optimize costs and track hybrid blast radius.

Healthcare

Protect continuity of care and EHR availability across clinical workflows.

Public Sector

Ensure mission continuity and audit readiness for citizen-facing services.

MSP

Protect service margins and scale ops using multi-tenant, AI-assisted triage.

Retail & E-commerce

Safeguard peak retail campaigns, POS uptime, and digital customer journeys.

Technology

Protect customer trust and engineering velocity with SLA-driven visibility.

Hospitality

Deliver frictionless guest experiences and keep booking engines online.

Education

Maintain always-on student portals, learning platforms, and campus networks.

Manufacturing

Prevent production downtime by unifying IT, OT-adjacent, and edge systems.

Financial Services

Secure transaction trust and meet strict resilience compliance requirements.

Why LogicMonitor?

Discover why leading IT teams trust us to unify hybrid observability and eliminate tool sprawl.

Learn more
Explore Resources

Check out our resource library for IT pros, featuring expert guides, strategies, and insights for smarter, AI-driven operations.

Resources

Upcoming Events

Platform Help

Blog

Insights and advice from the experts on all things observability and AI.

Case Studies

See what real users have to say about the LogicMonitor platform.

Webinars

Live and on-demand learning, all in one place.

IT Guides

Learn from expert guides on the topics that matter most to IT teams.

How We Compare

See how our platform stacks up against other solutions.

CONFERENCE

SWORD Day

September 17, 2026

Geneva

WEBINAR

Incident Management Has Outgrown Its Playbook

September 23, 2026

Online

View all events

Join us at innovation-focused conferences, tech talks, webinars, and other events.

Support Docs

Access product docs, release notes, and support resources.

LM Community

Join the community to learn from peers, ask questions, and connect with experts.

Customer Education

Learn more about our platform through resources and live trainings.

2026 The Year of Autonomous IT

NEW

Discover the trends, benchmarks, and strategies driving the industry shift to Autonomous IT.

Read the report
About LogicMonitor

Our observability platform proactively delivers the insights and automation CIOs need to accelerate innovation.

Leadership

Meet the leaders building the future of observability and AI.

Our Customers

See the proof of how IT teams win with LogicMonitor.

Careers

Find job openings and learn about our employee benefits.

Newsroom

Stay current with our latest mentions, press releases, and events.

Culture

NEW

Join a collaborative, values-driven culture built on innovation and growth.

Security

Purpose-built security for the hybrid observability and AI era.

Contact & Locations

Connect with our experts to explore AI-powered observability solutions.

Sustainability

Our commitment to the environment and the people in it.

The countdown to Elevate 2026 is on. Join us in Chicago, London, or Sydney.

Register here
Try it free

Platform

Explore Platform

One platform, one system for observability, intelligence, and action.

Agentic AIOps

Infrastructure Observability

Cloud Observability

Internet Performance Monitoring

Digital Experience Monitoring

Log Management

3,000+ Integrations

WebPageTest Web Performance

Test, compare, and optimize website speed, Core Web Vitals, and performance across real devices and global locations.

Solutions

Explore Solutions

Proactively manage modern hybrid environments with predictive insights, intelligent automation, and full-stack observability.

By Business Outcome

By Role

By Industry

Professional Services

Why LogicMonitor?

Discover why leading IT teams trust us to unify hybrid observability and eliminate tool sprawl.

Pricing

Resources

Explore Resources

Check out our resource library for IT pros, featuring expert guides, strategies, and insights for smarter, AI-driven operations.

Resources

Upcoming Events

Platform Help

NEW

2026 The Year of Autonomous IT

Discover the trends, benchmarks, and strategies driving the industry shift to Autonomous IT.

Company

About LogicMonitor

Our observability platform proactively delivers the insights and automation CIOs need to accelerate innovation.

Leadership

Meet the leaders building the future of observability and AI.

Careers

Find job openings and learn about our employee benefits.

Culture

NEW

Join a collaborative, values-driven culture built on innovation and growth.

Contact & Locations

Connect with our experts to explore AI-powered observability solutions.

Our Customers

See the proof of how IT teams win with LogicMonitor.

Newsroom

Stay current with our latest mentions, press releases, and events.

Security

Purpose-built security for the hybrid observability and AI era.

Sustainability

Our commitment to the environment and the people in it.

Partners

Docs

LM Academy

LM Community

Agentic AIOps

Agentic AIOps Overview

Autonomously detect, diagnose, and resolve issues across your environment.

Meet Edwin AI

Turn fragmented cross-domain event noise into explainable, guided action.

AI Agent

Deploy specialized AI agents to handle investigation across the incident lifecycle.

Event Intelligence

Compress raw alert storms into high-fidelity, prioritized insights.

AI Automation

Execute governed, closed-loop remediation across automation playbooks.

ITOps Context Graph

NEW

Unify topology, telemetry, and changes into an AI-ready context layer.

MCP

NEW

Establish traceable, secure governance boundaries for AI tool integrations.

Infrastructure Observability

Infrastructure Observability Overview

Full visibility across your entire hybrid estate to eliminate tool sprawl.

Network Monitoring

Accelerate time to innocence with deep network path and device visibility.

Server Monitoring

Track server health, OS metrics, and resource utilization across environments.

Remote Monitoring

Monitor distributed endpoints, branch networks, and remote facility health.

VM Monitoring

Maximize hypervisor performance and streamline compute capacity planning.

SD-WAN Monitoring

Keep multi-site cloud networks connected with real-time edge visibility.

Database Monitoring

Pinpoint database query bottlenecks to keep business applications fast.

Configuration Monitoring

Minimize change failure rates by tracking device configuration drift.

Storage Monitoring

Track SAN/NAS arrays, IOPS bottlenecks, and storage capacity trends.

Cloud Observability

Cloud Observability Overview

Multi-cloud and hybrid environments unified into a single operational pane.

Container Monitoring

Automated, real-time visibility for Kubernetes and ephemeral microservices.

AWS Monitoring

Track AWS services, scaling, and costs alongside on-premises data.

Google Cloud Monitoring

Monitor native GCP infrastructure, compute, and serverless resources.

Azure Monitoring

Comprehensive visibility into Azure environments, gateways, and workloads.

AI Monitoring

Track LLM infrastructure, GPU utilization, and AI application stack health.

Oracle Cloud Monitoring

Track OCI native compute, enterprise databases, and cloud storage.

SaaS Monitoring

Validate availability and workforce productivity for critical SaaS apps.

Cloud Cost Optimization

Optimize cloud spend, maintain performance, and control budgets.

Internet Performance Monitoring

Internet Performance Monitoring Overview

Understand performance across the full stack wherever users depend on it.

Internet Health

NEW

Use global vantage points for independent validation of internet outages.

Real User Monitoring

NEW

Capture actual customer journeys and frontend performance in real time.

Synthetic Monitoring

NEW

Emulate user transactions and SaaS workflows to catch problems early.

Endpoint Monitoring

NEW

Diagnose remote workforce digital experience across devices and networks.

Digital Experience Monitoring

Digital Experience Monitoring

See every dependency, regardless of ownership or location.

Website Monitoring

Protect revenue journeys with proactive synthetic checks and uptime tracking.

CDN Monitoring

NEW

Audit edge performance and latency variance across your CDN providers.

API Monitoring

NEW

Test endpoints and third-party API reliability for critical app integrations.

Application Performance Monitoring

Connect code execution and traces directly to infrastructure health.

DNS Monitoring

NEW

Speed up time to innocence by tracking global nameserver resolution times.

DevOps Lifecycle Monitoring

NEW

Protect release velocity by validating dependencies during deployments.

BGP Monitoring

NEW

Trace global routing changes and path leaks to secure internet reachability.

Logs

Log Management Overview

Centralize and correlate log data to resolve incidents before they escalate.

Log Analytics & Intelligence

Correlate contextual log data with metrics to speed up root-cause analysis.

By Business Outcome

Autonomous IT

Predictive, autonomous IT built for resilience.

Automation

Eliminate repetitive operational toil with safe, policy-governed remediation workflows.

Modernization and Transformation

Accelerate complex technology transitions while protecting core enterprise resilience.

Cloud Migration

Maintain workload performance throughout migration.

Tool Consolidation

Reduce licensing costs and data silos by replacing fragmented monitoring tools.

Cost Optimization

Lower your total cost-to-serve by finding cloud waste and underused resources.

Operational Efficiency

Maximize team capacity by reducing alert storms and shift-handoff friction.

Reduce MTTR

Shorten war-room by surfacing topology-aware probable cause in mins.

Network Reachability

NEW

Independently audit external BGP, ISP, and SaaS provider connectivity boundaries.

Edge Deployment Optimization

NEW

Monitor SLOs, compare providers, and validate cloud and edge delivery.

Web Performance Optimization

NEW

Maximize digital checkout conversions by tracking global frontend latency metrics.

Application Resilience

NEW

Safeguard business services against transaction failures and costly downtime.

Workforce Productivity

NEW

Troubleshoot remote hardware and network issues to protect productivity.

By Role

CIO

Maximize enterprise resilience and align AI investments to measurable business ROI.

AIOps

Compress cross-domain event noise into explainable, automated ops leverage.

DevOps

Speed up releases by protecting engineering roadmaps from toil.

ITOps

Standardize incident response to reduce alert fatigue and after-hours work.

CloudOps

Unify multi-cloud visibility to optimize costs and track hybrid blast radius.

By Industry

Healthcare

Protect continuity of care and EHR availability across clinical workflows.

Public Sector

Ensure mission continuity and audit readiness for citizen-facing services.

MSP

Protect service margins and scale ops using multi-tenant, AI-assisted triage.

Retail & E-commerce

Safeguard peak retail campaigns, POS uptime, and digital customer journeys.

Technology

Protect customer trust and engineering velocity with SLA-driven visibility.

Hospitality

Deliver frictionless guest experiences and keep booking engines online.

Education

Maintain always-on student portals, learning platforms, and campus networks.

Manufacturing

Prevent production downtime by unifying IT, OT-adjacent, and edge systems.

Financial Services

Secure transaction trust and meet strict operational resilience compliance requirements.

Resources

Blog

Insights and advice from the experts on all things observability and AI.

Case Studies

See what real users have to say about the LogicMonitor platform.

Webinars

Live and on-demand learning, all in one place.

IT Guides

Learn from expert guides on the topics that matter most to IT teams.

How We Compare

See how our platform stacks up against other solutions.

Upcoming Events

CONFERENCE

SWORD Day

September 17, 2026

WEBINAR

Incident Management Has Outgrown Its Playbook

September 23, 2026

View all events

Join us at innovation-focused conferences, tech talks, webinars, and other events.

Platform Help

Support Docs

Access product docs, release notes, and support resources.

LM Community

Join the community to learn from peers, ask questions, and connect with experts.

Customer Education

Learn more about our platform through resources and live trainings.

DYNAMIC ROUTING PROTOCOLS

BGP vs OSPF: Key Differences and Tutorials

OSPF handles fast intra-domain routing while BGP scales to the Internet. Learn the key differences, inner workings, and how to configure each on Cisco routers.

12–17 minutes
June 23, 2026
Denton Chikura

IN THIS DEEP DIVE

CHAPTERS

    NEWSLETTER

    Subscribe to our newsletter

    Get the latest blogs, whitepapers, eGuides, and more straight into your inbox.

    SHARE

    The quick download:

    Don’t treat OSPF and BGP as interchangeable. Each is engineered for a specific scope and role.

    • OSPF is a link-state protocol designed for fast convergence inside a single autonomous system, using hierarchical areas to scale to several hundred routers.

    • BGP is the de facto standard for inter-domain routing across the Internet, using path attributes instead of simple cost metrics to give operators granular control over inter-domain routing decisions.

    • Both protocols can get complex quickly: OSPF through its multiple area and LSA types, BGP through its extensive attribute manipulation and best-path selection logic.

    • Start with clear requirements around network scope, convergence speed, and administrative control before choosing a protocol. The wrong fit creates more problems than it solves.

    BGP vs OSPF

    Routing protocols are used to automatically and dynamically exchange routing information between routers. There are several routing protocols to choose from, each with its own pros and cons, as each routing protocol is designed to be well-suited to a particular network implementation scenario. Two of the most popular routing protocols used today are Open Shortest Path First (OSPF) and Border Gateway Protocol (BGP). These are very different in their design, as we shall see. We’ll start with a summary of the differences and then explain each protocol in more depth.

    OSPF

    OSPF is an interior gateway protocol (IGP) that routes packets within a single Autonomous System (AS). Unlike other IGPs, OSPF is a link-state routing protocol. In other words, it relies on link-state information to calculate route paths and make routing decisions.

    After the protocol starts, each router running OSPF sends link-state advertisements (LSAs) throughout the AS or area containing information about its connected interfaces and routing metrics. When there is a change to any router, it is propagated to all routers in the area. Such an update triggers a rerun of the shortest-path-first algorithm. 

    OSPF splits each AS into smaller sections called areas. All the routers in the same area have identical LSA databases. They have also summarized information about the other areas. There are multiple types of OSPF areas, which will be described later in this article.

    BGP

    BGP is a routing protocol primarily used for inter-domain routing and is considered an External Gateway Protocol (EGP).  However, BGP can also be used to advertise networks within an AS and, when configured to do so, can function similarly to IGPs.

    BGP is used to exchange routing information among routers in the same AS or different ASs. An AS is a set of routers under a single administrative authority. An AS path is the route to a destination. It is also a list of ASs that the route passes through to reach a particular router. Each route has additional information attached that comes in the form of path attributes. The path attributes are used in routing policies to influence how the router routes the traffic.

    Summary of differences between OSPF and BGP

    Below is a summary of some of the differences between OSPF and BGP.

    OSPFBGP
    Routing domainIntra-domainPrimarily Inter-domain but can also be used as intra-domain
    Maximum size of the networkCan be deployed in mid-sized to large networks with up to several hundred routersScalable to the worldwide Internet
    ImplementationEasy for basic configuration Easy to moderately difficult for basic configuration 
    Network topologyHierarchical Mesh, but can be modified to star using a route reflector
    ConvergenceFastSlow
    Resource requirementsMemory- and CPU-intensiveDirectly proportional to the size of the routing table 
    MetricBased on bandwidth/costBased on BGP attributes

    Table 1: Summary of OSPF vs. BGP.

    Differences between OSPF and BGP

    There are several differences between OSPF and BGP. To start with, OSPF is an interior gateway protocol. Therefore, it is confined to a single domain for routing (intra-domain). On the other hand, BGP is primarily designed to route between routing domains (inter-domain).

    OSPF can be successfully deployed in networks with several hundred routers in a single flat area. However, this is directly related to the resources available on the routers (see below for the resource requirements). Conversely, the only routing protocol that runs on the Internet exclusively is BGP.

    The basic configuration of OSPF (say, a single area with no fancy features enabled) is relatively easy. Even the most basic BGP configuration requires more effort than OSPF’s basic configuration (and some advanced routing knowledge). While both OSPF and BGP can get very complex, BGP is far more difficult to use due to the numerous features available, which make it suitable for many situations and corner cases.  For example, OSPF primarily uses a metric to determine the best route. BGP, on the other hand, uses a set of attributes that can be adjusted with fine granularity to modify routing behavior in multiple ways.

    OSPF must be deployed hierarchically (we will discuss this in the next section), whereas BGP does not require any hierarchy to scale.

    In terms of convergence, OSPF reacts faster to network changes than BGP. This makes sense, given that BGP is designed for vast networks where changes happen more often statistically. You would not want routers on large networks to be constantly recalculating routes.

    As for resource requirements, OSPF’s constant recalculation makes it CPU- and memory-intensive. In contrast, BGP does not respond that quickly and becomes CPU- and memory-intensive as the routing table grows. Therefore, routers that hold the Internet routing table require powerful CPUs and a lot of memory.

    Regarding the metric used to calculate the best route, OSPF uses a cost derived from interface bandwidth and the costs advertised by other routers when the LSA is sent. BGP can use any BGP attributes to select the best route.

    The inner workings of OSPF and BGP 

    This section describes the two protocols in more detail. We will focus on the most common options we will see configured in the next section of the article.

    OSPF

    As mentioned in the first section, OSPF is a link-state routing protocol. OSPF routers exchange link-state advertisements that describe the networks they know about. From these advertisements, each OSPF router builds a full topology of the network in its memory.  Before doing this, though, they need to establish an adjacency with neighboring OSPF routers. Before establishing an adjacency, the two routers must become neighbors. The routers find each other using Hello packets.

    The following information from the Hello packets sent by the two routers must match:

    • They should be in the same area.
    • The router ID must be unique.
    • The subnet must be the same.
    • The Hello and dead timer must be the same.
    • The stub flag must match.
    • The authentication must match. 

    It’s important to know that not all neighbor routers become adjacent. Let’s consider the scenario in Figure 1 (a broadcast or a non-broadcast multi-access network).

    Figure 1: Broadcast multiaccess network.

    The OSPF Hello protocol will elect a designated router (DR) for the network in this particular example. For redundancy purposes, a backup designated router (BDR) will be elected. Every other router from the segment will become a DROther. This means that the DROther will become adjacent only to the DR and BDR, and every DROther router will receive the LSA from the DR (or the BDR if the DR fails). 

    The purpose of this mechanism is to reduce the amount of routing information traffic exchanged. There are two rules to elect the DR and BDR:

    • Priority: Highest priority is preferred.
    • Router ID: Highest router ID is preferred.

    The router ID is derived using the following options:

    • Manually set.
    • The highest IP address from a loopback interface.
    • The highest IP address from an up physical interface.

    Should every OSPF configuration be left at default and all the routers be configured at exactly the exact moment, in the above case, R3 will become the DR, R2 the BDR, and R1 the DROther (Figure 2).

    Figure 2: DR, BDR, and DROther.

    Above, the DROther sends its updates to the multicast IP address 224.0.0.6, which only the DR and BDR listen to. The DR sends the update to 224.0.0.5, which all routers in the segment listen to.

    It was mentioned that OSPF was designed to be hierarchical and scalable, achieved through OSPF areas. Based on the type of LSAs that can be present in an area, these are the OSPF areas:

    Area TypesLSA 1LSA 2LSA 3LSA 4LSA 5LSA 7
    Backbone AreaYesYesYesYesYesNo
    Non-backbone AreaYesYesYesYesYesNo
    Stub AreaYesYesYesNoNoNo
    Totally Stubby AreaYesYesNoNoNoNo
    Not-So-Stubby AreaYesYesYesNoNoYes

    Table 2: OSPF areas.

    It is worthwhile to discuss what each LSA type is:

    • LSA Type 1 – Router LSA: Generated by every router and describes the router links.
    • LSA Type 2 – Network LSA: Generated by the DR and describes the routers connected to the segment.
    • LSA Type 3 – Network Summary LSA: Generated by the Area Border Router and sent to another area to represent the destinations outside that area.
    • LSA Type 4 – ASBR Summary: Used to describe the router that advertises external routes.
    • LSA Type 5 – AS External LSA: Represents the routes external to the AS.
    • LSA Type 7 – NSSA External: Represents the external routes from an NSSA area that will be converted to Type 5 LSA.

    Now let’s discuss the router types in OSPF, as shown in Figure 3.

    Figure 3: OSPF areas and router roles.

    In this particular case, area 0 is the backbone area, the rest of the areas are non-backbone areas, and these are the roles of the routers:

    • R1 and R2: Internal routers because all their interfaces are in the same area.
    • R3 and R4: Area Border Routers because their interfaces are in two different areas. They are also called backbone routers because they have at least one interface in Area 0.
    • R5: Autonomous System Border Router, which redistributes external routes (BGP) in OSPF.

    BGP

    As already mentioned, BGP is used to connect ASes or to advertise network reachability information inside an AS.

    When BGP is configured between routers in the same AS, it is called Internal BGP. When it is configured between routers in different ASes, it is called External BGP (Figure 4).

    Figure 4: Internal and external BGP peers.

    In this example, the BGP session between R1 and R2 is internal, and the BGP session between R2 and R3 is external. The network reachability information is sent via BGP Update messages, enabling the advertisement and withdrawal of routes.

    One of the most critical fields in the Update message is the “Path Attributes,” which define what attributes are attached to the routes. There are four categories of BGP attributes:

    • Well-Known Mandatory: These are recognized by all BGP speakers and must be present in all Update messages.
    • Well-Known Discretionary: All BGP speakers recognize these messages, but they may optionally appear in Update messages.
    • Optional Transitive: These may or may not be recognized by BGP speakers, but even so, they are passed to other BGP peers.
    • Optional Non-Transitive: The BGP speakers might recognize these messages but not pass them to other BGP peers.

    While OSPF uses cost as a metric to determine the best path, BGP uses BGP attributes to determine the best path. Because it is not uncommon to have multiple paths to the same destination, BGP has a best-path selection algorithm to eventually choose the best path (or paths, if BGP multipath is configured).

    Detailed information about the exact steps for the algorithm are described here and here.

    One thing to remember is that a route will be considered a candidate for the best path only if the next hop on that route is reachable.

    Consider Figure 5. By default, if no additional actions are taken on R2, R1 will not accept the 10.10.10.0/24 route because, in the BGP Update message, the next hop for the route is R3, and R1 does not know how to reach it.

    Figure 5: BGP route next hop must be reachable.

    There are multiple ways to solve the problem above, and they are listed below:

    • R2 can set itself as the next-hop-self for the BGP update sent to R1, so R1 now has the next-hop IP address within its routing table.
    • R2 can advertise the subnet between R2 and R3 in the IGP of AS 1. This however, is less desirable, since inter AS communication should be restricted only to BGP, otherwise unpredictable routing may occur.  It is best practice to keep IGPs operating within the boundaries of their ASes.

    Configuration

    This section shows how to configure basic OSPF and BGP on Cisco routers.

    OSPF

    For OSPF, we will use the following diagram of a multi-area OSPF network. In this scenario, R3 is the ABR because it has interfaces in both Area 0 and Area 1. Area 1 is a non-backbone area (not a stub, stubby, or NSSA).

    Figure 6: Multi-area OSPF

    Following interface configuration, this is what is required on R1 to be configured as an internal backbone router (the same configuration is done for R2 with the difference of IP addressing).

    router ospf 1
     network 1.1.1.1 0.0.0.0 area 0
     network 10.10.10.1 0.0.0.0 area 0

    The configuration is similar for R4, except that the interfaces are added in Area 1.

    R3 has a different configuration. Observe how interfaces are part of different areas.

    router ospf 1
     network 1.1.1.3 0.0.0.0 area 0
     network 10.10.10.3 0.0.0.0 area 0
     network 20.20.20.3 0.0.0.0 area 1

    Because all three routers in Area 0 were configured simultaneously and none of the OSPF parameters were changed, R3 became the DR, R2 became the BDR, and R1 became DROther. As mentioned before, the router ID of R3 was the highest because it has the highest loopback IP address out of the three routers in Area 0.

    R1#show ip ospf neighbor Ethernet0/0
    
    Neighbor ID     Pri   State           Dead Time   Address         Interface
    1.1.1.2           1   FULL/BDR        00:00:32    10.10.10.2      Ethernet0/0
    1.1.1.3           1   FULL/DR         00:00:39    10.10.10.3      Ethernet0/0
    R1#

    If you checked on R3, R1 would be in the state of DROther.

    R3#show ip ospf neighbor Ethernet0/0
    
    Neighbor ID     Pri   State           Dead Time   Address         Interface
    1.1.1.1           1   FULL/DROTHER    00:00:35    10.10.10.1      Ethernet0/0
    1.1.1.2           1   FULL/BDR        00:00:31    10.10.10.2      Ethernet0/0
    R3#

    Checking the routing table of R1, you would see routes from the same area (Area 0) and Area 1 (with the code of IA).

          1.0.0.0/32 is subnetted, 4 subnets
    O        1.1.1.2 [110/11] via 10.10.10.2, 00:06:55, Ethernet0/0
    O        1.1.1.3 [110/11] via 10.10.10.3, 00:06:55, Ethernet0/0
    O IA     1.1.1.4 [110/21] via 10.10.10.3, 00:06:55, Ethernet0/0
          20.0.0.0/24 is subnetted, 1 subnets
    O IA     20.20.20.0 [110/20] via 10.10.10.3, 00:06:55, Ethernet0/0

    This would be a basic configuration of a multi-area OSPF network. This kind of deployment will suffice for most networks. 

    BGP

    For BGP, we will use the setup in Figure 7.

    Figure 7: Internal and External BGP.

    R1 and R2 are in AS1 (which means they will have an internal BGP between them), and R3 is in AS 2, so there will be an external BGP session between R2 and R3. R3 advertises the route for 1.1.1.1/32.

    The configuration required for R1 is the one below.

    router bgp 1
     neighbor 10.10.10.2 remote-as 1

    The configuration for R2 is the one below.

    router bgp 1
     neighbor 10.10.10.1 remote-as 1
     neighbor 20.20.20.3 remote-as 2

    And the configuration for R3. There is an additional command required to advertise the network 1.1.1.1/32, as noted below.

    router bgp 2
     network 1.1.1.1 mask 255.255.255.255
     neighbor 20.20.20.2 remote-as 1

    At this point, R2 should have in its routing table the network 1.1.1.1/32, but R1 will not have it because the next hop of the route (20.20.20.3) is not reachable by R1.

    R1#show ip route bgp
    
    Gateway of last resort is not set
    
    R1#sh ip bgp 1.1.1.1
    BGP routing table entry for 1.1.1.1/32, version 0
    Paths: (1 available, no best path)
      Not advertised to any peer
      Refresh Epoch 1
      2
        20.20.20.3 (inaccessible) from 10.10.10.2 (10.10.10.2)
          Origin IGP, metric 0, localpref 100, valid, internal
          rx pathid: 0, tx pathid: 0
    R1#

    To solve this, we can configure R2 to set itself as the next-hop for the routes it advertises to R1.

    router bgp 1
     neighbor 10.10.10.1 remote-as 1
     neighbor 10.10.10.1 next-hop-self
     neighbor 20.20.20.3 remote-as 2

    This will allow R1 to install the route in the routing table.

    Gateway of last resort is not set
    
          1.0.0.0/32 is subnetted, 1 subnets
    B        1.1.1.1 [200/0] via 10.10.10.2, 00:00:25
    R1#

    At first glance, the BGP configuration is simple, but it is as basic as it gets. In reality, you would need to play around with BGP attribute manipulation and configure additional features. Some of the attributes that can be manipulated to affect BGP routing behavior include Local Preference, AS_PATH length, and MED to name a few. The BGP configuration can get very complex, and vendors constantly add new complex features to support more and more use cases.

    Conclusion

    The following are lists that summarize the pros and cons of each routing protocol. Note that some of the cons may not actually be considered cons in certain situations, so these should be taken only as guidelines.

    OSPF

    • Pros
      • Fast convergence
      • Open standard
      • Scalable due to hierarchical area implementation
    • Cons
      • Uses large amounts of system resources (CPU, memory) to run algorithm and maintain full network topology information
      • Multiple area types and link state advertisement types can become extensively complex 

    BGP

    • Pros
      • Extremely scalable
      • Low resource usage even for large BGP tables
      • Extremely granular routing behavior adjustments
    • Cons
      • Slow to converge
      • Complexity can increase if many BGP attributes are tweaked

    BGP and OSPF are complex protocols. Their configuration can be very difficult at times, and it is critical to understand how the protocols work and what their core components are. Failing to do so would not only prevent you from having the right configuration but also put you at risk of being unable to properly troubleshoot issues with these protocols.

    It is also worth checking the latest vendor documentation for features and their configuration, as each feature’s defaults may change from release to release.

    See your network infrastructure clearly with LogicMonitor, from routing protocols to application performance.

    LogicMonitor delivers user-to-code visibility across your network, helping your team act on routing issues before they reach users.

    Request a demo

    FAQs

    Can OSPF and BGP run on the same router?

    Yes. It’s common for routers to run both protocols simultaneously. OSPF handles internal routing within the autonomous system, while BGP manages external routing between autonomous systems. The router can redistribute routes between the two protocols when needed, though this requires careful configuration to avoid routing loops.

    When should I use BGP instead of OSPF?

    Use BGP when you need to exchange routing information between different autonomous systems, when you’re connecting to the Internet through multiple ISPs, or when you need granular control over routing policies using path attributes. OSPF is the better choice for routing within a single organization’s network.

    Why is BGP convergence slower than OSPF?

    BGP is designed for large-scale networks like the Internet, where constant route recalculation would create instability. It uses timers and dampening mechanisms to prevent rapid route flapping. OSPF’s faster convergence is appropriate for smaller, controlled environments where quick adaptation to topology changes is more important than stability at scale.

    What happens if a BGP next hop is unreachable?

    The route won’t be installed in the routing table and won’t be considered for the best-path selection. This is a common issue in iBGP configurations where the next hop defaults to the external peer’s address. Solutions include configuring next-hop-self on the iBGP peer or advertising the external subnet in the IGP.

    By Denton Chikura

    Technical Writer

    Denton Chikura is a technical writer and longtime observability advocate focused on helping site reliability engineers and engineering teams discover the tools and capabilities that strengthen internet resilience. He works at the intersection of monitoring, performance, and infrastructure to make complex systems more understandable and usable, bridging the gap between deep technical detail and real‑world operations. His goal is to help teams build faster, detect issues earlier, and recover smarter, ultimately making the internet a better, more reliable place for everyone.

    Disclaimer: The views expressed on this blog are those of the author and do not necessarily reflect the views of LogicMonitor or its affiliates.

    © LogicMonitor 2026 | All rights reserved. | All trademarks, trade names, service marks, and logos referenced herein belong to their respective companies.

    Product

    Platform

    Infrastructure

    Cloud & Multi-Cloud

    Log Management

    Edwin AI

    Enterprise

    Demo

    Pricing

    WebPageTest Pricing

    RUM Monitoring

    IPM Monitoring

    Synthetic Monitoring

    How We Compare

    Datadog

    Dynatrace

    Virtana

    Solarwinds

    PRTG

    ManageEngine

    ScienceLogic

    SiteScope

    BigPanda

    About

    Careers

    Our Partners

    Leadership

    Newsroom

    Security

    AI Governance

    Sustainability

    Legal

    Documentation

    Docs Hub

    Release Notes

    Security

    Support Center

    Resources

    Autonomous IT in 2026

    Resource Library

    LM Academy

    Blog

    Case Studies

    Customer Education

    Connect

    Contact & Locations

    Submit a Ticket

    Events

    LM Community

    Careers


    Product

    Platform

    Infrastructure

    Cloud & Multi-Cloud

    Log Management

    Edwin AI

    Enterprise

    Demo

    Pricing

    WebPageTest Pricing

    RUM Monitoring

    IPM Monitoring

    Synthetic Monitoring


    How We Compare

    Datadog

    Dynatrace

    Virtana

    Zenoss

    Solarwinds

    PRTG

    ManageEngine

    ScienceLogic

    SiteScope

    BigPanda


    About

    Careers

    Our Partners

    Leadership

    Newsroom

    Security

    AI Governance

    Sustainability

    Legal


    Documentation

    Docs Hub

    Release Notes

    Security

    Support Center


    Resources

    Autonomous IT in 2026

    Resource Library

    LM Academy

    Blog

    Case Studies

    Customer Education


    Connect

    Contact & Locations

    Submit a Ticket

    Events

    LM Community

    Careers


    Privacy Policy

    Terms of Use

    Preference Center

    Do Not Sell My Information

    © 2026 LogicMonitor