gentoo 无线网络配置
来源:互联网 发布:光猫itv端口改成网口 编辑:程序博客网 时间:2024/05/18 06:20
源地址:http://www.jianshu.com/p/683fcf66c222
安装
安装net-wireless/wpa_supplicant
包
emerge --ask wpa_supplicant
配置
Set for Gentoo net.* scrips,tell the network script to use wpa_supplicant.File/etc/conf.d/net
modules_wlan0="wpa_supplicant"# 因为wpa_supplicant还不能很好的自动侦测驱动,所以需要我们为其指定正在使用的驱动。wpa_supplicant_wlan0="-Dnl80211"config_wlan0="dhcp"
/etc/wpa_supplicant/wpa_supplicant.conf
# Allow users in the 'wheel' group to control wpa_supplicantctrl_interface=DIR=/var/run/wpa_supplicant GROUP=wheel# Make this file writable for wpa_guiupdate_config=1#自动扫描AP(也就是可以上的无线网络热点)ap_scan=1 # 简单的情形:WPA-PSk密码验证方式,PSK是ASCII密码短语,所有合法的加密方式都允许连接network={ ssid="simple" psk="very secret passphrase" # 优先级越高,就能越早匹配到。 priority=5}
也可以使用wpa_passphrase
命令添加无线热点
wpa_passphrase [ ssid ] [ passphrase ] >> /etc/wpa_supplicant/wpa_supplicant.conf
上面这条命令可以自动生成一段配置,我们将它输出添加到 wpa_supplicant 的默认配置文件里面。
启动网络
初始化wpa_supplicant环境
wpa_supplicant -Dwext -iwlan0 -c /etc/wpa_supplicant/wpa_supplicant.conf
参数:
-B - Fork into background.-c filename - Path to configuration file.-i interface - Interface to listen on.-D driver - Optionally specify the driver to be used. For a list of supported drivers see the output of wpa_supplicant -h. nl80211 is the current standard, but not all wireless chip's modules support it. wext is currently deprecated, but still widely supported.
设置、获取IP
自动获取
dhcpcd wlan0
手动设置
ifconfig wlan0 192.168.1.11 broadcast 192.168.1.255 netmask 255.255.255.0
告知Gentoo RC系统网卡名字
cd /etc/init.dln -s net.lo net.wlan0#start and stop it using the following commands:/etc/init.d/net.eth0 start/etc/init.d/net.eth0 stop#开机启动rc-update add wlan0 default
wpa_cli
wpa_cli> scan> scan_results> add_network0> set_network 0 ssid "MYSSID"> set_network 0 psk "passphrase"> enable_network 0> save_configOKdhcpcd interface
0 0
- gentoo linux 无线网络配置
- Gentoo 无线网络配置 wpa_supplicant
- gentoo 无线网络配置
- Gentoo 无线网络配置 wpa_supplicant
- gentoo下无线网络配置(ndiswrapper, wpa_supplicant)
- gentoo配置
- gentoo破解WEP无线网络步骤整理
- 无线网络配置
- 配置无线网络
- gentoo 字体配置
- java3d 配置(linux gentoo )
- Gentoo kernel配置
- gentoo 配置内核过程
- gentoo ATI 显卡 配置
- gentoo 声卡 配置
- Gentoo如何配置网络
- Gentoo网络配置
- 【gentoo】kvm 配置
- SoC Structure
- JAVA用引用实现队列
- ASP + FLASH + ACCESS教程
- POJ 2785 4 Values whose Sum is 0
- View Composer 代理初始化失败
- gentoo 无线网络配置
- (最大化最小值),poj3258,River Hopscotch
- CListCtrl 使用大全
- 彻底解决 LINK : fatal error LNK1123: 转换到 COFF 期间失败: 文件无效或损坏
- spark1.2.0版本搭建伪分布式环境
- 【费用流】codevs1227 方格取数 2
- 谈谈对CAP定理的理解
- JavaScript 运行机制详解:再谈Event Loop
- Activity位移切换