SDN use different IP then host

Nov 27, 2023
219
51
28
Netherlands
daniel-dog.com
Hello everyone,

I recently got a new server I am planning the last couple of things before I deploy the new server for production.
Now I have used SDNs in the past (but before SDN was in the GUI and more like set it once and never change it) and plan on using it on the new server as well since not all my VMs need a dedicated IP address. (Most of my VMs can share a external IP address)

Now my question is:
What would I need to change and where to use an different IP address for the SDN then the host has.
My tough was to just add a new Linux bridge and configure the IP address to the one I want to use for the SDN.
But I see no option to use a different Linux Bridge for the SDN Zone / SDN VNet.

I did notice that the SDN config is stored in /etc/network/interfaces.d/sdn.
But can I just change the Linux Bridge name and the external IP address in the SDN config file? or do I need to change it somewhere else too.
 
So you basically want a bridge for all your VMs and external connectivity via SNAT? Do I understand that correctly?

Then you would create a Simple Zone, a VNet in there and configure a Subnet that is different from the one that your host uses. Then you just need to enable SNAT and you should be good to go.
 
I could not add a second Linux bridge to the host as it has already a Linux bridge. (Make sense since only one port has a ethernet cable connected, so just using another port is not possible for me.)

Now I have created a second Simple Zone called WLANSIM.
Then I created a new VNET called WLANNET and entered by subnet 62.169.x.x/21, set the gateway that my provider needs me to use and selected SNAT.

But when I go into range and enter 10.0.0.1 to 10.0.0.254 I get:
update sdn subnet object failed: 400 Parameter verification failed.dhcp-range: start-address 10.0.0.1 is not in subnet 62.169.x.x/21 (500)

I get that 10.0.0.x is not part of the 62.169.x.x address but the 62.169.x.x is my external IP address and 10.0.0.x is my local IP address that should be given out to the VMs by the Proxmox VE DHCP for the external IP sharing between VMs.

I am probably missing something. But its my first time doing it where the external IP address is not the same as the external IP adress of the host.
 
Generally, you will need to set the subnet to the 10.x.x.x range for the VNet, since this is the IP range that the VMs will be using inside the VNet. Your external IP and gateway should be set on vmbr0 that bridges your physical interface. If you have SNAT activated, then traffic from the VMs goes out of your host should be NATted.

Just to make sure: You have two external IPs? One for your host and one that you want your VMs to share? Are they in the same subnet?
 
I have actually 4 IP addresses.
1 for the host itself, and 3 for VMs where I want to use 1 of the 3 for a IP share between the VMs.
The host IP is on a different subnet then the 3 extra IPs.
But since I only have one network interface to works with on the host, there seems to be no way to add a additional vmbr1 to it.
So it seems not possible to do what I wanted to do if I am correct?