Allow multiple vm's to communicate to each other.

jacurtis81

New Member
Jun 1, 2023
7
3
3
So I been trying this for a while. But obviously im doing something wrong. I basically want to create a host-only network something VirtualBox does. But I want to create some vm's inside a single proxmox host (pve). Lets say vm-a, vm-b, vm-c where the 3 vm-x's can only talk to each other with a ip4 address.

What I have done/tried.
1. Created a network connection(bridged) on pve with not but the name filled in. Added them to 2 vm's but the the machine dont get ip's. I get someting like this.
machine-1Screen Shot 2023-06-14 at 11.57.48 AM.png
machine-2
Screen Shot 2023-06-14 at 11.59.22 AM.png

Even tried this way. Buy adding a 10.10.10.0/24 in ipv4 field.
Screen Shot 2023-06-14 at 12.00.22 PM.pngScreen Shot 2023-06-14 at 12.02.05 PM.png


Please Adivise,

Thanks
 
I think your first instinct (creating a new bridged connection in proxmox with no bridge ports) is correct. I don't know how virtualbox is set up, but I don't believe the VMs are going to automatically receive IP addresses in this scenario.

Depending on your needs, I think your options are either to manually set a static IP address (in the same subnet) on each of the VMs, or run a DHCP server on one of the VMs that will assign IP addresses to the others.
 
  • Like
Reactions: B.Otto
Proxmox does not come with a inbuild DHCP server. Adding a second bridge with empty 'Bridge ports' field is the right way here, but you have to assign static IP addresses here - or set up your own DHCP server (usually not worth the hassle for local-only IPs).

The 'IPv4/CIDR' field of your Linux Bridge is a different thing. That is for the (optional!) interface used by your Proxmox Host to connect to this bridge. Since you only want your VMs to talk over this network, you can leave this field empty.
 
I think your first instinct (creating a new bridged connection in proxmox with no bridge ports) is correct. I don't know how virtualbox is set up, but I don't believe the VMs are going to automatically receive IP addresses in this scenario.

Depending on your needs, I think your options are either to manually set a static IP address (in the same subnet) on each of the VMs, or run a DHCP server on one of the VMs that will assign IP addresses to the others.

Thanks, And doing more research I believe you right. Noobs.
I set a blank bridged interface and added it to the machines and set a static ip on two machine with that interface. And a ping works. So I guess im good.

Thanks again
 
  • Like
Reactions: jaywll
Proxmox does not come with a inbuild DHCP server. Adding a second bridge with empty 'Bridge ports' field is the right way here, but you have to assign static IP addresses here - or set up your own DHCP server (usually not worth the hassle for local-only IPs).

The 'IPv4/CIDR' field of your Linux Bridge is a different thing. That is for the (optional!) interface used by your Proxmox Host to connect to this bridge. Since you only want your VMs to talk over this network, you can leave this field empty.
Thanks that works as far as I can tell. No DHCP server, I just assigned the two machines a static ip. And tested using a ping. ooh and I can ssh to each other.
 
  • Like
Reactions: jaywll
Okay, I'm back. Turns out that i need to be able to assign an ip to automatically as I create vm's with that network. I tried this option (https://dannyda.com/2020/06/06/how-...eate-an-dhcp-server-on-proxmox-ve-pve-easily/) but nothing seems to work.

I did however use a vm with a static ip to ping the dhcp server and it pings. But the server wont assign ip's. weird. And also the network interface on the server has a weird name that changes after reboot. something like eth0@if11.

Any Advice? Anyone?
 
you can install a dhcp server on the host
apt install isc-dhcp-servers
interface to listen
nano /etc/default/isc-dhcp-server
Code:
INTERFACESv4="vmbr2"
basic example :
nano /etc/dhcp/dhcpd.conf
Code:
default-lease-time 86400;
max-lease-time 172800;

subnet 192.168.85.0 netmask 255.255.255.0 {
range                           192.168.85.11 192.168.85.99;
option domain-name-servers      1.1.1.1, 1.0.0.1;
option routers                  192.168.85.1;
}

systemctl restart isc-dhcp-server.service
 
Last edited:
you can install a dhcp server on the host
apt install isc-dhcp-servers
interface to listen
nano /etc/default/isc-dhcp-server
Code:
INTERFACESv4="vmbr2"
basic example :
nano /etc/dhcp/dhcpd.conf
Code:
default-lease-time 86400;
max-lease-time 172800;

subnet 192.168.85.0 netmask 255.255.255.0 {
        range                           192.168.85.11 192.168.85.99;
        option domain-name-servers      1.1.1
, 1.0.0.1;
        option routers                  192.168.85.1;
}

systemctl restart isc-dhcp-server.service
Essentially that is what i have done. But instead of the host(pve). I created a new container, also tried it with a vm.

1. Created Linux Bridged network device on host with.
Screen Shot 2023-06-18 at 3.45.20 PM.png
2. Created a ubuntu server vm. Added the default network device to update and install isc-dhcp-server. Then deleted it.
3. Added the vmbr1 device to my newly created vm.
4. Changed the configuration files like so.
a. Found the network interface and edited configuration file.
Screen Shot 2023-06-14 at 11.57.48 AM.png

Screen Shot 2023-06-18 at 3.51.39 PM.png

5. Changed the isc-dhcp-server configuration file (/etc/dhcp/dhcpd.conf) to this.
Screen Shot 2023-06-18 at 4.06.03 PM.png

6. Oooh, I assigned this VM a static ip of 10.0.0.1 in hopes that that would help too.
Screen Shot 2023-06-18 at 4.09.02 PM.png

Finally, I tried to test it on other vm's.
1. Created new vm and added vmbr1 as the device. (Never gets an ip)
2. Created new vm and assigned it a static ip of 10.0.0.5 and tried to ping the dhcp server at 10.0.0.1 and it works.
3. But yet nothing on dhcp lease list
Screen Shot 2023-06-18 at 4.16.27 PM.png

 

Attachments

  • Screen Shot 2023-06-14 at 11.59.22 AM.png
    Screen Shot 2023-06-14 at 11.59.22 AM.png
    63.3 KB · Views: 7
  • Screen Shot 2023-06-18 at 3.45.20 PM.png
    Screen Shot 2023-06-18 at 3.45.20 PM.png
    24.7 KB · Views: 7
Essentially that is what i have done. But instead of the host(pve). I created a new container, also tried it with a vm.

1. Created Linux Bridged network device on host with.
View attachment 51795
2. Created a ubuntu server vm. Added the default network device to update and install isc-dhcp-server. Then deleted it.
3. Added the vmbr1 device to my newly created vm.
4. Changed the configuration files like so.
a. Found the network interface and edited configuration file.
View attachment 51797

View attachment 51799

5. Changed the isc-dhcp-server configuration file (/etc/dhcp/dhcpd.conf) to this.
View attachment 51800

6. Oooh, I assigned this VM a static ip of 10.0.0.1 in hopes that that would help too.
View attachment 51801

Finally, I tried to test it on other vm's.
1. Created new vm and added vmbr1 as the device. (Never gets an ip)
2. Created new vm and assigned it a static ip of 10.0.0.5 and tried to ping the dhcp server at 10.0.0.1 and it works.
3. But yet nothing on dhcp lease list
View attachment 51802

I think it working now. I was missing a semi-colon after the domain-name-servers option in the dhcpd.conf file.
 
  • Like
Reactions: _gabriel

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!