|
NAMEwifibox —
embedded (virtualized) wireless router
SYNOPSIS
DESCRIPTIONwifibox deploys a Linux guest operating system with the
help of
bhyve(8)
and attaches its driver to a wireless network device on the host system via
the PCI pass-through capabilities of the
vmm(4)
kernel module. This way the original FreeBSD PCI wireless network card driver
can be replaced for the performance and stability of the one provided by the
Linux kernel, or put into use if the device is not supported by FreeBSD at
all.
Once the guest has been started up successfully,
There is a CONFIGURATIONAfter the installation to the system, check the sample configuration files provided in the /usr/local/etc/wifibox directory and follow the instructions to create a working configuration, otherwisewifibox will refuse to start. For systems that might
be put in sleep mode, e.g. laptops, there is a sample
devd.conf(5)
configuration file in the /usr/local/etc/devd
directory that can be used to restart wifibox on
resume.
By default, PCI pass-through is disabled for AMD-based hardware,
hence it must be explicitly enabled via the corresponding
syctl(8)
variable. This can be done by adding the following line to either
/etc/sysctl.conf or
/boot/loader.conf depending on whether
vmm(4) is
going to be loaded by hw.vmm.amdvi.enable=1 In order to make wifibox_enable="YES" At the same time, make sure that no FreeBSD driver is configured for the same device and remove all the related settings from there. The devmatch(8) utility might be used to stop any conflicting drivers from loading automatically. For example, the iwm(4) and iwlwifi(4) native drivers could be disabled in rc.conf(5) as shown below. devmatch_enable="YES" devmatch_blocklist="if_iwm if_iwlwifi" Note these settings will only take effect on the next boot. Until
then the # service devmatch start # kldunload if_iwm if_iwlwifi The # service wifibox start After ifconfig_wifibox0="SYNCDHCP" In addition to this, to reduce boot times, dhclient(8) can be instructed to run in the background and not to wait for a positive link and issuing an IP address after it has been launched. background_dhclient_wifibox0="YES" defaultroute_delay="0" If preferred, static IP address configuration is possible with this method. Assume that wifibox0 is configured as 10.0.0.1/24 on the guest's side, and the host wants to use the 10.0.0.2/24 IP address. defaultrouter="10.0.0.1" ifconfig_wifibox0="inet 10.0.0.2/24" The wifibox0 networking interface can be brought
up with the use of the # service netif start wifibox0 For static IP address configurations, the
# service routing restart Note that since wifibox0 becomes managed by
# service netif stop # service wifibox restart # service netif start If the devd.conf(5) file is installed, devd(8) must be restarted so the additional configuration file can be read. # service devd restart COMMANDSThewifibox system service and
devd(8) can
manage the following actions by themselves, but the commands for the
wifibox script itself are listed below for the
reference.
DIAGNOSTICSIfwifibox does not have behave in the expected way,
check /var/log/wifibox.log for errors. This file holds
messages about the progress of each executed command, and their amount depends
on the configured level of logging. The log files of the guest are exported to
the host and they are made available under the
/var/run/wifibox/appliance/log directory. There it is
recommended to check the
/var/run/wifibox/appliance/log/dmesg file for messages
related to the boot sequence, such as driver initialization, and the
/var/run/wifibox/appliance/log/messages file for the
run-time system messages, which are usually emitted by the daemons. If all
else fails, use the console command to connect to the
guest.
EXIT STATUSThe exit status is 0 on success, and >0 if any of the commands fail.SEE ALSObhyve(8), vmm(4), bridge(4), sysctl(8), sysctl.conf(5), loader.conf(5), rc.conf(5), devmatch(8), kldunload(8), devd.conf(5), devd(8), cu(1), nmdm(4), wifibox-guest(5)CAVEATSwifibox supports only a single wireless network device
at a time, and it has to be PCI one. It cannot be launched multiple times.
The The The PCI pass-through implementation of bhyve(8) may not be able to cooperate with the Linux system in the guest due to lack of emulation of certain quirks and features that are required to make the driver work. Sometimes this can cause strange and unexpected error messages. Always try the latest available version of bhyve(8) when this happens. AUTHORSGábor Páli <pali.gabor@gmail.com>
Visit the GSP FreeBSD Man Page Interface. |