RTL8192cu只做SoftAP使用操作步骤
- 需要使用下面指令关闭图形界面
/etc/init.d/NetworkManager stop
- 虚拟机中需要安装了brctl指令
- 按照以下步骤建立桥接
ifconfig eth2 down
brctl addbr br0
brctl addif br0 eth2
brctl addif br0 wlan14
ifconfig eth2 192.168.16.1 netmask 255.255.255.0
ifconfig wlan14 192.168.16.1 netmask 255.255.255.0
ifconfig eth2 up
ifconfig wlan14 up
ifconfig br0 192.168.16.102 netmask 255.255.255.0
ifconfig br0 up
route add default gw 192.168.16.1
./hostapd rtl_hostapd_2G.conf -B
- rtl_hostapd_2G.conf配置文件如下所示
##### hostapd configuration file ##############################################
interface=wlan14
ctrl_interface=/var/run/hostapd
ssid=wgl878706
channel=6
wpa=3
wpa_passphrase=87654321
auth_algs=1
bridge=br0
##### Wi-Fi Protected Setup (WPS) #############################################
eap_server=1
# WPS state
# 0 = WPS disabled (default)
# 1 = WPS enabled, not configured
# 2 = WPS enabled, configured
wps_state=2
uuid=12345678-9abc-def0-1234-56789abcdef0
# Device Name
# User-friendly description of device; up to 32 octets encoded in UTF-8
device_name=RTL8192CU
# Manufacturer
# The manufacturer of the device (up to 64 ASCII characters)
manufacturer=Realtek
# Model Name
# Model of the device (up to 32 ASCII characters)
model_name=RTW_SOFTAP
# Model Number
# Additional device description (up to 32 ASCII characters)
model_number=WLAN_CU
# Serial Number
# Serial number of the device (up to 32 characters)
serial_number=12345
# Primary Device Type
# Used format: <categ>-<OUI>-<subcateg>
# categ = Category as an integer value
# OUI = OUI and type octet as a 4-octet hex-encoded value; 0050F204 for
# default WPS OUI
# subcateg = OUI-specific Sub Category as an integer value
# Examples:
# 1-0050F204-1 (Computer / PC)
# 1-0050F204-2 (Computer / Server)
# 5-0050F204-1 (Storage / NAS)
# 6-0050F204-1 (Network Infrastructure / AP)
device_type=6-0050F204-1
# OS Version
# 4-octet operating system version number (hex string)
os_version=01020300
# Config Methods
# List of the supported configuration methods
config_methods=label display push_button keypad
##### default configuration #######################################
driver=rtl871xdrv
beacon_int=100
hw_mode=g
ieee80211n=1
wme_enabled=1
ht_capab=[SHORT-GI-20][SHORT-GI-40][HT40+]
wpa_key_mgmt=WPA-PSK
wpa_pairwise=TKIP
rsn_pairwise=CCMP
max_num_sta=8
wpa_group_rekey=86400