# 𝄜 OSPF vs. BGP for SD-WAN | Hub-and-Spoke vs. Mesh ⿻

When designing an **SD-WAN underlay**, choosing between **OSPF and BGP** depends on the architecture:

* **Hub-and-Spoke**: BGP is usually the better choice.
    
* **Full Mesh**: Neither is ideal, but BGP scales better than OSPF.
    

Let’s break this down.

---

## **1\. Hub-and-Spoke Architecture**

### **BGP: The Better Choice**

✅ **Pros:**

* **Scales well** – Hubs can act as route reflectors to simplify peering.
    
* **No flooding issues** – Unlike OSPF, BGP does not flood link-state changes.
    
* **Better control** – BGP policies can be used to influence routing paths.
    
* **Supports multi-homed setups** – Ideal for SD-WAN scenarios where the hub has multiple upstream ISPs.
    

❌ **Cons:**

* **Slower convergence** – BGP is not designed for real-time failover. SD-WAN overlay mechanisms (like path monitoring) are needed.
    
* **More complex configuration** – Requires route reflectors or confederations for scalability.
    

### **Why Not OSPF?**

❌ **OSPF has scalability issues in hub-and-spoke.**

* Every spoke **learns every route** from the hub. In large deployments, this can lead to **LSA (Link-State Advertisement) overload**.
    
* **Does not scale well across different WAN links.**
    

**➡ Verdict:** **BGP is the best choice for SD-WAN hub-and-spoke deployments.**

---

## **2\. Full Mesh Architecture**

### **Neither OSPF Nor BGP is Ideal**

* **OSPF is problematic** because of excessive flooding in a large mesh.
    
* **BGP scales better but has slow convergence** (not good for fast SD-WAN failover).
    
* **SD-WAN’s own overlay intelligence (policy-based routing, dynamic path selection) usually replaces the need for full-mesh IGP routing.**
    

### **What About Babel or Other Solutions?**

* **Babel (or EIGRP in Cisco environments)** handles dynamic networks better than BGP/OSPF, but it's rarely seen in SD-WAN.
    
* **SD-WAN solutions like Fusion use their own intelligent path selection, which outperforms any IGP in a full-mesh SD-WAN setup.**
    

**➡ Verdict:** **Avoid full mesh unless necessary. If you must use it, use BGP over OSPF, but rely on SD-WAN's native traffic steering instead.**

---

### **Recommendation Wrap Up for SD-WAN Routing:**

* **Use BGP for hub-and-spoke SD-WAN.**
    
* **Avoid full mesh and let SD-WAN handle dynamic path selection.**
    
* **OSPF is only useful for LAN routing, not for SD-WAN underlays.**
    

%[https://bsky.app/profile/mastelek.bsky.social/post/3lr3cdkzj6s2c]
