πŸ€·β€β™‚οΈServer Mode

Great for use in a network lab

Server mode is a great way of turning the WLAN Pi in to a box of tricks that can provide many of the network services that you'll need for a home or small scale lab.

If you flip your WLAN Pi in to Server mode, you'll instantly have access to a:

  • DHCP server

  • TFTP server

  • Wireless Console

As we've already covered the Wireless Console functionality in a previous demo, we take a look at using and configuring the DHCP and TFTP servers.

Warning: before switching in to server mode, please consider the caveat below!

When switching the WLAN Pi in to Server mode, a DHCP server becomes available on the Ethernet port of the WLAN Pi. If it is connected to a network port already supplies IP address via DHCP, this may cause a conflicts and service issues for other devices on the same segment. Make sure you do not connect the WLAN Pi to a segment that already has a DHCP service configured!!! (...and never connect it to a customer live network)

Server Mode

To switch in to server mode, select the mode from the FPMS menu option: Modes > Server > Confirm

The WLAN Pi will now reboot and switch in to Server mode.

Note that unlike other WLAN Pi modes, Server mode is not persistent. When the WLAN Pi is rebooted or powered off/on, it will automatically revert to Classic mode. This s to prevent it being accidentally being booted up in Server mode on a live network (see DHCP server caveat above)

DHCP Server

Once the WLAN Pi is in Server mode, a DHCP service is available on the Ethernet port of the WLAN Pi. If you connect this to a lab switch VLAN, it provides an quick and easy way of providing IP addresses to your lab devices.

It's very easy to modify the service to provide the IP range, DNS servers and DHCP options that you need. This make it an excellent tool for tasks such testing or staging APs that have have custom DHCP option requirements.

The configuration files for the DHCP service can be found in the file dhcp.conf in the directory /etc/wlanpi-server/dhcp/. The screen-shot below shows how to access the configuration file and list its contents:

If you'd like to change any aspect of the DHCP scope before switching into Server mode (e.g. DNS servers, lease time etc.), edit this file using an editor such as "nano" before the mode switch. When you switch from Classic to Server mode, the configuration file will be read and your new DHCP configuration used for the DHCP service.

If you'd like to add in a custom option for your APs to direct them to a specific wireless controller (e.g. option 43), then take a look at this excellent article (from someone you may recognise!): https://www.jiribrejcha.net/2020/08/cisco-aironet-and-catalyst-ap-option-43-configuration-for-isc-dhcp-server-on-linux/

TFTP Server

Server mode also comes with pre-configured TFTP server.

It is useful for firmware and software upgrades. Home folder of the TFTP server is /srv/tftp. Simply upload your software image to this folder on your WLAN Pi, SSH to the device you are upgrading, and initiate the upgrade from the device. Here is an example of Cisco AP manual image upgrade:

archive download-sw /force-reload /overwrite tftp://<IP-address>/<image-file-name>

TFTP is also useful when you want to backup configurations from your network devices. You could do something along these lines and save your switch configuration to the WLAN Pi TFTP server. You will find it in the /srv/tftp folder.

copy running-config tftp:

Further Information

https://github.com/WLAN-Pi/wlanpi-server

Last updated