DMVPN: Phase 1-3
CCNP ENARSI 300-410 EVE-NG / GNS3
مقصدObjectiveObjective
اس لیب میں آپ DMVPN کے تینوں phases، NHRP کا کردار، اور hub-spoke ٹوپولوجی کنفیگر کرنا سیکھیں گے۔Is lab mein aap DMVPN ke teenon phases, NHRP ka kirdar, aur hub-spoke topology configure karna seekhenge.In this lab you will learn the three DMVPN phases, NHRP's role, and how to configure a hub-spoke topology.
آسان مثالSimple AnalogySimple Analogy
DMVPN ایسا ہے جیسے کمپنی کا ہیڈ آفس (hub) اور برانچیں (spokes) ہوں۔ Phase 1 میں ہر برانچ صرف ہیڈ آفس سے بات کرتی ہے۔ Phase 2 میں برانچیں ہیڈ آفس سے ایک دوسرے کا نمبر (NHRP) لے کر براہ راست بات کر لیتی ہیں۔ Phase 3 میں ہیڈ آفس خود بتا دیتا ہے: تم دونوں آپس میں بات کر لو۔DMVPN aisa hai jaise company ka head office (hub) aur branchein (spokes) hon. Phase 1 mein har branch sirf head office se baat karti hai. Phase 2 mein branchein head office se ek doosre ka number (NHRP) le kar braah-e-raast baat kar leti hain. Phase 3 mein head office khud bata deta hai: tum dono aapas mein baat kar lo.DMVPN is like a company head office (hub) with branches (spokes). In Phase 1 every branch talks only to HQ. In Phase 2 branches get each other's number (NHRP) from HQ and talk directly. In Phase 3 HQ itself tells them: you two talk directly.
سیٹ اپLab SetupLab Setup
ایک Hub راؤٹر (public IP 203.0.113.1) اور دو Spoke راؤٹرز (Spoke1، Spoke2) انٹرنیٹ (کلاؤڈ) کے ذریعے جڑے ہیں۔ Tunnel نیٹ ورک 10.0.0.0/24، NHRP نیٹ ورک-ID 1۔Ek Hub router (public IP 203.0.113.1) aur do Spoke routers (Spoke1, Spoke2) internet (cloud) ke zariye jure hain. Tunnel network 10.0.0.0/24, NHRP network-ID 1.One Hub router (public IP 203.0.113.1) and two Spoke routers (Spoke1, Spoke2) connect over the internet (cloud). Tunnel network 10.0.0.0/24, NHRP network-ID 1.
اقداماتStepsSteps
Step 1
Hub پر mGRE tunnel بنائیں۔ Hub کا tunnel multipoint ہوتا ہے — ایک ہی انٹرفیس کئی spokes سنبھالتا ہے۔ NHRP network-ID اور authentication لگائیں۔Hub par mGRE tunnel banayein. Hub ka tunnel multipoint hota hai — ek hi interface kai spokes sambhalta hai. NHRP network-ID aur authentication lagayein.Build the mGRE tunnel on the Hub. The hub's tunnel is multipoint — one interface serves many spokes. Set the NHRP network-ID and authentication.
configure terminal interface Tunnel0 ip address 10.0.0.1 255.255.255.0 ip nhrp network-id 1 ip nhrp authentication DMVPN-KEY tunnel source GigabitEthernet0/0 tunnel mode gre multipoint exit
Step 2
Spoke1 پر tunnel کنفیگر کریں۔ Spoke کا tunnel point-to-point طرز پر hub کی طرف اشارہ کرتا ہے — tunnel destination hub کی public IP ہوتی ہے۔ NHRP hub کو اپنا mapping بتاتا ہے۔Spoke1 par tunnel configure karein. Spoke ka tunnel point-to-point tarz par hub ki taraf ishara karta hai — tunnel destination hub ki public IP hoti hai. NHRP hub ko apna mapping batata hai.Configure the tunnel on Spoke1. The spoke's tunnel points at the hub — tunnel destination is the hub's public IP. NHRP registers its mapping with the hub.
configure terminal interface Tunnel0 ip address 10.0.0.2 255.255.255.0 ip nhrp network-id 1 ip nhrp authentication DMVPN-KEY ip nhrp nhs 10.0.0.1 ip nhrp map 10.0.0.1 203.0.113.1 ip nhrp map multicast 203.0.113.1 tunnel source GigabitEthernet0/0 tunnel destination 203.0.113.1 exit
Step 3
Spoke2 پر بھی وہی کنفیگریشن دہرائیں (tunnel IP 10.0.0.3)۔ دونوں spokes کے NHRP registration hub پر نظر آنے چاہئیں: show ip nhrp۔Spoke2 par bhi wohi configuration dohraein (tunnel IP 10.0.0.3). Dono spokes ke NHRP registration hub par nazar aane chahiye: show ip nhrp.Repeat the same configuration on Spoke2 (tunnel IP 10.0.0.3). Both spokes' NHRP registrations should appear on the hub: show ip nhrp.
show ip nhrp
Step 4
Phase 1 ٹیسٹ کریں۔ Phase 1 میں spoke-to-spoke ٹریفک hub سے گزرتا ہے۔ Spoke1 سے Spoke2 کے LAN تک ping کریں اور hub پر ٹریفک دیکھیں۔Phase 1 test karein. Phase 1 mein spoke-to-spoke traffic hub se guzarta hai. Spoke1 se Spoke2 ke LAN tak ping karein aur hub par traffic dekhein.Test Phase 1. In Phase 1, spoke-to-spoke traffic passes through the hub. Ping from Spoke1 to Spoke2's LAN and observe the traffic on the hub.
ping 10.0.0.3 source 10.0.0.2
Step 5
Phase 2 سمجھیں۔ Phase 2 میں spokes کو ایک دوسرے کے subnets کی routing معلومات ملتی ہیں، تو spoke براہ راست NHRP resolution کر کے spoke-to-spoke tunnel بنا لیتا ہے — hub بیچ میں نہیں رہتا۔Phase 2 samjhein. Phase 2 mein spokes ko ek doosre ke subnets ki routing maloomat milti hain, to spoke braah-e-raast NHRP resolution kar ke spoke-to-spoke tunnel bana leta hai — hub beech mein nahi rehta.Understand Phase 2. In Phase 2, spokes learn each other's subnets via routing, so a spoke resolves NHRP directly and builds a spoke-to-spoke tunnel — the hub stays out of the data path.
show ip nhrp show dmvpn
Step 6
Phase 3 سمجھیں۔ Phase 3 میں hub NHRP redirect بھیجتا ہے اور spokes shortcut switching کرتے ہیں — spoke کو پہلے سے subnets جاننے کی ضرورت نہیں، hub اسے بہتر راستے کی طرف اشارہ کر دیتا ہے۔ یہ سب سے بہترین اور عام ڈیزائن ہے۔Phase 3 samjhein. Phase 3 mein hub NHRP redirect bhejta hai aur spokes shortcut switching karte hain — spoke ko pehle se subnets janne ki zaroorat nahi, hub ise behtar raste ki taraf ishara kar deta hai. Ye sab se behtreen aur aam design hai.Understand Phase 3. In Phase 3 the hub sends NHRP redirects and spokes do shortcut switching — the spoke doesn't need to know subnets in advance; the hub points it to the better path. This is the best and most common design.
show ip nhrp shortcut show dmvpn detail
Step 7
IPsec تحفظ شامل کریں۔ DMVPN عام طور پر IPsec کے ساتھ چلتا ہے (mGRE over IPsec)۔ کم از کم یہ سمجھیں کہ production میں tunnel کو encrypt کیے بغیر انٹرنیٹ پر نہیں چلانا چاہیے۔IPsec tahaffuz shamil karein. DMVPN aam tor par IPsec ke saath chalta hai (mGRE over IPsec). Kam az kam ye samjhein ke production mein tunnel ko encrypt kiye baghair internet par nahi chalana chahiye.Add IPsec protection. DMVPN normally runs with IPsec (mGRE over IPsec). At minimum, understand that a production tunnel must never run over the internet unencrypted.
show crypto ipsec sa
تصدیقVerifyVerify
Hub پر show ip nhrp میں دونوں spokes dynamic entries کے ساتھ نظر آئیں۔ Spoke-to-spoke ping کامیاب ہو اور Phase 2/3 میں براہ راست tunnel بنے۔Hub par show ip nhrp mein dono spokes dynamic entries ke saath nazar aayein. Spoke-to-spoke ping kamyab ho aur Phase 2/3 mein braah-e-raast tunnel bane.On the hub, show ip nhrp should list both spokes as dynamic entries. Spoke-to-spoke ping should succeed, with a direct tunnel in Phase 2/3.
show ip nhrp show dmvpn
خرابی دور کرناTroubleshootingTroubleshooting
⚠️ Spoke hub کے ساتھ register نہیں ہو رہا۔Spoke hub ke saath register nahi ho raha.The spoke isn't registering with the hub.
✅ NHRP network-ID اور authentication دونوں طرف ایک جیسے چیک کریں۔ Spoke پر ip nhrp nhs اور ip nhrp map درست hub IPs کی طرف اشارہ کریں۔ Underlay (انٹرنیٹ) connectivity پہلے ping سے چیک کریں۔NHRP network-ID aur authentication dono taraf ek jaise check karein. Spoke par ip nhrp nhs aur ip nhrp map durust hub IPs ki taraf ishara karein. Underlay (internet) connectivity pehle ping se check karein.Verify NHRP network-ID and authentication match on both sides. On the spoke, ip nhrp nhs and ip nhrp map must point to the correct hub IPs. Check underlay (internet) connectivity with ping first.
⚠️ Spoke-to-spoke ping hub سے گزر رہا ہے، براہ راست tunnel نہیں بن رہا۔Spoke-to-spoke ping hub se guzar raha hai, braah-e-raast tunnel nahi ban raha.Spoke-to-spoke ping goes via the hub; no direct tunnel forms.
✅ آپ Phase 1 میں ہیں۔ Phase 2 کے لیے spokes کو ایک دوسرے کے subnets routing سے معلوم ہونے چاہئیں۔ Phase 3 کے لیے hub پر NHRP redirect اور spokes پر shortcut switching آن ہونی چاہیے۔Aap Phase 1 mein hain. Phase 2 ke liye spokes ko ek doosre ke subnets routing se maloom hone chahiye. Phase 3 ke liye hub par NHRP redirect aur spokes par shortcut switching on honi chahiye.You're in Phase 1. For Phase 2, spokes must learn each other's subnets via routing. For Phase 3, NHRP redirect must be on the hub and shortcut switching on the spokes.
انٹرویو سوالاتInterview Q&AInterview Q&A
❓ DMVPN کے تینوں phases میں کیا فرق ہے؟DMVPN ke teenon phases mein kya farq hai?What is the difference between the three DMVPN phases?
Phase 1: spoke-to-spoke ٹریفک hub سے گزرتا ہے۔ Phase 2: spokes براہ راست tunnel بناتے ہیں (routing سے subnets جانتے ہیں)۔ Phase 3: hub NHRP redirect بھیجتا ہے، spokes کو پہلے سے subnets جاننے کی ضرورت نہیں — بہترین ڈیزائن۔Phase 1: spoke-to-spoke traffic hub se guzarta hai. Phase 2: spokes braah-e-raast tunnel banate hain (routing se subnets jante hain). Phase 3: hub NHRP redirect bhejta hai, spokes ko pehle se subnets janne ki zaroorat nahi — behtreen design.Phase 1: spoke-to-spoke traffic goes via the hub. Phase 2: spokes build direct tunnels (they know subnets via routing). Phase 3: hub sends NHRP redirects, spokes need no prior subnet knowledge — the best design.
❓ NHRP DMVPN میں کیا کرتا ہے؟NHRP DMVPN mein kya karta hai?What does NHRP do in DMVPN?
NHRP tunnel IP کو public (NBMA) IP سے map کرتا ہے — جیسے ARP۔ Spoke hub کے پاس register ہوتا ہے، پھر دوسرے spoke کا public پتہ پوچھ کر براہ راست tunnel بنا لیتا ہے۔NHRP tunnel IP ko public (NBMA) IP se map karta hai — jaise ARP. Spoke hub ke paas register hota hai, phir doosre spoke ka public pata pooch kar braah-e-raast tunnel bana leta hai.NHRP maps tunnel IPs to public (NBMA) IPs — like ARP. The spoke registers with the hub, then asks for another spoke's public address to build a direct tunnel.