DHCP, DNS and Web Server Configurations Using Packet Tracer.



In this Artice we will write about how to configure a DHCP, DNS and Web Server and for this configuration we will use Layer-3 and Layer-2 switches.

          DHCP Server Configuration in Layer-3 Switch! 

As network design above show that we have connected hosts (PC's) to Layer-2 switches and so we are not going to assign manual IPs to these hosts, but we will configure DHCP Server for these hosts to get there IP's. In this article we will create VLANS and made there IP pools for DHCP configuration and these VLANS are 10,20 and 30.

As commands below show that how we three VLANS 10,20 and 30 are created, and their name are vlan10, vlan20 and vlan30 respectively.

 

Figure 2: VLANS in Layer-3 Switch

After creating VLANS we will create IP DHCP pools for these VLANS which will be used by Layer-3 switch to act as DHCP server to assign IP addresses to hosts relevant to each VLAN were connected.
Following picture will show how to create DHCP Pools.

 

Figure 3: Pool Creation


 Now we will give IP address to VLANS interfaces we have created in Layer-3 switch as shown in figure 2 to act as default gateway for inter-VLAN communication or routing.

As shown in figure below.

                                                                  Figure 4: IP assignment to VLAN interfaces

As IP has been assigned, we will assign ports to each VLAN for accessing and differentiating different networks. As three Layer-2 Switches are connected to three ports of Layer-3 switch (Core Switch) so these will act as different networks as shown below.

                                                                  Figure 5: Port 1 to VLAN 10
                                                                 Figure 6: Port 2 to VLAN 20
                                                                 Figure 7: Port 3 to VLAN 30
                        

As shown in Figure Below hosts (PC's) connected to layer-2 switches are assigned with IP addresses through DHCP configuration. The IP assignment has started from 192.168.10.2 because 192.168.10.1 acting as default gateway.
                                                                   Figure 8: DHCP IP for VLAN 10
                                                                   Figure 9: DHCP IP for VLAN 20
                                                                   Figure 10: DHCP IP for VLAN 30

WEB Server and DNS Configuration in Server connected to Layer-2 Switch! 

 As Random IP's getting assigned to hosts but as shown in figure 1, we have two servers connected to last/three Layer-2 switch so we have to assign IPs to servers manually to get server services. 

As shown in figure below I have given IP address to WEB Server and also DNS server address is also given in End for hostname resolution.

                                                                   Figure 11: Web Server IP Address

As shown in figure below I have given IP address to DNS Server and also same server address is also given in End for hostname resolution.

                                                                 Figure 12: DNS Server IP Address
After manual IP assignment to servers, we will process to get services (DNS + WEB) from servers.
As shown in figure below we have given the IP Address of web server for Host name resolution and my website name is securitywithblue.com and DNS service is ON.

                                                                    Figure 13: DNS service by server

                                                                    Figure 14: WEB Service by server


All things have been configured but as we have been using Layer-3 switch we have to make it like a router so we will make this change by simple one command IP Routing as shown in figure below.
                                                                      Figure 15: IP Routing
Now we have to give DNS server address in pools we have created for DHCP so automatically our hosts (PCs) will get DNS Server address in there IP configurations.
                                                                    Figure 16: DNS server to VLAN10
                                                                      Figure 16: DNS server to VLAN20

                                                                     Figure 16: DNS server to VLAN30

Now we will access from any host (PC) website securitywithblue.com using IP address and by name which we have given in DNS server configuration for record maintenance.
We will enter IP Address of server where site securitywithblue.com is hosted.

                                                                    Figure 17: Website access using IP Address
We will enter name securitywithblue.com of server which can be resolved in DNS server where record for this name is stored, and their IP Address is given for host resolution.


                                                                    Figure 18: Website access using Name


Now we have configured all the services which we have to get from servers. These are the services which we can get from servers and instead of using routers for inter-VLAN communication we have used a Layer-3 Switch which is economically suitable and also work like a router.











                              

 





Comments

Previous Posts

How to Create a Web Server in Packet Tracer?

Layer 3 Switch Configuration for Inter-Vlan Communication for different networks?

Layer-3 Switch as DHCP Server for LAN!