Linux DHCP server config for PXE/BMP boot

Dell switches support Bare-metal provisioning(BMP) where a switch can be provisioned to automatically download image and config file from a remote server and boot up with that image file. In a nutshell, the process involves:

  1. Factory default switches comes with pre-installed FTOS(DNOS) image. After switch bootup in BMP mode, all interfaces are configured as “no shut” and send out DHCP discover messages.
  2. On receiving a DHCP offer from a server, the switch uses that information to download the new FTOS image and configuration file from a remote server.
  3. DHCP server has to be configured such that it provides following information in its DHCP offer message to the switch:  IP address of the interface, subnet mask, default gateway IP, FTP/TFTP server IP, image name and configuration file name that resides on that FTP/TFTP server.
  4. The switch will download the image to its local memory partition(A: or B:), automatically set the boot parameters to boot from that partition in next reboot. It also saves the downloaded configuration file to “startup-config” and goes for a reboot so that it boots up with the downloaded image.

In our lab setup, Ubuntu was used as a DHCP server. To install DHCP server on ubuntu, use “sudo apt-get install isc-dhcp-server“.  Below is a sample config on /etc/dhcp/dhcpd.conf file:

option configfile code 209 = text; #to send configfile info
host lab-s6000 {
 hardware ethernet 90:b1:1c:f4:9a:e5; #switch mac
 fixed-address 10.11.214.143; # assign static IP to above switch
 option vendor-class-identifier "lab-s6000"; #vendor-class-id
 option routers 10.11.214.254; #default gateway info
 option tftp-server-name "10.11.213.164";  ## tftp server info
 option configfile "lab-test";  ## config file info. 
 filename "FTOS-SI-9.5.0.1.bin";  ##image file info in TFTP server
}

We can also specify the image download link directly on the “filename” parameter in above dhcpd config file.. For example:  “filename”ftp://anonymous:123@10.1.1.1/image_file_name”

On the switch end, we just need to configure it to boot in BMP mode, “reload-type bmp vendor-class-identifier lab-s6000” . Following log message will be displayed on console when the switch receives DHCP offer from ubuntu:

%STKUNIT0-M:CP %BMP-5-BMP_ACK: DHCP ACK received on Ma 0/0.
%STKUNIT0-M:CP %BMP-5-BMP_BOOT_OFFER: DHCP acquired IP 10.11.214.143 mask 255.255.255.0 server IP 10.11.213.164.
%STKUNIT0-M:CP %BMP-5-BMP_BOOT_OFFER: DHCP tftp IP NIL sname 10.11.213.164 dns IP NIL router IP 10.11.214.254.
%STKUNIT0-M:CP %BMP-5-BMP_BOOT_OFFER: DHCP image file FTOS-SI-9.5.0.1.bin.
%STKUNIT0-M:CP %BMP-5-BMP_BOOT_OFFER: DHCP config file lab-test.

After switch boot up, we can check the status of BMP using “show boot bmp” command:

Dell#show boot bmp
Config download enabled via DHCP
BMP State : BMP process has started
BMP State : Received DHCP offer from DHCP server 10.11.213.164
***** SELECTED OFFER DETAILS *****
Server Type = DHCP
Interface Index = 236732616
Acquired IP = 10.11.214.143
Subnet Mask = 255.255.255.0
Image file = FTOS-SI-9.5.0.1.bin
Config file = lab-test
Server IP = 10.11.213.164
TFTP Server IP = Nil
TFTP Server Name = 10.11.213.164
DNS IP = Nil
Routers = 10.11.214.254
**********************************
BMP State : Downloading image FTOS-SI-9.5.0.1.bin
BMP State : Flash Image and BMP image are same FTOS-SI-9.5.0.1.bin
BMP State : Downloading config/script file lab-test
BMP State : Config/Script file lab-test successfully downloaded
BMP State : Downloaded config is successfully applied
BMP State : BMP process is successfully completed
Dell#

By default, the switch will send “vendor class identifier” in its DHCP discover message. In the vendor class, the switch  will include “DELLNTW-S6000”(if the switch model is S6000) as vendor name along with the current OS that the switch has booted up with and a user-defined text(that we specify in reload-type CLI). We can check the DHCP transactions/packet capture on server end using tcpdump or dhcpdump utility (“sudo apt-get install dhcpdump“).

More information about BMP on Dell’s whitepaper.

Advertisements
This entry was posted in Force10, Linux and tagged , , , , , , , . Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s