Study of nslookup Command
Experiment
Study of nslookup Command
๐ฏ Aim
To query DNS servers and obtain domain name or IP address mapping using the nslookup command.
๐ Objective
By the end of this experiment, students will be able to:
- Resolve domain names to IP addresses
- Perform reverse DNS lookups
- Query specific DNS servers
- Understand DNS record types
๐ Theory
The nslookup (name server lookup) command is used to:
- Query the Domain Name System (DNS)
-
Translate:
- Domain name → IP address
- IP address → Domain name
๐ It helps in:
- Troubleshooting DNS issues
- Verifying DNS configuration
- Checking domain resolution
๐ It works in:
- Non-interactive mode (single query)
- Interactive mode (multiple queries)
๐งพ Syntax
๐ง Common Usage
Non-Interactive Mode:
Reverse Lookup:
๐งฐ Prerequisites
- Linux system
- Internet connectivity
- DNS configured
๐ฌ Procedure & Commands
1️⃣ Lookup Domain Name
2️⃣ Reverse DNS Lookup
3️⃣ Use Specific DNS Server
4️⃣ Enter Interactive Mode
Then use:
5️⃣ Query Specific Record Types
- MX Record (Mail Server):
- NS Record (Name Server):
- A Record:
๐ฅ️ Sample Output
๐ Output Interpretation
| Field | Meaning |
|---|---|
| Server | DNS server used |
| Address | IP of DNS server |
| Name | Domain name |
| Address (result) | Resolved IP |
๐ Exercises for Students
- Resolve a domain name to IP address.
- Perform reverse lookup of an IP.
- Query MX records of a domain.
- Use different DNS servers and compare results.
- Explore interactive mode and run multiple queries.
❓ Viva Questions
- What is DNS?
-
What is
nslookupused for? - Difference between forward and reverse lookup?
- What is an MX record?
- Why use different DNS servers?
⚠️ Precautions
- Results may vary depending on DNS server
- Some domains may restrict certain records
- Ensure correct syntax in interactive mode
✅ Result
The nslookup command is an essential tool for DNS querying and troubleshooting, helping users understand domain resolution and network configuration.
Comments
Post a Comment