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

การทำ 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 MP287 ขึ้น E05

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

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

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

วิธีเคลียร์ซับหมึก Brother MFC-J430w

วิธีเคลียร์ซับหมึก Brother MFC-J430w หรือ หน้าจอเครืองพิมพ์โชว์ว่า Ink Absorber Full  กดปุ่ม start ปุ่มเขียว (ปุ่มถ่ายเอกสารสี) กดค้างไว้ แล้วเสียบปลั๊ก รอจนเครื่องพิมพ์จอโชว์ว่า MAINTENANCE  เมื่อขึ้น MAINTENANCE ให้ทำการกดลูกศรเลื่อนขึ้น ลง จนตัวเลขเป็น 80 แล้ว กดปุ่ม OK  กดลูกศรขึ้น ลง ทำการเลือนหา PURGE: แล้วทำการกดตัวเลข 2783 แล้วดูว่า ค่าเป็น 0 แล้วหรือยัง  กดปุ่ม STOP/EXIT 1 ครั้ง เพื่อออกจาก maintenance mode ที่มา   refreshcartridges.co.uk