你好,游客 登录 注册 搜索
背景:
阅读新闻

linux 无线网卡配置和使用

[日期:2006-10-08] 来源:  作者: [字体:大 中 小]

  根据需要进行更改,下面是我的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 ; and others) #程序版本
  orinoco_cs.c 0.13e (David Gibson ; and others)
  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 如何配置无线网卡的简单步骤。

linux
相关资讯      
本文评论   查看全部评论 (0)
表情: 表情 姓名: 字数

       

评论声明
  • 尊重网上道德,遵守中华人民共和国的各项有关法律法规
  • 承担一切因您的行为而直接或间接导致的民事或刑事法律责任
  • 本站管理人员有权保留或删除其管辖留言中的任意内容
  • 本站有权在网站内转载或引用您的评论
  • 参与本评论即表明您已经阅读并接受上述条款