اس لیب میں آپ GRE ٹنل بنانا اور اسے IPsec سے محفوظ کرنا سیکھیں گے — site-to-site VPN کی بنیاد۔
Is lab mein aap GRE tunnel banana aur usay IPsec se secure karna seekhenge — site-to-site VPN ki bunyaad.
In this lab you will learn to build a GRE tunnel and secure it with IPsec — the foundation of a site-to-site VPN.
دو دفاتر کے درمیان انٹرنیٹ ہے — جیسے دو شہروں کے درمیان سمندر۔ GRE ٹنل کا مطلب سمندر کے نیچے ایک پائپ ڈال دینا: اندر سے جو گزرے وہ محفوظ، باہر سے کوئی دیکھ نہیں سکتا۔ IPsec اس پائپ کو تالا لگا دیتا ہے — encryption۔ دونوں مل کر site-to-site VPN بنتا ہے۔
Do offices ke darmiyan internet hai — jaise do shehron ke darmiyan samandar. GRE tunnel ka matlab samandar ke neeche ek pipe daal dena: andar se jo guzre wo mehfooz, bahar se koi dekh nahi sakta. IPsec us pipe ko taala laga deta hai — encryption. Dono mil kar site-to-site VPN banta hai.
The internet lies between two offices — like an ocean between two cities. A GRE tunnel means laying a pipe under the ocean: whatever passes inside is safe, no one outside can see it. IPsec puts a lock on that pipe — encryption. Together they form a site-to-site VPN.
R1 اور R2 انٹرنیٹ (203.0.113.0/24) سے connected ہیں۔ دونوں کے پیچھے LANs ہیں۔ ڈیوائسز: 2x روٹر 2911 (R1, R2)، 2x پی سی۔ PC1: 192.168.10.10/24 (R1 کے پیچھے)۔ PC2: 192.168.30.10/24 (R2 کے پیچھے)۔
R1 aur R2 internet (203.0.113.0/24) se connected. Dono ke peeche LANs hain. Devices: 2x Router 2911 (R1, R2), 2x PC PC1: 192.168.10.10/24 (R1 ke peeche). PC2: 192.168.30.10/24 (R2 ke peeche).
R1 and R2 are connected to the internet (203.0.113.0/24). Both have LANs behind them. Devices: 2x Router 2911 (R1, R2), 2x PC. PC1: 192.168.10.10/24 (behind R1). PC2: 192.168.30.10/24 (behind R2).
R1 پر GRE ٹنل۔ ٹنل انٹرفیس بنائیں، اسے IP دیں، پھر بتائیں کہ ٹنل کہاں سے نکلے (source) اور کہاں جائے (destination)۔
R1 par GRE tunnel. Tunnel interface banao, usay IP do, phir batao ke tunnel kahan se nikle (source) aur kahan jaye (destination).
GRE tunnel on R1. Create the tunnel interface, give it an IP, then tell it where the tunnel starts (source) and where it goes (destination).
enableconfigure terminalinterface tunnel 0ip address 10.0.0.1 255.255.255.252tunnel source s0/0/0tunnel destination 203.0.113.2exitپھر دوسری سائٹ کا روٹ ٹنل کے ذریعے دیں۔
Phir doosri site ka route tunnel ke through do
Then route the other site's network through the tunnel.
ip route 192.168.30.0 255.255.255.0 10.0.0.2R1 پر IPsec (ٹنل کی حفاظت)۔ پہلے ISAKMP پالیسی (Phase 1): encryption، hash، pre-shared key۔
R1 par IPsec (tunnel ki hifazat). Pehle ISAKMP policy (Phase 1): encryption, hash, pre-shared key.
IPsec on R1 (protecting the tunnel). First the ISAKMP policy (Phase 1): encryption, hash, pre-shared key.
crypto isakmp policy 10encryption aeshash shaauthentication pre-sharegroup 2exitcrypto isakmp key MYSECRET address 203.0.113.2پھر transform-set (Phase 2): اصل encryption۔ پھر crypto map میں سب جوڑیں اور باہر والے انٹرفیس پر لگائیں۔
Phir transform-set (Phase 2): asal encryption. Phir crypto map mein sab joro aur bahar wale interface par lagao
Then the transform-set (Phase 2): the actual encryption. Then join everything in a crypto map and apply it on the outside interface.
crypto ipsec transform-set MYSET esp-aes esp-sha-hmacexitcrypto map MYMAP 10 ipsec-isakmpset peer 203.0.113.2set transform-set MYSETmatch address 100exitaccess-list 100 permit gre host 203.0.113.1 host 203.0.113.2interface s0/0/0crypto map MYMAPexitٹیسٹنگ: PC1 سے PC2 پنگ کریں۔
Testing: PC1 se PC2 ping karo.
Testing: ping PC2 from PC1.
پھر show crypto ipsec sa سے دیکھیں کہ پیکٹس encrypt ہو رہے ہیں (encaps/decaps counters بڑھ رہے ہوں)۔
Phir show crypto ipsec sa se dekho ke packets encrypt ho rahe hain (encaps/decaps counters barh rahe hon).
Then check with show crypto ipsec sa that packets are being encrypted (the encaps/decaps counters should be increasing).
show crypto isakmp sa اور show crypto ipsec sa سے ٹنل کی حالت دیکھیں۔
show crypto isakmp sa aur show crypto ipsec sa se tunnel ki haalat dekho.
Check the tunnel's state with show crypto isakmp sa and show crypto ipsec sa.
show crypto isakmp sashow crypto ipsec sa