Configure Proxmox with different IP Class's

starnetwork

Renowned Member
Dec 8, 2009
422
8
83
Hi,
i have machine with Proxmox 1.5 and few pools of IP (numbers here are for example)
first pool:
IP's: 212.180.100.110-212.180.100.116
DNS:
Default Gateway: 212.180.110.108
Subnet Mask: 255.255.255.248
DNS: 80.179.50.100 + 80.179.56.100

Second pool:
82.199.60.86 - 82.199.60.96
Default Gateway: 82.199.60.83
Subnet Mask: 255.255.255.240
DNS: 80.179.50.100 - 80.179.56.100

Proxmox interface configurations:
vmbr0 | yes | eth0 | 212.180.100.110 | 255.255.255.248 | 212.180.110.108

when i create new vps with ip from the first pool, its work good, but when i create vps with ip from the second pool, no Internet connection, and no remove connection to the vps

how i can configure the vps with ip from the second pool ?

Best Regards,
Star Network.
 
Last edited:
Hi Udo,

I am trying the same with different public ip addresses with different segments.
But I couldn't configure multiple brifge within proxmox gui.
Do I have to make it in the config file /etc/network/interfaces?

Br
Mr.X
 
Hi Udo,

I am trying the same with different public ip addresses with different segments.
But I couldn't configure multiple brifge within proxmox gui.
Do I have to make it in the config file /etc/network/interfaces?

Br
Mr.X
Hi,
i have tried to bound two bridges to one device (eth0 and eth0:0) - no chance.
For two bridges you need two nics or vlan-tagging on one nic (eth0.1, eth0.5 for vlan 1 and 5).

But if both networks are on one cable, you should reach both networks with the vm - the host should only get an ip from one net.

Udo
Udo
 
Hi all,

I think I did it .-) I tried it with two Class C networks and with my two public networks as well.

Here my ifconfig:

server100:~# ifconfig
eth0 Link encap:Ethernet HWaddr 00:26:18:7d:d5:6e
inet6 addr: fe80::226:18ff:fe7d:d56e/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:4807 errors:0 dropped:0 overruns:0 frame:0
TX packets:4688 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:596642 (582.6 KiB) TX bytes:3200186 (3.0 MiB)
Interrupt:16

lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:3770 errors:0 dropped:0 overruns:0 frame:0
TX packets:3770 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:1134504 (1.0 MiB) TX bytes:1134504 (1.0 MiB)

venet0 Link encap:UNSPEC HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00
UP BROADCAST POINTOPOINT RUNNING NOARP MTU:1500 Metric:1
RX packets:4 errors:0 dropped:0 overruns:0 frame:0
TX packets:4 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:250 (250.0 B) TX bytes:362 (362.0 B)

vmbr0 Link encap:Ethernet HWaddr 00:26:18:7d:d5:6e
inet addr:192.168.1.113 Bcast:192.168.1.255 Mask:255.255.255.0
inet6 addr: fe80::226:18ff:fe7d:d56e/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:4819 errors:0 dropped:0 overruns:0 frame:0
TX packets:3726 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:510304 (498.3 KiB) TX bytes:3116436 (2.9 MiB)

vmbr1 Link encap:Ethernet HWaddr c6:e1:46:57:4f:29
inet addr:192.168.2.177 Bcast:192.168.2.255 Mask:255.255.255.0
inet6 addr: fe80::c4e1:46ff:fe57:4f29/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:12 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:0 (0.0 B) TX bytes:720 (720.0 B)

and the interfaces:

cat /etc/network/interfaces
# network interface settings
auto lo
iface lo inet loopback

iface eth0 inet manual

iface eth1 inet manual

auto vmbr0
iface vmbr0 inet static
address 192.168.1.113
netmask 255.255.255.0
gateway 192.168.1.1
bridge_ports eth0
bridge_stp off
bridge_fd 0

auto vmbr1
iface vmbr1 inet static
address 192.168.2.177
netmask 255.255.255.0
gateway 192.168.2.1
bridge_ports eth0
bridge_stp off
bridge_fd 0
 
Hi Dietmar,

but with two different segments we do need two gateways, or?

Mr.X
 
Hi dietmar and starnetwork,

you need more gateways to route different networks on one machine.

Due to circumstances that it is only possible to set one default gateway to a interface you need to modify your routing table with source routing (ip from iproute2 package)

ip rule add from secondnet/xy table net2
ip route add default dev vmbr0 via gwnet2 table net2

Further information: http://wiki.openvz.org/Source_based_routing


Best Regards

Andreas Müller
 
Hi Andreas,

thanks for this Link of the wiki.
I will give it a try tonight. Will be back with the results tomorrow.

Cu
Mr.X
 
Hi all,

yesterday night I had no time so I did it today.
My first way with the two bridges is not working.
Its not possible to set two bridges on on interface (eth0).
So I searched the internet for a solution.

Just a short review:
I have two /28 networks

1.1.8.176-191
1.1.10.112-127

I found this: http://forum.proxmox.com/threads/841-Add-IP-of-another-subnet?p=4249&mode=linear#post4249

but I couldn't make it working .-(

Here my config:

cat /etc/network/interfaces
# network interface settings
auto lo
iface lo inet loopback

auto eth0
iface eth0 inet static
address 1.1.10.113
netmask 255.255.255.240
gateway 1.1.10.112

iface eth1 inet manual

auto vmbr0
iface vmbr0 inet static
address 1.1.8.177
netmask 255.255.255.240
bridge_ports none
bridge_stp on
bridge_fd 0

But this is not working.
I can reach the ip of eth0 but not the other ones .-(
May be someone see my error.

Br
Mr.X
 

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!