您的位置首页百科知识

centos6.4如何设置无线网

centos6.4如何设置无线网

CentOS-6.4无线上网命令行配置介绍:待连接的WIFI的ssid为“thm”,密码为12345678,认证方式为WPA2-PSK1. 检查无线网卡厅野驱动是否安装1 xxx#iwconfig若打印wlan0(或其他名字)的无线网卡信息,则表明无线网卡驱动已经安装,否则要先安装无线网卡驱动方能继续。2. 配置/etc/sysconfig/network-scripts/ifcfg-wlan0我的配置文件内容为:1 DEVICE=wlan02 HWADDR=9C:4E:36:9A:64:103 TYPE=Wireless4 UUID=f017bd9c-eebf-46fc-823c-7f76cc8d5abf5 ONBOOT=no6 NM_CONTROLLED=yes7 BOOTPROTO=dhcp8 ESSID="thm"3. 安装工具wpa_supplicant1 xxx#yum install wpa_supplicant4. 配置/etc/wpa_supplicant/wpa_supplicant.conf,写入相关ssid和对应的密码1 xxx#wpa_passphrase thm 12345678 >> /etc/wpa_supplicant/wpa_supplicant.conf我的扮源喊配置文件内容为:1 ctrl_interface=/var/run/wpa_supplicant2 ctrl_interface_group=wheel3 4 network={5 ssid="thm"裂斗6 #psk="12345678"7 psk=eabb3e1572789c41a1600051b1235e03c0787c88fc527f6597cd29cb5a7078225. 后台运行wpa_supplicant进程1 xxx#wpa_supplicant -B -Dwext -iwlan0 -c /etc/wpa_supplicant/wpa_supplicant.conf6. 搜索无线网络1 xxx#iwlist wlan0 scan | grep ESSID7. 连接无线网络1 xxx#iwconfig wlan0 essid "thm"8. dhcp方式获取ip1 xxx#dhclient wlan09. 测试网络是否联通1 xxx#ping www.baidu.com