cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
859
Views
1
Helpful
0
Comments
M02@rt37
VIP
VIP

In modern networking architectures, the use of overlay technologies like VxLAN has become increasingly popular to address scalability and flexibility challenges.

When implementing a VxLAN fabric, the choice of underlay (control-plane) routing protocol is a crucial decision that can impact network performance, scalability, and convergence.

Two commonly used routing protocols for underlay networks are OSPF and BGP.

In this article, we will compare OSPF and BGP as underlay protocols for the context of a VxLAN fabric.

 

Basis

OSPF is an Interior Gateway Protocol (IGP) designed for use within an autonomous system (AS). It is a link-state routing protocol that uses a Dijkstra algorithm to calculate the shortest path to a destination. OSPF exchanges link-state advertisements (LSAs) to build a link-state database and construct a network topology. OSPF offers fast convergence and is suitable for environments with rapidly changing topologies.

BGP is an Exterior Gateway Protocol (EGP) that operates between different autonomous systems. It is used to exchange routing and reachability information between autonomous systems. BGP is designed for scalability and is well-suited for large networks with complex policies. It uses the path vector algorithm to determine the best path for routing. While BGP may have slower convergence compared to OSPF, its focus on policy and path selection makes it an excellent choice for interdomain routing.

 

Raw comparision 

Scalability:

  • BGP is known for its scalability and is well-suited for large-scale networks with thousands of routes and peers.
  • OSPF can handle medium to large networks but might encounter scalability challenges as the network grows significantly.

Convergence Speed:

  • BGP convergence can be slower, which might impact network stability during route changes.
  • OSPF offers fast convergence, making it suitable for environments where rapid failure recovery is essential, such as data centers.

Network Policies:

  • BGP provides granular control over routing policies and path selection, which is essential for multi-tenant environments and complex network designs.
  • OSPF is less focused on policy and might not provide the same level of flexibility for complex routing scenarios.

Ease of Configuration:

  • BGP configuration can be complex as an underlay in a VxLAN Fabric, especially when dealing with route reflectors, communities, and policies, ASes.
  • OSPF configuration tends to be simpler and more straightforward, making it easier to deploy and manage in smaller networks.

 

Optimizations

To achieve optimal performance and scalability, network administrators can take advantage of OSPF's features and configurations.

One of these optimizations involves configuring OSPF interfaces as point-to-point (P2P) links, which can lead to a more efficient OSPF operation.

The P2P links make use of unnumbered links to save on address space. By using unnumbered, number of IPs required is n, where n is the number of switches in the leaf/spine fabric. The following configuration is applied to the leaf and spine switches:

interface ethernet x/y
no switchport
medium p2p
ip unnumbered loopback<id>
ip ospf network point-to-point
ip router ospf UNDERLAY area 0.0.0.0
no shutdown

The medium p2p is a config item. Without this line, the ip unnumbered command is not available on the interface. This configuration treats the link as a direct connection between two routers, avoiding the need for an IP address assignment on the physical interfaces. OSPF P2P interfaces are particularly useful in scenarios where a separate subnet is not practical or necessary for each physical link. This is the case in a VxLAN Fabric.

Benefits of P2P Interfaces:

  • IP Address Efficiency: Configuring OSPF interfaces as P2P eliminates the need for IP addressing on the physical links. This reduces IP address consumption and simplifies network design. 
  • Convergence Speed: OSPF with P2P interfaces can achieve faster convergence during link failures, as the information about a failed link is immediately known to the adjacent router.

Furthermore, configuring links with the command ip ospf network point-to-point has an impact on reducing the number of LSAs generated in the OSPF network. However, it's important to clarify that the reduction in LSAs is not directly because of the "point-to-point" network type itself, but rather due to the characteristics and behavior associated with it.

The following factors contribute to a potential reduction in LSAs:

  1. One LSA per Link: In a "point-to-point" network type, OSPF generates a single LSA (Type 1 Router LSA) for the link between two routers. This is in contrast to "broadcast" or "non-broadcast multi-access" network types where OSPF generates multiple LSAs for the broadcast domain.

  2. No Designated Router (DR) or Backup Designated Router (BDR): In a "point-to-point" network, there is no need to elect a DR or BDR because there are only two routers on the link. This eliminates the need for Type 2 Network LSAs that would be generated in broadcast network types.
  3. Direct Link: "Point-to-point" interfaces represent direct links between two routers, which means there's less complexity in the network topology compared to multi-access networks. This can result in fewer LSAs being generated to describe the link state.

Techniques like OSPF area design, route summarization, and stub areas also play a significant role in optimizing the LSDB (Link-State Database) and reducing LSAs in larger OSPF networks.

On the other hand, BGP employs various techniques to optimize routing updates. These techniques include route reflectors, route dampening, prefix filtering, and aggregation. BGP optimizations are tailored to inter-domain routing scenarios, where policy control and scalability are paramount.

 

Configuring OSPF as the underlay in a VxLAN fabric can indeed be simpler and more straightforward compared to using BGP as the underlay. This is because VxLAN overlay networks commonly use BGP as the overlay control plane protocol, and using OSPF for the underlay can lead to a more seamless integration. Here's a breakdown of the reasons why OSPF underlay is often considered easier:

Protocol Familiarity: OSPF is a well-established and widely used IGP for routing within an AS. Network administrators often have a good understanding of OSPF's behavior, configuration, and troubleshooting.

Automatic Summarization: OSPF has built-in mechanisms for route summarization, which simplifies the advertisement of routes between areas. This can help in creating a scalable and efficient underlay topology.

Ease of Troubleshooting: OSPF's well-defined behavior and clear database structure make troubleshooting easier. Issues can be isolated to specific areas or links, and tools like "show" commands and OSPF-specific debugs are readily available.

Less Configuration Overhead: OSPF typically requires fewer configuration parameters compared to BGP, especially in a simpler underlay scenario. This reduces the chances of misconfiguration and human errors.

Fast Convergence: OSPF's link-state database allows for fast convergence after link failures, ensuring minimal impact on network performance.

On the other hand, using BGP as the underlay introduces additional complexity, as BGP is a powerful routing protocol designed for inter-domain routing with many optional features. While BGP is a suitable choice for the overlay control plane in VXLAN, configuring and troubleshooting BGP for the underlay can be more challenging, especially for network administrators who are less familiar with BGP intricacies.

 

The choice between OSPF and BGP as underlay protocols in a VxLAN fabric depends on the specific requirements of the network. Using OSPF as the underlay in a VxLAN fabric is often a pragmatic choice due to its simplicity, familiarity, and ease of troubleshooting

Network architects should consider the network's size, growth potential, convergence speed, and policy requirements when selecting the most appropriate underlay protocol for their VxLAN fabric.

 

Sources:

https://mhd-experts.com/2020/05/20/quel-underlay-pour-ma-fabric-leaf-spine-partie-3/

https://leanpub.com/virtualextensiblelanvxlanapracticalguidetovxlansolutionpart1

Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community: