This translation is older than the original page and might be outdated. See what has changed.

FIXME This page is not fully translated, yet. Please help completing the translation.
(remove this paragraph once the translation is finished)

AP 桥接模式

Bridged AP is to extend your existing wired host router to have wireless capabilities. Clients connecting to OpenWRT will get an IP address from the wired host router.

OpenWrt bridges the LAN network with the WLAN of the device in Access Point mode. The advantage of bridging is that broadcast traffic from Wireless to LAN and vice versa works without further changes.

This document outlines the steps necessary to implement such a setup.

Note: This recipe results in a bridged LAN that will work fine for home and small networks. It is similar to the “Dumb AP” recipe at dumbap. These pages should probably be merged.

The changes below assume an OpenWrt default configuration, the relevant files are:

Edit /etc/config/network and change the lan interface section to set the IP your access point should have in the future:

config interface lan
        option ifname eth0
        option type bridge
        option proto static
        option ipaddr 192.168.1.2
        option netmask 255.255.255.0
        option gateway 192.168.1.1
        option dns 192.168.1.1

This IP address must be an unused one within the network subnet of the main router. You could also change proto to dhcp and let the main router decide the access point's address, but of course from then on the access point needs a DHCP server and you will lose the ability to directly plug into your access point for maintenance.

In /etc/config/wireless, locate the existing wifi-iface section and change its network option to point to the newly created interface section.

config wifi-iface
	option device wifi0
	option network lan
	option mode ap
	option ssid OpenWrt
	option encryption none

Naturally, you should consider securing your wifi network.

/etc/init.d/dnsmasq disable

Ensure the host router is connected with a lan port of the openwrt, not the wan port!

Enable the new wireless network.

root@OpenWrt:~# ifup wifi
root@OpenWrt:~# wifi
This website uses cookies. By using the website, you agree with storing cookies on your computer. Also you acknowledge that you have read and understand our Privacy Policy. If you do not agree leave the website.More information about cookies
  • Last modified: 2022/06/02 07:52
  • by yodo