Please help with setting up two subnets

Michal6040

New Member
May 6, 2022
14
0
1
Hello. I have a request for help. I need to set up two subnets on proxmox. Because some virtual machines will go on subnet 192.168.158. * And the other part will go on subnet 192.168.159. *

the subnet 192.168.158 is connected to port enp1. * and the subnet 195.168.159 is connected to port enp2. *


I tried the setup but it doesn't work

auto lo
iface lo inet loopback
iface enp1 inet manual
iface enp2 inet manual
iface enp3 inet manual

auto vmbr0
iface vmbr0 inet static
address 192.168.158.21/24
netmask 255.255.255.0
gateway 192.168.158.254

bridge_ports enp1
bridge_stp off
bridge_fd 0

auto vmbr1
iface vmbr1 inet manual
bridge_ports enp2
bridge_stp off
bridge_fd 0
bridge_vlan_aware yes
 
Last edited:
In what does this 'not work'? can you use the webgui at 192.168.158.21:8006? does a VM connected to vmbr0 using that subnet work?
we need more information to help you
 
Thank you for helping me. Web UI 192.168.158.21:8006 works. Virtual machines on a subnet 192.168.158. * (vmbr0) they work.
what do you think about this configuration

auto lo
iface lo inet loopback
iface enp1 inet manual
iface enp2 inet manual
iface enp3 inet manual
iface enp4 inet manual

auto vmbr0
iface vmbr0 inet static
address 192.168.158.21/24
netmask 255.255.255.0
gateway 192.168.158.254

bridge_ports enp1
bridge_stp off
bridge_fd 0

auto vmbr1
iface vmbr1 inet static
address 192.168.159.21/24
netmask 255.255.255.0
gateway 192.168.159.254

bridge_ports enp2
bridge_stp off
bridge_fd 0
 
Last edited:
Ok so the vmbr2 / 195.168.159.0 network is not working?

Is there a gateway for 195.168.159.0 ? Is this s public network or private?
 
Ok so the vmbr2 / 195.168.159.0 network is not working?

Is there a gateway for 195.168.159.0 ? Is this s public network or private?
yes network 159 is not working. It's a private network. This network worked on hyper-v normally. We are switching from hyper-v because proxmox suits us better.

Personally, I think the whole problem is in the configuration of the proxmox network card.
 
Last edited:
is the 195.168.59.0 network a VLAN?

If it is, you either need to make vmbr1 "VLAN aware" and put the correct VLAN tag onto the VM ethernet port or you need to create a Linux VLAN port on proxmox and then any VM attached will be in the VLAN for that network.

see
https://<your proxmox fqdn or ip>:8006/pve-docs/chapter-sysadmin.html#_vlan_802_1q
 
Thank you my problem has been solved.

settings in proxmox:

sudo nano /etc/network/interfaces

Code:
auto lo
iface lo inet loopback
iface eno1 inet manual
iface eno2 inet manual
iface eno3 inet manual
iface eno4 inet manual
iface ens3f1 inet manual

auto vmbr0
iface vmbr0 inet static
        address 192.168.158.121/24
        gateway 192.168.158.254
        bridge-ports eno1
        bridge-stp off
        bridge-fd 0

auto vmbr1
iface vmbr1 inet static
        address 192.168.159.121/24
        bridge-ports eno2
        bridge-stp off
        bridge-fd 0

settings in virtual machine:
find the name of the network card in the virtual machine with the command ip a in my case the name is ens18

sudo nano /etc/netplan/00-installer-config.yaml

Code:
network:
  ethernets:
    ens18:
      addresses:
      - 192.168.159.109/24
      gateway4: 192.168.159.254
      nameservers:
        addresses:
        - 192.168.159.254
        search: []
  version: 2

sudo netplan apply

you can lock
 

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!