Network Configuration for multiple IP subnets on one ethernet device?

spdriver

Renowned Member
May 25, 2010
17
1
68
In WebGUI, it is only possible to set one IP address for i.e. vmbr0.

I want to bind multiple subnets to this vmbr0(eth0), as VMs will also use these IP subnets.

VMs shall reach each subnet and all external IPs. No restrictions.


How to do this outside the WebGui? The WebGui does not allow this.


The config should be usable for a pair of two machines (Proxmox Cluster), providing seemless migration of VMs.

A second NIC (eth1) is used on each machine to connect the two machines with direct link.


Please provide eamples for "/etc/network/interfaces"


Is any WebGui extension planned for this feature?

thanks.
 
Hi,

I have done it this way - but be careful I made bonded devices with vlans on to of it:

# network interface settings
auto lo
iface lo inet loopback

iface eth0 inet manual

iface eth1 inet manual

auto bond0
iface bond0 inet manual
slaves eth0 eth1
bond_miimon 100
bond_mode 802.3ad

auto bond0.10
iface bond0.1 inet manual
vlan-raw-device bond0

auto bond0.20
iface bond0.2 inet manual
vlan-raw-device bond0

auto bond0.150
iface bond0.3 inet manual
vlan-raw-device bond0

auto bond0.151
iface bond0.4 inet manual
vlan-raw-device bond0

auto bond0.152
iface bond0.5 inet manual
vlan-raw-device bond0

auto bond0.153
iface bond0.6 inet manual
vlan-raw-device bond0

auto bond0.154
iface bond0.7 inet manual
vlan-raw-device bond0

auto bond0.155
iface bond0.8 inet manual
vlan-raw-device bond0

auto vmbr0
iface vmbr0 inet static
address xxx.xxx.xxx.xxx
netmask 255.255.252.0
gateway xxx.xxx.xxx.xxx
bridge_ports bond0.10
bridge_stp off
bridge_fd 0

auto vmbr20
iface vmbr20 inet manual
bridge_ports bond0.20
bridge_stp off
bridge_fd 0

auto vmbr150
iface vmbr150 inet manual
bridge_ports bond0.150
bridge_stp off
bridge_fd 0

auto vmbr151
iface vmbr151 inet manual
bridge_ports bond0.151
bridge_stp off
bridge_fd 0

auto vmbr152
iface vmbr152 inet manual
bridge_ports bond0.152
bridge_stp off
bridge_fd 0

auto vmbr153
iface vmbr153 inet manual
bridge_ports bond0.153
bridge_stp off
bridge_fd 0

auto vmbr154
iface vmbr154 inet manual
bridge_ports bond0.154
bridge_stp off
bridge_fd 0

auto vmbr155
iface vmbr155 inet manual
bridge_ports bond0.155
bridge_stp off
bridge_fd 0
 
I also have the same problem.

Description: Due to historical network setup, we get 2 IP Ranges routed.
From internal: 192.168.4.x
External: 83.220.1xx.xxx
On all machines, this goes to eth0 (yes i know, cant do anything about it)
Normally i just split the interface into eth0 and eth0:1
This does not work with vmbr.

How can I make this work and get my routes working properly?

Because inside my KVM there is a server with outside ip 83.220.1xx.xxx and inside ip 192.168.4.xx
The Apache Webserver inside seems to be running incredibly slow, and I think this is due to routing problems.

Any ideas?
 
Hi,

i would use different vlan´s for the different subnet´s. this way the subnets get also separeted on layer2. with proxmox-gui you can set up a vmbrX for every vlan an add them to the vm (works with kvm and openvz).


Sven