اولاً:- راونر الـ Headquarter "HQ" /
أ- المعطيات
-راوتر ISR يعمل عليه راوتينج بروتوكول BGP .
- اثنان من مزودي الخدمه " نشط , ثانوي".
-ارقام ال AS الخاصة بكل من مزود خدمه أ و ب.
ب- المطلوب
-تحقيق التوازن بين الوصلتين باتجاه مزود خدمه أ , و ضبط الوصلة الى مزود ب كنوع ثانوي.
__________
لنبدأ في الاعدادات التي تخص ما يحقق لنا هذه المطاليب في راوتر HQ
هذه الاعدادات سوف تمكن الراوتر من الاتصال بعدد اثنين مزود خدمه مع منع المشكلة الشائعه من جعل الراوتر HQ منطقة انتقاليه , و لعمل Load Sharing سيلزم بعض الاضافات سوف اقوم بذكرها لاحقاً بعد هذه الاعدادات.
المشاركة الأصلية كتبت بواسطة Amaranth
كود:
Router BGP 50
neighbor 10.10.10.10 remote-as 101
neighbor 10.10.10.10 route-map LOCAL Out
!-- This Policy route map is applied locally in the outband direction to disable the use of your HQ router as a transit for Both ISPs
neighbor 10.10.10.10 route-map 101one in
!-- this is applied to filter out anything not sourced within First ISP network , this means only to accept routes from First ISP which is sourced with its network
neighbor 20.20.20.20 remote-as 102
neighbor 20.20.20.20 route-map LOCAL Out
!-- Same note about this command described above
neighbor 20.20.20.20 route-map 102one in
!-- like said before but this time we will accept only routes sourced with 102 network ISP
الان سوف نقوم بعمل AS-Path ACL التي سوف نستعملها للروات ماب LOCAL بغرض تطبيق سياسة منع الراوتر المحلي من ان يكون منطقة انتقاليه مابين مزودي الخدمه الاثنين, ولاحظ ان هذه القائمة فقط تسمح بال Local BGP Routes
كود:
ip as-path access-list 10 permit ^$
!-- this means that only the locally originated "^$ " Routes is allowed , anything else is denied because the nature of the implicit deny
route-map LOCAL permit 10
match as-path 101
ايضاً نقوم بعمل قائمتين اضافيتين لكل من الراوت ماب 101one و 102one
كود:
ip as-path access-list 20 permit ^101$
route-map 101one permit 10
match as-path 101!--this for accepting only the routes sourced within 101 ISP network , anything else is no prohibited
ip as-path access-list 30 permit ^102$
route-map 102one permit 10
match as-path 102
الان نحتاج الى انشاء Two Default Routes لكي يتم نشرها لبقية اعضاء الشبكة التي تتبع HQ Router
كود:
ip route 0.0.0.0 0.0.0.0 10.10.10.10
ip route 0.0.0.0 0.0.0.0 20.20.20.20
الان لا ننسى انه سوف نسمح فقط لل Default Route updates ان تصل لل HQ من مزودي الخدمه "ولانسمح لاي نوع اخر بالدخول" وهذا بتطبيق الاتي IP Prefix List
نضيف الاتي في Global Config Mode
كود:
neighbor 10.10.10.10 prefix-list ABC in
neighbor 20.20.20.20 prefix-list ABC inip prefix-list ABC seq 5 permit 0.0.0.0/0
المفضلات