السلام عليكم يا شباب العرب
اليوم سأتكلم عن ال load balancing across two parellel links
كثيرا ما نواجه السيناريو الموضح في الشكل أسفل



أي فرعين مربوطين بخطين

فكيف سأعمل ال load balancing بينهما؟؟؟؟؟؟؟

الحل سهل جدا في هذا المثال البسيط

فعلى مستوى كل راوتر يتم عمل ال static routing



كود:
R3#show run | include ip route ip route 172.16.2.0 255.255.255.0 Serial0/0 ip route 172.16.2.0 255.255.255.0 Serial0/1
كود:
R4#show run | include ip route ip route 172.16.1.0 255.255.255.0 Serial0/0 ip route 172.16.1.0 255.255.255.0 Serial0/1


فستظهر ال routing tables كما يلي
كود:
R3#sh ip route 172.16.0.0/24 is subnetted, 2 subnets C 172.16.1.0 is directly connected, Serial0/2 S 172.16.2.0 is directly connected, Serial0/0 is directly connected, Serial0/1 192.168.1.0/30 is subnetted, 2 subnets C 192.168.1.0 is directly connected, Serial0/0 C 192.168.1.4 is directly connected, Serial0/1


كود:
R4#sh ip route 172.16.0.0/24 is subnetted, 2 subnets S 172.16.1.0 is directly connected, Serial0/0 is directly connected, Serial0/1 C 172.16.2.0 is directly connected, Serial0/2 192.168.1.0/30 is subnetted, 2 subnets C 192.168.1.0 is directly connected, Serial0/0 C 192.168.1.4 is directly connected, Serial0/1


ثم بعد ذلك نقوم بتفعيل ال load balancing
على الشكل الآتي

كود:
R4(config)#interface s0/0 R4(config-if)#ip load-sharing per-packet
و هذا ال command نعيده مع الأنترفيس s0/0 and s0/1 on R3
و كذلك s0/0 and s0/1 on R4 و انظر رحمك الله إلى ال output تاع ال debug ip packet لما أعمل ping 172.16.2.1 source 172.16.1.1 على مستوى الراوتر R3


كود:
R3#debug ip packet IP packet debugging is on R3#ping 172.16.2.1 source 172.16.1.1 Type escape sequence to abort. Sending 5, 100-byte ICMP Echos to 172.16.2.1, timeout is 2 seconds: Packet sent with a source address of 172.16.1.1 !!!!! Success rate is 100 percent (5/5), round-trip min/avg/max = 4/21/68 ms R3# *Mar 1 00:18:48.315: IP: s=172.16.1.1 (local), d=172.16.2.1 (Serial0/1), len 100, sending *Mar 1 00:18:48.379: IP: s=172.16.2.1 (Serial0/1), d=172.16.1.1, len 100, rcvd 4 *Mar 1 00:18:48.379: IP: s=172.16.1.1 (local), d=172.16.2.1 (Serial0/0), len 100, sending *Mar 1 00:18:48.399: IP: s=172.16.2.1 (Serial0/0), d=172.16.1.1, len 100, rcvd 4 *Mar 1 00:18:48.399: IP: s=172.16.1.1 (local), d=172.16.2.1 (Serial0/1), len 100, sending *Mar 1 00:18:48.403: IP: s=172.16.2.1 (Serial0/1), d=172.16.1.1, len 100, rcvd 4 *Mar 1 00:18:48.403: IP: s=172.16.1.1 (local), d=172.16.2.1 (Serial0/0), len 100, sending *Mar 1 00:18:48.411: IP: s=172.16.2.1 (Serial0/0), d=172.16.1.1, len 100, rcvd 4 *Mar 1 00:18:48.411: IP: s=172.16.1.1 (local), d=172.16.2.1 (Serial0/1), len 100, sending *Mar 1 00:18:48.419: IP: s=172.16.2.1 (Serial0/1), d=172.16.1.1, len 100, rcvd 4
ماذا عملنا في هذا المثال؟؟؟؟؟؟
قلنا للراوتر يا راوتر عند إرسال ال packet قم بإرسال واحدة في ال s0/0 و أخرى في ال s0/1 و هذا ما يتضح في ال debug

آمل من الإخوة إضافة ما يعرفونه بهذا الخصوص
قمت بتجريبها لما يكون ال ethernet بين الراوترين و لم تصلح
هذا و الله أعلم
اللهم علمنا ما جهلنا و انفعنا بما علمتنا إنك أنت العليم الحكيم