[SOLVED] how to setup network interface configuration for local bridge to connect two vms

piddy

Member
Feb 13, 2021
14
3
8
45
I'm looking for a detailed explanation of how to configure the network interfaces on two vms to connect them to the same local bridge. My use case is a TrueNAS Scale VM that I want to access from a debian server VM where I'll run plex.

I've set up a new bridge under networking (called 'media'). My intention is to make this 'virtual switch' available to the two VMs only. I want the plex VM to access a smb share on the TrueNAS VM. Being a virtual switch, I'm expecting the bridge network to be quick (10+ Gb/s). The trouble is, I can't ping one VM from the other!

I've added the bridge to the hardware of each VM. On the TrueNAS VM, I've configured the interface of the media bridge (in my case 'enp6s18') so that its ip address is 10.0.100.21. I've then edited the debian VM network interfaces file (with the command 'sudo nano /etc/networks/interfaces'), to add the following lines:

Code:
auto enp6s18
 address 10.0.100.22
 netmask 255.255.255.0
 gateway 10.0.100.1

I've then rebooted the debian VM to apply the above changes. I checked they'd been applied by running:
Code:
ip a
... but it didn't show any change to the interface. So then I ran:
Code:
sudo ip addr add 10.0.100.22/24 dev enp6s18
... that attached the ip address to the interface (confirmed by running 'ip a' again); but when I try to ping the TrueNAS VM
Code:
ping 10.0.100.21
I get the error:
Code:
ping: connect: Network is unreachable

I've hit my limit of switch networking / layer 2 network communications. Any guidance / help would be fantastic.

Thank you in advance.

p
 
Last edited:
For anyone stumbling on this thread, the problem was the /etc/networks/interfaces file. The entry for the internal bridge should be:
Code:
auto [INTERFACE, e.g enp6s18]
iface [INTERFACE, e.g enp6s18] inet static
 address [IP_ADDRESS, e.g. 10.0.1.100]
 netmask [NETMASK, e.g. 255.255.255.0]

There's no need to set a gateway ip address
 

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!