|
Connecting to a Wireless LAN with Linux, Part 2
Getting OnlineIn Part 1 we reviewed hardware options, which wireless utilities should be present, how to use Windows drivers, and how to be open to connect to any available wireless access point. Today we'll cover configurations on Red Hat- and Debian-type systems, basic security, and hardware discovery. Wireless connectivity can be rather overly friendly, allowing connections from anyone. This howto assumes you have a wireless access point on a LAN, which can be all wireless or mixed wired and wireless. You don't want it wide open to just any random person with a desire to snoop on your network or "borrow" your bandwidth, but you want some access controls and security. Your access point should have a unique SSID (service set identifier), WEP (wireless equivalent privacy) or WPA/WPA2 (Wi-fi protected access) set up and working, and either a DHCP server or a pool of assigned IP addresses for clients.
Red Hat and Red Hat-type SystemsRed Hat, Fedora, CentOS, and most Red Hat clones have the excellent Network Configuration Tool. On Red Hat the command to open it is Fire it up and highlight the wireless adapter on the Devices tab, and click Edit. The key configuration items are:
Don't use ad-hoc, or peer-to-peer mode, which leaves you open to random connections. Ad-hoc mode is useful for quick easy connectivity without needing an access point, such as for meetings, so be sure to use it only when you really intend to.
Debian and Debian-based SystemsOn Debian you can configure all Ethernet interfaces in the /etc/network/interfaces file. This is an example for a static IP on a PCI wireless adapter. Use the "auto eth1" line only for PCI cards, to start them at boot. Don't use it for PCMCIA: auto eth1 iface eth1 inet static address 192.168.1.100 network 192.168.1.0 netmask 255.255.255.0 broadcast 192.168.1.255 gateway 192.168.1.1 wireless_essid Office wireless_mode Managed wireless_key 5e5d5e66255b75464a492b4b42
The " This is how to configure it for DHCP: auto eth1 iface eth1 inet dhcp Be sure to list your Ethernet devices in order: lo, eth0, eth1, and so forth. They will be started in the order listed.
Multiple Profiles, Starting and Stopping Wireless Adapters
Multiple profiles are created with the On Debian, use the whereami utility. If you run your laptop on battery a lot, you can save power by turning off the wireless adapter when you're not using it. For PCMCIA adapters, use the pcmcia-cs tools. These commands stop and restart the card without unloading the drivers: # /sbin/cardctl suspend # /sbin/cardctl resume These commands eject and activate the card after insertion: # /sbin/cardctl eject # /sbin/cardctl insert Check the card status: $ /sbin/cardctl status
For PCI adapters use the old familiar # /sbin/ifdown eth1 # /sbin/ifup eth1 Check the PCI adapter status: $ /sbin/ifconfig
Hardware DiscoveryBecause wireless adapter manufacturers like to use different chipsets in the exact same model line and never tell you, you may be forced to figure it out for yourself, like when you replace a Windows installation with Linux. Or you might want to haul your trusty Knoppix CD to the store and find out what's installed before purchasing a new PC. Or you just need to see the card information to use in configuration.
Use the
# cardctl ident
Socket 0:
no product info available
Socket 1:
product info: "Lucent Technologies", "WaveLAN/IEEE", "Version 01.01", ""
manfid: 0x0156, 0x0002
function: 6 (network)
Sometimes this does not tell you what you need to know, so as a last resort pop the card out and copy the FCC (Federal Communications Commission) ID number. Take this to the FCC search page; this will tell you everything about the device. Look for the "Operational Description" to find the chipset.
Before using $ /sbin/lspci ... 02:07.0 Network controller: Intersil Corporation Prism 2.5 Wavelan Chipset (rev 01) ...
Reducing Troubles and Getting HelpWireless networking is going to be a moving target for some time. When you have the right wireless adapter, wireless tools, and kernel support, getting up and running is as simple as installing the adapter and configuring your network settings. The number one hassle is finding the right hardware. I still recommend the Senao 2511 and Orinoco Classic Gold because they are dependable, even though they are 802.11b cards. If you are looking at any other cards, especially 802.11g or multi-mode, insist on testing before purchase. I can't even recommend Prism54 anymore, due to this update on the Prism54 site: "Manufacturers started buying the SoftMAC chipsets, which are not yet supported and may never be." You can always try NdisWrapper, which allows you to use an adapter that does not have native Linux support by using the Windows drivers. However it does not work all the time. When you are having problems the first place to go is the mailing lists for your Linux distribution. Fedora, Red Hat, and Debian have great user lists with a lot of information on using wireless adapters. The next place to go is Wireless LAN resources for Linux, which is the #1 comprehensive resource. Finally, have some patience, and don't believe everything you read. There is all kinds of hype such as "Turbo mode!! Watch streaming video over wireless!!" and "108 Mbps!!" and similar silliness. These may work under ideal conditions in a test lab, but in the real world don't hold your breath. ResourcesBuild A Linux-Based Wireless Access PointWi-Fi Planet
|