Dear Community of Proxmox,
This is an english translation to my initial thread in the german forum.
I'm sorry if i didn't translate right - don't hesitate to ask if you don't understand something.
I've got multiple subnets bound to one interface.
That's my current /etc/network/interfaces:
Legend:
94.***.***.169 - The Address of my host (PVE 4.4)
88.***.***.120/29 - Additional subnet I (.121-.127 usable)
94.***.***.96/28 - Additional subnet II (.97-.110 usable)
vmbr0 - The bridge, connected to eth0
vmbr1 - I used it for internal traffic between the VM's, i actually don't use it anymore
All VM's (lxc) have their IP Address with a /32 Mask and the Host (94.***.***.169) as Gateway.
So far everything worked out well.
About half a week ago i began adding 94.***.***.97 in /etc/network/interfaces.
But it didn't quite work like i expected:
As i restarted the networking service after adding the Address i couldn't reach any VM behind that IP.
After a little bit of trial and error - it worked. But then all my other VM's got unreachable, so i had to restart each of them.
It should be possible to add new ip addresses on the fly, right?
Am i doing something wrong?
Maybe it's a completely crappy configuration, if it is please explain why...
Happy to hear from you guys
~Timon Michel
This is an english translation to my initial thread in the german forum.
I'm sorry if i didn't translate right - don't hesitate to ask if you don't understand something.
I've got multiple subnets bound to one interface.
That's my current /etc/network/interfaces:
Code:
source /etc/network/interfaces.d/*
auto lo
iface lo inet loopback
iface lo inet6 loopback
auto eth0
iface eth0 inet static
address 94.***.***.169
netmask 255.255.255.192
gateway 94.***.***.129
up route add -net 94.***.***.128 netmask 255.255.255.192 gw 94.***.***.129 dev eth0
auto vmbr0
iface vmbr0 inet static
address 94.***.***.169
netmask 255.255.255.255
bridge_ports none
bridge_stp off
bridge_fd 0
bridge_maxwait 0
pre-up brctl addbr vmbr0
up ip route add 88.***.***.121/32 dev vmbr0
up ip route add 88.***.***.122/32 dev vmbr0
up ip route add 88.***.***.123/32 dev vmbr0
up ip route add 88.***.***.124/32 dev vmbr0
up ip route add 88.***.***.125/32 dev vmbr0
up ip route add 88.***.***.126/32 dev vmbr0
up ip route add 88.***.***.127/32 dev vmbr0
up ip route add 94.***.***.97/32 dev vmbr0
auto vmbr1
iface vmbr1 inet static
address 192.168.178.1
netmask 255.255.255.0
bridge_ports none
bridge_stp off
bridge_fd 0
post-up iptables -t nat -A POSTROUTING -s '192.168.178.0/24' -o eth0 -j MASQUERADE
post-down iptables -t nat -D POSTROUTING -s '192.168.178.0/24' -o eth0 -j MASQUERADE
Legend:
94.***.***.169 - The Address of my host (PVE 4.4)
88.***.***.120/29 - Additional subnet I (.121-.127 usable)
94.***.***.96/28 - Additional subnet II (.97-.110 usable)
vmbr0 - The bridge, connected to eth0
vmbr1 - I used it for internal traffic between the VM's, i actually don't use it anymore
All VM's (lxc) have their IP Address with a /32 Mask and the Host (94.***.***.169) as Gateway.
So far everything worked out well.
About half a week ago i began adding 94.***.***.97 in /etc/network/interfaces.
But it didn't quite work like i expected:
As i restarted the networking service after adding the Address i couldn't reach any VM behind that IP.
After a little bit of trial and error - it worked. But then all my other VM's got unreachable, so i had to restart each of them.
It should be possible to add new ip addresses on the fly, right?
Am i doing something wrong?
Maybe it's a completely crappy configuration, if it is please explain why...
Happy to hear from you guys
~Timon Michel