OpenWrt settings
Under OpenWrt The main is to set the/etc/config/network,/etc/config/wireless these two files, the other is the default LAN and WAN mode.
/etc/config/network, turn off the VLAN (enable_valn=0), set the LAN interface to static and remove the bridge (the default is ' option Type bridge ', WiFi is usually automatically bridged to the LAN interface), The WAN removes the ' option ifname ' option (the wireless WiFi interface automatically joins the WAN as the ifname).
config switch eth1 option reset 0 option enable_vlan 0config interface loopback option ifname lo option proto static option ipaddr 127.0.0.1 option netmask 255.0.0.0config interface lan option ifname eth1 option proto static option ipaddr 192.168.2.1 option netmask 255.255.255.0config interface wan option proto dhcp
Once configured, the interfaces on all switches become internal LANs, while wireless WiFi is used as a WAN connection extranet. The LAN and WAN are NAT-mode address translation (specifically in the firewall WAN settings masq=1, the default is set), firewall Nat option is called Masquerade (camouflage), is the WAN interface packet Source address of the network to disguise their own, Very image:).
Make sure the firewall boot up:
/etc/init.d/firewall Enable
To see if Firewall is started:
/etc/init.d/firewall enabled && Echo on
/etc/config/wireless, set WiFi parameters:
config wifi-device radio0 option type mac80211 option channel 0 option hwmode 11g option txpower 0config wifi-iface option device radio0 option network wan option mode sta option ssid yourapssid option encryption psk2 option key yourkey
The main is to set mode for Sta,network Select to automatically join the WAN, fill in the SSID to connect to the WiFi AP, encryption mode encryption and key key, all completed after restarting the network, WiFi connection after successful Wi-Fi LED lights.
/etc/init.d/network restart
OpenWrt Wi-Fi client mode