OpenWrt Wi-Fi client mode

Source: Internet
Author: User

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.