Exercise: Exploring Wi-Fi Interfaces
Using a Physical Wireless Adapter
1 Purpose
This exercise provides hands-on experience with a real Wi-Fi interface in a Linux environment. The ability to identify a wireless card and use command-line tools to scan for networks is a fundamental skill for network setup and troubleshooting. This guide focuses on using a physical USB Wi-Fi adapter to perform a real-world network scan from your virtual machine.
2 What You’ll Accomplish
By the end of this exercise, you will be able to:
- Identify and pass through a USB device to a virtual machine.
- Use
nmclito scan for real-world wireless networks. - Use
ip addrto identify a wireless interface. - Explore
nmcli’s help documentation as an alternative.
This exercise maps to the following program and course learning outcomes:
- Course Learning Outcomes (CLOs):
- 1. Identify hardware and basic network components: You will identify and interact with a physical wireless network interface card.
- 3. Troubleshoot hardware and basic network components: Using
nmclito scan for networks is a primary step in diagnosing Wi-Fi connectivity issues.
This exercise develops the following skills, which align with the O*NET SOC Code 15-1232.00 for Computer User Support Specialists.
| Learning Objective | O*NET KSAs | Technologies Used |
|---|---|---|
| Identify and scan with Wi-Fi hardware. | Knowledge: Telecommunications, Computers & Electronics Skills: Systems Analysis, Troubleshooting |
nmcli, lsusb |
3 Prerequisites
This exercise requires a running Fedora 42 virtual machine. For the main steps, you will need a Linux-compatible USB Wi-Fi adapter. An alternative path is provided if you do not have one.
4 Step-by-Step Guide
Open a terminal window in your Fedora VM to begin.
If you do not have a USB Wi-Fi adapter, you can still explore the capabilities of the nmcli tool. Instead of following the steps below, use the --help flag to learn about the commands. In your notebook, answer the final “Check on Learning” question based on what you discover.
# Explore the main help menu
nmcli --help
# Explore the "device" subcommand
nmcli device --help
# Explore the "wifi" subcommand for devices
nmcli device wifi --help4.1 Step 1: Connect and Passthrough Your Adapter
Plug the USB Wi-Fi adapter into your computer. In your virtualization software (e.g., VirtualBox, VMware, GNOME Boxes), find the setting to connect or “pass through” the USB device from the host to the running Fedora VM.
4.2 Step 2: Verify the Device
Inside the VM, run lsusb to confirm that the VM now sees the adapter. You should see it listed as a new device.
lsusb4.3 Step 3: Identify the Interface
Run the ip addr command. You should see a new interface that was not there before, likely named wlan0 or something similar. This is your wireless interface.
ip addr4.4 Step 4: Scan for Networks
Now, use nmcli to perform a scan for all nearby Wi-Fi networks.
nmcli device wifi list4.5 Step 5: Analyze the Output
You will see a list of real Wi-Fi networks, including their SSIDs, signal strength (SIGNAL), the channel they are on, and the security type (e.g., WPA2). This output confirms your adapter is working correctly.
In your notebook, write down the name of your Wi-Fi interface and the SSID of two networks you discovered.
5 Reflect and Review
Now that you have completed this exercise, reflect on your experience in your Microsoft Teams Student Notebook:
- 3 commands you used in this exercise.
- 2 pieces of information
nmcli device wifi listprovides about a network. - 1 question you still have about passing devices through to a VM.
Answer these questions in your notebook to solidify your understanding:
- What is the purpose of passing through a USB device to a VM?
- You run
nmcli device wifi listand see your home network listed with a SIGNAL strength of 25. What does this low number generally indicate? - What command would you use to see if your Wi-Fi adapter is even detected as a USB device?
- (For all students) Based on the
nmcli device wifi --helpcommand, what is the fullnmclicommand to connect to a network with the SSID “MyGuestNetwork”?