You are on page 1of 5

DHCP DNS WEB SERVER Configuration

DHCP use UDP 67 and 68 ports. It has a messaging system for the communication
between DHCP server and DHCP client.These messaging system’s messages and
their types are mentined below:

 DHCP Discovery (broadcast)


 DHCP Offer (unicast)
 DHCP Request (broadcast)
 DHCP Acknowledgement (unicast)

        Here, a client sends a broadcast “DHCP Discovery” message that mentions


that it need an ip address.The DHCP servers are replies with configuration offers
to the client by “DHCP Offer” unicast message. After that DHCP client sends a
broadcast “DHCP Request” message to the network with the “Transaction ID” of
the first DHCP Server that send DHCP Offer.The other DHCP servers understand
that DHCP client wants to use the DHCP server that has the related “Transaction
ID”. Lastly the DHCP server sends a unicast “DHCP Acknowledgement” message
to the DHCP client that mentions the ip assignment is successfully done or it send
a refuse messaged named “DHCP-NACK”.
    
There is a router that will carry our DHCP server role beside its routing
functionalities. And there is a switch for PCs.

        On routerA, firstly we will give an ip address to the router interface that is


connected to the switch.Secondly that we will create a DHCP pool named IPD. In
this pool we will mention ip addresses that will be given to the DHCP clients.After
that we will assign the router’s interface address as a default-router address for
clients. And in the last part we will exclude some addresses that we don t want to
use during this dynamic ip assignments.

        RouterA# config terminal


        RouterA(config)# interface fastEthernet 0/0
        RouterA(config-if)# ip address 10.0.0.1 255.0.0.0
        RouterA(config-if)# no shut

        RouterA(config-if)# exit
    

RouterA(config)# ip dhcp pool kvch


    

RouterA(dhcp-config)# network 10.0.0.0 255.0.0.0


    

RouterA(dhcp-config)# default-router 10.0.0.1

RouterA(dhcp-config)# dns-server 10.0.0.2

        RouterA(dhcp-config)# exit
    

RouterA(config)# ip dhcp excluded-address 10.0.0.1 10.0.0.10


    

Connect DNS Server to Switch and enter the following TCP/IP Configuration .

IP ADDRESS  10.0.0.2

GATEWAY  10.0.0.1

DNS SERVER  10.0.0.2

Click on Config Tab , Select DNS & enter the following Details for Web Server
Turn on DNS Service.

Web Connect Server to Switch and enter the following TCP/IP Configuration.

IP ADDRESS  10.0.0.3

GATEWAY  10.0.0.1

DNS SERVER  10.0.0.2


Click on Config Tab , Select HTTP & enter the following Details

Now go to User 1 PC

Turn on DHCP for this PC , you will see all details populated from DHCP Server.

Click on WebServer Link and enter the following URL.

www.cisco.com

you will see the modified Home Page.

You can test this bu User PC 2 also.

IP address 192.168.1.1 on fa0/0 and 192.168.2.1 on fa0/1.


ROUTER(config)#int f0/0
ROUTER(config-if)#ip address 192.168.1.1 255.255.255.0
ROUTER(config-if)#no shutdown
ROUTER(config)#int f0/1
ROUTER(config-if)#ip address 192.168.2.1 255.255.255.0
ROUTER(config-if)#no shutdown
The DHCP_SERVER is assigned IP Address 192.168.2.2 on the interface fa0/0 and the
DHCP pool is defined with name POOL1 and network of 192.168.1.0 with subnet mask
255.255.255.0 is assigned to the pool POOL1.

DHCP_SERVER(config)#int f0/0
DHCP_SERVER(config-if)#ip address 192.168.2.2 255.255.255.0
DHCP_SERVER(config-if)#no shutdown
DHCP_SERVER(config)#ip dhcp pool POOL1
DHCP_SERVER(dhcp-config)#network 192.168.1.0 255.255.255.0
DHCP_SERVER(dhcp-config)#default-router 192.1Now, the ip helper address
command is used for configuring the router as a dhcp relay agent, giving 192.168.2.2
the address of DHCP_server.
ROUTER(config)#int f0/0
ROUTER(config-if)#ip helper-address 192.168.2.2
ROUTER(config-if)#exit
68.1.1
DHCP_SERVER(dhcp-config)#exit

You might also like