Google Cloud, Alias IP Ranges and LXC/LXD

Hi,

Google uses Alias IP Ranges for their own container and pod hosting, and I did manage to get it to work with LXC/LXD last year but can’t get it to work anymore right now. The intention would be to have a primary subnet for the hosts, and a secondary subnet from which each host will get an Alias IP Range, will host all the containers. Each container should get an internal IP from the secondary subnet/alias IP range, and it should be able to reach other containers inside the secondary subnet, etc. Google takes care of all the routing within the VPC, and the underlying OS automatically gets a route added for the alias IP range already.

I’ve tried all possible combinations from a bridge with or without NAT, macvlan, ipvlan, routed, and so on to get the containers to actually use an IP address from the secondary/alias IP range.

Does anyone have any tips? Hints? Any tutorials around somewhere?

EDIT: this is now resolved. You’ll need to modify the instance_configs.cfg file to disable alias IP ranges on the instance level. Simply creating a nat bridge works fine after this.

Can you elaborate on what this looked like or what was needed to make it work? :slight_smile: