Basic Router & Switch Setup

CCNA 200-301 v2.0 · Live Feb 3, 2027 (v1.1 valid through Feb 2, 2027) Cisco Packet Tracer

مقصدObjectiveObjective

اس لیب میں آپ سیکھیں گے کہ راؤٹر اور سوئچ پر پہلی دفعہ کیا کنفیگر کرتے ہیں۔ ہوسٹ نیم، پاس ورڈز، بینر اور بنیادی سیکیورٹی — یہ ہر ڈیوائس کا بنیادی سیٹ اپ ہے۔Is lab mein aap seekhenge ke router aur switch par pehli dafa kya configure karte hain. Hostname, passwords, banner aur basic security — ye har device ka bunyadi setup hai.In this lab, you'll learn what to configure first on a router and switch. Hostname, passwords, banner, and basic security — this is the basic setup for every device.

آسان مثالSimple AnalogySimple Analogy

نیا راؤٹر یا سوئچ خریدنا بالکل نئے موبائل جیسا ہے۔ پہلے آپ اسے اپنا نام دیتے ہیں، پاس ورڈ لگاتے ہیں، اور اسکرین لاک آن کرتے ہیں۔ راؤٹر میں بھی پہلے ہوسٹ نیم سیٹ کرتے ہیں، پاس ورڈز لگاتے ہیں، اور بینر لگاتے ہیں تاکہ کوئی غلط بندہ اندر آئے تو وارننگ پڑھ لے۔ یہ بنیادی سیٹ اپ ہر ڈیوائس پر پہلا قدم ہوتا ہے۔Naya router ya switch khareedna bilkul naye mobile jaisa hai. Pehle aap usay apna naam dete hain, password lagate hain, aur screen lock on karte hain. Router mein bhi pehle hostname set karte hain, passwords lagate hain, aur banner lagate hain taake koi ghalat banda andar aaye to warning parh le. Ye basic setup har device par pehla qadam hota hai.Buying a new router or switch is just like buying a new phone. First you give it your name, set a password, and turn on the screen lock. On a router you also start by setting the hostname, adding passwords, and placing a banner so anyone unauthorized reads the warning. This basic setup is the first step on every device.

سیٹ اپLab SetupLab Setup

R1 راؤٹر کا G0/0 انٹرفیس PC1 سے اسٹریٹ کیبل سے کنیکٹڈ ہے۔ سوئچ SW1 ابھی صرف بنیادی سیٹ اپ کے لیے استعمال ہوگا۔ ڈیوائسز: 1x راؤٹر 2911 (R1)، 1x سوئچ 2960 (SW1)، 1x پی سی۔ PC1 پر IP 192.168.1.10، ماسک 255.255.255.0، گیٹ وے 192.168.1.1 سیٹ کرو۔ R1 کے G0/0 کو PC سے کنیکٹ کرو۔R1 router ka G0/0 interface PC1 se straight cable se connected hai. Switch SW1 abhi sirf basic setup ke liye istemal hoga. Devices: 1x Router 2911 (R1), 1x Switch 2960 (SW1), 1x PC PC1 par IP 192.168.1.10, mask 255.255.255.0, gateway 192.168.1.1 set karo. R1 ke G0/0 ko PC se connect karo.Router R1's G0/0 interface is connected to PC1 with a straight-through cable. Switch SW1 will only be used for basic setup for now. Devices: 1x Router 2911 (R1), 1x Switch 2960 (SW1), 1x PC. Set IP 192.168.1.10, mask 255.255.255.0, gateway 192.168.1.1 on PC1. Connect R1's G0/0 to the PC.

اقداماتStepsSteps

Step 1

راؤٹر پر (R1)۔ پہلے پرولیجڈ موڈ میں جائیں، پھر کنفیگریشن موڈ۔Router par (R1). Pehle privileged mode mein jayein, phir configuration mode.On the router (R1). First enter privileged mode, then configuration mode.

enable
configure terminal

Step 2

ہوسٹ نیم ڈیوائس کا نام ہے — پرامپٹ میں نظر آتا ہےHostname device ka naam hai — prompt mein nazar aata haiThe hostname is the device's name — it shows in the prompt.

hostname R1

Step 3

پاس ورڈز (R1)۔ اب پاس ورڈز لگاتے ہیں۔ enable secret پرولیجڈ موڈ کا پاس ورڈ ہےPasswords (R1). Ab passwords lagate hain. enable secret privileged mode ka password haiPasswords (R1). Now we set passwords. The enable secret is the privileged mode password.

enable secret cisco123

Step 4

