|
发表于 2016-7-31 00:54:17
|
显示全部楼层
本帖最后由 cspm333 于 2016-7-31 01:00 编辑
我以為您的bridge1=192.168.1.0/24 ,bridge2=192.168.2.0/24 ,以為用192.168.0.0/22 就含蓋了.
注意看才發覺bridge1=192.168.33.0/24 bridge2=192.168.1.0/24
不過這影響不大,您把192.168.33.0/24 與192.168.1.0/24 同加到address-list ,用bridge這名稱標示即可.
您的mangle路由標記應該是我想像中這樣:
/ip firewall mangle
add action=mark-routing chain=prerouting new-routing-mark=to_eth1 passthrough=no src-address=192.168.33.0/24
add action=mark-routing chain=prerouting new-routing-mark=to_l2tp-out1 passthrough=no src-address=192.168.1.0/24
因為沒特別指定dst-address,
像src-address=192.168.33.0/24 連結dst-address=192.168.1.0/24時 ,會把封包送到eth1
像src-address=192.168.1.0/24 連結dst-address=192.168.33.0/24時 ,會把封包送到l2tp-out1
這兩種情況組合起來,自然連接不到對端的bridge.
所以您可以:
方法1:
/ip firewall mangle
add action=mark-routing chain=prerouting new-routing-mark=to_eth1 passthrough=no src-address=192.168.33.0/24 dst-address=!192.168.1.0/24
add action=mark-routing chain=prerouting new-routing-mark=to_l2tp-out1 passthrough=no src-address=192.168.1.0/24 dst-address=!192.168.33.0/24
(因只有兩個bridge,所以用排除就好....但有3個bridge時,您就要排出所有的組合情況)
方法2:
/ip firewall mangle
add action=accept chain=prerouting src-address-list=bridge dst-address-list=bridge
add action=mark-routing chain=prerouting new-routing-mark=to_eth1 passthrough=no src-address=192.168.33.0/24
add action=mark-routing chain=prerouting new-routing-mark=to_l2tp-out1 passthrough=no src-address=192.168.1.0/24
(第一行就用accept宣告封包當屬src-address與dst-address同是菜單記錄的網段時,下面的動作全乎略.
也就第二行和第三行Rule即使不指定dst-address排除的對像,也不擔心封包被送去eth1或l2tp-out1
所以若您有多個bridge使用時,這是最佳的途逕)
|
|