Comment 42 for bug 1805920

Revision history for this message
Christian Ehrhardt  (paelzer) wrote :

TL;DR:
- I really really tried, but failed to recreate yout case on a single system
- I need your real setup as the VLAN-Tag-0 addition in your case seems to be different
- That makes my request to one of you committing (and checking to be able to) to verify this even more important - see comment #41

Details (of a failed test approach)

# Simple iPXE (without dhcp/tftp/...)

# get some virtualization that gives us a bridge with dhcp
$ sudo apt install uvtool-libvirt apache2
# re-logon for permissions

# copy host kernel there to boot from
$ sudo cp -v /boot/vmlinuz-$(uname -r) /boot/initrd.img-$(uname -r) /var/www/html/
$ sudo chown www-data:www-data /var/www/html/*

# prep qemu to tap on the libvirt bridge
sudo mkdir -p /etc/qemu
$ echo "allow all" | sudo tee /etc/qemu/bridge.conf

# start qemu and right at the start press Ctrl+B to get to the iPXE prompt
$ sudo qemu-system-x86 -cpu host -net nic -net bridge,br=virbr0 -m 1024 -enable-kvm -curses -boot n

# in IPXE then
iPXE> dhcp
# check your dhcp config to work on the expected network
iPXE> show ip
# use your IPs and kernel versions for this
iPXE> kernel http://192.168.122.1/vmlinuz-4.15.0-42-generic
iPXE> initrd http://192.168.122.1/initrd.img-4.15.0-42-generic
iPXE> boot

You can do the same with a config, by putting a ipxe config file at your apache
cat << EOF >/var/www/html/ipxe.config
#!ipxe
kernel http://192.168.122.1/vmlinuz-4.15.0-42-generic
initrd http://192.168.122.1/initrd.img-4.15.0-42-generic
boot
EOF

And then boot with chainbooting:
iPXE> dhcp
iPXE> chain http://192.168.122.1/ipxe.config

# Try to use VLANs here
# Note: There would actually be afull VLAN feature which no one every requested.
# It is off atm, but per https://ipxe.org/cmd/vcreate we could now do like
iPXE> vcreate --tag 42 net0
iPXE> set net0-42/ip 192.168.123.100
iPXE> set net0-42/netmask 255.255.255.0
iPXE> set net0-42/gateway 192.168.123.1

So I wonder about your case, we have a non vlan-aware iPXE that gets 0-tagged packages - is that correct? And most other network stacks would shrug the 0-tag off, but iPXE does not and thinks it is not there (unless you'd config through vcreate maybe).
Lets try to "simulate" that ...

# Add a "normal" VLAN tag 0 interface to the host bridge
$ sudo ip link add name virbr0.0 link virbr0 type vlan id 0
$ sudo ip addr add 192.168.124.1/24 broadcast 192.168.124.255 dev virbr0.0

# On boot we configure iPXE to use that IP range, but intentionally ignoring any VLAN tagging
iPXE> set net0/ip 192.168.124.100
iPXE> set net0/netmask 255.255.255.0
iPXE> set net0/gateway 192.168.124.1
iPXE> set net0/dns 192.168.124.1
iPXE> ifopen net0
iPXE> chain http://192.168.124.1/ipxe.config

Without the fix this blocks on not reaching it
iPXE> chain http://192.168.124.1/ipxe.config
http://192.168.124.1/ipxe.config.................. Connection timed out (http://ipxe.org/4c0a6035)

Installed the 1.0.0+git-20180124.fbe8c52d-0ubuntu2.2 from proposed but it fails there as well.
Probably your VLAN-0-TAG case is slightly different to what I had assumed here, but atm I have no way to know where.