Multiple networks on VM

Lipstick

Member
Jul 15, 2016
10
1
21
73
Hi,
We've a 3 server Proxmox 4.4 cluster, with one network with public IP's and one with a private IP class.
We have no problem reaching VM's on public IP through vmbr0 on PVE, but one the private IP we can only reach PVE web interfaces and not VM's.
We have added, with the PVE GUI, a second network device (net1) to a VM, bridged to vmbr1, and added on interfaces file of VM a eth1 with the private conf, but without success.
Maybe we have to indicate on iproute table the PVe as gateway instead of the gateway of the network? Or there is some additional configuration to put on interfaces file of PVE to obtain the bridging also on private IP's?
Here below the network config on one of PVE's
Code:
auto vmbr0
iface vmbr0 inet static
        address  XX.85.27.135
        netmask  255.255.255.XXX
        gateway  XX.85.27.129
        bridge_ports bond0
        bridge_stp off
        bridge_fd 0

auto vmbr1
iface vmbr1 inet static
        address  192.168.68.135
        netmask  255.255.255.0
        bridge_ports bond1
        bridge_stp off
        bridge_fd 0
        
post-up ip route add 192.168.68.0/24 dev vmbr1 src 192.168.68.135 table rt2
    post-up ip route add default via 192.168.68.254 dev vmbr1 table rt2
    post-up ip rule add from 192.168.68.135/32 table rt2
    post-up ip rule add to 192.168.68.135/32 table rt2

Thank's for any help,
Michele
 
  • Like
Reactions: netfiretec
Hi Michele
Just to make things clear, can your VMs and the Proxmox host ping each other in the 192.168.68.0/24 network ?
Also when you trying to access the VMs in the private network, what is your source IP adress ? Are you in the 192.168.68.0/24 network as well ?
 
From one Proxmox host, as well as from VPN, I can ping the other Proxmox host but i cannot ping the VM (192.168.68.140) even from it's Proxmox host (192.168.68.135).
Moreover I can ping from private Proxmox host (192.168.68.135) the public IP of the VM inside it (XX.85.27.140).

I think it can be an error in interfaces file config on VM.

Code:
root@mpve1:~# ping 192.168.68.140
PING 192.168.68.140 (192.168.68.140) 56(84) bytes of data.
From 192.168.68.135 icmp_seq=1 Destination Host Unreachable
From 192.168.68.135 icmp_seq=2 Destination Host Unreachable

root@mpve1:~# ping 192.168.68.136
PING 192.168.68.136 (192.168.68.136) 56(84) bytes of data.
64 bytes from 192.168.68.136: icmp_seq=1 ttl=64 time=0.285 ms
64 bytes from 192.168.68.136: icmp_seq=2 ttl=64 time=0.124 ms

From VPN:
PING 192.168.68.137 (192.168.68.137): 56 data bytes
64 bytes from 192.168.68.137: icmp_seq=0 ttl=64 time=76.793 ms
64 bytes from 192.168.68.137: icmp_seq=1 ttl=64 time=27.179 ms

root@mpve1:~# ping xx.85.27.140
PING xx.85.27.140 (xx.85.27.140) 56(84) bytes of data.
64 bytes from x.85.27.140: icmp_seq=1 ttl=64 time=0.526 ms
64 bytes from xx.85.27.140: icmp_seq=2 ttl=64 time=0.476 ms

Michele
 
Hi Michele
First I would advise to disable the extra static routes you added for the momment and start with the basics:
all machines connected to the vmbr1 switch should be able to ping each other (if firewall is disabled) so you should concentrate on that.

For checking the vmbr1 please enter
brctl show vmbr0

it should the list of interfaces connected to the network

vmbr1 8000.ac9e17846319 no eth0
tap101i0
tap102i0
tap102i1


this is the output on my system

here 101, and 102 are the ids of the VM who have a device connected to vmbr1
 
Stupid me! Sorry, Manu, it was only a copy and paste error in file interfaces (an eth0 instead of eth1).
Now it works perfectly on both networks, public and private.
Best regards and many thanks,
Michele
 

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!