EXPERIMENT No-12
OBJECT: Simulation of DHCP Configuration in Cisco Router
REQUIRED SOFTWARE: Cisco Packet Tracer 8.1.1
Network Diagram
Setup this network:

Router>enable Router#config t Router(config)#int fa 0/0 Router(config-if)#ip address 192.168.1.1 255.255.255.0 Router(config-if)#no shut Router(config-if)#exit Router(config)#ip dhcp pool gyancs Router(dhcp-config)#network 192.168.1.0 255.255.255.0 Router(dhcp-config)#default-router 192.168.1.1 Router(dhcp-config)#dns-server 8.8.8.8 Router(dhcp-config)#exit Router(config)#ip dhcp excluded-address 192.168.1.1 192.168.1.5 Router(config)#exit Router#
Introduction to DHCP
When a host in a Computer Network wants to contact another host, then its pass must be a unique IP address. Whether it is LAN or WAN. We can also configure these IP addresses manually on every host.
But if the network is large enough then this approach will not work. In large networks you cannot manually assign IP addresses by going to each host pass. DHCP is used to solve this problem.
DHCP Protocol provides IP address to hosts. These IP addresses are assigned dynamically. DHCP always maintains a pool of IP addresses. When a host tries to connect to the network, it asks for an IP address request from DHCP.
DHCP provides the IP address to the host upon request. When the host leaves the network, this IP address comes back to the DHCP pool and becomes available for other Hosts.
The Dynamic Host Control Protocol is the Client / Server Protocol. Whose Port Number is 67.
Assigning an IP address to hosts is the first task of DHCP. But DHCP provides many information hosts besides IP address. A list of some such common information is given below.
-
IP address (Ex. 192.168.1.1)
-
Subnet Mask (Ex 255.255.0.0)
-
Domain Name (Ex. www.gyancs.com)
-
Default Gateway (Ex. 192.168.1.1)
-
DNS Server Address
Advantages of DHCP Protocol
Now we want to know what benefits you get from DHCP.
-
Changing the IP address in DHCP reduces the chances of errors.
-
You do not need to manage the IP address list by using DHCP. Also you do not need to manage which IP address is empty and which has been assigned. DHCP does this work automatically.
When we move the host to another network, DHCP assigns a new IP address.
Process of IP Address Configuration with DHCP
There are a few steps from requesting a host to providing an IP address. These steps are explained below.
-
First DHCP client (host) broadcasts DHCP discover message for available DHCP servers. It is used to discover the DHCP server in the message network.
-
After this, the DHCP server that receives this message sends an offer message to the client. The DHCP server shows its own existence through the offer message.
-
It then broadcasts the request message to the client server for IP address and regarding information.
-
The server then sends the information to the client via an unicast acknowledgment message.
Configuring DHCP (Dynamic Host Configuration Protocol)
DHCP server has an important role in any network. When we DHCP server can be configured on a router or switch. If you do DHCP server configuration then we should have the following information.
Requirements
-
We should have a network ID. If you do not define the network ID of a subnet, then by default all the addresses are assigned.
-
We should know which IP addresses are already being used. Such as any addresses that are being used for printers, routers or other purposes. Such IP addresses are exclude in the DHCP configuration.
-
We should also know the IP address of the default router (default gateway) of the network.
You must also know the IP address of the DNS (Domain Name System) server.
Based on the above information, which is required to configure any DHCP server. The following steps are given to configure the DHCP server below. You can easily configure DHCP by following these steps.
Steps
-
We first exclude addresses that are already being used or reserved for another purpose.a
-
After that you create a pool with unique name for the subnet.
-
After this, we set the network ID and subnet mask that will be used to assign IP addresses to Server Hosts.
-
After this we do the address setting of the default gateway.
-
Then later do the address setting of the DNS server.
If we do not want to use the lease time in advance, then we can set the lease time in days, hours and minutes.
Example
Which is as follows?
router(config)#ip dhcp excluded-address 192.168.1.1 192.168.1.5
router(config)#ip dhcp pool gyancs
router(dhcp-config)#network 192.168.1.1 255.255.255.0
router(dhcp-config)#default-router 192.168.1.1
router(dhcp-config)#dns-server 8.8.8.8
See from the example above that the range of IP address is first exclude. After this a DHCP pool named gyancs has been created.
Later the network and subnet mask is given. Network is defined by NID. After this the default gateway and DNS server are defined.
Download Cisco Packet Tracer 6.22
Download Cisco Packet Tracer 8.1.1
MCQ-SET 1
Dear Students, This Purpose of Preparation of Computer Network Online Test is in 30 Questions English. There is a collection of questions asked in the CCNA Exam. On answering each question one point will be given. And it is mandatory to bring 50% marks to pass. To start the test you have to click on Start Button. All the questions will have to be answered. Go to Last and click on Finish Button, after which your Result will appear on the screen. After clicking Finish, there will be three option shows below 1.Restart Quiz 2.View Question 3.Show Leader-board. After filling your name and e-mail id by clicking on the show leader-board, click on send, after which your result will be shown.
MCQ-SET 2
session layer
None of the these
half duplex
3
network layer
DTE/DCE interface
VDR
2
5
100 microwatts
bipolar
Full duplex.
gearshift
transponders
adaptive
Computer bus
unknown
between peers
Process-To-Process Message Delivery
allow just a portion of a file to be resent
port
IP
In-service expansion
directionalized transmission
To detect problems in protocol
PAS
128
light
more dense than
glass or plastic