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

  • การ Config Router Board ให้เป็น LoadBalance (ตัวอย่าง 3 Wan)
    เริ่มโดย yod
    Read 12,239 times
0 สมาชิก และ 1 ผู้มาเยือน กำลังดูหัวข้อนี้
yod

 

 
การ Config Router Board ให้เป็น LoadBalance


ตัวอย่างจะเป็น LoadBalance 3 Wan นะครับ โดยให้ Port Ether1 สำหรับ Internet เส้นที่ 1 และ Port Ether2 เป็น Internet เส้นที่ 2 และ Port Ether3 เป็น Internet เส้นที่ 3 โดย Internet ทั้ง 3 เส้นมีความเร็วเท่ากันครับ


1. Login เข้า Winbox เข้า Menu Interface เพื่อ Config ไม่ให้ Port 3 เป็น Slave ของ Port2 (ถ้าเป็นรุ่น 450G ให้ยกเลิก Bridge ครับ)

Click ที่ Ether3 เลือก Master Port เป็น None จากนั้น Click [OK]



ทำซ้ำกับ Port Ether4 และ Port Ether5 ครับ

และ Set Port Ether5 ให้ชี้ Master Port ไปที่ Ether4 ครับ


2. กำหนด IP Address ให้กับ Port Ether4
Disable Default config ของ Address Ether2 ด้วยนะครับ




3. สร้าง DHCP Server ให้กับ Port Ether4
Disable Default DHCP ของ  Ether2 ด้วยเช่นกันครับ




ขั้นตอนนี้ก็ Next ไปเรื่อยๆ ตอนให้ใส่ DNS ก็ใส่ IP ของ Router เลยก็ได้ครับ




4. Copy Script จากด้านล่างลง New Terminal ครับ โดย Click Mouse ขวาแล้ว Paste และก็ Enter






5. เข้า Menu PPP ตรวจสอบ UserName/Password ในแต่ละ Interface pppoe-out ให้ถูกต้อง แล้วเชื่อมแต่ละ Ethernet เข้ากับ Modem






6. ถ้าไม่ติดปัญหาอะไร ที่มุมขวาล่างของ Interface pppoe-out จะต้องขึ้น Connected ครับ






เรียบร้อยครับ

ถ้าสนใจทฤษฎีเพิ่มเติม ดูได้จาก Link นี้ได้เลยครับ http://wiki.mikrotik.com/wiki/ECMP_load_balancing_with_masquerade


/interface pppoe-client
add user=sysnet1@isp password=1234 interface=ether1 disabled=no
add user=sysnet2@isp password=1234 interface=ether2 disabled=no
add user=sysnet3@isp password=1234 interface=ether3 disabled=no

/ ip route
add dst-address=0.0.0.0/0 gateway=pppoe-out1, pppoe-out2, pppoe-out3 check-gateway=ping

/ 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 firewall mangle
add chain=input in-interface=pppoe-out1 action=mark-connection new-connection-wlan1_conn
add chain=input in-interface=pppoe-out2 action=mark-connection new-connection-wlan2_conn
add chain=input in-interface=pppoe-out3 action=mark-connection new-connection-wlan3_conn
add chain=output connection-mark=wlan1_conn action=mark-routing new-routing-mark=to_wlan1    
add chain=output connection-mark=wlan2_conn action=mark-routing new-routing-mark=to_wlan2    
add chain=output connection-mark=wlan3_conn action=mark-routing new-routing-mark=to_wlan3

/ ip route
add dst-address=0.0.0.0/0 gateway=pppoe-out1 routing-mark=to_wlan1
add dst-address=0.0.0.0/0 gateway=pppoe-out2 routing-mark=to_wlan2
add dst-address=0.0.0.0/0 gateway=pppoe-out3 routing-mark=to_wlan3


สวัสดีครับ

ผมใช้ RB450G

ผมทำตามขั้นตอนนี้ แต่งงตรงนี้นิดหน่อยครับ

พอใส่แล้วมันแจ้งว่าตรงนี้ผิดตลอด ตรงสีแดง

/ ip firewall mangle
add chain=input in-interface=pppoe-out1 action=mark-connection new-connection-wlan1_conn

ขอบคุณครับ

yod

ของผม 2 WAN แบบ

pppoe-out1 port 4

และ Static IP port 5

ส่วน 1- 3 ผมสร้างเป็น bridge1 ไว้ครับ

เพิ่มเติม เวอร์ชั่น 5.20 ครับ ลอง Reset config ใหม่ก็ติดตรงนี้เหมือนเดิม

[admin@MikroTik] /ip firewall mangle> add chain=input in-interface=pppoe-out1 action=mark-conne
ction new-connection-wlan1_conn
expected end of command (line 1 column 64)

yod


ต้องแก้ script ใหม่ครับ เพราะตัวอย่างจะเป็นการอ้างอิง interface ที่ชื่อ pppoe-out1, pppoe-out2, pppoe-out3 ครับ ให้อ้างอิง interface eth5 แทนครับ

กรณีที่ความเร็ว download/upload ของ wan แต่ละเส้นไม่เท่ากัน
เช่น wan 1 download 20M , wan 2 download 30M
มีวิธีถ่วงน้ำหนักหรือเปล่าครับ


pjk

#9


สร้าง Internet pppoe-out1, pppoe-out2, pppoe-out3 หรือยังครับ
[/quote]

ไม่รู้ว่ามันต้องเป็นแบบนี้รึเเปล่าครับ
/interface pppoe-client
add user=sysnet1@isp password=1234 interface=ether1 disabled=no
add user=sysnet2@isp password=1234 interface=ether2 disabled=no
add user=sysnet3@isp password=1234 interface=ether3 disabled=no

/ ip route
add dst-address=0.0.0.0/0 gateway=pppoe-out1,pppoe-out2,pppoe-out3 check-gateway=ping

/ 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 firewall mangle
add chain=input in-interface=pppoe-out1 action=mark-connection new-connection-mark=wlan1_conn <---พอแก้แบบนี้แล้วมันวางScriptsผ่าน
add chain=input in-interface=pppoe-out2 action=mark-connection new-connection-mark=wlan2_conn <---พอแก้แบบนี้แล้วมันวางScriptsผ่าน
add chain=input in-interface=pppoe-out3 action=mark-connection new-connection-mark=wlan3_conn <---พอแก้แบบนี้แล้วมันวางScriptsผ่าน
add chain=output connection-mark=wlan1_conn action=mark-routing new-routing-mark=to_wlan1
add chain=output connection-mark=wlan2_conn action=mark-routing new-routing-mark=to_wlan2
add chain=output connection-mark=wlan3_conn action=mark-routing new-routing-mark=to_wlan3

/ ip route
add dst-address=0.0.0.0/0 gateway=pppoe-out1 routing-mark=to_wlan1
add dst-address=0.0.0.0/0 gateway=pppoe-out2 routing-mark=to_wlan2
add dst-address=0.0.0.0/0 gateway=pppoe-out3 routing-mark=to_wlan3

หากผิดพลาดยังไงขออภัยด้วย