Running Debian 12, my ethernet card gets an IP using DHCP, and I want to add a VLAN config to that same interface, VLAN 30, and assign it a static IP. Here’s my /etc/network/interfaces:
auto lo
iface lo inet loopback
# The primary network interface
auto enp0s25
allow-hotplug enp0s25
iface enp0s25 inet dhcp
#VLAN
auto enp0s25.30
iface enp0s25.30 inet static
address 192.168.30.2
netmask 255.255.255.0
gateway 192.168.30.1
vlan-raw-device enp0s25
No amount of restarting NetworkManager or rebooting gets it to activate the enp0s25.30 interface. The NetworkManger log shows only this line relating to the .30 VLAN:
NetworkManager[2239]: <info> [1718593439.7242] ifupdown: guessed connection type (enp0s25.30) = 802-3-ethernet
Note that my install uses NetworkManager and dhclient to configure interfaces. I don’t have ifupdown installed. I don’t have anything configured in dhclient.conf because I assumed NetworkManager would notice the ‘inet static’ and use that.
Any help getting this working would be appreciated.