DHCP on packet tracer

This tutorial is about how to configure dhcp on cisco router in packet tracer. The Dynamic Host Configuration Protocol (DHCP) is a network protocol that is used to configure network devices. DHCP allows a computer to join an IP-based network without having a pre-configured IP address. DHCP is a protocol that assigns unique IP addresses to devices, then releases and renews these addresses as devices leave and re-join the network. 
Internet Service Providers (ISPs) usually use DHCP to allow customers to join the Internet with minimum effort. The DHCP server maintains a database of available IP addresses and configuration information. When it receives a request from a client, the DHCP server determines the network to which the DHCP client is connected, and then allocates an IP address. DHCP servers typically grant IP addresses to clients only for a limited interval.

Lets apply DHCP on packet tracer.
First, let us make a topology with one router on which we will apply DHCP and several client PCs. More like this one,

Untitled

Now, we will apply DHCP on the router.
The commands in sequence are as follows.


cli actual

In the following command “ip dhcp pool cisco”, we are creating a  pool for DHCP called cisco. cisco is the name here and we can name it whatever we want.
Similarly, in the command “default-router “ we are telling the DHCP about the default route to follow.
Notice, after we exit from DHCP mode, we are excluding some IP addresses by applying this command “ip dhcp excluded-addresses x-x”, where x is the starting and ending IP address respectively. We are basically reserving some IPs for our use. It can be used to attach printers, or assign it to some specific users for security purposes. You can also give dns address in dhcp by using the following command.
dns-server 192.168.1.15.

Now, open the PC.

image

Click on IP Configuration

image

Select from Static to DHCP

image

And after DHCP request is completed you will see the following screen.

image

Now, after applying some IPs in sequence, DHCP will skip the IPs that we have excluded from our DHCP pool.

image

That is all, we have applied DHCP on packet tracer.



Reactions:

24 comments:

  1. i luv this tutorial......simply very very beneficial for students and instructors.......
    thank you...very much....pal....

    ReplyDelete
    Replies
    1. Platinum FREE Download Business Voip Solutions with DU solution.I like the helpful information you provide in your articles. I will bookmark your blog and check again here regularly.

      Delete
  2. how to get the dynamic ip for all vlans
    help me please

    ReplyDelete
  3. can v apply dhcp server to switch instead of router ????

    ReplyDelete
    Replies
    1. yes we can but it should be l3 switch

      Delete
    2. we can not assign ip address to switches unless we are creating vlan on switch to have remote connection with switch .. And this is the reason we can not ping to switches however we can ping with routers

      Delete
  4. This post is very interesting and knowledgeable for me...
    thanks for sharing...
    more info:- Cisco Router Support

    ReplyDelete
  5. Can't believe I passed ccna without knowing this! Been searching to know and now I know....very easy to follow. Thanks man,.

    ReplyDelete
  6. Tutorials on this website are very simple, easy to understand, luv it.
    Thanks

    ReplyDelete
  7. thank you thank you..

    ReplyDelete
  8. Hi Usman
    I can get IP address for the pc which is in Default Vlan1....But my PC in vlan 2 cannot get ip ????

    ReplyDelete
    Replies
    1. yup thats the issue . Your PCs in other vlans wont get the ip addresses through same DHCP . May be use another server for them . DHCP doesnot support more than one vlan

      Delete
  9. Company A has 20 workstations allocate for 4 departments as each department will have 5 workstation. The company purchased 4 routers and 4 switches for but the company wants the IP address to be able to be AUTO-ASSIGN to every workstation. DHCP suggested

    ReplyDelete
    Replies
    1. Yeah great. DHCP is used to assign IP addresses.

      Delete
    2. This comment has been removed by the author.

      Delete
    3. tan kendosen can i contact your to know further about your assignment as i too got the same assignment

      Delete
  10. can we maintain a database on a particular pc and and can access it from the other one in cisco packet tracer

    ReplyDelete
  11. i mean can we create a peer to peer network applying kademlia algorithm

    ReplyDelete
  12. Nice article. I ever make like this tutorial but just DHCP on computer server not in router

    ReplyDelete