ACI Policy Model & Contracts
CCNP Data Center — DCCOR track EVE-NG — Nexus / ACI lab
مقصدObjectiveObjective
اس lesson میں آپ APIC GUI میں ACI contracts اور filters بنائیں گے اور انہیں EPGs کے درمیان لگا کر controlled ٹریفک کی اجازت دیں گے۔Is lesson mein aap APIC GUI mein ACI contracts aur filters banayenge aur unhein EPGs ke darmiyan laga kar controlled traffic ki ijazat denge.In this lesson you will build ACI contracts and filters in the APIC GUI and attach them between EPGs to allow controlled traffic.
آسان مثالSimple AnalogySimple Analogy
ACI contract دفتر کے دروازوں کی policy جیسا ہے: ڈیفالٹ ہر دروازہ بند ہے، اور contract وہ لکھی ہوئی اجازت ہے جو بتاتی ہے کہ کون اندر آ سکتا ہے اور کس دروازے (port) سے۔ACI contract daftar ke darwazon ki policy jaisa hai: default har darwaza band hai, aur contract woh likhi hui ijazat hai jo batati hai ke kaun andar aa sakta hai aur kis darwaze (port) se.An ACI contract is like an office door policy: by default every door is locked, and a contract is the written permission saying exactly who may enter and through which door (port).
سیٹ اپLab SetupLab Setup
APIC GUI کی access، Lab-Tenant نام کا tenant پہلے سے بنا ہو، اور اس کے اندر application profile جس میں Web-EPG اور DB-EPG ہوں۔APIC GUI ki access, Lab-Tenant naam ka tenant pehle se bana ho, aur us ke andar application profile jis mein Web-EPG aur DB-EPG hon.APIC GUI access with a tenant named Lab-Tenant already created, plus an application profile with Web-EPG and DB-EPG inside it.
اقداماتStepsSteps
Step 1
Tenant کھولیں۔ ACI میں ہر چیز — VRF، bridge domains، contracts — tenant کے نیچے ہوتی ہے۔Tenant kholein. ACI mein har cheez — VRF, bridge domains, contracts — tenant ke neeche hoti hai.Open the tenant. Everything in ACI — VRF, bridge domains, contracts — lives under the tenant.
🖱️ Tenants > Lab-Tenant پر کلک کریںTenants > Lab-Tenant par click kareinTenants > Lab-Tenant
Step 2
Web-to-DB نام کا standard contract بنائیں۔ Contract خود خالی ہوتا ہے — اصل rules filters میں ہوتے ہیں۔Web-to-DB naam ka standard contract banayein. Contract khud khaali hota hai — asal rules filters mein hote hain.Create a standard contract named Web-to-DB. The contract itself is empty — the real rules live in the filters.
🖱️ Contracts > Standard پر right-click کر کے Create Contract چنیںContracts > Standard par right-click kar ke Create Contract chuneinTenants > Lab-Tenant > Security Policies > Contracts > Standard > Right-click > Create Contract
Step 3
DB-3306 نام کا filter بنائیں جو TCP port 3306 allow کرے۔ Filter وہ list ہے جو بتاتی ہے کہ contract کون سے ports اور protocols کی اجازت دیتا ہے۔DB-3306 naam ka filter banayein jo TCP port 3306 allow kare. Filter woh list hai jo batati hai ke contract kaun se ports aur protocols ki ijazat deta hai.Create a filter named DB-3306 that allows TCP port 3306. A filter is the list of ports and protocols the contract permits.
🖱️ Filters پر right-click کر کے Create Filter چنیںFilters par right-click kar ke Create Filter chuneinTenants > Lab-Tenant > Security Policies > Filters > Right-click > Create Filter
Step 4
Contract میں ایک subject add کریں اور اس سے DB-3306 filter جوڑیں۔ Subject contract کو اس کے rules سے جوڑتا ہے۔Contract mein ek subject add karein aur us se DB-3306 filter jorein. Subject contract ko us ke rules se jorta hai.Add a subject to the contract and link the DB-3306 filter to it. The subject ties the contract to its rules.
🖱️ Contract کے subject میں DB-3306 filter attach کریںContract ke subject mein DB-3306 filter attach kareinContracts > Web-to-DB > Subjects > Add Subject > associate Filter DB-3306
Step 5
DB-EPG پر Web-to-DB کو provided contract کے طور پر add کریں۔ DB والی side سروس provide کرتی ہے۔DB-EPG par Web-to-DB ko provided contract ke tor par add karein. DB wali side service provide karti hai.On DB-EPG, add Web-to-DB as a provided contract. The DB side provides the service.
🖱️ DB-EPG پر Web-to-DB کو Provided Contract کے طور پر add کریںDB-EPG par Web-to-DB ko Provided Contract ke tor par add kareinApplication Profiles > Lab-App > Application EPGs > DB-EPG > Contracts > Add Provided Contract
Step 6
Web-EPG پر Web-to-DB کو consumed contract کے طور پر add کریں۔ Web والی side سروس استعمال کرتی ہے۔ Tenants > Lab-Tenant > Operational سے تصدیق کریں۔Web-EPG par Web-to-DB ko consumed contract ke tor par add karein. Web wali side service istemal karti hai. Tenants > Lab-Tenant > Operational se tasdeeq karein.On Web-EPG, add Web-to-DB as a consumed contract. The Web side consumes the service. Verify with Tenants > Lab-Tenant > Operational.
🖱️ Web-EPG پر Web-to-DB کو Consumed Contract کے طور پر add کریںWeb-EPG par Web-to-DB ko Consumed Contract ke tor par add kareinApplication Profiles > Lab-App > Application EPGs > Web-EPG > Contracts > Add Consumed Contract
تصدیقVerifyVerify
APIC GUI میں Tenants > Lab-Tenant > Operational پر جائیں اور تصدیق کریں کہ Web-to-DB contract Web-EPG اور DB-EPG کے درمیان نظر آ رہا ہے۔APIC GUI mein Tenants > Lab-Tenant > Operational par jayein aur tasdeeq karein ke Web-to-DB contract Web-EPG aur DB-EPG ke darmiyan nazar aa raha hai.In the APIC GUI go to Tenants > Lab-Tenant > Operational and confirm that the Web-to-DB contract appears between Web-EPG and DB-EPG.
خرابی دور کرناTroubleshootingTroubleshooting
⚠️ Contract لگانے کے بعد بھی EPGs کے درمیان ٹریفک block ہے۔Contract lagane ke baad bhi EPGs ke darmiyan traffic block hai.Traffic between the EPGs is still blocked after adding the contract.
✅ Contract دونوں EPGs پر ہونا چاہیے: ایک side پر provided، دوسری پر consumed۔ یہ بھی چیک کریں کہ filter صحیح port allow کرتا ہے۔Contract dono EPGs par hona chahiye: ek side par provided, doosri par consumed. Ye bhi check karein ke filter sahi port allow karta hai.The contract must be on both EPGs: provided on one side, consumed on the other. Also check that the filter allows the right port.
⚠️ Contract لگا ہے لیکن ping پھر بھی fail ہو رہا ہے۔Contract laga hai lekin ping phir bhi fail ho raha hai.The contract is attached but ping still fails.
✅ چیک کریں کہ bridge domain میں subnet configure ہے اور endpoints واقعی EPG میں learn ہوئے ہیں۔Check karein ke bridge domain mein subnet configure hai aur endpoints waqai EPG mein learn hue hain.Check that the bridge domain has the subnet configured and that the endpoints are actually learned in the EPG.
انٹرویو سوالاتInterview Q&AInterview Q&A
❓ ACI contract کیا ہے؟ACI contract kya hai?What is an ACI contract?
Contract ACI کی وہ policy ہے جو EPGs کے درمیان ٹریفک کی اجازت دیتی ہے۔ ڈیفالٹ سب deny ہے؛ contract ہی مخصوص ٹریفک کو allow کرتا ہے۔Contract ACI ki woh policy hai jo EPGs ke darmiyan traffic ki ijazat deti hai. Default sab deny hai; contract hi makhsoos traffic ko allow karta hai.A contract is the ACI policy that allows traffic between EPGs. By default everything is denied; the contract is what permits specific traffic.
❓ Provided اور consumed contract میں کیا فرق ہے؟Provided aur consumed contract mein kya farq hai?What is the difference between a provided and a consumed contract?
Provider EPG سروس دیتا ہے (مثلاً DB سرور)، اور consumer EPG اسے استعمال کرتا ہے (مثلاً Web سرور)۔ Contract ان دونوں کے درمیان لگتا ہے۔Provider EPG service deta hai (masalan DB server), aur consumer EPG usay istemal karta hai (masalan Web server). Contract in dono ke darmiyan lagta hai.The provider EPG offers the service (for example the DB server), and the consumer EPG uses it (for example the Web server). The contract sits between them.