کنسول وہ ہے جب آپ کیبل سے سیدھا کنیکٹ ہوں، vty وہ ہے جب نیٹ ورک سے (telnet/SSH) کنیکٹ ہوںConsole woh hai jab aap cable se seedha connect hon, vty woh hai jab network se (telnet/SSH) connect honConsole is when you connect directly with a cable; VTY is when you connect over the network (telnet/SSH).

line console 0
password con123
login
exit
line vty 0 4
password vty123
login
exit

Step 5

پاس ورڈز انکرپٹ کرو اور بینر لگاؤPasswords encrypt karo aur banner lagaoEncrypt the passwords and set the banner.

service password-encryption
banner motd #Authorized Access Only#

Step 6

ٹیسٹنگ: PC سے راؤٹر کو پنگ کرو: ping 192.168.1.1۔ جواب آنا چاہیے۔Testing: PC se router ko ping karo: ping 192.168.1.1. Jawab aana chahiye.Testing: ping the router from the PC: ping 192.168.1.1. You should get a reply.

Step 7

پھر کنسول سے لاگ آؤٹ کر کے دوبارہ لاگ ان کرو — پاس ورڈ مانگنا چاہیے۔ enable لکھو تو enable secret کا پاس ورڈ مانگنا چاہیے۔Phir console se logout kar ke dobara login karo — password maangna chahiye. enable likho to enable secret ka password maangna chahiye.Then log out of the console and log in again — it should ask for a password. Type enable and it should ask for the enable secret password.

تصدیقVerifyVerify

show running-config سے پوری کنفیگریشن دیکھو۔ show version سے ہوسٹ نیم اور اپ ٹائم کنفرم کرو۔show running-config se poori configuration dekho. show version se hostname aur uptime confirm karo.Check the full configuration with show running-config. Confirm the hostname and uptime with show version.

show running-config
show version

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

⚠️ کنسول پر پاس ورڈ غلط بتا رہا ہے۔Console par password ghalat bata raha hai.The console says the password is wrong.

✅ پاس ورڈ دوبارہ سیٹ کرو: line console 0 پر جا کر password کمانڈ لکھو۔ یاد رکھو، پاس ورڈ کیس سینسٹیو ہوتا ہے۔Password dobara set karo: line console 0 par ja kar password command likho. Yaad rakho, password case-sensitive hota hai.Set the password again: go to line console 0 and type the password command. Remember, passwords are case-sensitive.

⚠️ PC سے پنگ فیل ہو رہا ہے۔PC se ping fail ho raha hai.Ping from the PC is failing.

✅ انٹرفیس G0/0 پر no shutdown لکھنا بھول گئے ہوں گے۔ ہر انٹرفیس کو no shutdown سے آن کرنا پڑتا ہے۔interface G0/0 par no shutdown likhna bhool gaye honge. Har interface ko no shutdown se on karna parta hai.You probably forgot to type no shutdown on interface G0/0. Every interface must be turned on with no shutdown.

⚠️ show run میں پاس ورڈز پلین نظر آ رہے ہیں۔show run mein passwords plain nazar aa rahe hain.Passwords appear in plain text in show run.

✅ service password-encryption لکھنے کے بعد show running-config میں پاس ورڈز ##### کی صورت میں نظر آئیں گے۔ پرانی کنفگ میں دوبارہ پاس ورڈ لکھنا پڑ سکتا ہے۔service password-encryption likhne ke baad show running-config mein passwords ##### mein nazar aayenge. Purani config mein dobara password likhna par sakta hai.After typing service password-encryption, passwords in show running-config will appear as #####. In an old config you may need to re-type the passwords.

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

❓ enable secret اور enable password میں فرق کیا ہے؟enable secret aur enable password mein farq kya hai?What is the difference between enable secret and enable password?

enable secret کا پاس ورڈ MD5 سے ہیش ہوتا ہے اور زیادہ محفوظ ہے۔ enable password پرانا اور کمزور طریقہ ہے۔enable secret ka password MD5 se hash hota hai aur zyada mehfooz hai. enable password purana aur kamzor tareeqa hai.The enable secret password is hashed with MD5 and is more secure. Enable password is an older, weaker method.

❓ کنسول اور VTY میں فرق بتاؤ۔Console aur VTY mein farq batao.Explain the difference between console and VTY.

کنسول پورٹ وہ ہے جہاں آپ کنسول کیبل سے سیدھا ڈیوائس سے کنیکٹ ہوتے ہیں۔ VTY لائنز ریموٹ ایکسیس (telnet/SSH) کے لیے ہوتی ہیں۔Console port woh hai jahan aap console cable se seedha device se connect hote hain. VTY lines remote access (telnet/SSH) ke liye hoti hain.The console port is where you connect directly to the device with a console cable. VTY lines are for remote access (telnet/SSH).