[ipxe-devel] [PATCH 0/2] Fill in iBFT VLAN field

Stefan Hajnoczi stefanha at redhat.com
Fri Mar 1 15:32:14 UTC 2013

iSCSI booting does not work VLANs because the iBFT VLAN field is not
being filled in.  Without the 802.1Q VLAN Identifier from the iBFT, the
operating system cannot connect to the iSCSI target.

This patch series adds iBFT VLAN support and can be tested with the
following commands:

  iPXE> vcreate --tag 100 net0
  iPXE> autoboot net0-100

Users may wish build iPXE with an embedded script containing these
commands since there is no way for a default iPXE build to "know" which
VLAN tag to use.

Test environment:

1. Ensure an iSCSI target is running and firewall will allow DHCP/iSCSI.
2. Prepare DHCP server configuration (dnsmasq):

  $ cat iscsi-dnsmasq.conf

3. Prepare QEMU "up" and "down" network scripts:

  $ cat iscsi-up.sh
  ifconfig $iface up
  ip link add link $iface name $iface.100 type vlan id 100
  ifconfig $iface.100 netmask up
  dnsmasq -C iscsi-dnsmasq.conf
  tcpdump -i $iface -w /tmp/dump.log &
  echo $! >/tmp/tcpdump.pid

  $ cat iscsi-down.sh
  kill $(</tmp/dnsmasq.pid) $(</tmp/tcpdump.pid)
  ifconfig tap0.100 down
  ip link delete tap0.100

2. Launch virtual machine:

  $ sudo qemu-system-x86_64 \
        -netdev tap,id=tap0,script=iscsi-up.sh,downscript=iscsi-down.sh \
        -device virtio-net-pci,netdev=tap0,romfile=path/to/virtio-net.rom

Stefan Hajnoczi (2):
  [netdevice] Add netdev_vlan() to get 802.1Q VLAN Identifier
  [iscsi] Include 802.1Q VLAN Identifier in iBFT

 src/drivers/block/ibft.c     |  2 ++
 src/include/ipxe/netdevice.h |  1 +
 src/net/netdevice.c          | 11 +++++++++++
 src/net/vlan.c               | 17 +++++++++++++++++
 4 files changed, 31 insertions(+)


More information about the ipxe-devel mailing list