以下是网络拓扑的概述:
Fritz!Box 7340和MikroTik hAP ac lite路由器目前
都充当DHCP服务器,有效地将网络分成两个 LAN。MikroTik路由器也被配置为LAN的网桥。192.168.88.xxx
为了避免双重NAT的麻烦,我想将MikroTik hAP ac lite重新配置为第 2 层交换机。这样做比双重 NAT 更有优势 。
所有 DHCP 和 NAT 都应该由Fritz!Box 专门处理。 此外,MikroTik hAP ac lite应该在同一本地 IP 地址范围内有一个静态 IP 地址,以便仍然可以通过其 Web 界面对其进行管理。
Fritz!Box配置不是问题。然而,我是一个管理MikroTik 的 RouterOS的新手,我在网上没有找到关于这个特定问题的说明。因此,我的问题:
将MikroTik hAP ac lite配置为第 2 层交换机、移除其 DHCP 服务器同时保留静态 IP 地址以进行管理的(详细)步骤是什么?
顺便说一句,我在 GNU/Linux 上,所以使用Winbox对我来说不是一个选项。
MikroTik 支持页面
在 MikroTik 支持页面上,我看到了一篇关于如何配置 DHCP 中继的文章。但是,我不清楚 DHCP 中继是否与第 2 层交换机相同或只是其中的一部分?
与 MikroTik 论坛的交叉链接
http://forum.mikrotik.com/viewtopic.php?f=2&t=117434
出口
# mar/05/2017 00:49:46 by RouterOS 6.34.2
# software id = XXXX-XXXX
#
/interface bridge
add admin-mac=6C:3B:::: auto-mac=no comment=defconf name=bridge
/interface ethernet
set [ find default-name=ether2 ] name=ether2-master
set [ find default-name=ether3 ] master-port=ether2-master
set [ find default-name=ether4 ] master-port=ether2-master
set [ find default-name=ether5 ] master-port=ether2-master
/ip neighbor discovery
set ether1 discover=no
set bridge comment=defconf
/interface wireless security-profiles
add authentication-types=wpa2-psk eap-methods="" management-protection=allowed \
mode=dynamic-keys name=WLAN1 supplicant-identity="" wpa2-pre-shared-key=\
*****************
add authentication-types=wpa2-psk eap-methods="" management-protection=allowed \
mode=dynamic-keys name=WLAN2 supplicant-identity="" wpa2-pre-shared-key=\
*****************
/interface wireless
set [ find default-name=wlan1 ] band=2ghz-b/g/n channel-width=20/40mhz-Ce \
country=belgium disabled=no distance=indoors frequency=auto mode=ap-bridge \
security-profile=WLAN1 ssid=WLAN1 wireless-protocol=802.11
set [ find default-name=wlan2 ] band=5ghz-a/n channel-width=20/40mhz-Ce \
country=belgium disabled=no distance=indoors frequency=auto mode=\
station-pseudobridge security-profile=WLAN2 ssid=WLAN2 \
wireless-protocol=802.11
/ip pool
add name=default-dhcp ranges=192.168.88.10-192.168.88.254
/ip dhcp-server
add address-pool=default-dhcp disabled=no interface=bridge name=defconf
/interface bridge port
add bridge=bridge comment=defconf interface=ether2-master
add bridge=bridge comment=defconf interface=wlan1
add bridge=bridge comment=defconf interface=wlan2
/ip address
add address=192.168.88.1/24 comment=defconf interface=bridge network=\
192.168.88.0
/ip dhcp-client
add comment=defconf dhcp-options=hostname,clientid interface=ether1
add default-route-distance=0 dhcp-options=hostname,clientid disabled=no \
interface=wlan2
/ip dhcp-server network
add address=192.168.88.0/24 comment=defconf gateway=192.168.88.1
/ip dns
set allow-remote-requests=yes
/ip dns static
add address=192.168.88.1 name=router
/ip firewall filter
add chain=input comment="defconf: accept ICMP" protocol=icmp
add chain=input comment="defconf: accept establieshed,related" \
connection-state=established,related
add action=drop chain=input comment="defconf: drop all from WAN" in-interface=\
ether1
add action=fasttrack-connection chain=forward comment="defconf: fasttrack" \
connection-state=established,related
add chain=forward comment="defconf: accept established,related" \
connection-state=established,related
add action=drop chain=forward comment="defconf: drop invalid" connection-state=\
invalid
add action=drop chain=forward comment=\
"defconf: drop all from WAN not DSTNATed" connection-nat-state=!dstnat \
connection-state=new in-interface=ether1
/ip firewall nat
add action=masquerade chain=srcnat comment="defconf: masquerade" disabled=yes \
out-interface=ether1
add action=masquerade chain=srcnat out-interface=bridge
/system clock
set time-zone-name=Europe/Brussels
/system routerboard settings
set cpu-frequency=650MHz protected-routerboot=disabled
/tool mac-server
set [ find default=yes ] disabled=yes
add interface=bridge
/tool mac-server mac-winbox
set [ find default=yes ] disabled=yes
add interface=bridge