PXE boot over trunk port at the switch

Hello Gyus,

There’s anything special I need to do to get a bare-metal to pxe boot a trunk port? I can’t get any machine to pxe boot, would appreciate your help thanks. Not sure if maas supports this type of pxe boot.
MAAS 2.5

Hi Rafise,

this is from documentation:

VLANs (Virtual LANs) are a common way to create logically separate networks using the same physical infrastructure.

Managed switches can assign VLANs to each port in either a “tagged” or an “untagged” manner. A VLAN is said to be “untagged” on a particular port when it is the default VLAN for that port, and requires no special configuration in order to access it.

“Tagged” VLANs can also be used with nodes in MAAS. That is, if a switch port is configured such that “tagged” VLAN frames can be sent and received by a MAAS node, that MAAS node can be configured to automatically bring up VLAN interfaces, so that the deployed node can make use of them.

A “Default VLAN” is created for every fabric, to which every new VLAN-aware object in the fabric will be associated with by default (unless specified otherwise).

Concepts and Terms

Thank you, but the problem is that maas cant pxe boot a machine that is on a trunk port even if the maas know about of the vlan in that trunk.

lets say you have a machine on a switch that all ports are trunk how would you commission those machine? maybe I’m doing something wrong .

How are your machine and switch configured?

PXE booting over a trunk port most likely means that the machine will try to PXE boot over the default VLAN that is configured on your switch. As long as you’ve configured MAAS to provide DHCP for that VLAN, it should work.

If you want to PXE boot over a non-default VLAN, you need to configure it in your machine BIOS to tag the PXE traffic with that VLAN. But I would suggest configuring the default VLAN on the switch port, that will make things easier in the end, but either solution is fine.


We pxe over trunk ports all the time we configure the network adaptor bios and provide the vlan we want.

Thanks Guys,
Setup the nic to boot on a specific vlan at the nic bios and I see now booting from maas but it don’t fully finish, it stay at if-config: no response after 2 secs - giving up. any idea what I’m doing wrong?

What about MTU’s ?? Are they set correctly? what about STP/Portfast, are they enabled or disabled?


Yes, MTU 1500 at the VLAN tag of the maas STP/Portfast are enabled on the switch.

Hello Guys,

Cisco switches had a bug after replacement everything stating to work thanks guys for your help. post can be close.

I’m trying to achieve the same thing: PXE boot over VLAN.
I’ve modified the VLAN in the SLOT 2 Port 1 Partition 1 interface in UEFI to tag the packages with the right VLAN tag. I also tried doing the same thing for SLOT 2 Port 2 Partition 1, but that didn’t change things. In MAAS I’ve set the VLAN tag for the network. I now end up with our Dell R430 booting with its 10Gb interface with the following output:

After that we wait a couple of minutes and it jumps to a Grub menu, perhaps remnants from the last deployment.

Ideas why it can’t fetch the Netbook image?

i had this problem before. if you see on this comment, there are an error message said ‘error: couldn’t send network packet.’ before it jumps to Grub menu.

they suggest to replace grub efi to maas boot-resource. so i do research to check wheter grub is able to boot via tagged vlan or not. so this thread show me that they had problem with booting via tagged vlan.

so i think in your case it wasnt ‘fetch netboot image’ problem, but it might be grub problem. so to encounter this problem i try to change vlan configuration by setting port using VLAN 100 as default unttaged VLAN on that port, and VLAN 1 as a tagged VLAN. it can boot with no problem (commision, test, and deploy).

to help you figure it, i show you my config, my machine was in port 7

but now i face another issue, i cannot use multiple vlan on the same machine. i think it happen because the testing boot is not actually install vlan module to the ubuntu kernel by default. so maybe there are any suggestion?

Hi all. If I set the boot from the VLAN in the BIOS of the nic, the image will start booting successfully,. But as in one of the previous posts, it will remain hanging when it starts trying to configure the ephemeral eth0 interface via DHCP. Do I have to set anything else for ephemeral to know that it is a tagged interface or should it work out-of-box like this?

1 Like

make sure the switch port have the vlan you are trying to pxe boot as a native vlan.

But I cannot have same VLAN tagged and native at once. What I try to achieve is boot from tagged VLAN, not from native. Is there a solution for this?
In PXE BIOS I have “VLAN” specified, image starts booting image from it but when ephemeral starts to configure adapters, it hang as on picture.

Hi Blatato,

If the port at the switch is trunk use my previous recommendation if you are using flat vlan no need to do anything to the port or server maas should boot fine. Let me ask what ios version is on the cisco switch?

Hi, my problem is related only to booting from tagged VLAN. Of course If I use flat or native VLAN it works as expected. But if I chose in network card BIOS PXE boot from tagged VLAN, it only loads initial image, but when ephemeral start to configure networking, it is not bringing up the interface. Is there any solution for this case or what am I missing?

remember if your port is trunk at client side you need a native vlan to communicate with the maas (pxe boot). Also assuming you are directly connected as a layer 2 where the maas is located (no routing involve. If you can give us more details on your network topology to understand better.

Thank you @rafise for your effort. Its probably more complex than I thought. What I want to achieve is to build new ESXi host. Both VLANs MAAS and ESXi mgmt, are in the trunk now, as I need them for VMware. Booting from the ESXi VLAN over DHCP relayed to MAAS VLAN. Its booting well, but then probably enlisting wants to set the network to the “native” MAAS and its not working because its in the trunk, if I understand it correctly. But if I set MAAS VLAN to native, it will not work in WMware than. I hope you understand :slight_smile:

Try my switch port configurations, MAAS server and client side.


interface Ethernet1/10
description MAAS
switchport mode trunk
spanning-tree port type edge trunk
channel-group 900 mode active


interface Ethernet1/40
description client
switchport mode trunk
switchport trunk native vlan 10
switchport trunk allowed vlan 2010-2310
spanning-tree port type edge trunk
channel-group 901 mode active