系统硬件环境:
笔记本机:sony pcg-grx560
无线网卡:Lucent/Agere firmware version 8.72 (在这里我不知道我的网卡是具体什么型号的。因为这个卡是内部测试卡,没有任何商标标识。但是芯片是Lucent的)
Access Point :(1)D-Link DWL-1000AP Firmware Version: 3.2.31 ESSID = default
Access Point :(2)Avaya Wireless Model:RG-1 ESSID 22e6da
软件:
linux 版本:Red Hat Linux Advanced Server 2.1
kernel = 2.4.20
在编译核心的时候可以许选择过去的无线网卡的驱动程序。因为要升级。
但是需要支持pcmcia。
首先要说的事情是本身 AS 2.1 是能够支持我试验的这个网卡。但是我发现它的驱动程序是在是
很老,而且在2.1里面没有wireless_tools :-( (在RedHat 9中是有wireless_tools但是我没有
在RedHat 9中试验过)。于是就重新下载和安装这些软件。
下载和释放所需要的软件:
wget http://ozlabs.org/people/dgibson/dldwd/orinoco-0.13e.tar.gz
wget http://pcmcia-cs.sourceforge.net/ftp/contrib/wireless_tools.26.tar.gz
编译无线网卡的驱动:
tar zxvf ./orinoco-0.13e.tar.gz
cd orinoco-0.13e
make
make install
编译无线网卡工具:
tar zxvf ./wireless_tools.26.tar.gz
cd wireless_tools.26
make
make install
建立一个网卡的启动界面:
cp /etc/sysconfig/network-scripts/ifcfg-eth0 /etc/sysconfig/network-scripts/ifcfg-eth1
vi /etc/sysconfig/network-scripts/ifcfg-eth1
根据需要进行更改,下面是我的ifcfg-eth1的内容。大家可以根据实际情况进行定义:
DEVICE=eth1
BOOTPROTO=static
BROADCAST=192.168.50.255
IPADDR=192.168.50.234
NETMASK=255.255.255.0
NETWORK=192.168.50.0
ONBOOT=yes
GATEWAY=192.168.50.234
TYPE=Ethernet
USERCTL=no
PEERDNS=no
存盘退出
配置无线网卡的参数:
cp /etc/pcmcia/wireless.opts /etc/pcmcia/wireless.opts.back
vi /etc/pcmcia/wireless.opts
修改下面内容:
INFO="Wavelan IEEE example (Lucent default settings)"
ESSID="default" #更改成为你Access Point 的SSID
MODE="Ad-Hoc"
# RATE="auto"
KEY="off" #是否使用wep 进行加密。
存盘退出。
重新启动你的计算机。
系统启动后,可以输入dmesg检测核心是否加载上了无线网卡的驱动程序。例如下面:
orinoco.c 0.13e (David Gibson orinoco_cs.c 0.13e (David Gibson eth1: Station identity 001f:0001:0008:0048
eth1: Looks like a Lucent/Agere firmware version 8.72 #Firmware
eth1: Ad-hoc demo mode supported
eth1: IEEE standard IBSS ad-hoc mode supported
eth1: WEP supported, 104-bit key
eth1: MAC address 00:02:2D:1F:56:41 #网卡MAC地址
eth1: Station name "HERMES I"
eth1: ready
eth1: index 0x01: Vcc 3.3, irq 10, io 0x0100-0x013f
eth1: New link status: Connected (0001)
root登陆后,输入下面的命令检查eth1 是否启动成功:
[root@wanghao root]# ifconfig eth1
eth1 Link encap:Ethernet HWaddr 00:02:2D:1F:56:41
inet addr:10.0.1.4 Bcast:10.255.255.255 Mask:255.0.0.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:2165 errors:0 dropped:0 overruns:0 frame:0
TX packets:239 errors:118 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:100
RX bytes:232532 (227.0 Kb) TX bytes:33128 (32.3 Kb)
Interrupt:10 Base address:0x100
然后可以试验一下是否能够ping到Access Point 和你其他的计算机。
以上这些东西就是一般用来配置无线网卡的步骤。
但是在有一些时候你需要拿你的笔记本去其他的地方(连接不同的Access Point )这样
就需要更改不同的ESSID下面我简单介绍一些如何更改不同的ESSID。
首先你可以检查一下你现在的ESSID,使用下面的命令:
[root@wanghao root]# iwconfig eth1
Warning: Driver for device eth1 has been compiled with version 14
of Wireless Extension, while this program is using version 11.
Some things may be broken...
eth1 IEEE 802.11-DS ESSID:"default" Nickname:"wanghao"
Mode:Ad-Hoc Frequency:2.437GHz Cell: 00:40:05:DF:88:D7
Bit Rate:11Mb/s Tx-Power=15 dBm Sensitivity:1/3
Retry limit:4 RTS thr:off Fragment thr:off
Encryption key:off
Power Management:off
Link Quality:0 Signal level:0 Noise level:0
Rx invalid nwid:0 invalid crypt:0 invalid misc:2
其中ESSID:"default" 就是你现在的ESSID。
检查使用的channel:
[root@wanghao root]# iwlist eth1 channel
Warning: Driver for device eth1 has been compiled with version 14
of Wireless Extension, while this program is using version 11.
Some things may be broken...
eth1 14 channels in total; available frequencies :
Channel 01 : 2.412 GHz
Channel 02 : 2.417 GHz
Channel 03 : 2.422 GHz
Channel 04 : 2.427 GHz
Channel 05 : 2.432 GHz
Channel 06 : 2.437 GHz
Channel 07 : 2.442 GHz
Channel 08 : 2.447 GHz
Channel 09 : 2.452 GHz
Channel 10 : 2.457 GHz
Channel 11 : 2.462 GHz
Current Frequency:2.437GHz (channel 06)
下面对它进行更改:
[root@wanghao root]# iwconfig eth1 essid 22e6da
其中22e6da 是我的另外一个Access Point的ssid
检查更改结果:
[root@wanghao root]# iwconfig eth1
Warning: Driver for device eth1 has been compiled with version 14
of Wireless Extension, while this program is using version 11.
Some things may be broken...
eth1 IEEE 802.11-DS ESSID:"22e6da" Nickname:"wanghao"
Mode:Ad-Hoc Frequency:2.412GHz Cell: 00:02:2D:22:E6:DA
Bit Rate:11Mb/s Tx-Power=15 dBm Sensitivity:1/3
Retry limit:4 RTS thr:off Fragment thr:2347 B
Encryption key:off
Power Management:off
Link Quality:0 Signal level:0 Noise level:0
Rx invalid nwid:0 invalid crypt:0 invalid misc:3
检查更改后使用的channel:
[root@wanghao root]# iwlist eth1 channel
Warning: Driver for device eth1 has been compiled with version 14
of Wireless Extension, while this program is using version 11.
Some things may be broken...
eth1 14 channels in total; available frequencies :
Channel 01 : 2.412 GHz
Channel 02 : 2.417 GHz
Channel 03 : 2.422 GHz
Channel 04 : 2.427 GHz
Channel 05 : 2.432 GHz
Channel 06 : 2.437 GHz
Channel 07 : 2.442 GHz
Channel 08 : 2.447 GHz
Channel 09 : 2.452 GHz
Channel 10 : 2.457 GHz
Channel 11 : 2.462 GHz
Current Frequency:2.412GHz (channel 01)
然后在ping一下你的其他计算机的地址。如果正常,试验完成。
这里只是向大家简单的介绍了一下linux 如何配置无线网卡的简单步骤。