Welcome to Sysnet Board คู่มือ การใช้งานอุปกรณ์ Network. Please log in or sign up.
สมาชิกทั้งหมด
17,595
กระทู้ทั้งหมด
10,026
หัวข้อทั้งหมด
4,711

  • Mikrotik NTH Load Balancing แบบ 3 wan ขอโค๊ดทีครับ
    เริ่มโดย ipon
    Read 13,927 times
0 สมาชิก และ 1 ผู้มาเยือน กำลังดูหัวข้อนี้

 

 
Mikrotik NTH Load Balancing  แบบ 3 wan  ขอโค๊ดทีครับ ทำไม่ผ่านเลย   อีก 2 เส้นไม่วิ่งเลย

แบบนี้ถูกมั๊ยครับ

       /interface pppoe-client
add ac-name="" add-default-route=no allow=pap,chap,mschap1,mschap2 comment="" \
   dial-on-demand=no disabled=no interface=ether1 max-mru=1480 \
   max-mtu=1480 mrru=disabled name=pppoe-out1 password=1234 profile=default \
   service-name="" use-peer-dns=yes user=sysnet1@isp
add ac-name="" add-default-route=no allow=pap,chap,mschap1,mschap2 comment="" \
   dial-on-demand=no disabled=no interface=ether2 max-mru=1480 \
   max-mtu=1480 mrru=disabled name=pppoe-out2 password=1234 profile=default \
   service-name="" use-peer-dns=no user=sysnet2@isp
add ac-name="" add-default-route=no allow=pap,chap,mschap1,mschap2 comment="" \
   dial-on-demand=no disabled=no interface=ether3 max-mru=1480 \
   max-mtu=1480 mrru=disabled name=pppoe-out3 password=1234 profile=default \
   service-name="" use-peer-dns=no user=sysnet3@isp

/ip address
add address=192.168.20.1/24 broadcast=192.168.20.255 comment="" disabled=no interface=ether4 network=192.168.20.0

/ip pool
add name=dhcp_pool2 ranges=192.168.20.2-192.168.20.254

/ip dhcp-server
add address-pool=dhcp_pool2 authoritative=after-2sec-delay bootp-support=static disabled=no interface=ether4 lease-time=3d name=dhcp1

/ip dhcp-server network
add address=192.168.20.0/24 comment="" dns-server=192.168.20.1 gateway=192.168.20.1

/ ip firewall mangle
add chain=prerouting src-address-list=mrk1 in-interface=ether4 action=mark-connection new-connection-mark=mrk1 passthrough=yes
add chain=prerouting src-address-list=mrk1 in-interface=ether4 action=mark-routing new-routing-mark=mrk1 passthrough=no

add chain=prerouting src-address-list=mrk2 in-interface=ether4 action=mark-connection new-connection-mark=mrk2 passthrough=yes
add chain=prerouting src-address-list=mrk2 in-interface=ether4 action=mark-routing new-routing-mark=mrk2 passthrough=no

add chain=prerouting src-address-list=mrk3 in-interface=ether4 action=mark-connection new-connection-mark=mrk3 passthrough=yes
add chain=prerouting src-address-list=mrk3 in-interface=ether4 action=mark-routing new-routing-mark=mrk3 passthrough=no

add chain=prerouting in-interface=ether4 connection-state=new nth=3,1 action=mark-connection new-connection-mark=mrk1 passthrough=yes
add chain=prerouting in-interface=ether4 action=add-src-to-address-list address-list=mrk1 address-list-timeout=1d connection-mark=mrk1 passthrough=yes
add chain=prerouting in-interface=ether4 connection-mark=mrk1 action=mark-routing new-routing-mark=mrk1 passthrough=no

add chain=prerouting in-interface=ether4 connection-state=new nth=3,2 action=mark-connection new-connection-mark=mrk2 passthrough=yes
add chain=prerouting in-interface=ether4 action=add-src-to-address-list address-list=mrk2 address-list-timeout=1d connection-mark=mrk2 passthrough=yes
add chain=prerouting in-interface=ether4 connection-mark=mrk2 action=mark-routing new-routing-mark=mrk2 passthrough=no

add chain=prerouting in-interface=ether4 connection-state=new nth=3,3 action=mark-connection new-connection-mark=mrk3 passthrough=yes
add chain=prerouting in-interface=ether4 action=add-src-to-address-list address-list=mrk3 address-list-timeout=1d connection-mark=mrk3 passthrough=yes
add chain=prerouting in-interface=ether4 connection-mark=mrk3 action=mark-routing new-routing-mark=mrk3 passthrough=no

/ ip firewall nat
add chain=srcnat out-interface=pppoe-out1 action=masquerade
add chain=srcnat out-interface=pppoe-out2 action=masquerade
add chain=srcnat out-interface=pppoe-out3 action=masquerade

/ ip route
add dst-address=0.0.0.0/0 gateway=pppoe-out1 scope=255 target-scope=10 routing-mark=mrk1
add dst-address=0.0.0.0/0 gateway=pppoe-out2 scope=255 target-scope=10 routing-mark=mrk2
add dst-address=0.0.0.0/0 gateway=pppoe-out3 scope=255 target-scope=10 routing-mark=mrk3

