 In this demo, I'll show how to configure your wireless LAN interface via the command line. So to do that, we in fact have to turn off the network manager, which automatically manages the interface for you. So I right click on the network manager icon and disable networking. So that both of the, or all of the interfaces on my laptop are disabled. To see interface information, we use ifconfig, and in this case it shows me that only I have one interface and that's my loopback interface, LO, the special interface for sending to myself. But it does not list my wired ethernet interface nor my wireless LAN interface because I've been disabled. So let's enable them. In this case, we're going to just deal with the wireless LAN interface. I need to do this as sudo because to modify the interface information, you need the appropriate privileges. I have config and I know that the interface name from past attempts is WLAN0. If we go back, how do I know the interface name? I have config minus a, list them all. So to find out all the interfaces, even those disabled, I have config minus a. It is clear the screen. So I want to configure my wireless LAN interface, wireless LAN WLAN0, and I want to enable it, which means turning it up. And now look at the configuration of WLAN0 and now it's enabled and it shows me the hardware address. It doesn't have an IP address because it's not connected to any wireless LAN and it has not obtained that IP address yet. Now let's look at the wireless configuration of this interface. I have config shows the IP and MAC configuration, but IW config can be used to look at the wireless configuration details. IW config, same interface identifier, WLAN0, and it shows me that my interface supports IEEE 802.11 B, G and N. It's not associated to any access point and therefore there's no extended service set ID, shows me some of the parameters of the interface, such as the transmit power, and it's in manage mode. Manage mode is the mode where it will be managed by an access point. So we need to associate with an access point. So first we need to know of an access point nearby to select. Some of the commands that are associated with wireless interface configuration can be listed if we do a search by the man pages for IW. We see there's IW config for configuring the interface and there are some other related commands like listing some information about the interface, looking at different wireless events. We're going to try to list some information about the interface, IW list. Just look at the man page for IW list. There are many different sets of information that we can get. So we specify IW list, the interface name. We can scan for different access points nearby, which we'll do in a moment. We can look at frequency information, the channels which are supported by the interface, data rate information, and other details about the wireless interface. Let's scan for some interfaces. I'll do it as sudo so that we've got the privileges to do the scanning. IW list, the interface name, and the operation is scanning. And I'll pipe it into less so that it doesn't scroll too fast through the screen. And we see what it shows for this interface is a set of cells or access points that have been discovered during that short scanning phase. Basically, the wireless interface goes into a receive mode and tries to either receive beacons or send out probe requests with the hope of receiving probe responses to learn about access points. And it does that on all of different channels. So it goes through from channel one and does some brief scanning, and then channel two, channel three, and so on, with the aim of discovering all nearby access points on all the possible channels. And it gives the details here of those access points. Here cell zero one, we see the address of the access point, and the channel it's using, channel six, something about the signal quality, whether it's using encryption or not. And importantly, the thing that we will need is the extended service set ID. There's one with solar, and the other features which the access point has advertised are listed there, like the data rates supported, the encryption supported, and so on. If we scroll down, we'll see that there are other access points found. Here cell O2 with ESSID WSIT, also on channel six, and cell three on channel nine, ESSID Earth, and cell four, also WSIT. So two access points there which belong to the WSIT network, and we're going to use one of them to associate with. So now we'll use IWCONFIG to tell our wireless interface to associate with an access point with ESSID WSIT. And now let's look at the first wireless interface information. We see now that we're associated with an access point on the network WSIT, the frequency the data rate that it's connected with, and the access point information, as well as link quality information. So now we're associated. If we want to send data, we will need an IP address. If we use IWCONFIG, let's check, we don't yet have an IP address. So normally the network manager does all this automatically for us. It shows the access points available by scanning, and either manually you can select one of the ESSIDs, or you may configure it automatically, select them, but via the command line we must do these steps separately. So the final step we want to do is find an IP address, and we do that using DHCP. So we start the DHCP client, and which will try to discover an IP address for the wireless LAN zero interface. It may take some time. It sends out a request to the DHCP server on the network. And if all is well, the DHCP server should send back a response, including the IP address for this interface. It's completed. So let's look at the interface information now, and we see now we have an IP address, 101098.38. So that's the way that we can configure the wireless interface via the command line. We first turned on the wireless interface, and then we use IWList to scan for access points. And then I told my wireless interface to associate with an access point on extended service at WSIIT. And then I used DHCP client to obtain an IP address using DHCP. To finish a couple of other things we saw with IWList there were different operations available. So we can list for our interface the rates supported or the current bit rate, 5.5 megabits per second. Remember with wireless LAN there are multiple bit rates available, data rates, and the wireless LAN card in your computer will choose the best one depending on the signal quality. So it may change over time, it will automatically switch between different data rates. Another thing we can do is list the channels or frequencies supported, simply list the available frequencies or channels, and the current frequency that we have available. And there are other operations that can be formed with IWList and the other IW family of command line tools that will let you to configure your wireless interface. Last thing to do let's turn off the wireless interface using IF config by turning it down. And we're back to simply our loopback interface, no other interface is configured. You may want to enable your networking again so all of those steps will be automatically managed by the network manager software on the operating system.