[PVE-User] Multiple Network Interfaces in CT

Timh B timh at shiwebs.net
Thu May 5 08:09:31 CEST 2011

On Wed, May 4, 2011 17:42, Shain Miley wrote:
> Hello all,
> I am going to be setting up a two or three node Proxmox cluster for DR
> purposes in the near future.
> I am only allowed a limited number of external ip addresses at this
> location.
> Each of these machines has a 4 port NIC card, so my plan was to setup
> the external ip range (201.94.31.x) on ETH0 and setup the non-routable
> internal ip addresses (192.168.1.x) on ETH1.
> I am wondering how best to achieve this setup.
> I see that I am able to assign multiple ip address to a CT via the web
> gui..but it looks like both ip address would be on the same bridge
> instead of each having their own.
> The goal is really to allow all CT's on any of the three nodes to
> communicate via the 192. network while saving the 209. ip's for CT's
> that require forward facing addresses.
> Any help on this would be appreciated,
> Thanks again,
> Shain
> _______________________________________________
> pve-user mailing list
> pve-user at pve.proxmox.com
> http://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-user


I would simply create another bridge with the 209 addresses, and those cts
that need external interfaces I would add another veth to. This require
you to use bridged networking of course and some manual commands to get
the extra interface attached to your ct, but it's not hard.

As you see, I've "reversed" your order of addresses as I think it's better
to have the default interface and HNs on unroutable addresses and add
routable addresses where needed instead. This way you can also create
containers with venet-interfaces and 192-addresses.

I would also setup the "external" bridge without ip-address on the HN so
you dont "waste" them and dont make the HN availible.


# physical interfaces
iface eth0 inet manual
iface eth1 inet manual

# default interface
auto vmbr0
iface vmbr0 inet static
        bridge_ports eth0
        bridge_stp off
        bridge_fd 0

# external interface
auto vmbr1
iface vmbr1 inet manual
        bridge_ports eth1
        bridge_stp off
        bridge_fd 0

When creating cts, use bridged networking, put the guest on vmbr0(192) or
vmbr1(209). You then configure the interface inside the container as any
normal interface. If you want more interfaces on a single CT, you can use
vzctl on the HN;

vzctl set <VEID> --save --netif_add eth1,,,,vmbr1

Read the documentation about vzctl and modify the config to fit your needs.


More information about the pve-user mailing list