Web, DNS, and FTP Server Setup in Cisco Packet Tracer

Aisyah Aldina

Illustration of a globe for a guide on web, DNS, and FTP servers in Cisco Packet Tracer

Hi everyone, after several articles about routing, it is time to fill the network with the services people actually use. In this article I build a single server in Cisco Packet Tracer that runs a web server (HTTP), a DNS server, and an FTP server at the same time. By the end, a PC in another LAN can open www.mamang.lab in its browser and grab files over FTP.

I did everything in Cisco Packet Tracer 8.2.1, continuing the 2 router topology from my guide on EIGRP configuration in Cisco Packet Tracer. Routing between the LANs has to be working already, whether you use static routes, RIP, OSPF, or EIGRP, because the server and the test PC sit on different networks.

Download the Packet Tracer lab file
Open with Cisco Packet Tracer 8.2.1 or later · 2 routers, 2 switches, 4 PCs, 1 server · fully configured, ready to try
Download .pkt

The Topology and Cables Used

Add a server to LAN 2

Cisco Packet Tracer window showing a topology with Server0 in LAN 2

The topology has 2 Cisco 1941 routers, 2 Cisco 2960-24TT switches, 4 PCs, and 1 Server-PT. I placed the server in LAN 2 (the yellow box), while the PC that accesses it is in LAN 1 (the green box).

Topology with 2 routers, 2 switches, 4 PCs, and a Server-PT in LAN 2

You can find Server-PT in the End Devices category, in the same group as the PC and the laptop.

Server0 FastEthernet0  ->  Switch1 FastEthernet0/2  (straight)
PC0, PC1               ->  Switch0                  (straight)
PC2, PC3               ->  Switch1                  (straight)
Router0 Gig0/0         ->  Switch0 Gig0/1           (straight)
Router1 Gig0/0         ->  Switch1 Gig0/1           (straight)
Router0 Gig0/1         ->  Router1 Gig0/1           (cross-over)

Cable from the server to the switch

Straight-through cable from Server0 Fa0 to Switch1 Fa0/2

A server and a switch are different types of devices, so the cable is Copper Straight-Through. Connect it from FastEthernet0 on the server to FastEthernet0/2 on Switch1.

Setting the Server IP Address

Open the Server0 window

Server0 marked with a red circle in the Cisco Packet Tracer topology

In the topology area, click the Server0 icon that I marked with a red circle. The Server0 window opens next to it.

Desktop tab and IP Configuration icon marked in the Server0 window

In the Server0 window, click the Desktop tab and then click the IP Configuration icon. Later we will turn on the services from the Services tab, which sits to the left of the Desktop tab.

A static IP for the server

Static IP 192.168.2.100 and DNS server set on Server0 in Packet Tracer

Fill in the IP Configuration fields like this.

IPv4 Address     192.168.2.100
Subnet Mask      255.255.255.0
Default Gateway  192.168.2.1
DNS Server       192.168.2.100

A server should always use a static IP so its address never changes. The DNS Server field points to the server’s own IP, because this same server is also our DNS.

Warning: The IP Configuration screen on Server-PT has no Interface row like the one on a PC, so the fields sit a little higher. Make sure you do not type the IP into the Subnet Mask field, because Packet Tracer will reject it with the message Invalid subnet mask entered.

Turning On the Web Server

The HTTP service in the Services tab

HTTP and HTTPS services turned On in the Server0 Services tab

Still in the Server0 window, click the Services tab and pick HTTP from the list on the left. HTTP and HTTPS are already On by default, and the File Manager holds a few sample files, including index.html.

To make it obvious that the page really comes from our server, click edit on index.html, replace its content with the code below, then click Save and answer Yes when it asks to overwrite.

<html><center><h1>Server Mamang Lab</h1><p>Halaman ini dilayani oleh Server0 (192.168.2.100)</p></center></html>

Creating a DNS Record

Turn on DNS and add an A record

DNS Service On with an A record pointing www.mamang.lab to 192.168.2.100

Still in the Services tab, pick DNS and switch DNS Service to On. Type www.mamang.lab in Name, leave Type as A Record, enter 192.168.2.100 in Address, then click Add.

An A record is an entry that maps a domain name to an IP address. With this record in place, any PC that asks for the address of www.mamang.lab gets 192.168.2.100 as the answer.

Checking the FTP Server

The default FTP user

FTP service On with the default cisco user on Server0

Pick FTP in the Services tab. The service is already On, and there is a default user cisco with the password cisco and RWDNL permissions, which stand for Write, Read, Delete, Rename, and List. For this lab I just use that default user. If you want your own user, fill in Username and Password, tick the permissions, and click Add.

Setting DNS on the PC

Open the PC0 window

PC0 marked with a red circle in the Cisco Packet Tracer topology

Close the Server0 window, then click the PC0 icon in LAN 1 that I marked with a red circle.

PC0 Desktop tab with the IP Configuration, Command Prompt, and Web Browser icons marked

In the PC0 window, click the Desktop tab. The three marked icons are the ones we use in this article: IP Configuration to set the DNS, Command Prompt for nslookup and FTP, and Web Browser to open the website.

Point the PC DNS to the server

DNS Server 192.168.2.100 set in the PC0 IP Configuration

Click IP Configuration and set DNS Server to 192.168.2.100. Keep the IP, subnet mask, and gateway as they were. Without a DNS Server, the PC can only reach the server by its IP, not by its domain name.

Testing Web, DNS, and FTP

Open the website from PC0

PC0 Web Browser opening http://www.mamang.lab served by Server0

Close IP Configuration with the X button, then on the PC0 Desktop click Web Browser, type http://www.mamang.lab in the URL field, and click Go. My first try came back blank because the PC was still resolving the address through ARP and DNS. After clicking Go one more time, the Server Mamang Lab page showed up right away.

Check DNS and log in to FTP

nslookup www.mamang.lab output and a successful FTP login on PC0

Close the Web Browser, then click Command Prompt on the PC0 Desktop and run the following commands.

nslookup www.mamang.lab
ftp www.mamang.lab

nslookup shows that www.mamang.lab was answered by server 192.168.2.100 with the address 192.168.2.100, which means DNS is working. The ftp command then asks for a username and password, so type cisco for both. The 230- Logged in message tells you the FTP login succeeded.

List the FTP folder contents

Output of the dir command listing files in the FTP server folder
dir
quit

The dir command lists the contents of the /ftp folder on the server. It holds the IOS image files that ship with Packet Tracer, and this is also the folder people usually use to back up and restore router configurations. Type quit to leave FTP.

Common Problems and How to Fix Them

The browser shows Request Timeout or Host Name Unresolved

Check that the DNS Server on the PC is set to 192.168.2.100 and that DNS Service on the server is On. If the IP address (http://192.168.2.100) works but the name does not, the problem is definitely DNS.

The server cannot be reached even by IP

The problem is in the network, not the service. Ping 192.168.2.100 from the PC first, then check the server gateway and the routing between the routers.

FTP login fails

Make sure the username and password match the FTP user list exactly, including upper and lower case.

At this point a single server is handling web, DNS, and FTP for a PC on another network. In the next article we cover NAT, so a local network can reach a public network using one IP address. If you run into any other error while trying this, just leave a comment below.

Leave a Comment