Exp 9

Download as pdf or txt
Download as pdf or txt
You are on page 1of 9

DEPARTMENT OF

COMPUTER SCIENCE & ENGINEERING

Experiment 9
Student Name: Aditya Dwivedi UID: 22BCS10306
Branch: CSE Section/Group: A
Semester: 5th Date of Performance: 17/10/24
Subject Name: Computer Networks Subject Code: 22CSH-312

1.Aim: Configuring DNS Server and accessing web Resources by Domain


Name.

2. Requirements(Hardware/Software):
Packet Tracer

3. Objective : The objective of this experiment is to Understand Routing


Mechanism.

4. Procedure:

DNS (Domain Name System) is a hierarchical and decentralized


system used to translate human-readable domain names (e.g.,
www.example.com) into machine-readable IP addresses (e.g.,
192.168.1.1). This process allows users to access websites and
other internet resources using domain names instead of
remembering numerical IP addresses.
1. Setup the Network Devices
 Add the following devices to your workspace:
o 1 PC
o 2 Servers
o 1 Switch
DEPARTMENT OF
COMPUTER SCIENCE & ENGINEERING

2. Connect the Devices


 Use Copper Straight-Through cables to connect the devices:
o PC to Switch
o Server 1 to Switch
o Server 2 to Switch

3. Configure the Devices


PC Configuration
1. Click on the PC > Go to the Desktop > Open IP Configuration.
2. Set the following IP settings:
o IP Address: 192.168.5.11
o Subnet Mask: 255.255.255.0 (default)
o Default Gateway: 192.168.5.1
o DNS Server: 192.168.5.13
Server 1 Configuration (Web Server)
1. Click on Server 1 > Go to the Desktop > Open IP Configuration.
2. Set the following IP settings:
o IP Address: 192.168.5.12
o Subnet Mask: 255.255.255.0
o Default Gateway: 192.168.5.1
o DNS Server: 192.168.5.13
Server 2 Configuration (DNS Server)
1. Click on Server 2 > Go to the Desktop > Open IP Configuration.
DEPARTMENT OF
COMPUTER SCIENCE & ENGINEERING

2. Set the following IP settings:


o IP Address: 192.168.5.13
o Subnet Mask: 255.255.255.0
o Default Gateway: 192.168.5.1
o DNS Server: 192.168.5.13

4. Configure the DNS Server (Server 2)


1. Click on Server 2 > Go to the Services tab > Select DNS.
2. Turn DNS Service on.
3. In the DNS Records section, add the following records:
o Name: www.cisco.com
o Address: 192.168.5.12
o Click on Add.
This creates a mapping between the domain name www.cisco.com and
the web server’s IP address (192.168.5.12).

5. Configure the Web Server (Server 1)


1. Click on Server 1 > Go to the Services tab > Select HTTP.
2. Ensure the HTTP service is turned on.
3. You can customize the content of the web page if necessary, or
use the default web page provided by Packet Tracer.
4. Edit the index.html File:
Select the file index.html and click on the Edit button.
DEPARTMENT OF
COMPUTER SCIENCE & ENGINEERING

5. Delete Existing Content:


Inside the editor, delete all the existing content of the index.html
file to start fresh.
6. Add Custom HTML Code:
Replace the old content with the following simple HTML code:
7. Copy code
<html>
<h1>Welcome to Google</h1>
</html>
8. Save the File:
After entering the HTML code, click on Save to store the changes
in the index.html file.

6. Test DNS Resolution from the PC


1. Click on the PC > Go to the Desktop > Open Command Prompt.
2. Test the DNS server by pinging the domain name:
Copy code
ping www.cisco.com
If successful, you will see replies from the IP address 192.168.5.12
3. Access the web page:
o Open a Web Browser from the PC's Desktop.
Click on PC0 > Go to the Desktop > Open Web Browser.
o Type www.cisco.com in the address bar.
DEPARTMENT OF
COMPUTER SCIENCE & ENGINEERING

o The default web page hosted on Server 1 should appear.

5. Output:

Fig 1: Creating a network topology

Fig 2: Assigning address to PC 0


DEPARTMENT OF
COMPUTER SCIENCE & ENGINEERING

Fig 3: Assigning address to Web server

Fig 4: Assigning address to DNS server


DEPARTMENT OF
COMPUTER SCIENCE & ENGINEERING

Fig 5: Configure the DNS server

Fig 6: Configure the web server

Fig 7: Edit the file


DEPARTMENT OF
COMPUTER SCIENCE & ENGINEERING

Fig 8: Test DNS resolution from the PC

Fig 9: Access the web page


DEPARTMENT OF
COMPUTER SCIENCE & ENGINEERING

6. Learning Outcome:
1. The learner will understand how DNS resolves domain names into IP
addresses to route traffic between clients and servers.
2. The learner will be able to explain components such as DNS clients
(resolvers), DNS servers (authoritative, recursive), and zones.

You might also like