Sunday, October 17, 2021

Adding NAT to VXLANs without ambiguous routing

Hi, I recently got great help from here in picking BPN EVPN for setting up multi-tenant VMs across a data centre. I now have multiple VXLAN spanning multiple hosts, however I need to add NAT to these VXLAN networks, but I can't figure out how to do so without assigning overlapping address spaces on the host router.

So what I've done is this: I create a VXLAN and associated bridge, connect the KVM guests to the bridge. Now they can talk to each other but they can't talk to the host or the internet. So I enable port forwarding and NAT on the host, and set up a dummy device and assign it an IP (with same CIDR as the static IPs I assign to the VMs), so the guests can use it as a gateway to connect to the outside world.

This works, however if I want to have multiple VXLAN on a host, I will run into trouble since they will share local address space. Right now all VXLANs are assigned addresses in 172.16.0.0/12. What am I missing? Can I just set up a route directly from the gateway IP? Thanks in advance.



No comments:

Post a Comment