MPLS Layer 3 VPN: الـ VRF و RD و RT و VPNv4

جارٍ التحميل…

MPLS Layer 3 VPN: الـ VRF و RD و RT و VPNv4

أهم خدمة تبيعها شركات الاتصالات: Layer three VPN على MPLS. العميل عنده فرعين، والمزوّد يربطهم بدون ما الـ core يعرف شبكاتهم، وبدون تعارض مع عملاء ثانيين بنفس العناوين. نفهم الـ VRF، والـ route distinguisher، والـ route target، و MP-BGP VPNv4، والـ labelين، ونبني الاتصال بين الفرعين.

ضمن مسار ENARSI 300-410 — التوجيه المتقدم وخدمات الشبكات

شرح الدرس مكتوبًا

نص شرح المعلم والكود الذي كتبه ونتيجة تشغيله، بنفس ترتيب الدرس.

PE1
enable
configure terminal
hostname PE1
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
end
enable
configure terminal
router ospf 1
router-id 1.1.1.1
network 1.1.1.1 0.0.0.0 area 0
network 10.0.12.0 0.0.0.255 area 0
end
enable
configure terminal
mpls ldp router-id lo0 force
interface g0/0/0
mpls ip
end
enable
configure terminal
vrf definition CUST
rd 65000:1
route-target export 65000:100
route-target import 65000:100
address-family ipv4
exit-address-family
interface g0/0/1
vrf forwarding CUST
ip address 192.168.10.1 255.255.255.252
no shutdown
ip route vrf CUST 192.168.1.0 255.255.255.0 192.168.10.2
end
P
enable
configure terminal
hostname P
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
end
enable
configure terminal
router ospf 1
router-id 2.2.2.2
network 2.2.2.2 0.0.0.0 area 0
network 10.0.12.0 0.0.0.255 area 0
network 10.0.23.0 0.0.0.255 area 0
end
enable
configure terminal
mpls ldp router-id lo0 force
interface g0/0/0
mpls ip
interface g0/0/1
mpls ip
end
PE2
enable
configure terminal
hostname PE2
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
end
enable
configure terminal
router ospf 1
router-id 3.3.3.3
network 3.3.3.3 0.0.0.0 area 0
network 10.0.23.0 0.0.0.255 area 0
end
enable
configure terminal
mpls ldp router-id lo0 force
interface g0/0/0
mpls ip
end
enable
configure terminal
vrf definition CUST
rd 65000:2
route-target export 65000:100
route-target import 65000:100
address-family ipv4
exit-address-family
interface g0/0/1
vrf forwarding CUST
ip address 192.168.20.1 255.255.255.252
no shutdown
ip route vrf CUST 192.168.2.0 255.255.255.0 192.168.20.2
end
CE1
enable
configure terminal
hostname CE1
no ip domain-lookup
interface g0/0/0
ip address 192.168.10.2 255.255.255.252
no shutdown
interface lo1
ip address 192.168.1.1 255.255.255.0
ip route 0.0.0.0 0.0.0.0 192.168.10.1
end
CE2
enable
configure terminal
hostname CE2
no ip domain-lookup
interface g0/0/0
ip address 192.168.20.2 255.255.255.252
no shutdown
interface lo1
ip address 192.168.2.1 255.255.255.0
ip route 0.0.0.0 0.0.0.0 192.168.20.1
end

حيّاك الله. الدرس اللي فات بنينا core بـ MPLS. والحين نستخدمه للخدمة الأهم: Layer three VPN. العميل CUST عنده فرعين: CE1 في الرياض ورا PE1، و CE2 في جدة ورا PE2. والمزوّد يبغى يربطهم، ويكون عنده مِيّة عميل ثاني، وكلهم ممكن يستخدمون نفس العناوين الخاصة، زي one ninety two dot one sixty eight dot one dot zero.

