hostapd工具的移植:修改makefile: 在第四行增加cc=arm-hisiv200-linux-gcc
生成hostapd,複製到交叉編譯平台的/usr/bin
iptables-1.4.1.1工具的移植:linux下wifi工具網路**iptables交叉編譯,及其支援iptables使用的核心配置
vi /etc/hostapd.conf (配置hostapd檔案)
inte***ce=wlan0
ssid=my_wifi111
hw_mode=g
channel=6
dtim_period=1
rts_threshold=2347
fragm_threshold=2346
macaddr_acl=0
auth_algs=3
#ieee80211n=0
wpa=2
wpa_passphrase=12345678
wpa_key_mgmt=wpa-psk
wpa_pairwise=tkip
rsn_pairwise=ccmp
4、hostapd /etc/hostapd.conf -b & (開啟ap,但是不能上網)
5、ifconfig wlan0 192.168.0.1 netmask 255.255.255.0 (配置wlan0的ip)
7、vi /etc/udhcpd.conf
start 192.168.0.20
end 192.168.0.254
inte***ce wlan0
opt dns 8.8.8.8
option subnet 255.255.255.0
opt router 192.168.0.1
9、mkdir /var/lib/misc –p
touch /var/lib/misc/udhcpd.leases (這兩個第一次建立以後就不用了)
10、udhcpd -fs /etc/udhcpd.conf & (開啟dhcp服務)
11、mkdir /home/xy/onvif/iptables-1.4.1.1/install//libexec/xtables/ -p
12、cp libipt_masquerade.so /home/xy/onvif/iptables-1.4.1.1/install//libexec/xtables/ (iptables需要依賴這個庫, 這個路徑是你安裝iptable時生成的路徑)
11、echo 1 > /proc/sys/net/ipv4/ip_forward (開啟ip**功能)
12、iptables -t nat -a postrouting -o eth0 -j masquerade
linux下多網絡卡路由設定
在linux多網絡卡情況下,如不能正確設定路由將導致部分網路不通。一 檢視路由 使用命令 route 二 預設路由設定 1 刪除預設路由 route del default 2 增加預設路由 route add default gw ip 如 192.168.1.1 三 網段路由設定 1 增加網段路...
LINUX設定網絡卡
一 臨時啟用網絡卡並配置ip ifconfgi eth1 192.168.8.201 netmask 255.255.255.0 up 二 通過直接配置 etc sysconfig network scripts ifcfg eth1 一般為ifcfg eth0 vi etc sysconfig n...
linux 設定網絡卡
配置網絡卡 修改 etc sysconfig network scripts ifcfg eth0檔案,如果有多張網絡卡,則修改相應的網絡卡 vim etc sysconfig network scripts ifcfg eth0 device eth0 網絡卡對應的裝置別名 bootproto s...