Can't get the second subnet working

sitesten

New Member
Sep 25, 2012
6
0
1
I need to configure two subnets to be used by my KVM machines.

Initially I configured the vmbr0 interface with a configuration like this:

Code:
auto vmbr0
iface vmbr0 inet static
address xxx.xxx.216.48
netmask 255.255.255.248
bridge_ports none
bridge_stp off
bridge_fd 0

It worked just perfect and all the VMs assigned to vmbr0 have network connection. Later I got another subnet and tried to add an additional network interface like:

Code:
auto vmbr1
iface vmbr1 inet static
address xxx.xxx.108.0
netmask 255.255.255.248
bridge_ports none
bridge_stp off
bridge_fd 0

Unfortunately any VM assigned to vmbr1 does seems to have a network.
Anyone have an idea what's wrong with my configuration?
 
I believe that you have to bind the bridge to your physical network device ... for instance, you can have your /etc/network/interfaces contain:

auto lo
iface lo inet loopback

auto vmbr0
iface vmbr0 inet static
address 192.168.xxx.xxx
netmask 255.255.255.0
gateway 192.168.xxx.1
bridge_ports eth0
bridge_stp off
bridge_fd 0

auto vmbr1
iface vmbr1 inet static
address 192.168.yyy.yyy
netmask 255.255.255.0
gateway 192.168.yyy.yyy
bridge_ports eth1
bridge_stp off
bridge_fd 0

This assumes that xxx and yyy are your two subnets.

hope that helps.
 
Both subnets are using the same Ethernet adapter although I'm going to try explicitly specifying eth0 for both of them.
 
I'd like to use bridged networking with two different subnets that are having two different gateways. I have a single network interface. The link you provided seems to be related with a different case.
 
I'd like to use bridged networking with two different subnets that are having two different gateways. I have a single network interface. The link you provided seems to be related with a different case.

No need to alter your /etc/network/interfaces, simple edit /etc/vz/vz.conf

#NEIGHBOUR_DEVS=detect

Change this line to:

NEIGHBOUR_DEVS=all

Now, restart:
# /etc/init.d/vz restart

Run again your VPS via Proxmox Web UI or CLI:
# vzctl start VPS_ID

The try to PING your 1st and 2nd subnet.
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!