Table of Contents

Multicast protocol support in Etherboot

What is multicast, anyway?

In IP based networks, there are basically three types of IP packets: unicase, broadcast, and multicast.

Unicast packets are sent from one host, with a valid sender IP address (except for very special things like DHCP discovery), to exactly one other host, specified by another valid IP address.

Broadcast packets are sent from one host to all hosts on the same physical network, by using the broadcast address of that network. For example, on 192.168.0.0/24 (or 192.168.0.0/255.255.255.0, which means exactly the same), the network address would be 192.168.0.0 and the broadcast address would be 192.168.0.255. Broadcasts are used e.g. for discovery functions (IIRC for Windows file share name discovery; for some time protocol host discovery; you get the point).

Multicast packets are kind of a mixture between those two concepts. Those are sent from a host to a so-called “multicast group”, which hosts can subscribe to. Multicast groups can span several physical networks, theoretically even across the entire internet. Multicast-aware routers manage packet forwarding etc., just think of it as “magic” for now.

The interesting part of multicast is that in an example setup of 200 computing nodes on system boot, the kernel/initrd package needs only to be sent once to the wire, with all the nodes picking the file “from the wire”, as opposed to sending the same 5 Meg file 200 times.

This is of course not completely true, but for those intelligent multicast file transfer protocols supported by etherboot, the number of necessary transmissions of the boot file can be significantly reduced, with hosts booting a little later (milliseconds or seconds) jumping onto the running packet train and asking the server for retransmission of lacking packets after the first client has been catered for.

How to use multicast with Etherboot 5.2 (and above)

There are two multicast file transfer protocols supported by Etherboot as of now.

Using atftpd

atftp stands for Advanced Trivial File Transfer Protocol. It supports RFC 1350, RFC 2090, RFC 2347, RFC 2348 and RFC 2349. atftp is intended for serving boot files to large clusters. It is multi-threaded and supports multicast.

  1. Download atftp_0.6.2.tar.gz from http://packages.debian.org/testing/net/atftpd.html (newer versions might also work - please update this documentation accordingly)
  2. Unzip and extract the files (tar xvzf atftp_0.6.2.tar.gz)
  3. cd atftp-0.6.2
  4. ./configure; make; make install
    Note: The author has not been able to get atftpd work on Slackware with inetd, so he runs atftpd in daemon mode. You should ensure that your /etc/inetd.conf and /etc/services file (or the appropriate files on your distribution) do not reference the port number that you will be running atftpd on, else atftpd will not work.
    The daemon can be started like this:
    'atftpd –daemon –port 1758 –mcast_addr 224.1.1.0-255 –mcast_port 1758 –mcast_ttl=1'
  5. Edit src/Config in your Etherboot source repository and add the following compile flags:
    # Enable Multicast Support
        CFLAGS+= -DALLMULTI -DMULTICAST_LEVEL1 -DMULTICAST_LEVEL2
        # Download files via Multicast tftp (RFC 2090)
        CFLAGS+= -DDOWNLOAD_PROTO_TFTM
  6. Alternatively, download Etherboot from www.rom-o-matic.net with the appropriate options activated
  7. Modify your DHCP server config (/etc/dhcpd.conf on many distributions): Set the filename to:
    filename "x-tftm://192.168.2.3//lts/vmlinuz-2.4.21-ltsp-1"; 

    (adapt to your local storage location).

Using mini-slamd

  1. Compile mini-slamd:
        cd /etherboot/etherboot-5.1/contrib/mini-slamd
        make
  2. Modify dhcpd.conf
    Set the file name to either of these:
        filename "x-slam:///";
        filename "x-slam://192.168.0.253:10000/239.255.1.1:10000";

    where:

    • The first IP is the IP of your server
    • The second IP is the multicast IP and udp port to use (as hard-coded in mini-slamd)
  3. Run mini-slamd with the filename to be delivered as the parameter:
              etherboot/etherboot-5.1/contrib/mini-slamd/mini-slamd /tftpboot/vmlinuz-2.4.19.ltsp-1    
mini-slamd facts

So those packets are non-routable.

Using mftp (mtftp???)

There is no documentation available currently.

Troubleshooting

If multicast does not seem to work for you, you might have to set an IP route to the appropriate network interface on the server.

Supported Multicast-Enabled Drivers

Driver Version Confirmed by
3c509 5.2 Tim Legge
3c515 5.2 Tim Legge
3c595 5.2 Untested, please confirm to tlegge at rogers Dot com
3c90x 5.2 Eric Biederman and Tim Legge
eepro100 5.2 Eric Biederman and Tim Legge
epic100 5.2 Tim Legge
forcedeth 5.2 Tim Legge
natsemi 5.2 Tim Legge
ns83820 5.2 Tim Legge
ns8390 5.2 Tim Legge (Includes ne, ne2k-pci, possibly others)
pcnet32 5.2 Tim Legge
rtl8139 5.2 Tim Legge
r8169 5.2 Tim Legge
sis900 5.2 Tim Legge
sundance 5.2 Tim Legge
tg3 5.2 Tim Legge
tlan 5.2 Tim Legge
tulip 5.2 Tim Legge
via-rhine 5.2 Tim Legge
w89c840 5.2 Tim Legge