Proxmox 1.7 - 2.6.32 - Setting up two different networks on two different eth devices

ndew

Renowned Member
Nov 26, 2008
29
0
66
I know this issue has been discussed before but I can't find anything in the forums that's the same setup as I have.

networking config is like this

network interface settings
auto lo
iface lo inet loopback

iface eth0 inet manual

iface eth1 inet manual

auto vmbr0
iface vmbr0 inet static
address 66.209.xxx.195
netmask 255.255.255.192
gateway 66.209.xxx.254
bridge_ports eth0
bridge_stp off
bridge_fd 0

auto vmbr1
iface vmbr1 inet static
address 66.209.xxx.140
netmask 255.255.255.192
bridge_ports eth1
bridge_stp off
bridge_fd 0

xxx is the same on all interfaces. vmbr0 is on 1 vlan and vmbr1 is on another vlan and they have different gateways ( i only assigned a gateway to vmbr0 ). If i switch the cables and assign the network and gate way from vmbr1 to vmbr0 then the 66.209.xxx.140 ip works fine but the 66.209.xxx.195 ip does not.

This rules out a routing issue as if i assign them one at a time it works with out any issues. I really don't know why this wont work, both network cards are plugged in to cisco ports configured for specific vlans (in this case vmbr0 is vlan 9 and vmbr1 is vlan 100) they are not trunking ports.

If anyone can give me some insight i would be in your debit. This same setup works fine with 2.6.24 on proxmox 1.5. However i want to get away from that as it's being phased out, and i don't want to use 2.6.18 as it's not the primary kernel that proxmox is going to support 2.6.32 is.

Thanks,
Nick
 
Re: Proxmox 1.7 - 2.6.32 - Setting up two different networks on two different eth dev

Now to answer my own question, took some time but i got it working. This is what i did.


# network interface settings
auto lo
iface lo inet loopback

iface eth0 inet manual

iface eth1 inet manual

auto vmbr0
iface vmbr0 inet static
address 66.209.xxx.195
netmask 255.255.255.192
gateway 66.209.xxx.254
bridge_ports eth0
bridge_stp off
bridge_fd 0

auto vmbr1
iface vmbr1 inet static
address 66.209.xxx.140
netmask 255.255.255.192
bridge_ports eth1
bridge_stp off
bridge_fd 0
post-up /root/configvmbr1.sh

the contents of the script

route add -net 66.209.xxx.0 netmask 255.255.255.0 dev vmbr1 (this is a secondary network that's on the same VLAN as the ip assigned to vmbr1)
ip rule add from 66.209.xxx.140 table 9
ip route add default dev vmbr1 via 66.209.xxx.190 table 9
ip rule add from 66.209.xxx.0/24 table 10 (this is a secondary network that's on the same VLAN as the ip assigned to vmbr1)
ip route add default dev vmbr1 via 66.209.xxx.254 table 10 (this is a secondary network that's on the same VLAN as the ip assigned to vmbr1)

And now everything works perfectly. Let me know if anyone has any questions.