This page is not fully translated, yet. Please help completing the translation.
(remove this paragraph once the translation is finished)
请注意 “哑接入点”这个说法源自树莓派的世界。由一个普通网络工程师看来,确切的词汇应该是“无线接入点”。如linksys.com所述 - “接入点用以太网线[或别的类似介质]连接至有线路由、交换机或集线器,并为指定区域提供无线信号。而具有无线接口的路由器应当称为“无线路由”。
摘要: 本文记录了如何为一个已有“主路由”的网络创建扩展哑接入点(哑AP) 。之所以称它为“哑接入点”,是因为它既不提供路由,也不提供DHCP或DNS服务,这些功能是由其接入的主路由提供。
一般情况下,这样做是为已有网络扩展无线覆盖范围:覆盖另一个楼层或消除无线死点。也可以用无线AP达成同样的目的。您可以把这种拓扑结构想成“菊花链”的实现。
这种部署的结果是成为一个无内部子网的桥接LAN。接入任一路由的设备之间都是互相可见的,并经由主路由接入因特网。这种设置在小型办公场所或家庭网络中可以很好的工作。但大一点的网络中,最好使用更加细致的部署方式。
本说明已更新至2021年10月15日,与OpenWrt 21.01.0版本的界面保持一致。 由于v21版本的界面与前序版本有较大差异,我们会尽量涵盖这些差异点,但无法保证绝对一致。
本设置需要两个路由、一部带有网口的电脑和一条网线。我们将路由分为主路由和无线AP路由并均以默认配置开始。主路由应当已经配置完毕并连接至因特网。
The changes below assume an OpenWrt default configuration, the relevant files are:
Edit /etc/config/network and change the interface section:
On switchless devices, simply bridge all ethernet interfaces together, remove the existing WAN interface - if any.
config interface lan
option type 'bridge'
option ifname 'eth0 eth1' # Bridges lan and wan
option proto 'dhcp' # Change as appropriate
On devices with a separate WAN interface, bridge the LAN VLAN together with the WAN interface, remove the existing WAN interface - if any.
config interface lan
option type 'bridge'
option ifname 'eth0.1 eth1' # Bridges vlan 1 and wan
option proto 'dhcp' # Change as appropriate
Switch configuration on WR1043ND (barrier breaker):
config switch_vlan
option device 'switch0'
option vlan '1'
option ports '0 1 2 3 4 5t' # 1. add 0 in here
#config switch_vlan # 2. comment out or delete the whole vlan 2 section
# option device 'switch0'
# option vlan '2'
# option ports '0 5t'
On devices where WAN and LAN are separated by switch config, reconfigure the LAN VLAN to cover all ports, remove the existing WAN interface and its related VLAN - if any.
config switch_vlan eth0_1
option vlan '1'
option ports '0 1 2 3 4 5t' # Might vary depending on the device
config interface lan
option type 'bridge'
option ifname 'eth0.1'
option proto 'dhcp' # Change as appropriate
Edit /etc/config/wireless, and don't worry about most of it, things that might need changes are commented.
config 'wifi-device' 'radio0'
option type 'mac80211'
option channel '11'
option macaddr '12:e4:4a:b3:83:1a'
option htmode 'HT20'
list ht_capab 'SHORT-GI-20'
list ht_capab 'SHORT-GI-40'
list ht_capab 'TX-STBC'
list ht_capab 'RX-STBC1'
list ht_capab 'DSSS_CCK-40'
config 'wifi-iface'
option device 'radio0'
option network 'lan' # Set to the name of the bridged interface
option mode 'ap'
option ssid 'ap_myaccesspoint'
option encryption 'psk2' # Change as appropriate
option key 'ap_password'
If you still need dnsmasq running for something else (e.g. TFTP server) you can do:
uci set dhcp.lan.ignore=1 uci commit dhcp /etc/init.d/dnsmasq restart
If not disable dnsmasq service:
/etc/init.d/dnsmasq disable /etc/init.d/dnsmasq stop
Disable odhcpd with uci:
uci set dhcp.lan.dhcpv6=disabled uci set dhcp.lan.ra=disabled uci commit
Or disable service:
/etc/init.d/odhcpd disable /etc/init.d/odhcpd stop
/etc/init.d/firewall disable /etc/init.d/firewall stop
Reloading the network config should be enough, it should automatically restart if necessary.
/etc/init.d/network reload
If you would like your AP to receive IPv6 as a host only and not for routing you have to tell the DHCPv6 client not to request prefix delegation.
If you do not do this the AP will reject basic IPv6 addresses.
If you want to still be able to use IPv6 on the router itself change the wan6 to lan6 and @wan to @lan.
config interface 'lan6' option proto 'dhcpv6' option ifname '@lan' option reqprefix 'no'
Note that although the start-up of daemons such as firewall, dnsmasq, and optionally odhcpd have been set to disabled, when a new image is flashed to the device, they will be re-enabled. To work-around this, simply add the following to /etc/rc.local on the device:
# these services do not run on dumb APs
for i in firewall dnsmasq odhcpd; do
if /etc/init.d/"$i" enabled; then
/etc/init.d/"$i" disable
/etc/init.d/"$i" stop
fi
done
DLNA and UPnP clients and printer or SMB discovery protocols on LANs tend to work by using multicast packets. For example PS3, xbox, TVs and stereos use DLNA to detect, communicate with and stream audio/video over the network. By default on bridged interfaces on OpenWrt (at least tested in 18.x series) multicast snooping is turned off. This means all network interfaces connected to a bridge (such as a WiFi SSID and ethernet VLAN) will receive multicast packets as if they were broadcast packets.
On WiFi the slowest modulation available is used for multicast packets (so that everyone can hear them). If you have “enabled legacy 802.11b rates” on your WiFi (Advanced settings checkbox in LuCI under the WiFi settings, or option legacy_rates '1' in /etc/config/wireless file) then 1Mbps is the rate that will be used. This can completely use up the WiFi airtime with even fairly light multicast streaming.
There are two possible fixes for this, one is to enable multicast snooping: option igmp_snooping '1' under the appropriate /etc/config/network settings for the bridge. This will cause the bridge to forward only on bridge ports that have requested to receive the particular multicast group. On the other hand, if someone on WiFi requests the group, it will still flood the multicast there, and some people have reported problems with certain devices such as android phones and with ipv6 when igmp_snooping is enabled (requires further debugging to identify if there is really a problem or not). By disabling legacy 802.11b rates (option legacy_rates '0') you can at least force the use of 6Mbps or more on the WiFi multicast packets, and this opens up more airtime for other uses.