الحل من أربع قطع. الـ VRF على الـ PE: جدول توجيه منفصل لكل عميل، زي درس الـ VRF-lite. الـ RD، يعني route distinguisher: رقم يتحط قبل عنوان العميل، عشان one ninety two dot one sixty eight dot one dot zero حق عميل، تختلف عن one ninety two dot one sixty eight dot one dot zero حق عميل ثاني. والناتج اسمه VPNv4 prefix. الـ RT، يعني route target: community تقول: هذا المسار يدخل أي VRF. export يحطها، و import يقبلها. و MP-BGP بين الـ PEs، بالـ address family vpnv4، ينقل المسارات هذي ومعها label ثاني. الـ VRFs جاهزة على الـ PEs، و RD مختلف لكل PE، والـ RT نفسه: six five zero zero zero colon one hundred. والـ PEs يعرفون شبكات العميل المحلية بـ static. نشوف جدول CUST في PE1.

PE1
show ip route vrf CUST | begin Gateway

PE1 يعرف one ninety two dot one sixty eight dot one dot zero بس، من CE1. وما يعرف شي عن جدة. نبني MP-BGP بين PE1 و PE2. جار iBGP على الـ loopbacks، وتحت address-family vpnv4: activate، و send-community extended، لأن الـ RT extended community، وبدونها ما ينرسل. وبعدها address-family ipv4 vrf CUST، وفيها redistribute static و connected، عشان شبكات العميل تدخل BGP.

PE1
configure terminal
router bgp 65000
bgp router-id 1.1.1.1
neighbor 3.3.3.3 remote-as 65000
neighbor 3.3.3.3 update-source lo0
address-family vpnv4
neighbor 3.3.3.3 activate
neighbor 3.3.3.3 send-community extended
exit-address-family
address-family ipv4 vrf CUST
redistribute static
redistribute connected
end
PE2
configure terminal
router bgp 65000
bgp router-id 3.3.3.3
neighbor 1.1.1.1 remote-as 65000
neighbor 1.1.1.1 update-source lo0
address-family vpnv4
neighbor 1.1.1.1 activate
neighbor 1.1.1.1 send-community extended
end
show bgp vpnv4 unicast all

PE2 استلم مسارات الرياض، وكل مسار تحت Route Distinguisher six five zero zero zero colon one. لكن PE2 للحين ما يعلن جدة، لأننا ما سوينا redistribute في الـ VRF حقه. الحين دورك. كمّل PE2: address-family ipv4 vrf CUST فيها redistribute static و connected. وبعدها جرّب ping من CE1 لـ one ninety two dot one sixty eight dot two dot one. وقّف الفيديو، وجرّب.

تمرين: على PE2: router bgp 65000 ← address-family ipv4 vrf CUST ← redistribute static و redistribute connected. بعدها على CE1: ping 192.168.2.1 source lo1.

الحل.

PE2
configure terminal
router bgp 65000
address-family ipv4 vrf CUST
redistribute static
redistribute connected
end
PE1
show ip route vrf CUST | begin Gateway

جدول CUST في PE1 فيه one ninety two dot one sixty eight dot two dot zero بالـ code B، والـ ping من الرياض لجدة نجح، بعد ما ضاعت أول packet ين بسبب الـ ARP. والسؤال الأهم: P يعرف one ninety two dot one sixty eight dot two dot zero؟ أبداً. ولا حتى PE1 يعرفه في جدوله الأساسي. كل شي داخل الـ VRF. والـ packet تمشي بـ label ين: الخارجي من LDP يوصلها لـ PE2، و P يشيله بالـ PHP، والداخلي من BGP يقول لـ PE2: هذي لـ VRF CUST. الخلاصة: VRF و RD و RT و vpnv4، والـ core ما يعرف شي. والدرس الجاي: تشخيص MPLS VPN.

