Sysnet Board คู่มือ การใช้งานอุปกรณ์ Network

การ Config อุปกรณ์ เครือข่าย Network Device => อุปกรณ์ Mikrotik Router => หัวข้อที่ตั้งโดย: doonut เมื่อ วันที่ 1 ธันวาคม 2014, 14:48:48

ชื่อ: Load balance 2 wan adsl ไม่รวมสปีด!!
โดย: doonut เมื่อ วันที่ 1 ธันวาคม 2014, 14:48:48
สวัสดีครับคุณยอด ผมใช้ adsl ของ 3bb สองเส้น เส้นล่ะ 15Mbps ทั่งสองเส้น ช่างมาติดเส้นที่สองเสร้จมาดๆ ผมได้ทำตามการะทู้ของคุณยอด
https://www.sysnetcenter.com/board/index.php?topic=1556.0/ (https://www.sysnetcenter.com/board/index.php?topic=1556.0/)การทำ-Loadbalance-Internet-ADSL-3-เส้น-(PPPoE)-แบบ-PCC
แบบใช้ hotspot script และได้ทำการเทสออกเน็ตทั้งสองเส้น pppoe-out1, pppoe-out2 โดยการถอดออกที่เส้น และลองออกเน็ต
ทั้ง สองเส้นออกเน้ตได้ปกติ จากนั้นผมได้เซ้ต actrul profile ใน userman ให้ download 30mbps
แต่...ผลที่ได้พบว่า เน็ตออกเส้นเดียว วิ่งไปสุด 15mbps โดยอีกเส้นไม่มีการไหลของข้อมูลครับ

1. ผมไม่ทราบว่าผิดตรงไหนสปีดไม่รวมเป็น 15+15=30?

รบกวนคุณยอดด้วยนะครับ ขอบคุณครับ
ชื่อ: Re: Load balance 2 wan adsl ไม่รวมสปีด!!
โดย: yod เมื่อ วันที่ 1 ธันวาคม 2014, 15:53:58
เปลี่ยน subnet ตามที่ใช้งานนะครับ ตรง src-address

/ ip firewall mangle
add chain=input in-interface=pppoe-out1 action=mark-connection new-connection-mark=wan1_conn
add chain=input in-interface=pppoe-out2 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 action=mark-connection chain=prerouting connection-mark=no-mark disabled=\
    no dst-address-type=!local hotspot=auth src-address=192.168.1.0/24 new-connection-mark=\
    wan1_conn passthrough=yes per-connection-classifier=both-addresses:2/0

add action=mark-connection chain=prerouting connection-mark=no-mark disabled=\
    no dst-address-type=!local hotspot=auth src-address=192.168.1.0/24 new-connection-mark=\
    wan2_conn passthrough=yes per-connection-classifier=both-addresses:2/1

add chain=prerouting connection-mark=wan1_conn in-interface=bridge1 action=mark-routing new-routing-mark=to_wan1
add chain=prerouting connection-mark=wan2_conn in-interface=bridge1 action=mark-routing new-routing-mark=to_wan2

/ ip route
add dst-address=0.0.0.0/0 gateway=pppoe-out1 routing-mark=to_wan1 check-gateway=ping
add dst-address=0.0.0.0/0 gateway=pppoe-out2 routing-mark=to_wan2 check-gateway=ping

add dst-address=0.0.0.0/0 gateway=pppoe-out1 distance=1 check-gateway=ping
add dst-address=0.0.0.0/0 gateway=pppoe-out2 distance=2 check-gateway=ping

/ ip firewall nat
add chain=srcnat out-interface=pppoe-out1 action=masquerade
add chain=srcnat out-interface=pppoe-out2 action=masquerade
ชื่อ: Re: Load balance 2 wan adsl ไม่รวมสปีด!!
โดย: doonut เมื่อ วันที่ 1 ธันวาคม 2014, 16:41:34
อันนี้คือก่อนหน้าที่จะใส่สคริป ที่คุณยอดตอบกระทู้ครับ
(https://www.sysnetcenter.com/board/upload/files/images/nfwdeu-wireless-b2a061.png)

อันนี้คือหลังจากใส่สคริป
(https://www.sysnetcenter.com/board/upload/files/images/nfwde4-wireless-bd8edc.png)

ไม่มี packet วิ่งเข้ามาที่ pppoe-out1 ครับ วิ่งแต่ pppoe-out2
(https://www.sysnetcenter.com/board/upload/files/images/nfwdo1-wireless-9cd8c1.png)

ผมเทสจากคอมพิวเตอร์ที่ bypass hotspot นะครับ เพราะผมรีโมทจากข้างนอกเข้ามาที่เครื่องนี้ เวลา speedtest มันมี packet วิ่งแต่ขา pppoe-out2 ขาเดียวครับ รวมทั้งเปิด youtube ก้อวิ่งขาเดียวครับ
ผลที่ได้ สปีดยัง ไม่รวมกัน ครับ ไม่ทราบว่ามันยังติดสคริปก่อนหน้าอยู่หรือป่าว?

ขอบคุณครับ
ชื่อ: Re: Load balance 2 wan adsl ไม่รวมสปีด!!
โดย: yod เมื่อ วันที่ 1 ธันวาคม 2014, 18:16:32
ลอง restore แล้วทำใหม่ครับ เพราะ run script ซ้อนกันนิครับ มี static route เพียบเลย และ dynamic route ของ pppoe-out1 ไม่ขึ้น ตรวจสอบ default route ที่ pppoe-out1 ด้วยครับ ใน tab dial-out

และอย่าเพิ่งทำ pptp tunnel ครับ
ชื่อ: Re: Load balance 2 wan adsl ไม่รวมสปีด!!
โดย: doonut เมื่อ วันที่ 3 ธันวาคม 2014, 12:40:48
รายงานผลครับ หลังจาก restore ใหม่ แล้วใส่สคิป ที่คุณยอดโพสให้ ลองผิดลองถูกมา 1 วันเต็ม สปีดรวมกันแล้วครับ แต่ ต้องเอาในส่วน hotspot : auth ออกสปีดถึงจะรวมกัน

1. ไม่ทราบว่า มีทางทำ load balance แบบรวมสปีด + ใช้ hotspot มั่ยครับ?
2. เนื่องจากเป็นเน็ตเจ้าเดียวกัน ผมเลยไม่มีความจำเป็นที่ต้องทำ load balance แบบ backup line เพราะว่าถ้ามันไป มันไปหมด

ขอบคุณครับ

ชื่อ: Re: Load balance 2 wan adsl ไม่รวมสปีด!!
โดย: yod เมื่อ วันที่ 4 ธันวาคม 2014, 12:31:43


ตาม script ทำได้แน่นอนครับ แก้ไขหมายเลข subnet ให้ตรงกับที่ใช้ครับ

Users found this pages searching for: