Gentoo, wireless network configuration
In the previous article "Gentoo, wireless network card installation", we have understood the installation process of wireless network cards. Here, I will record my battle with wireless networks!
Reference: http://www.gentoo.org/doc/zh_cn/handbook/handbook-x86.xml? Part = 4 & chap = 4
Preparation: very simple, but very important.
The wpa_supplicant tool is used to establish and maintain wireless connections. Therefore, it must run continuously without stopping. Once it stops, the wireless connection will be disconnected.
Command for installing wpa_supplicant
Emerge wpa_supplicant
Step 1: first create a wpa_supplicant.conf file. I created it here,
Configuration File Content:
Update_config = 0
Ctrl_interface =/ VaR / Run / Wpa_supplicant
Ctrl_interface_group = Wheel
#Automatically scans the AP (that is, the wireless network hotspot that can be accessed)
Ap_scan=1
# Set the first type of network. You can set more than one network and use priority to define the priority.
# This is the password-free network connection setting with the SSID hiccds.
Network = {
SSID = " Hiccds "
PSK = " Zhangzhuhu "
Priority = 5
}
# This is the network connection setting with the SSID hiccds password zhangyufeng. In simple cases: WPA-PSK password verification method. PSK is an ASCII password phrase, and all valid encryption methods allow connection.
Network = {
SSID = " Hiccds "
Scan_ssid = 1
PSK = " Zhangzhuhu "
Priority = 2
}
Other connections everyone can go here to see: http://www.gentoo.org/doc/zh_cn/handbook/handbook-x86.xml? Part = 4 & chap = 4
You can also use the command man wpa_supplicant.conf in the system (the Linux manual looks very comfortable)
Step 2: Start the network
Wpa_supplicant - Dwext - Iwlan0 - C / Etc / Wpa_supplicant / Wpa_supplicant . Conf &
Step 3: Set and obtain IP addresses
If it is automatically obtained: dhcpcd wlan0
If you set it manually: ifconfig wlan0 192.168.1.11 broadcast 192.168.1.255 netmask 255.255.255.0
OK.
..........
In Gentoo, there is a more handsome configuration method: configure the/etc/CONF. d/NET file, which can be based on wpa_supplicant or wireless_tools.