如何将 MikroTik hAP ac lite 路由器配置为第 2 层交换机?

Ser*_*ndt 5 nat switch mikrotik dhcp-server

以下是网络拓扑的概述: 网络拓扑结构 无论是弗里茨!盒7340的MikroTik HAP交流精简版路由器目前充当DHCP在两个局域网服务器,有效地分割网络。该的MikroTik路由器还配置了一个桥梁192.168.88.xxxLAN。

为了避免双NAT的麻烦,我想将MikroTik hAP ac lite重新配置为二层交换机。这样做比双 NAT优势。

所有 DHCP 和 NAT 都应由Fritz!Box专门处理 此外,MikroTik hAP ac lite应该在相同的本地 IP 地址范围内有一个静态 IP 地址,这样它仍然可以通过其 Web 界面进行管理。

弗里茨!盒的配置是不是一个问题。然而,我是一个管理MikroTik 的 RouterOS的新手,我在网上没有找到关于这个特定问题的说明。因此,我的问题是:

MikroTik hAP ac lite配置为第 2 层交换机、删除其 DHCP 服务器同时保留用于管理的静态 IP 地址的(详细)步骤是什么?

顺便说一下,我使用的是 GNU/Linux,所以使用Winbox不是我的选择。

MikroTik 支持页面

在 MikroTik 支持页面上,我看到了一篇关于如何配置 DHCP 中继的文章。但是,我不清楚 DHCP 中继是与第 2 层交换机相同还是只是它的一部分?

DHCP 中继

链接到 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
Run Code Online (Sandbox Code Playgroud)

Cha*_*a0s 4

只需桥接 hAP 上的每个接口,它本质上就充当交换机的作用。
差不多就是这样了。

然后删除或禁用 IP > DHCP 服务器上的任何 dhcp 服务器实例。

由于您不提供任何配置导出,因此不可能为您提供有关如何执行上述操作的任何命令,因为每个 mikrotik 安装都是独一无二的。您可以通过多种不同的方式实现当前的设置。我们需要知道您当前的配置才能为您提供任何命令。

DHCP 中继与您询问的内容无关,因此请不要对此感到困惑。

另外,winbox 在使用 Wine 的 Linux 上运行良好。这是在非 Windows 计算机上运行 Winbox 的官方方式。

如果没有 winbox,它只会使整个过程变得更加困难,因为您可能会失去对 mikrotik 的访问权限,以便将其 IP 更改为 FritzBox 子网(即使无法通过 IP 访问,Winbox 也可以找到并连接到 mikrotik 路由器)。如果您不明白自己在做什么(盲目复制/粘贴命令),您可能最终不得不重置整个配置才能再次获得访问权限。

恕我直言,您应该将 FritzBox 配置为 PPPoE 桥接器,并使用 Mikrotik 拨号(pppoe-client)到 ISP 以建立互联网连接。

这样 FritzBox 将充当调制解调器,仅此而已。hAP 将充当强大的路由器。让 Mikrotik 获得公共 IP,您可以避免双重 NAT,最重要的是,您可以利用 mikrotik 的所有功能。您可以创建非常高级的配置,我非常怀疑 FritzBox(或任何其他消费者 dsl 调制解调器)可以做到这一点。