VRF-Lite

CCNP ENCOR 350-401 v1.2 EVE-NG / GNS3

مقصدObjectiveObjective

اس لیب میں آپ VRF-Lite کانفگر کرنا سیکھیں گے — ایک روٹر پر متعدد الگ الگ روٹنگ ٹیبلز بنانا۔Is lab mein aap VRF-Lite configure karna seekhenge — ek router par multiple isolated routing tables banana.In this lab you will learn to configure VRF-Lite — creating multiple isolated routing tables on one router.

آسان مثالSimple AnalogySimple Analogy

ایک ہی بلڈنگ میں دو کمپنیاں ہیں — دونوں اپنا اپنا دفتر چلاتی ہیں، لیکن بجلی کا میٹر ایک ہے۔ VRF کا مطلب روٹر کے اندر الگ الگ 'ورچوئل روٹرز' بنا دینا: ہر کمپنی کی اپنی روٹنگ ٹیبل، اپنے روٹس — ایک دوسرے کو دیکھ بھی نہیں سکتے۔ VRF-Lite یہی کام ہے، بغیر MPLS کے — چھوٹے ملٹی ٹیننٹ نیٹ ورکس کے لیے۔Ek hi building mein do companies hain — dono apna apna office chalati hain, lekin bijli ka meter ek hai. VRF ka matlab router ke andar alag alag 'virtual routers' bana dena: har company ki apni routing table, apne routes — ek doosre ko dekh bhi nahi sakte. VRF-Lite yehi kaam hai, baghair MPLS ke — chhote multi-tenant networks ke liye.Two companies share one building — both run their own office, but the electricity meter is one. VRF means creating separate 'virtual routers' inside the router: each company has its own routing table, its own routes — they can't even see each other. VRF-Lite does the same thing without MPLS — for small multi-tenant networks.

سیٹ اپLab SetupLab Setup

R1 کے G0/0 پر COMPANY-A کا سوئچ+PCs، G0/1 پر COMPANY-B کا سوئچ+PCs۔ ڈیوائسز: 1x روٹر 2911 (R1)، 2x سوئچ، 4x پی سی۔ COMPANY-A کے PCs: 192.168.10.10، .11/24۔ COMPANY-B کے PCs: 192.168.10.10، .11/24 (وہی IPs چلیں گے — الگ VRF!)۔R1 ke G0/0 par COMPANY-A ka switch+PCs, G0/1 par COMPANY-B ka switch+PCs. Devices: 1x Router 2911 (R1), 2x Switch, 4x PC COMPANY-A ke PCs: 192.168.10.10, .11/24. COMPANY-B ke PCs: 192.168.10.10, .11/24 (same IPs chalenge — alag VRF!).R1's G0/0 connects COMPANY-A's switch+PCs, G0/1 connects COMPANY-B's switch+PCs. Devices: 1x Router 2911 (R1), 2x Switch, 4x PC. COMPANY-A PCs: 192.168.10.10, .11/24. COMPANY-B PCs: 192.168.10.10, .11/24 (the same IPs work — different VRF!).

اقداماتStepsSteps

Step 1

R1 پر VRFs بنائیں۔ دو VRFs بناتے ہیں (A اور B)۔R1 par VRFs banao. Do VRFs banate hain (A aur B).Create VRFs on R1. We create two VRFs (A and B).

enable
configure terminal
ip vrf COMPANY-A
rd 1:1
exit
ip vrf COMPANY-B
rd 1:2
exit

Step 2

پھر ہر انٹرفیس کو اس کے VRF میں ڈالتے ہیں — دھیان دیں: ip vrf forwarding IP ایڈریس سے پہلے لگتا ہے، ورنہ IP اڑ جاتا ہے۔ دونوں VRFs میں ایک ہی IP بھی چل سکتا ہے!Phir har interface ko uske VRF mein daalte hain — dhyan do: ip vrf forwarding IP address se PEHLE lagta hai, warna IP ur jata hai. Dono VRFs mein same IP bhi chal sakta hai!Then we place each interface in its VRF — note: ip vrf forwarding goes BEFORE the IP address, otherwise the IP is removed. The same IP can even be used in both VRFs!