add dst-address=0.0.0.0/0 gateway=pppoe-out1 scope=255 target-scope=10
add dst-address=0.0.0.0/0 gateway=pppoe-out2 scope=255 target-scope=10
add dst-address=0.0.0.0/0 gateway=pppoe-out3 scope=255 target-scope=10

yod
แก้ตรง address ข้างล่างนะครับพี่ ให้เป็น subnet ที่ใช้ครับ


/ip firewall address-list add list=local address=192.168.1.0/24

/ip firewall mangle

add action=mark-connection chain=input comment="" disabled=no in-interface=pppoe-out1 new-connection-mark=first_conn passthrough=yes
add action=mark-connection chain=input comment="" disabled=no in-interface=pppoe-out2 new-connection-mark=second_conn passthrough=yes
add action=mark-connection chain=input comment="" disabled=no in-interface=pppoe-out3 new-connection-mark=third_conn passthrough=yes

add action=mark-routing chain=output comment="" connection-mark=first_conn disabled=no new-routing-mark=first passthrough=no
add action=mark-routing chain=output comment="" connection-mark=second_conn disabled=no new-routing-mark=second passthrough=no
add action=mark-routing chain=output comment="" connection-mark=third_conn disabled=no new-routing-mark=third passthrough=no

add action=add-src-to-address-list address-list=first address-list-timeout=4h chain="mark new unseen" comment="" disabled=no nth=3,1 src-address-type=!local
add action=add-src-to-address-list address-list=second address-list-timeout=4h chain="mark new unseen" comment="" disabled=no nth=3,2 src-address-type=!local
add action=add-src-to-address-list address-list=third address-list-timeout=4h chain="mark new unseen" comment="" disabled=no nth=3,3 src-address-type=!local

add action=add-src-to-address-list address-list=seen address-list-timeout=4h chain="mark new unseen" comment="" disabled=no src-address-type=!local
add action=jump chain="mark new unseen" comment="" disabled=no jump-target="mark connection"

add action=mark-connection chain="mark connection" comment="" disabled=no new-connection-mark=first_conn passthrough=yes src-address-list=first
add action=mark-connection chain="mark connection" comment="" disabled=no new-connection-mark=second_conn passthrough=yes src-address-list=second
add action=mark-connection chain="mark connection" comment="" disabled=no new-connection-mark=third_conn passthrough=yes src-address-list=third

add action=mark-routing chain="mark connection" comment="" connection-mark=first_conn disabled=no new-routing-mark=first passthrough=no
add action=mark-routing chain="mark connection" comment="" connection-mark=second_conn disabled=no new-routing-mark=second passthrough=no
add action=mark-routing chain="mark connection" comment="" connection-mark=third_conn disabled=no new-routing-mark=third passthrough=no

add action=mark-routing chain=prerouting comment="" connection-mark=first_conn disabled=no new-routing-mark=first passthrough=no src-address-list=first
add action=mark-routing chain=prerouting comment="" connection-mark=second_conn disabled=no new-routing-mark=second passthrough=no src-address-list=second
add action=mark-routing chain=prerouting comment="" connection-mark=third_conn disabled=no new-routing-mark=third passthrough=no src-address-list=third

add action=jump chain=prerouting comment="" connection-state=new disabled=no jump-target="mark connection" src-address-list=local
add action=jump chain=prerouting comment="" connection-state=new disabled=no jump-target="mark new unseen" src-address-list=local

/ip firewall nat
add action=masquerade chain=srcnat comment="" disabled=no out-interface=pppoe-out1
add action=masquerade chain=srcnat comment="" disabled=no out-interface=pppoe-out2
add action=masquerade chain=srcnat comment="" disabled=no out-interface=pppoe-out3

/ip route
add disabled=no distance=1 dst-address=0.0.0.0/0 gateway=pppoe-out1 routing-mark=first scope=255 target-scope=10
add disabled=no distance=1 dst-address=0.0.0.0/0 gateway=pppoe-out2 routing-mark=second scope=255 target-scope=10
add disabled=no distance=1 dst-address=0.0.0.0/0 gateway=pppoe-out3 routing-mark=third scope=255 target-scope=10

add disabled=no distance=1 dst-address=0.0.0.0/0 gateway=pppoe-out1 scope=255 target-scope=10
add disabled=no distance=2 dst-address=0.0.0.0/0 gateway=pppoe-out2 scope=255 target-scope=10
add disabled=no distance=3 dst-address=0.0.0.0/0 gateway=pppoe-out3 scope=255 target-scope=10

ขอบคุณ คุณยอด และ sysnet ด้วยครับ  บริการหลังการขายนี้  สุดยอดครับ

/ip firewall address-list add list=local address=192.168.1.0/24


    พอใส่ตัวนี้เข้าไป ออก hotspot ไม่ได้ ครับ

ผมว่ามันกลับบ้านเก่าแล้วครับ รีเซ็ต แบคอัพ ที่มาจากร้าน ยังออก hotspot ได้เครื่องเดกียว