Skip to content
LinkState
Go back

Where VXLAN actually burns CPU in Linux labs

Introduction to Overlay Networking

Overlay networking is a technique used to virtualize Layer 2 and Layer 3 networks, allowing multiple virtual networks to coexist on top of a physical network. This is particularly useful in cloud computing, data centers, and other environments where network virtualization is required.

Overview of VXLAN

VXLAN (Virtual Extensible LAN) is a popular overlay networking technology that allows Layer 2 networks to be extended over Layer 3 networks. It does this by encapsulating Layer 2 packets in UDP packets, allowing them to be transmitted over IP networks. VXLAN is commonly used in data centers and cloud computing environments to provide a scalable and flexible way to virtualize networks.

Walkthrough of a Packet’s Journey

To understand how overlay networking works, let’s walk through the journey of a single packet.

Packet Receipt and Bridge Lookup

When a packet is received on a network interface, it is first processed by the bridge lookup module. The bridge lookup module checks the packet’s destination MAC address against a table of known MAC addresses, to determine which port the packet should be forwarded to.

# Example CLI command to display bridge lookup table
bridge link show

VXLAN Encapsulation Process

If the packet is destined for a VXLAN network, it is encapsulated in a VXLAN header. This process involves constructing the VXLAN header, which includes the VNI, source and destination IP addresses, and other information.

# Example CLI command to display VXLAN header construction
tcpdump -i any -vv -s 0 -c 100 -W 1000 port 4789

Packet Checksum Handling

When a packet is encapsulated in a VXLAN header, the checksum is recalculated to ensure that the packet is not corrupted during transmission.

# Example CLI command to display packet checksum handling
tcpdump -i any -vv -s 0 -c 100 -W 1000 port 4789 -e

Remote Decapsulation and Delivery

When the packet is received at the remote end, it is decapsulated and delivered to its final destination. The decapsulation process involves removing the VXLAN header, and delivering the packet to the destination MAC address.

# Example CLI command to display remote decapsulation and delivery
tcpdump -i any -vv -s 0 -c 100 -W 1000 port 4789 -e

Troubleshooting Common Issues

Troubleshooting overlay networks can be complex, due to the multiple layers of virtualization involved.

Identifying Bottlenecks in Overlay Networks

To identify bottlenecks in overlay networks, it’s essential to monitor CPU utilization, network throughput, and packet loss.

# Example CLI command to display CPU utilization
top -b -n 1 -d 1 -c

Scaling Limitations and Performance Optimization

Overlay networks can be scaled horizontally, by adding more commodity hosts to the network. However, this can lead to performance issues, due to the increased CPU utilization and network throughput.

CPU Utilization and Overlay Network Scaling

CPU utilization is a critical factor in overlay network scaling, as it can lead to performance issues and packet loss.

# Example CLI command to display CPU utilization
top -b -n 1 -d 1 -c

Reproducible Lab Setup and Testing

To test and validate overlay networks, it’s essential to set up a reproducible lab environment.

Setting Up a Test Environment for Overlay Networking

Setting up a test environment for overlay networking involves configuring the network topology, and deploying the overlay network software.

# Example CLI command to configure network topology
containerlab deploy -t clab.yml

Measuring CPU Dominance and Performance Impact

To measure CPU dominance and performance impact, it’s essential to monitor CPU utilization, network throughput, and packet loss.

Using Tools to Monitor CPU Utilization and Network Performance

Tools such as top and tcpdump can be used to monitor CPU utilization and network performance.

# Example CLI command to display CPU utilization
top -b -n 1 -d 1 -c
# Example CLI command to display network throughput
tcpdump -i any -vv -s 0 -c 100 -W 1000 port 4789

Best Practices for Overlay Network Deployment

To deploy overlay networks effectively, it’s essential to follow best practices such as designing for scalability, configuring for optimal performance, and monitoring for performance issues.

Design Considerations for Scalable Overlay Networks

Designing for scalability involves configuring the overlay network to handle increased traffic and network growth.

# Example CLI command to configure overlay network for scalability
vxlanctl add vx-100 10.0.0.1 10.0.0.2

Advanced Topics and Future Directions

Overlay networking is a rapidly evolving field, with new technologies and techniques emerging all the time.

Emerging trends in overlay networking and VXLAN include the use of artificial intelligence and machine learning to optimize network performance, and the development of new overlay networking protocols.

# Example CLI command to configure AI-powered overlay network
ai-overlay configure --vxlan-network vx-100 --ai-model ai-model

Share this post on:

Previous Post
eBPF tracing for resolver path forensics
Next Post
Kubernetes DNAT with nft backend gone sideways