| 14 | | |
|---|
| 15 | | This is a Hint ( draft ) explaining how to prepare a PC for wireless communication with the Internet and how to put it into operation. I am not an expert on this field, but I solved this problem with the help of hints and advices given by many persons, and working through lots of papers, most of them not beeing actual anymore at this time. |
|---|
| 16 | | The object I had to deal with is an 'Acer' TravelMate 291LCi with Intel Centrino Mobile Technology, equiped with an Intel PRO/Wireless 2200BG(IEEE 802.11b/g) chip. The Laptop communicates with an 54 Mbps Wireless Netgear ADSL Firewall Router DG834G as access point However, there are good chances, that this hint may also be applied to other PC's with other drivers.If you cannot obtain a native Linux driver for your wireless NIC, you may want to try 'ndiswrapper', a package that will allow to load a Windows driver under Linux. |
|---|
| 17 | | |
|---|
| 18 | | The kernel compiled is version 2.6.15. This kernel includes already the driver ipw2200-1.0.8 and the iee802 subsystem and you may ask, why to build this two items additionally. However, I experienced serious difficulties not compiling them and decided to become independent from the kernel. |
|---|
| 19 | | |
|---|
| 20 | | This is a draftt, comments and suggestions will be highly welcomed. |
|---|
| | 14 | This is a Hint explaining how to prepare a PC for wireless communication with |
|---|
| | 15 | the Internet and how to put it into operation. I solved this problem with the |
|---|
| | 16 | help of hints and advices given by many persons, and working through lots of |
|---|
| | 17 | papers, many of them not beeing actual anymore at this time. |
|---|
| | 18 | The object I had to deal with is an 'Acer' TravelMate 291LCi with Intel |
|---|
| | 19 | Centrino Mobile Technology, equiped with an Intel PRO/Wireless 2200BG |
|---|
| | 20 | (IEEE 802.11b/g) chip. The Laptop communicates with an 54 Mbps Wireless |
|---|
| | 21 | Netgear ADSL Firewall Router DG834G as access point However, there are good |
|---|
| | 22 | chances, that this hint may also be applied to other PC's with other drivers. |
|---|
| | 23 | If you cannot obtain a native Linux driver for your wireless NIC, you may |
|---|
| | 24 | want to try 'ndiswrapper', a package that will allow to load a Windows driver |
|---|
| | 25 | under Linux. |
|---|
| | 26 | The kernel compiled is version 2.6.15. This kernel includes already the driver |
|---|
| | 27 | ipw2200-1.0.8 and the iee802 subsystem and you may ask, why to build this two |
|---|
| | 28 | items additionally. I experienced serious difficulties not compiling them and |
|---|
| | 29 | decided to become independent from the kernel. |
|---|
| | 30 | This second issue of the hint deals with additional instructions, how to |
|---|
| | 31 | operate a PC in a wireless field under a DHCP Server ( Dynamic Host Configura- |
|---|
| | 32 | tion Protocol ) providing IP's to the clients. This is the probably situation |
|---|
| | 33 | which will be found in most public locations, like airports, hotels etc. |
|---|
| 118 | | BOOTING THE PC |
|---|
| 119 | | |
|---|
| 120 | | If everything went right, the PC boots and loads firmware and wireless-driver. The corresponding booting messages will look like |
|---|
| | 127 | THE DHCPCD CLIENT SOFTWARE: |
|---|
| | 128 | Software to connect a computer to a network which uses DHCP to assign network |
|---|
| | 129 | addresses.There are two alternatives: dhcp, which includes also the server |
|---|
| | 130 | software, and dhcpcd, an implementation of the DHCP client specified in |
|---|
| | 131 | RFC2131. I prefered dhcpcd, wich seems to be more simple. |
|---|
| | 132 | Download |
|---|
| | 133 | dhcpcd-2.0.1.tar.bz2 |
|---|
| | 134 | http://developer.berlios.de/projects/dhcpcd/ |
|---|
| | 135 | Untar, change to the dhcpcd-2.0.1 directory and enter |
|---|
| | 136 | ./configure --prefix="" --sysconfdir=/var/lib |
|---|
| | 137 | and, as superuser, make. |
|---|
| | 138 | The reason for the prefix "" in the configuration command is explained in the |
|---|
| | 139 | blfs-book, version 6.1, chapter 14. Install the network service script |
|---|
| | 140 | /etc/sysconfig/network-devices/services/dhcpcd as indicated in the same place |
|---|
| | 141 | |
|---|
| | 142 | BOOTING THE PC: |
|---|
| | 143 | If everything went right, the PC boots and loads firmware and wireless-driver. |
|---|
| | 144 | The corresponding booting messages will look like |
|---|
| 132 | | MONITORING PROGRAMS |
|---|
| 133 | | |
|---|
| 134 | | There are many prrograms that allows the monitoring of wireless communications. I installed two of them: 'kismet' and 'KWiFiManager'. |
|---|
| 135 | | |
|---|
| 136 | | 'kismet' is a small wireless network detector, sniffer and intrusion detection system. |
|---|
| 137 | | Download 'kismet-2005-08-R1.tar.gz' from http://www.kismetwireless.net/download.shtml |
|---|
| 138 | | untar the file, enter make and make suidinstall. Run kismet the first time as root. Kismet runs on a shell console. |
|---|
| 139 | | |
|---|
| 140 | | 'kwifimanager' is a KDE frontend program used to configure and monitor wireless LAN cards. 'kwifimanager' is part of 'kdenetwork'. Download kdenetwork_3.4.1.tar.bz2 and follow the instructions given e.g. In BLFS - Version 6.1, chapter 29. Wireless tools should be installed before building this packet. |
|---|
| 141 | | |
|---|
| 142 | | CONFIGURING THE ROUTER - SAFETY CONSIDERATIONS |
|---|
| 143 | | |
|---|
| 144 | | during the installation of the wireless system, the safety options of the router are deactivated. Now, it is time to activate them. Access the settings menu of the router through a browser, entering something like http://192.168.0.1. I activated WEP ( Wired Equivalent Privacy ) with 64 bit encryption. You may consider a 125 bit encryption |
|---|
| 145 | | |
|---|
| 146 | | Enter a password in the encryption field, and the router will generate four keys, each one consisting of 10 characters, combining numbers 1 to 9 and letters A-F, like:EC670531BE. The first of this four keys is the one beeing normally used. |
|---|
| 147 | | |
|---|
| 148 | | Furthermore, the MAC-addresses ( Media Access Control ) of the laptop's and PC's wich are allowed to access the router shoud be entered in the access list 'trusted wireless stations'. You may get the MAC addresses from the list of connected devices in the settings menu of the router or with the help of a network exploration tool like 'nmap' ( Network Mapper ), in the last case e.g. entering 'nmap -sP 192.168.0.1/22' |
|---|
| 149 | | |
|---|
| 150 | | CONFIGURING THE PC FOR WIRELESS COMMUNICATIONS |
|---|
| 151 | | |
|---|
| 152 | | immediately after the safety options of the router are activated, the PC will not more be able to see the access point: the PC also needs to be configured. |
|---|
| 153 | | |
|---|
| 154 | | Entering the command 'iwconfig eth1 key xxxxxxxxxx' enables the communication, but not permanently. For a permanent configuration, write a shell-script e.g.'connect' in /etc/rc.d/init.d: |
|---|
| | 158 | MONITORING PROGRAMS: |
|---|
| | 159 | There are many prrograms that allows the monitoring of wireless communi- |
|---|
| | 160 | cations. I installed two of them: 'kismet' and 'KWiFiManager'. |
|---|
| | 161 | 'kismet' is a small wireless network detector, sniffer and intrusion |
|---|
| | 162 | detection system. |
|---|
| | 163 | Download 'kismet-2005-08-R1.tar.gz' from http://www.kismetwireless.net/ |
|---|
| | 164 | download.shtml |
|---|
| | 165 | untar the file, enter make and make suidinstall. Run kismet the first time |
|---|
| | 166 | as root. Kismet runs on a shell console. |
|---|
| | 167 | |
|---|
| | 168 | 'kwifimanager' is a KDE frontend program used to configure and monitor |
|---|
| | 169 | wireless LAN cards. 'kwifimanager' is part of 'kdenetwork'. Download |
|---|
| | 170 | kdenetwork_3.4.1.tar.bz2 and follow the instructions given e.g. in |
|---|
| | 171 | BLFS - Version 6.1, chapter 29. Wireless tools should be installed before |
|---|
| | 172 | building this packet. |
|---|
| | 173 | |
|---|
| | 174 | CONFIGURING THE ROUTER - SAFETY CONSIDERATIONS: |
|---|
| | 175 | during the installation of the wireless system, the safety options of the |
|---|
| | 176 | router are deactivated. Now, it is time to activate them. Access the settings |
|---|
| | 177 | menu of the router through a browser, entering something like |
|---|
| | 178 | http://192.168.0.1. I activated WEP ( Wired Equivalent Privacy ) with 64 bit |
|---|
| | 179 | encryption. You may consider a 125 bit encryption |
|---|
| | 180 | Enter a password in the encryption field, and the router will generate four |
|---|
| | 181 | keys, each one consisting of 10 characters, combining numbers 1 to 9 and |
|---|
| | 182 | letters A-F, like:EC670531BE. The first of this four keys is the one beeing |
|---|
| | 183 | normally used. |
|---|
| | 184 | Furthermore, the MAC-addresses ( Media Access Control ) of the laptop's and |
|---|
| | 185 | PC's wich are allowed to access the router shoud be entered in the access |
|---|
| | 186 | list 'trusted wireless stations'. You may get the MAC addresses from the list |
|---|
| | 187 | of connected devices in the settings menu of the router or with the help of |
|---|
| | 188 | a network exploration tool like 'nmap' ( Network Mapper ), in the last case |
|---|
| | 189 | e.g. entering 'nmap -sP 192.168.0.1/22' |
|---|
| | 190 | However, even a 125 bit encryption does not give a real security today. |
|---|
| | 191 | According to a note contributed by Bryan Kadzban, real security can only be |
|---|
| | 192 | obtained with WPA or WPA2 encryption. You may want to consider this, if you |
|---|
| | 193 | have confidential data to transmit. |
|---|
| | 194 | |
|---|
| | 195 | CONFIGURING THE PC FOR WIRELESS COMMUNICATIONS: |
|---|
| | 196 | immediately after the safety options of the router are activated, the PC will |
|---|
| | 197 | not more be able to see the access point: the PC also needs to be configured. |
|---|
| | 198 | Entering the command 'iwconfig eth1 key xxxxxxxxxx' enables the communi- |
|---|
| | 199 | cation, but not permanently. For a permanent configuration, write a |
|---|
| | 200 | shell-script e.g.'connect' in /etc/rc.d/init.d: |
|---|
| 157 | | and make this script executable: chmod ug+x connect. Make a symbolic link in /etc/rc.d/rc3.d that points to this script: ln -s /etc/rc.d/init.d/connect S19connect. The link should start with something like S19, as the script should be run before the S20network script is executed. |
|---|
| 158 | | |
|---|
| 159 | | Furthermore, crreate a directory 'ifconfig.eth1' in '/etc/sysconfig/network-devices', cd to this directory and create a ipv4 file: |
|---|
| | 203 | and make this script executable: chmod ug+x connect. Make a symbolic link |
|---|
| | 204 | in /etc/rc.d/rc3.d that points to this script: |
|---|
| | 205 | ln -s /etc/rc.d/init.d/connect S19connect. The link should start with |
|---|
| | 206 | something like S19, as the script should be run before the S20network script |
|---|
| | 207 | is executed. For an unencrypted system, likely to be found on public places, |
|---|
| | 208 | the command in the script should not contain a key: |
|---|
| | 209 | /usr/local/sbin/iwconfig eth1 |
|---|
| | 210 | Create a directory 'ifconfig.eth1' in '/etc/sysconfig/network-devices', and |
|---|
| | 211 | cd to this directory. |
|---|
| | 212 | For operation withouth DHCP create a ipv4 file: |
|---|
| 167 | | And, last, change GATEWAY_IF in /etc/sysconfig/network to eth1. |
|---|
| 168 | | |
|---|
| 169 | | USING THE WIRELESS CONNECTION |
|---|
| 170 | | |
|---|
| 171 | | After rebooting, lsmod shows |
|---|
| 172 | | Module Size Used by |
|---|
| 173 | | ipw2200 176576 0 |
|---|
| 174 | | ieee80211 42664 1 ipw2200 |
|---|
| 175 | | ieee80211_crypt 4804 1 ieee80211 |
|---|
| 176 | | |
|---|
| 177 | | The command 'iwconfig eth1' in a console delivers |
|---|
| | 220 | and change GATEWAY_IF in /etc/sysconfig/network to eth1. |
|---|
| | 221 | For operation with DHCP create instead ipv4 a file dhcpcd: |
|---|
| | 222 | ONBOOT="no" |
|---|
| | 223 | SERVICE="dhcpcd" |
|---|
| | 224 | DHCP_START="eth1 -t 20" |
|---|
| | 225 | DHCP_STOP="-k " |
|---|
| | 226 | # Set PRINTIP="yes" to have the script print |
|---|
| | 227 | # the DHCP assigned IP address |
|---|
| | 228 | PRINTIP="yes" |
|---|
| | 229 | # Set PRINTALL="yes" to print the DHCP assigned values for |
|---|
| | 230 | # IP, SM, DG, and 1st NS. This requires PRINTIP="yes". |
|---|
| | 231 | PRINTALL="no" |
|---|
| | 232 | |
|---|
| | 233 | USING THE WIRELESS CONNECTION : |
|---|
| | 234 | After booting, lsmod shows |
|---|
| | 235 | Module Size Used by |
|---|
| | 236 | ipw2200 176576 0 |
|---|
| | 237 | ieee80211 42664 1 ipw2200 |
|---|
| | 238 | ieee80211_crypt 4804 1 ieee80211 |
|---|
| | 239 | |
|---|
| | 240 | The command 'iwconfig eth1' entered in a console delivers |
|---|
| 179 | | Mode:Managed Frequency:2.462 GHz Access Point: 00:0A:B5:CF:64:28 |
|---|
| 180 | | Bit Rate=48 Mb/s Tx-Power=20 dBm |
|---|
| 181 | | Retry limit:7 RTS thr:off Fragment thr:off |
|---|
| 182 | | Encryption key:57E4-DB3A-B1 Security mode:open |
|---|
| 183 | | Power Management:off |
|---|
| 184 | | Link Quality=95/100 Signal level=-29 dBm Noise level=-86 dBm |
|---|
| 185 | | Rx invalid nwid:0 Rx invalid crypt:0 Rx invalid frag:0 |
|---|
| 186 | | Tx excessive retries:0 Invalid misc:0 Missed beacon:0 |
|---|
| 187 | | The connection to the access pont is therefore activ. |
|---|
| 188 | | |
|---|
| 189 | | The internet browser should be configured with direct access to the internet. Opening the browser should immediately establish a connection. |
|---|
| 190 | | |
|---|
| 191 | | |
|---|
| 192 | | AKNOWLEDGEMENTS |
|---|
| 193 | | |
|---|
| 194 | | I have tryed to compile articles, informations, hints and answers to questions I put in the BLFS-mailing list to this hint. Many thanks to all those who contributed: Gabe Yoder, Andrew Benton, Alexander E. Patrakov, Jim Gifford, David Fix, Rainer Peter Feller, Chris Staub, Randy McMurchy, |
|---|
| 195 | | Jeremy Monnet, Stefan Krah. And in advance thanks to those who, hopfully, will give a feedback to this paper |
|---|
| 196 | | |
|---|
| 197 | | LINKS AND LITERATURE |
|---|
| 198 | | |
|---|
| | 242 | Mode:Managed Frequency:2.462 GHz Access Point: 00:0A:B5:CF:64:28 |
|---|
| | 243 | Bit Rate=48 Mb/s Tx-Power=20 dBm |
|---|
| | 244 | Retry limit:7 RTS thr:off Fragment thr:off |
|---|
| | 245 | Encryption key:57E4-DB3A-B1 Security mode:open |
|---|
| | 246 | Power Management:off |
|---|
| | 247 | Link Quality=95/100 Signal level=-29 dBm Noise level=-86 dBm |
|---|
| | 248 | Rx invalid nwid:0 Rx invalid crypt:0 Rx invalid frag:0 |
|---|
| | 249 | Tx excessive retries:0 Invalid misc:0 Missed beacon:0 |
|---|
| | 250 | As the ONBOOT parameter was set to 'yes', the connection to the access point |
|---|
| | 251 | is already activ. |
|---|
| | 252 | The internet browser should be configured with direct access to the internet. |
|---|
| | 253 | Opening the browser should establish immediately a connection. |
|---|
| | 254 | |
|---|
| | 255 | USING THE WIRELESS CONNECTION UNDER A DHCP SERVER: |
|---|
| | 256 | I experienced some problems starting the dhcpcd daemon during the boot |
|---|
| | 257 | process. So I decided to set the ONBOOT parameter in the file |
|---|
| | 258 | /etc/sysconfig/network-devices/ifconfig.eth1/dhcpcd to 'no', as indicated |
|---|
| | 259 | above, and to start as 'su' a little script 'eth1_connect' : |
|---|
| | 260 | #!/bin/bash |
|---|
| | 261 | /sbin/dhcpcd eth1 |
|---|
| | 262 | # end |
|---|
| | 263 | After starting the daemon dhcpcd, the connection to the access point is |
|---|
| | 264 | activ. |
|---|
| | 265 | |
|---|
| | 266 | AKNOWLEDGEMENTS: |
|---|
| | 267 | I have tryed to compile articles, informations, hints and answers to questions |
|---|
| | 268 | I put in the BLFS-mailing list to this hint. Many thanks to all those who |
|---|
| | 269 | contributed: Gabe Yoder, Andrew Benton, Alexander E. Patrakov, Jim Gifford, |
|---|
| | 270 | David Fix, Rainer Peter Feller, Chris Staub, Randy McMurchy, |
|---|
| | 271 | Jeremy Monnet, Stefan Krah, Bryan Kadzban. |
|---|
| | 272 | |
|---|
| | 273 | LINKS AND LITERATURE: |
|---|