[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
  listen-address=192.168.1.1
  dhcp-range=192.168.1.2,192.168.1.127,12h
  dhcp-match=gpxe,175
  dhcp-option=175,8:1:1
  dhcp-option=net:gpxe,17,"iscsi:192.168.1.1:::1:iqn.2012-10.net.vmsplice.server1:trial"
  pid-file=/tmp/dnsmasq.pid

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

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

  $ cat iscsi-down.sh
  #!/bin/bash
  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(+)

-- 
1.8.1.2




More information about the ipxe-devel mailing list