Server with multiple NIC and virtual servers.

G

gavfranc

Guest
Hi,

I hope someone can help me with this issue.


  • I have a proxmox server running on an hp proliant g8 with 4 network cards.
  • I have installed 2 KVM virtual servers running ubuntu 12.04 lts
  • I need 2 keep the 2 virtual servers on seperate networks.

I have set up one of the servers with LTSP and it accessing the internet via a bridge to the eth0. This server is also using Vmbr1 to eth1 (for clients) and is functioning perfectly. The clients machines can connect to it via eth1 access the internet and run local apps.

My issue is with the second server that I want to use a SAMBA/dns/dhcp server that must run seperate from the ltsp and use eth2 via vmbr2 for its services but access the gateway and the internet like the ltsp server can.


What is the best way I can set this up, I am not new to linux servers and I am very comfortable with normal networking but have little experience with virtualisation.

Thanks

Gavin
 
Last edited by a moderator:
You need to set up routing tables for each interface. Only the one WITHOUT the default gateway assigned in the interfaces file needs to have the ip rule enabled.

+++

My /etc/iproute2/rt_tables:
#
# reserved values
#
255 local
254 main
253 default
0 unspec
#
# local
#
#1 inr.ruhep
100 ABC
101 DEF

+++

My /etc/network/interfaces:

auto lo
iface lo inet loopback

#iface eth0 inet manual
#iface eth1 inet manual
#iface eth2 inet manual
#iface eth3 inet manual
#iface eth4 inet manual
#iface eth6 inet manual
#iface eth7 inet manual
#iface eth8 inet manual
#iface eth9 inet manual

# http://www.kernel.org/doc/Documentation/networking/bonding.txt
# https://help.ubuntu.com/community/UbuntuBonding

auto bond0
iface bond0 inet manual
slaves eth0 eth1 eth2 eth3
bond-mode 802.3ad
bond-miimon 100
bond-lacp-rate 1
bond-downdelay 200
bond-updelay 200

auto bond1
iface bond1 inet manual
slaves eth6 eth7 eth8 eth9
bond-mode 802.3ad
bond-miimon 100
bond-lacp-rate 1
bond-downdelay 200
bond-updelay 200

# http://manpages.ubuntu.com/manpages/precise/man5/bridge-utils-interfaces.5.html

auto vmbr0
iface vmbr0 inet static
address A.B.C.41
netmask 255.255.255.0
gateway A.B.C.1
network A.B.C.0
broadcast A.B.C.255
# see Ubuntu bridging-utils-interfaces man page
# Proxmox uses bridge_stp off
bridge_ports bond0
bridge_stp off
bridge_fd 0
up ip route add A.B.C.0/24 dev vmbr0 src A.B.C.41 table ABC
up ip route add default via A.B.C.1 dev vmbr0 table ABC
# up ip rule add from A.B.C.0/24 table ABC
up ip route flush cache
# post-down ip rule del from A.B.C.0/24 table ABC
post-down ip route del default via A.B.C.1 dev vmbr0 table ABC
post-down ip route del A.B.C.0/24 dev vmbr0 src A.B.C.41 table ABC
post-down ip route flush cache

auto vmbr1
iface vmbr1 inet static
address D.E.F.41
netmask 255.255.255.0
# gateway D.E.F.1
network D.E.F.0
broadcast D.E.F.255
# see Ubuntu bridging-utils-interfaces man page
# Proxmox uses bridge_stp off
bridge_ports bond1
bridge_stp off
bridge_fd 0
up ip route add D.E.F.0/24 dev vmbr1 src D.E.F.41 table DEF
up ip route add default via D.E.F.1 dev vmbr1 table DEF
up ip rule add from D.E.F.0/24 table DEF
up ip route flush cache
post-down ip rule del from D.E.F.0/24 table DEF
post-down ip route del default via D.E.F.1 dev vmbr1 table DEF
post-down ip route del D.E.F.0/24 dev vmbr1 src D.E.F.41 table DEF
post-down ip route flush cache
 
no double posts please. the forum is moderated and if the post is suspicious, it goes to the moderation queue.
 

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!