ข้ามไปที่เนื้อหาหลัก

การทำ LoadBalance PCC 2 WAN แบบ Static IP to 1LAN and Failover





MikroTik PPC LoadBalance 2 WAN (Static IP) to 1LAN and Failover

บทความนี้จะมาแนะนำ Script 2 LoadBalance 2 WAN (Static IP) to 1LAN and Failover  เป็นการรวมเน็ต 2 เส้น แบบ Static IP คือ การรับ IP มาจากเราเตอร์ 2 ตัวมารวมความเร็วกัน

/ip address
add address=YOUR LAN IP interface=LAN
add address=YOUR WAN1 IP interface=WAN1
add address=YOUR WAN2 IP interface=WAN2


/ip firewall mangle
add chain=input in-interface=WAN1 action=mark-connection new-connection-mark=WAN1_conn
add chain=input in-interface=WAN2 action=mark-connection new-connection-mark=WAN2_conn

add chain=output connection-mark=WAN1_conn action=mark-routing new-routing-mark=to_WAN1
add chain=output connection-mark=WAN2_conn action=mark-routing new-routing-mark=to_WAN2

add chain=prerouting dst-address=YOUR WAN1 SUBNET action=accept in-interface=LAN
add chain=prerouting dst-address=YOUR WAN2 SUBNET action=accept in-interface=LAN

add chain=prerouting dst-address-type=!local in-interface=LAN per-connection-classifier=both-addresses-and-ports:2/0 action=mark-connection new-connection-mark=WAN1_conn passthrough=yes
add chain=prerouting dst-address-type=!local in-interface=LAN per-connection-classifier=both-addresses-and-ports:2/1 action=mark-connection new-connection-mark=WAN2_conn passthrough=yes

add chain=prerouting connection-mark=WAN1_conn in-interface=LAN action=mark-routing new-routing-mark=to_WAN1
add chain=prerouting connection-mark=WAN2_conn in-interface=LAN action=mark-routing new-routing-mark=to_WAN2


/ip route
add dst-address=0.0.0.0/0 gateway=YOUR WAN1 GATEWAY routing-mark=to_WAN1 check-gateway=ping
add dst-address=0.0.0.0/0 gateway=YOUR WAN2 GATEWAY routing-mark=to_WAN2 check-gateway=ping

add dst-address=0.0.0.0/0 gateway=YOUR WAN1 GATEWAY distance=1 check-gateway=ping
add dst-address=0.0.0.0/0 gateway=YOUR WAN2 GATEWAY distance=2 check-gateway=ping


/ip firewall nat
add chain=srcnat out-interface=WAN1 action=masquerade
add chain=srcnat out-interface=WAN2 action=masquerade


IF YOU HAVE HOTSPOT ENABLED, ADD THIS

/ip firewall nat
add action=accept chain=pre-hotspot disabled=no dst-address-type=!local hotspot=auth


อ้างอิงจาก MikroTik PPC With Two WAN Load Balancing and Failover

ความคิดเห็น

โพสต์ยอดนิยมจากบล็อกนี้

วิธีเคลียร์ซับหมึก Canon ip2770

สำหรับเครื่องปริ้นเตอร์ รุ่น ip2770 ที่มีอาการไฟส้มกระพริบ 8 ครั้ง และ เขียว 1 ครั้ง นั้นแสดงว่าเครื่องปริ้นซับหมีกเต็ม เรามีวิธีมาแนะนำกัน สำหรับขั้นตอนแรกต้องเข้า Services mode ip2770 ให้ได้ก่อนก่อนครับ จะมีมีวิธีการดังนี้

วิธีแก้ Canon MX366 ซับหมึกเต็ม

ดาวน์โหลดโปรแกรมที่นี่ 1.ปิดเครื่องพริ้นเตอร์ รอจนไฟที่ปุ่ม Power ดับ  2. กดปุ่ม Power พร้อมกันกับปุ่ม Stop/ Reset 3. ปล่อยปุ่ม Stop/ Reset และกดไป 5 ครั้ง (ปุ่ม Power ยังไม่ปล่อยนะครับ)

วิธีแก้ Canon MP287 ขึ้น E05

สำหรับวันนี้เรามีวิธีแนะนำเครื่องปริ้นเตอร์ Canon Pixma MP287 ขึ้น E05 อาการนี้เกิดจากตลับหมึกแต่อย่าพึ่งซื้อหัวใหม่นะ แต่เราหาวิธีแก้ได้แล้วครับสำหรับอาการ E05