المدير العام
الجنس :
عدد المساهمات : 540 تاريخ التسجيل : 13/10/2009 العمر : 51
| موضوع: طريقة عمل load balance لثلاثة خطوط في سيرفر المايكروتك الخميس مارس 04, 2010 11:04 pm | |
| كارت الشبكة الاول الـ WAN1 والمسمى في الشرح con1 يحمل ايبي : 10.111.0.2/24 كارت الشبكة الثاني الـ WAN2 والمسمى في الشرح con2 يحمل ايبي : 10.112.0.2/24 كارت الشبكة الثالث الـ WAN2 والمسمى في الشرح con2 يحمل ايبي : 10.113.0.2/24 كارت الشبكة الرابع الـ LAN والمسمى في الشرح local يحمل ايبي : 192.168.0.1/24يجيب تسمة الكروت بهذه الاسماء اولا.كود عمل هذه الايبايت المذكورة كود PHP: ip address add address=192.168.0.1/24 network=192.168.0.0 broadcast=192.168.0.255 interface=local comment="" disabled=no add address=10.111.0.2/24 network=10.111.0.0 broadcast=10.111.0.255 interface=con1 comment="" disabled=no add address=10.112.0.2/24 network=10.112.0.0 broadcast=10.112.0.255 interface=con2 comment="" disabled=no add address=10.113.0.2/24 network=10.113.0.0 broadcast=10.113.0.255 interface=con3 comment="" disabled=no كود عمل اعدادت الجيت وي في الراوت كود PHP: ip route add dst-address=0.0.0.0/0 gateway=10.111.0.1 scope=255 target-scope=10 routing-mark=mark1 comment="" disabled=no add dst-address=0.0.0.0/0 gateway=10.112.0.1 scope=255 target-scope=10 routing-mark=mark2 comment="" disabled=no add dst-address=0.0.0.0/0 gateway=10.113.0.1 scope=255 target-scope=10 routing-mark=mark3 comment="" disabled=no add dst-address=0.0.0.0/0 gateway=10.113.0.1 scope=255 target-scope=10 comment="" disabled=no add dst-address=0.0.0.0/0 gateway=10.111.0.1 scope=255 target-scope=10 comment="" disabled=no كود عمل الدي ان اس كود PHP: ip dns set primary-dns=192.168.1.1 secondary-dns=192.168.0.1 allow-remote-requests=no cache-size=2048KiB cache-max-ttl=1w كود عمل الاعدادت في الفايرول - ناتكود PHP: ip firewall nat add chain=srcnat connection-mark=mark1 action=src-nat to-addresses=10.111.0.2 to-ports=0-65535 comment="" disabled=no add chain=srcnat connection-mark=mark2 action=src-nat to-addresses=10.112.0.2 to-ports=0-65535 comment="" disabled=no add chain=srcnat connection-mark=mark2 action=src-nat to-addresses=10.113.0.2 to-ports=0-65535 comment="" disabled=no اخيرا كود عمل الفايرول - مانجلكود PHP: ip firewall mangle add chain=prerouting in-interface=local src-address-list=mark1 action=mark-connection new-connection-mark=mark1 passthrough=yes comment="" disabled=no add chain=prerouting in-interface=local src-address-list=mark1 action=mark-routing new-routing-mark=mark1 passthrough=no comment="" disabled=no add chain=prerouting in-interface=local src-address-list=mark2 action=mark-connection new-connection-mark=mark2 passthrough=yes comment="" disabled=no add chain=prerouting in-interface=local src-address-list=mark2 action=mark-routing new-routing-mark=mark2 passthrough=no comment="" disabled=no add chain=prerouting in-interface=local src-address-list=mark3 action=mark-connection new-connection-mark=mark3 passthrough=yes comment="" disabled=no add chain=prerouting in-interface=local src-address-list=mark3 action=mark-routing new-routing-mark=mark3 passthrough=no comment="" disabled=no add chain=prerouting in-interface=local connection-state=new nth=1,1,0 action=mark-connection new-connection-mark=mark1 passthrough=yes comment="" disabled=no add chain=prerouting in-interface=local connection-mark=mark1 action=add-src-to-address-list address-list=mark1 address-list-timeout=1d comment="" disabled=no add chain=prerouting in-interface=local connection-mark=mark1 action=mark-routing new-routing-mark=mark1 passthrough=no comment="" disabled=no add chain=prerouting in-interface=local connection-state=new nth=1,1,1 action=mark-connection new-connection-mark=mark2 passthrough=yes comment="" disabled=no add chain=prerouting in-interface=local connection-mark=mark2 action=add-src-to-address-list address-list=mark2 address-list-timeout=1d comment="" disabled=no add chain=prerouting in-interface=local connection-mark=mark2 action=mark-routing new-routing-mark=mark2 passthrough=no comment="" disabled=no add chain=prerouting in-interface=local connection-state=new nth=1,1,1 action=mark-connection new-connection-mark=mark3 passthrough=yes comment="" disabled=no add chain=prerouting in-interface=local connection-mark=mark3 action=add-src-to-address-list address-list=mark3 address-list-timeout=1d comment="" disabled=no add chain=prerouting in-interface=local connection-mark=mark3 action=mark-routing new-routing-mark=mark3 passthrough=no comment="" disabled=no الصورة المرفقة توضح عمل السيرفر بصورة طبيعية بناءا على هذا الشرح | هذه الصورة مصغره ... نقره على هذا الشريط لعرض الصوره بالمقاس الحقيقي ... المقاس الحقيقي 1079x767 والحجم 159 كيلوبايت . |
| |
|