EIGRP: الـ Authentication بـ MD5 و SHA-256
أي جهاز يتصل بالشبكة ويتكلم EIGRP ممكن يصير جار ويحقن مسارات. الـ authentication يمنع هذا. نطبّق MD5 بـ key chain في الـ classic mode، و HMAC-SHA-256 في الـ named mode، ونشوف كيف شكل الجيرة لما يكون فيه mismatch، وأهمية رقم الـ key.
نص شرح المعلم والكود الذي كتبه ونتيجة تشغيله، بنفس ترتيب الدرس.
enable
configure terminal
hostname R1
no ip domain-lookup
interface g0/0/0
ip address 10.0.12.1 255.255.255.0
no shutdown
interface lo0
ip address 1.1.1.1 255.255.255.255
interface lo1
ip address 172.16.1.1 255.255.255.0
ip ospf network point-to-point
end
enable
configure terminal
router eigrp 100
eigrp router-id 1.1.1.1
network 10.0.12.0 0.0.0.255
network 172.16.1.0 0.0.0.255
network 1.1.1.1 0.0.0.0
no auto-summary
end
enable
configure terminal
logging buffered
endenable
configure terminal
hostname R2
no ip domain-lookup
interface g0/0/0
ip address 10.0.12.2 255.255.255.0
no shutdown
interface g0/0/1
ip address 10.0.23.2 255.255.255.0
no shutdown
interface lo0
ip address 2.2.2.2 255.255.255.255
interface lo1
ip address 172.16.2.1 255.255.255.0
ip ospf network point-to-point
end
enable
configure terminal
router eigrp 100
eigrp router-id 2.2.2.2
network 10.0.12.0 0.0.0.255
network 10.0.23.0 0.0.0.255
network 172.16.2.0 0.0.0.255
network 2.2.2.2 0.0.0.0
no auto-summary
endenable
configure terminal
hostname R3
no ip domain-lookup
interface g0/0/0
ip address 10.0.23.3 255.255.255.0
no shutdown
interface lo0
ip address 3.3.3.3 255.255.255.255
interface lo1
ip address 172.16.3.1 255.255.255.0
ip ospf network point-to-point
end
enable
configure terminal
no router eigrp 100
router eigrp CORP
address-family ipv4 unicast autonomous-system 100
eigrp router-id 3.3.3.3
network 10.0.23.0 0.0.0.255
network 172.16.3.0 0.0.0.255
endحيّاك الله. EIGRP بدون authentication يقبل أي جار يرسل hello صحيح على نفس الـ subnet ونفس الـ AS. يعني أي أحد يركّب لابتوب أو راوتر على الشبكة، ويشغّل EIGRP، ممكن يعلن default route ويسحب كل الترافيك له. والحل: authentication. كل رسالة EIGRP يكون معها hash من مفتاح سري، والجار اللي ما عنده نفس المفتاح، رسايله تنرمى.
في الـ classic mode، الخطوات ثلاث. key chain فيها key برقم، و key-string هو المفتاح. على الواجهة: ip authentication mode eigrp ورقم الـ AS و md5. وعلى الواجهة كمان: ip authentication key-chain eigrp ورقم الـ AS واسم الـ key chain. والـ classic يدعم MD5 بس. المعمل: R1 و R2 classic، و R3 named. نبدأ بالـ link بين R1 و R2. ونطبّق على R1 بس أول، عشان نشوف شكل المشكلة.
configure terminal
key chain EIGRP-KEYS
key 1
key-string Basma123
interface g0/0/0
ip authentication mode eigrp 100 md5
ip authentication key-chain eigrp 100 EIGRP-KEYS
end
show ip eigrp neighborsالجيرة مع R2 طاحت. R1 الحين يرفض أي hello بدون hash صحيح، و R2 للحين يرسل بدون authentication. ونشوف السبب في الـ log.
show logging | include EIGRP|DUALالرسالة تقول: Neighbor ten dot zero dot twelve dot two is down: authentication mode changed. وبعدها ما فيه أي محاولة جيرة ناجحة، لأن كل hello من R2 ينرمى. ولو شغّلت debug eigrp packets بتشوف السبب لكل رسالة: missing authentication. وهذا الدليل اللي تدوّره في التشخيص. الحين نكمل الطرف الثاني، R2، بنفس المفتاح ونفس رقم الـ key.
configure terminal
key chain EIGRP-KEYS
key 1
key-string Basma123
interface g0/0/0
ip authentication mode eigrp 100 md5
ip authentication key-chain eigrp 100 EIGRP-KEYS
endshow ip eigrp neighborsالجيرة رجعت. وأمرين يحبهم الاختبار. في MD5 رقم الـ key لازم يتطابق بين الطرفين، مو بس الـ string. والـ key chain يقدر يكون فيها أكثر من key، كل واحد له accept-lifetime و send-lifetime، عشان تغيّر المفتاح بدون ما تطيح الشبكة. والوقت لازم يكون مضبوط بالـ NTP، وإلا المفاتيح تنتهي في وقت غلط.
أما في الـ named mode، فيدعم HMAC-SHA-two fifty six، وأقوى من MD5. وكله تحت af-interface: authentication mode hmac-sha-two fifty six والمفتاح مباشرة. والـ named والـ classic ما يقدرون يتفقون على SHA، لأن الـ classic ما يدعمها. فعلى الـ link بين R2 الـ classic و R3 الـ named، لازم MD5. الحين دورك. فعّل MD5 على الـ link بين R2 و R3. على R2 بالطريقة الـ classic على g zero slash zero slash one، وعلى R3 من داخل af-interface g zero slash zero slash zero، بنفس الـ key chain. وتأكد إن R3 جار مع R2. وقّف الفيديو، وجرّب.
R2: على g0/0/1 نفس أوامر ip authentication. R3: key chain EIGRP-KEYS (key 1، Basma123)، و router eigrp CORP ← address-family ← af-interface g0/0/0 ← authentication mode md5 و authentication key-chain EIGRP-KEYS.
الحل.
configure terminal
interface g0/0/1
ip authentication mode eigrp 100 md5
ip authentication key-chain eigrp 100 EIGRP-KEYS
endconfigure terminal
key chain EIGRP-KEYS
key 1
key-string Basma123
router eigrp CORP
address-family ipv4 unicast autonomous-system 100
af-interface g0/0/0
authentication mode md5
authentication key-chain EIGRP-KEYS
end
show ip eigrp neighborsR3 جار مع R2، والـ authentication شغّال على الـ link كله. الخلاصة: الـ classic MD5 بـ key chain على الواجهة، والـ named يدعم SHA-two fifty six تحت af-interface، والـ mismatch يطيّح الجيرة، والدليل في الـ log. والدرس الجاي: EIGRP مع IPv6.
03 / دروس الكورس (74)
- 01حيّاكم الله: من ENCOR إلى ENARSI
- 02كيف يختار الراوتر المسار: Longest Match و Administrative Distance
- 03الـ Prefix List: فلترة بالشبكة وبطول الـ prefix
- 04الـ Route Map: لغة السياسات في التوجيه
- 05الـ Distribute List: الفلترة في EIGRP وفي OSPF
- 06الـ Redistribution: ربط EIGRP مع OSPF
- 07مشاكل الـ Redistribution في أكثر من نقطة: Tags تمنع الـ Loop
- 08الـ Summarization: مسار واحد بدل أربعة، و Null0
- 09منع الـ Loops: Split Horizon و Route Poisoning
- 10الـ Policy Based Routing: توجيه حسب المصدر
- 11الـ VRF-Lite: أكثر من Routing Table في راوتر واحد
- 12الـ BFD: اكتشاف العطل في جزء من الثانية
- 13تشخيص أعطال التوجيه: طريقة منظمة على شبكة خربانة
- 14EIGRP: شروط الجيرة وتشخيص الجار اللي ما يطلع
- 15EIGRP: الـ Metric بالأرقام، وكيف تتحكم في المسار
- 16EIGRP: الـ DUAL و الـ Feasible Successor
- 17EIGRP Named Mode: كل الإعدادات في مكان واحد
- 18EIGRP: الـ Variance و Unequal-Cost Load Balancing
- 19EIGRP Stub: حماية الشبكة من الـ Queries
- 20EIGRP: الـ Leak-Map والـ Offset-List
- 21EIGRP: الـ Authentication بـ MD5 و SHA-256انت هنا
- 22EIGRP for IPv6: الـ Classic والـ Named
- 23تشخيص EIGRP: ثلاث مشاكل في طريق واحد
- 24OSPF: حالات الجيرة، و Hello، و MTU
- 25OSPF: أنواع الشبكات و الـ DR و الـ BDR
- 26OSPF: أنواع الـ LSAs وقراءة الـ Database
- 27OSPF: ترتيب تفضيل المسارات وقاعدة الـ Backbone
- 28OSPF: الـ Stub و Totally Stubby Areas
- 29OSPF: الـ NSSA و LSA النوع سبعة
- 30OSPF: التلخيص في الـ ABR والـ ASBR
- 31OSPF: الفلترة الصحيحة بين الـ Areas
- 32OSPF: الـ Virtual Link لـ Area مفصولة
- 33OSPF: الـ Cost والـ Reference Bandwidth
- 34OSPF: الـ Authentication بـ MD5 و SHA
- 35OSPFv3: الـ OSPF حق IPv6
- 36تشخيص OSPF: جيران ما يطلعون
- 37BGP: الجلسات وحالاتها
- 38BGP: الـ iBGP بين الـ Loopbacks
- 39BGP: الـ Next Hop في الـ iBGP و next-hop-self
- 40BGP: الـ Route Reflector بدل الـ Full Mesh
- 41BGP: خوارزمية اختيار أفضل مسار
- 42BGP: التحكم في الترافيك الطالع بالـ Weight والـ Local Preference
- 43BGP: التحكم في الترافيك الداخل بالـ AS Path Prepend والـ MED
- 44BGP: الفلترة بالـ Prefix List وخطر الـ Transit
- 45BGP: الـ Regular Expressions و AS Path Filter
- 46BGP: الـ Communities و no-export
- 47BGP: حماية الجلسات بالـ Password و TTL Security
- 48MP-BGP: BGP لـ IPv6 بالـ Address Families
- 49تشخيص BGP: جلسات واقعة ومسار مو valid
- 50MPLS و LDP: Core بدون BGP
- 51MPLS Layer 3 VPN: الـ VRF و RD و RT و VPNv4
- 52تشخيص MPLS VPN: من الـ Core لفوق
- 53DMVPN: الـ mGRE و NHRP
- 54DMVPN: التوجيه فوق النفق و Phase 2
- 55DMVPN: الـ Phase 3 والحماية بـ IPsec
- 56AAA: TACACS+ و RADIUS وتشخيص الدخول
- 57الـ ACLs: الترتيب، والـ Sequence Numbers، والمكان الصح
- 58الـ Time-Based ACL: صلاحيات حسب الوقت
- 59الـ ACLs في IPv6 وفخ الـ Neighbor Discovery
- 60الـ uRPF: الحماية من العناوين المزوّرة
- 61الـ CoPP: حماية الـ Control Plane
- 62حماية الـ Management Plane: SSH و Access-Class
- 63IPv6 First-Hop Security: RA Guard و DHCPv6 Guard و Source Guard
- 64الدخول على الأجهزة والـ Backup بـ TFTP
- 65SNMP: من v2c المكشوف إلى SNMPv3
- 66الـ Syslog: مستويات الخطورة ووين تروح الرسائل
- 67الـ Debug بشرط: بدون ما تغرق الراوتر
- 68DHCP و الـ Relay: تشخيص أجهزة ما تاخذ عنوان
- 69DHCPv6: Stateful و Stateless والـ Relay
- 70الـ IP SLA و Object Tracking: Failover ذكي بين مزوّدين
- 71الـ Flexible NetFlow: مين يتكلم مع مين
- 72Catalyst Center Assurance: التشخيص من لوحة وحدة
- 73مشروع التشخيص الكامل: الشركة طاحت من الإنترنت
- 74الخاتمة: الاستعداد لاختبار ENARSI و وش بعده