Proxmox in vlan setup - Subnet issues

nabbyBlue

Member
May 18, 2024
9
0
6
Hi I appolagise if i am in the wrong place. I was torn between here and installation/configuration. I have seen a lot of posts about changing the ip address of your proxmox setup and to be honest the web gui and cli both seem to work fine. I had an ip address of 192.168.1.99 when i setup the server. When I setup vlans on my home network I setup the ethernet port to the server dedicated lan. then I changed the IP address to 192.168.20.99 after moving the ethernet to the new port and reboots the server becomes unreachable. I have checked the cli and its all still online. I have tried the changes via both web gui and cli I can even see the machine on my router on the new subnet but still unreachable under the new IP address.

I also tried to just change my IP address but keeping it on the original subnet. that works fine so as far as I can see i am making the changes correctly its just as soon as I move it to a new subnet I have the issues. I have turned off all firewall rules to rule that out too.

Im not sure if I have to make the system vlan aware? I know that sounds silly but my understanding is that setting is if I want my virtual machines on differing subnets? in this case I dont.

any suggestions would be great. thanks
 
I use VLANs in my home lab, but when you set up Proxmox for the first time, you can't make it VLAN aware (at least I haven't figured out a way). So I go through the standard install, then from the console (no network required) I will edit /etc/network/interfaces and set up my network that way. I usually will put one interface as VLAN aware, and assign the Proxmox management interface an IP address on my management VLAN. I usually make my second NIC port as not VLAN aware, and assign it a static IP on my non-routed storage VLAN. All my workloads get two virtual NICs, one on vmbr0 assigned to whatever VLAN they are on, and one on vmbr1 which is my dedicated storage network. Any NFS shares are accessed over the dedicated network, as it exists on both my NAS devices too. This way there is no storage traffic contention with regular traffic and nothing has to go through pfSense for routing. In your case, if you don't have a dedicate VLAN, you can leave that out. Just copy my settings for vmbr0 and adjust the name of the NIC to match wherever is in your machine. If you are not sure, execute "ip a" from the terminal before editing /etc/network/interfaces. I usually just reboot at this point and can access the management interface from the new IP address.

Also bear in mind that you have to set up your switch ports correctly if you are using VLANs in Proxmox. The switch port feeding a VLAN aware interface has to be tagged/trunk port. Switch ports feeding a non-VLAN aware interface need to be untagged/access ports. You can configure this in the management interface for your switch.


Code:
# network interface settings; autogenerated
# Please do NOT modify this file directly, unless you know what
# you're doing.
#
# If you want to manage parts of the network configuration manually,
# please utilize the 'source' or 'source-directory' directives to do
# so.
# PVE will preserve these directives, but will NOT read its network
# configuration from sourced files, so do not attempt to move any of
# the PVE managed interfaces into external files!

auto lo
iface lo inet loopback

iface enp46s0 inet manual

iface enp46s0d1 inet manual

auto vmbr0
iface vmbr0 inet static
        bridge-ports enp46s0
        bridge-stp off
        bridge-fd 0
        bridge-vlan-aware yes
        bridge-vids 2-100

auto vmbr0.10
iface vmbr0.100 inet static
        address 192.168.10.2/24
        gateway 192.168.10.1

auto vmbr1
iface vmbr1 inet static
        address 192.168.3.4/24
        bridge-ports enp46s0d1
        bridge-stp off
        bridge-fd 0


source /etc/network/interfaces.d/*