interface g0/0
ip vrf forwarding COMPANY-A
ip address 192.168.10.1 255.255.255.0
no shutdown
exit
interface g0/1
ip vrf forwarding COMPANY-B
ip address 192.168.10.1 255.255.255.0
no shutdown
exit

Step 3

VRF ویریفائی کریں۔ show ip vrf سے VRFs دیکھیں۔VRF verify karo. show ip vrf se VRFs dekho.Verify VRF. View the VRFs with show ip vrf.

show ip vrf

Step 4

ہر VRF کی اپنی روٹنگ ٹیبل ہوتی ہے — اس لیے show ip route کے ساتھ vrf کا نام لکھنا پڑتا ہے۔ پنگ بھی VRF بتائے کر کریں۔Har VRF ki apni routing table hoti hai — is liye show ip route ke saath vrf naam likhna parta hai. Ping bhi VRF specify kar ke karoEach VRF has its own routing table — so you must write the vrf name with show ip route. Also specify the VRF when pinging.

show ip route vrf COMPANY-A
ping vrf COMPANY-A 192.168.10.10

Step 5

ٹیسٹنگ: A کے PC سے A کے گیٹ وے کو پنگ کریں — کامیاب۔ A کے PC سے B کے نیٹ ورک کو پنگ کریں — ناکام (isolated)۔Testing: A ke PC se A ke gateway ko ping karo — kamyab. A ke PC se B ke network ko ping karo — nakaam (isolated).Testing: ping A's gateway from A's PC — success. Ping B's network from A's PC — failure (isolated).

Step 6

یہی VRF کا کمال ہے۔Yehi VRF ka kamal hai.That is the magic of VRF.

تصدیقVerifyVerify

show ip vrf سے VRFs دیکھیں۔ show ip route vrf COMPANY-A سے اس کی ٹیبل دیکھیں۔show ip vrf se VRFs dekho. show ip route vrf COMPANY-A se uski table dekho.View the VRFs with show ip vrf. View its table with show ip route vrf COMPANY-A.

show ip vrf
show ip route vrf COMPANY-A

خرابی دور کرناTroubleshootingTroubleshooting

⚠️ VRF لگانے کے بعد انٹرفیس کا IP غائب ہو گیا۔VRF lagane ke baad interface ka IP ghaib ho gaya.The interface's IP disappeared after applying VRF.

✅ پہلے ip vrf forwarding لگائیں، پھر IP ایڈریس دوبارہ لگائیں۔ ترتیب غلط ہو تو IP غائب ہو جاتا ہے۔Pehle ip vrf forwarding lagao, phir IP address dobara lagao. Tartib ghalat ho to IP ghaib ho jata hai.Apply ip vrf forwarding first, then re-apply the IP address. If the order is wrong, the IP disappears.

⚠️ پنگ فیل ہو رہا ہے حالانکہ سب ٹھیک لگ رہا ہے۔Ping fail ho raha hai halanke sab theek lag raha hai.Ping is failing even though everything looks fine.

✅ ہر VRF کی اپنی ٹیبل ہے — ping اور show کمانڈز میں 'vrf NAME' لکھنا مت بھولیں۔Har VRF ki apni table hai — ping aur show commands mein 'vrf NAME' likhna mat bhoolo.Each VRF has its own table — don't forget to write 'vrf NAME' in ping and show commands.

انٹرویو سوالاتInterview Q&AInterview Q&A

❓ VRF کیا ہے اور VRF-Lite کا مطلب؟VRF kya hai aur VRF-Lite ka matlab?What is VRF and what does VRF-Lite mean?

VRF (Virtual Routing and Forwarding) روٹر کے اندر الگ روٹنگ ٹیبلز بناتا ہے — ملٹی ٹیننٹ isolation کے لیے۔ VRF-Lite بغیر MPLS کے کام کرتا ہے۔VRF (Virtual Routing and Forwarding) router ke andar alag routing tables banata hai — multi-tenant isolation ke liye. VRF-Lite MPLS ke baghair kaam karta hai.VRF (Virtual Routing and Forwarding) creates separate routing tables inside a router — for multi-tenant isolation. VRF-Lite works without MPLS.