Setup VM + vlan + static mode

dvb91

New Member
Apr 29, 2023
8
0
1
Hi,

I setup Proxmox for using vlans :
- vlan10 for administration.
- vlan20 for a Debian 11 VM.

VM is running like a charm in DHCP mode.
-> But when I configure VM in static mode, gateway and dns are unreachable.

VM Proxmox configuration :



VM Debian configuration -> /etc/network/interfaces
I am not sure about this setup, perhaps I need to use tagged mode.
In this case, could you please show me an example ?

Thanks !



Lab shematic
 
Hi,

I setup Proxmox for using vlans :
- vlan10 for administration.
- vlan20 for a Debian 11 VM.

VM is running like a charm in DHCP mode.
-> But when I configure VM in static mode, gateway and dns are unreachable.

VM Proxmox configuration :



VM Debian configuration -> /etc/network/interfaces
I am not sure about this setup, perhaps I need to use tagged mode.
In this case, could you please show me an example ?

Thanks !



Lab shematic

Why are u using linux vlan on vmbr0? If you have a trunk (vlan10&vlan20) you can just mark vlanaware on vmbr0 and then add vlan id in network-adapter config. Regarding your vm - you might forgot to set auto ens18 so the interface is not up on boot? So just add

auto ens18 below auto lo and restart the network.
 
Last edited:
Why are u using linux vlan on vmbr0?
Because I didn't know exactly how to proceed :-(

If you have a trunk (vlan10&vlan20) you can just mark vlanaware on vmbr0

OK, VLAN aware was already checked, I have just removed vmbr0.20, but I have kept vmbr0.10 for administration :



and then add vlan id in network-adapter config.

Done :


Regarding your vm - you might forgot to set auto ens18 so the interface is not up on boot? So just add

auto ens18 below auto lo and restart the network.

Here is the new configuration. Unfortunately after reboot, it doesn't fix.
Did I missed something ?

 
Because I didn't know exactly how to proceed :-(



OK, VLAN aware was already checked, I have just removed vmbr0.20, but I have kept vmbr0.10 for administration :





Done :




Here is the new configuration. Unfortunately after reboot, it doesn't fix.
Did I missed something ?

Try puttin the IP directly on vmbr0. What does ping say? Whats the output of ip a inside the vm?
Make sure you have oobm access to the server, if you lock yourself out.
 
Last edited:
Try puttin the IP directly on vmbr0.
Where exactly ? Could you explain please (I don't want to break admin vlan).

What does ping say? Whats the output of ip a inside the vm?
Ping -> not responding.

Make sure you have oobm access to the server, if you lock yourself out.
I think it's OK, because it's working in dhcp mode.

ip a and ping KO :
 
Try puttin the IP directly on vmbr0.
Where exactly ? Could you explain please (I don't want to break admin vlan).

Never mind, I dont think this is related anymore - since dhcp is working in vm ... Its just something that could be done (but is not related to your network problems inside your vm).

What does ping say? Whats the output of ip a inside the vm?
Ping -> not responding.

Make sure you have oobm access to the server, if you lock yourself out.
I think it's OK, because it's working in dhcp mode.

ip a and ping KO :

Thats strange, if dhcp works in the vm are you sure your pfsense allows static use of 172.16.20.2/24? Anything in the firewall logs? checked the firewall rules?
 
Last edited:
Thats strange, if dhcp works in the vm are you sure your pfsense allows static use of 172.16.20.2/24?

Shame on me -> I assigned an address that was already in use !!!
-> Now I can ping gateway, and 1.1.1.1.

There is still DNS problem, I continue to check configuration.

You helped me to point on the problem -> thanks !
 
I installed resolvconf package :
1) with "dns-nameservers 1.1.1.1" (or IP vm_AdguardHome) -> DNS resolving is OK.
2) with "dns-nameservers IP_pfsense" -> DNS resolving is KO.

On pfSense machine, rules pass all traffic from vlan30.
Why DNS doesn't work ? Did I missed something here ?

Thanks.

 
Im not really into firewalling, but is DNS confgirued correctly on the pfsense (dns forwarding, resolver?) and isnt your VM using VLAN 20?
 
I don't use DNS forwarding or resolver. I only put AdGuardHome's IP adress in System / General setup / "DNS Servers Settings".
Perhaps I am wrong ?

Here is the lab schematic to help :
 
FYI, everything is working now.
After additional checks, it was necessary to activate the DNS resolver like this :

 

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!