دروس المسار (74)
  1. حيّاكم الله: من ENCOR إلى ENARSI
  2. كيف يختار الراوتر المسار: Longest Match و Administrative Distance
  3. الـ Prefix List: فلترة بالشبكة وبطول الـ prefix
  4. الـ Route Map: لغة السياسات في التوجيه
  5. الـ Distribute List: الفلترة في EIGRP وفي OSPF
  6. الـ Redistribution: ربط EIGRP مع OSPF
  7. مشاكل الـ Redistribution في أكثر من نقطة: Tags تمنع الـ Loop
  8. الـ Summarization: مسار واحد بدل أربعة، و Null0
  9. منع الـ Loops: Split Horizon و Route Poisoning
  10. الـ Policy Based Routing: توجيه حسب المصدر
  11. الـ VRF-Lite: أكثر من Routing Table في راوتر واحد
  12. الـ BFD: اكتشاف العطل في جزء من الثانية
  13. تشخيص أعطال التوجيه: طريقة منظمة على شبكة خربانة
  14. EIGRP: شروط الجيرة وتشخيص الجار اللي ما يطلع
  15. EIGRP: الـ Metric بالأرقام، وكيف تتحكم في المسار
  16. EIGRP: الـ DUAL و الـ Feasible Successor
  17. EIGRP Named Mode: كل الإعدادات في مكان واحد
  18. EIGRP: الـ Variance و Unequal-Cost Load Balancing
  19. EIGRP Stub: حماية الشبكة من الـ Queries
  20. EIGRP: الـ Leak-Map والـ Offset-List
  21. EIGRP: الـ Authentication بـ MD5 و SHA-256
  22. EIGRP for IPv6: الـ Classic والـ Named
  23. تشخيص EIGRP: ثلاث مشاكل في طريق واحد
  24. OSPF: حالات الجيرة، و Hello، و MTU
  25. OSPF: أنواع الشبكات و الـ DR و الـ BDR
  26. OSPF: أنواع الـ LSAs وقراءة الـ Database
  27. OSPF: ترتيب تفضيل المسارات وقاعدة الـ Backbone
  28. OSPF: الـ Stub و Totally Stubby Areas
  29. OSPF: الـ NSSA و LSA النوع سبعة
  30. OSPF: التلخيص في الـ ABR والـ ASBR
  31. OSPF: الفلترة الصحيحة بين الـ Areas
  32. OSPF: الـ Virtual Link لـ Area مفصولة
  33. OSPF: الـ Cost والـ Reference Bandwidth
  34. OSPF: الـ Authentication بـ MD5 و SHA
  35. OSPFv3: الـ OSPF حق IPv6
  36. تشخيص OSPF: جيران ما يطلعون
  37. BGP: الجلسات وحالاتها
  38. BGP: الـ iBGP بين الـ Loopbacks
  39. BGP: الـ Next Hop في الـ iBGP و next-hop-self
  40. BGP: الـ Route Reflector بدل الـ Full Mesh
  41. BGP: خوارزمية اختيار أفضل مسار
  42. BGP: التحكم في الترافيك الطالع بالـ Weight والـ Local Preference
  43. BGP: التحكم في الترافيك الداخل بالـ AS Path Prepend والـ MED
  44. BGP: الفلترة بالـ Prefix List وخطر الـ Transit
  45. BGP: الـ Regular Expressions و AS Path Filter
  46. BGP: الـ Communities و no-export
  47. BGP: حماية الجلسات بالـ Password و TTL Security
  48. MP-BGP: BGP لـ IPv6 بالـ Address Families
  49. تشخيص BGP: جلسات واقعة ومسار مو valid
  50. MPLS و LDP: Core بدون BGP
  51. MPLS Layer 3 VPN: الـ VRF و RD و RT و VPNv4
  52. تشخيص MPLS VPN: من الـ Core لفوق
  53. DMVPN: الـ mGRE و NHRP
  54. DMVPN: التوجيه فوق النفق و Phase 2
  55. DMVPN: الـ Phase 3 والحماية بـ IPsec
  56. AAA: 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
  63. IPv6 First-Hop Security: RA Guard و DHCPv6 Guard و Source Guard
  64. الدخول على الأجهزة والـ Backup بـ TFTP
  65. SNMP: من v2c المكشوف إلى SNMPv3
  66. الـ Syslog: مستويات الخطورة ووين تروح الرسائل
  67. الـ Debug بشرط: بدون ما تغرق الراوتر
  68. DHCP و الـ Relay: تشخيص أجهزة ما تاخذ عنوان
  69. DHCPv6: Stateful و Stateless والـ Relay
  70. الـ IP SLA و Object Tracking: Failover ذكي بين مزوّدين
  71. الـ Flexible NetFlow: مين يتكلم مع مين
  72. Catalyst Center Assurance: التشخيص من لوحة وحدة
  73. مشروع التشخيص الكامل: الشركة طاحت من الإنترنت
  74. الخاتمة: الاستعداد لاختبار ENARSI و وش بعده