Published using Google Docs
[RouterOS]-RB450G 依據內部不同ip決定不同pppoe進行連線_設定參數
Updated automatically every 5 minutes

/ip firewall address-list

add address=192.168.2.6 list=NAS

add address=192.168.2.1-192.168.2.19 list=OpenSpeed

add address=192.168.2.20-192.168.2.39 list=Static_PPPOE

add address=192.168.2.0/24 list=LAN_ALL

/ip firewall mangle

add action=mark-routing chain=prerouting comment="\AFS\A9w\A4\BA\BA\F4IP\A8\AB\A4\A3\A6PPPPOE\A5X\A5h" new-routing-mark=RM_pppoe_S passthrough=no src-address=192.168.2.20-192.168.2.39

add action=mark-routing chain=prerouting new-routing-mark=RM_pppoe_F_NAS passthrough=no src-address=192.168.2.6

/ip firewall nat

add action=masquerade chain=srcnat comment="PPPoE NAT \B3v\B5\A7" out-interface=pppoe-out_F_NAS src-address-list=NAS

add action=masquerade chain=srcnat out-interface=pppoe-out_S src-address-list=Static_PPPOE

add action=masquerade chain=srcnat out-interface=pppoe-out_F src-address=192.168.2.0/24

add action=masquerade chain=srcnat comment="NAT Loopback" dst-address=192.168.2.0/24 src-address=192.168.2.0/24

/ip route

add check-gateway=ping distance=1 gateway=pppoe-out_S routing-mark=RM_pppoe_S

add check-gateway=ping distance=1 gateway=pppoe-out_F_NAS routing-mark=RM_pppoe_F_NAS

add check-gateway=ping distance=1 gateway=pppoe-out_F