During installation, PC-BSD® configures your Ethernet interfaces to use DHCP and provides a post-install configuration screen to configure your wireless connection. In most cases, this means that your connected interfaces should "just work" whenever you use your PC-BSD® system.
For desktops that provide a system tray, a wireless configuration icon will appear if PC-BSD® detects a supported wireless card. If you hover over the wireless icon, shown in Figure 8.18a, it will indicate if the interface is associated and provide information regarding the IP address, IPv6 address, SSID, connection strength, connection speed, MAC address, and type of wireless device.
If you right-click the wireless icon, you will see a list of detected wireless networks. Simply click the name of a network to associate with it. The right-click menu also provides options to configure the wireless device, start the Network Manager, restart the network (useful if you need to renew your DHCP address), and to close the Network Monitor so that the icon no longer shows in the system tray. If you have multiple wireless devices, each will have its own icon in the system tray. If you do not use one of the devices, click Close the Network Monitor to remove it from the tray.
To view or manually configure all of your network interfaces click Control Panel → Network Configuration or type pc-su pc-netmanager. If a new device has been inserted (e.g. a USB wireless interface), a pop-up message will open when you start Network Configuration, indicate the name of the new device, and ask if you would like to enable it. Click Yes and the new device will be displayed with the list of network interfaces that PC-BSD® recognizes. In the example seen in Figure 8.18b, the system has one Intel Ethernet interface that uses the em driver and an Intel wireless interface that uses the wlan driver.
The rest of this section describes each tab of the Network Configuration utility and demonstrate how to view and configure the network settings for both Ethernet and wireless devices. It will then present some common troubleshooting scenarios, known issues, and suggestions for when a device does not have a built-in driver.
Devices: Ethernet Adapters
If you highlight an Ethernet interface in the Devices tab and either click the Configure button or double-click the interface name, you will see the screen shown in Figure 8.18c:
There are two ways to configure an Ethernet interface:
- Use DHCP: this method assumes that your Internet provider or network assigns your addressing information automatically using the DHCP protocol. Most networks are already setup to do this. This method is recommended as it should "just work".
- Manually type in the IP addressing information: this method requires you to understand the basics of TCP/IP addressing or to know which IP address you should be using on your network. If you do not know which IP address or subnet mask to use, you will have to ask your Internet provider or network administrator.
By default, PC-BSD® will attempt to obtain an address from a DHCP server. If you wish to manually type in your IP address, check the box "Assign static IP address". Type in the IP address, using the right arrow key or the mouse to move between octets. Then, double-check that the subnet mask (Netmask) is the correct value and change it if it is not.
If the Ethernet network uses 802.1x authentication, check the box "Enable WPA authentication" which will enable the "Configure WPA" button. Click this button to select the network and to input the authentication values required by the network.
By default, the "Disable this network device" box is unchecked. If you check this checkbox, PC-BSD® will immediately stop the interface from using the network. The interface will remain inactive until this checkbox is unchecked.
The "Advanced" tab, seen in Figure 8.18d, allows advanced users to change theirand to use DHCP to automatically obtain an . Both boxes should remain checked unless you are an advanced user who has a reason to change the default MAC or IPv6 address and you understand how to input an appropriate replacement address.
The "Info" tab, seen in Figure 8.18e, will display the current network address settings and some traffic statistics.
If you make any changes within any of the tabs, click the "Apply" button to activate them. Click the "OK" button when you are finished to go back to the main Network Configuration window.
You can repeat this procedure for each network interface that you wish to view or configure.
Devices: Wireless Adapters
If your wireless interface does not automatically associate with a wireless network, you probably need to configure a wireless profile that contains the security settings required by the wireless network. Double-click the wireless icon in the system tray or highlight the wireless interface displayed in the "Devices" tab of Network Configuration and click the "Configure" button. Figure 8.18f demonstrates that this system's wireless interface is currently associated with the wireless network listed in the "Configured Network Profiles" section:
To associate with a wireless network, click the "Scan" button to receive the list of possible wireless networks to connect to. Highlight the network you wish to associate with and click the "Add Selected" button. If the network requires authentication, a pop-up window will prompt you for the authentication details. Input the values required by the network then click the "Close" button. PC-BSD® will add an entry for the network in the "Configured Network Profiles" section.
If the network is hidden, click the Add Hidden button, input the name of the network in the pop-up window, and click “OK”.
If you add multiple networks, use the arrow keys to place them in the desired connection order. PC-BSD® will try to connect to the first profile in the list and will move down the list in order if it is unable to connect. When finished, click the "Apply" button. A pop-up message will indicate that PC-BSD® is restarting the network. If all went well, there should be an IP address and status of "associated" when you hover over the wireless icon in the system tray. If this is not the case, double-check for typos in your configuration values and read the section on Troubleshooting Network Settings.
PC-BSD® supports the types of authentication shown in Figure 8.18g. You can access this screen (and change your authentication settings) by highlighting an entry in the "Configured Network Profiles" section and clicking the "Edit" button.
This screen allows you to configure the following types of wireless security:
- Disabled: if the network is open, no additional configuration is required.
- WEP: this type of network can be configured to use either a hex or a plaintext key. If you click WEP then the "Configure" button, you will see the screen shown in Figure 8.18h. Type the key into both network key boxes. If the key is complex, check the Show Key box to make sure that the passwords are correct and that they match. Uncheck this box when you are finished to replace the characters in the key with the * symbol. A wireless access point that uses WEP can store up to 4 keys; the number in the key index indicates which key you wish to use.
- WPA Personal: this type of network uses a plaintext key. If you click WPA Personal then the Configure button, you will see the screen shown in Figure 8.18i. Type in the key twice to verify it. If the key is complex, you can check the Show Key box to make sure the passwords match.
- WPA Enterprise: if you click WPA Enterprise then the Configure button, you will see the screen shown in Figure 8.18j. Select the authentication method (EAP-TLS, EAP-TTLS, or EAP-PEAP); input the EAP identity; browse for the CA certificate, client certificate and private key file; and input and verify the password.
If you wish to disable this wireless interface, check the Disable this wireless device box. This setting can be desirable if you want to temporarily prevent the wireless interface from connecting to untrusted wireless networks.
The Advanced tab, seen in Figure 8.18k, allows you to configure the following:
- a custom MAC address. This setting is for advanced users and requires the Use hardware default MAC address box to be unchecked.
- how the interface receives its IP address information. If the network contains a DHCP server, check the Obtain IP automatically (DHCP) box. Otherwise, input the IP address and subnet mask to use on the network.
- the country code. This setting is not required if you are in North America. For other countries, check the Set Country Code box and select your country from the drop-down menu.
The Info tab, seen in Figure 8.18l, shows the current network status and statistics for the wireless interface:
Network Configuration (Advanced)
The Network Configuration (Advanced) tab of the Network Configuration utility is seen in Figure 8.18m. The displayed information is for the currently highlighted interface. If you wish to edit these settings, make sure that the interface that you wish to configure is highlighted in the Devices tab.
If the interface receives its IP address information from a DHCP server, this screen allows you to view the received DNS information. If you wish to override the default DNS settings or set them manually, check the Enable Custom DNS box. You can then set the following:
DNS 1: the IP address of the primary DNS server. If you do not know which IP address to use, click the Public servers button to select a public DNS server.
DNS 2: the IP address of the secondary DNS server.
Search Domain: the name of the domain served by the DNS server.
If you wish to change or set the default gateway, check the Enable Custom Gateway box and input the IP address of the default gateway.
The following settings can be modified in the IPv6 section:
Enable IPv6 support: if this box is checked, the specified interface can participate in IPv6 networks.
IPv6 gateway: the IPv6 address of the default gateway used on the IPv6 network.
IPv6 DNS 1: the IPv6 address of the primary DNS server used on the IPv6 network. If you do not know which IP address to use, click the Public servers button to select a public DNS server.
IPv6 DNS 2: the IPv6 address of the secondary DNS server used on the IPv6 network.
The Misc section allows you to configure these options:
System Hostname: the name of your computer. It must be unique on your network.
Enable wireless/wired failover via lagg0 interface: theinterface allows you to seamlessly switch between using an Ethernet interface and a wireless interface. If you want this functionality, check this box.
If you make any changes within this window, click the Save button to apply them.
The Proxy tab, shown in Figure 8.18n, is used when your network requires you to go through a proxy server in order to access the Internet.
Check the Proxy Configuration check box to activate the settings. The follow settings can be configured in this screen:
Server Address: enter the IP address or hostname of the proxy server.
Port Number: enter the port number used to connect to the proxy server.
Proxy Type: choices are "Basic" (sends the username and password unencrypted to the server) and "Digest" (never transfers the actual password across the network, but instead uses it to encrypt a value sent from the server). Do not select "Digest" unless you know that the proxy server supports it.
Specify a Username/Password: check this box and input the username and password if they are required to connect to the proxy server.
Proxy settings are saved to the /etc/profile and /etc/csh.cshrc files so that they are available to the PC-BSD® utilities as well as any application that uses fetch.
Applications that did not come with the operating system, such as web browsers, may require you to configure proxy support using that application's configuration utility.
If you save any changes to this tab, a pop-up message will warn that you may have to logout and back in in order for the proxy settings to take effect.
Troubleshooting Network Settings
While Ethernet networking usually "just works" on a PC-BSD® system, users sometimes encounter problems, especially when connecting to wireless networks. Sometimes the problem is due to a configuration error; sometimes a driver is buggy or is not yet available. This section is meant to help you pinpoint the problem so that you can either fix it yourself or give the developers the information they need to fix or create the driver.
Useful Files and Commands
When troubleshooting your network configuration, use the following files and commands:
This file is read when the system boots up. In order for the system to configure an interface at boot time, an entry must exist for it in this file. Entries are automatically created for you during installation for each interface that is active. An entry will be added (if it does not exist) or modified (if it already exists) when you configure an interface using the Network Configuration utility.
Here is an example of the rc.conf entries for an ethernet driver (em0) and a wireless driver (run0):
When reading through your own file, look for lines that begin with ifconfig. For a wireless interface, also look for lines containing wlans.
This file is used by wireless interfaces and contains the information needed to connect to a WPA network. If this file does not already exist, it is created for you when you enter the "Configuration" screen of a wireless interface.
This command shows the current state of your interfaces. When reading through its output, check that your interface is listed, has a status of "active", and has an IP address. Here is a sample ifconfig output showing the entries for the re0 Ethernet interface and the run0 wireless interface:
In this example, the ethernet interface (re0) is active and has an IP address. However, the wireless interface (run0, which is associated with wlan0) has a status of "no carrier" and does not have an IP address. In other words, it has not yet successfully connected to the wireless network.
This command lists the hardware that was probed during boot time and will indicate if the associated driver was loaded. If you wish to search the output of this command for specific information, pipe to grep as seen in the following examples:
dmesg | grep re0 re0: <RealTek 8168/8111 B/C/CP/D/DP/E PCIe Gigabit Ethernet> port 0xc000-0xc0ff mem 0xd0204000-0xd0204fff,0xd0200000-0xd0203fff irq 17 at device 0.0 on pci8 re0: Using 1 MSI messages re0: Chip rev. 0x28000000 re0: MAC rev. 0x00000000 miibus0: <MII bus> on re0 re0: Ethernet address: 60:eb:69:0b:dd:4d re0: [FILTER] re0: link state changed to DOWN re0: link state changed to UPdmesg | grep run0 run0: <1.0> on usbus3 run0: MAC/BBP RT3070 (rev 0x0201), RF RT2020 (MIMO 1T1R), address 00:25:9c:9f:a2:30 run0: firmware RT2870 loaded
If your interface does not show up in ifconfig or dmesg, it is possible that a driver for this card is not provided with the operating system. If the interface is built into the motherboard of the computer, you can use the pciconf command to find out the type of card. Here is an example:
In this example, there is a built-in Ethernet device that uses a driver that supports the RTL8168/8111/8111c chipsets. As we saw earlier, that driver is re0. The built-in wireless device was also found but the "?" indicates that a driver for the RTL8191SE chipset was not found. A web search for "FreeBSD RTL8191SE" will give an indication of whether a driver exists (perhaps in a version of FreeBSD that has not been released yet) or if a driver is being developed. You can also use a web search to locate a Windows driver and try using the ndisgen command, as described in this, to convert it to a FreeBSD driver.
The FreeBSD Handbook chapter onprovides a good overview of how wireless works and offers some troubleshooting suggestions.