我想在没有负载平衡的情况下在 mikrotik 上创建隔离网络。例如:
Wan1
:88.88.88.88 Wan2
:99.99.99.99
Lan1:192.168.1.0/24
Lan2:192.168.2.0/24
Lan1 通过 Wan1 上网,Lan2 通过 Wan2.Mikrotik mangle 上网,路由配置如下。当我使用这个配置时,我从来没有在 whatismyip 上看到 wan2。我在 lan1 和 lan2 上都看到了 wan1 ip。(数据包标记用于队列)
/ip firewall mangle
add action=mark-routing chain=prerouting comment=Wan1_Routing hotspot=auth \
new-routing-mark=Wan1 passthrough=no src-address=172.1.0.0/20 \
src-address-list=Wan1
add action=mark-routing chain=prerouting comment=Wan2_Routing hotspot=auth \
new-routing-mark=Wan2 passthrough=no src-address=172.5.0.0/21 \
src-address-list=Wan2
add action=mark-packet chain=prerouting comment=Wan1_Up in-interface=Wan1 \
new-packet-mark=Wan1_Up passthrough=no src-address-list=Wan1
add action=mark-packet chain=postrouting comment=Wan1_Dwn dst-address-list=\
Wan1 new-packet-mark=Wan1_Dwn out-interface=Wan1 passthrough=no
add action=mark-packet chain=prerouting comment=Wan2_Up in-interface=Wan2 \
new-packet-mark=Wan2_Up passthrough=no src-address-list=Wan2
add action=mark-packet chain=postrouting comment=Wan2_Dwn dst-address-list=Wan2 \
new-packet-mark=Wan2_Dwn out-interface=Wan2 passthrough=no
/ip route
add distance=1 gateway=192.168.1.1 routing-mark=Wan1
add distance=1 gateway=192.168.2.1 routing-mark=Wan2
add distance=1 gateway=192.168.1.1
add distance=1 gateway=192.168.2.1