October 22, 2012

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.



28 comments:

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

    ReplyDelete
  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
  13. Kami dari PT. HOKA HOKI INDONESIA memberitau bahwa perusahaan kami ingin bekerjasama dalam bidang pengurusan barang Import RESMI & BORONGAN

    Service Kami,
    Customs Clearance Import sistem Resmi maupun Borongan
    Penanganan secara Door to Door ASIA & EROPA
    Penyediaan Legalitas Under-Name (Penyewaan Bendera)
    Pengiriman Domestic antar pulau seluruh Indonesia laut dan Udara atau Darat.

    Customs Clearance Port
    Jakarta, Semarang, Surabaya, Belawan & Port Lain nya.

    Dote :
    Kami tidak menerima barang-barang larangan seperti Airsoft Gun, Obat-obatan terlarang.
    Kami tidak bertanggung jawab/ tidak akan mengganti kerugia apabila didapati adanya barang-barang bahaya / Larangan tersebut, dan apabila diketahui barang membahayakan maka kami akan melapor kepada pihak yang berwajib.
    Kami menerima barang-barang seperti Kimia, tetapi kimia yang ada disertai MSDS (Material Safety Data Sheet).

    Terima kasih atas kepercayaan nya,semoga kami dan perusahaan bpk/ibu berjalan dengan lancar.
    Jika ada yang ingin dipertayakan, silah kan hubungi kami di nomor (+62 21) 2906-8484
    Hp wa. 081908060678 E-Mail : andijm.logistics@gmail.com

    = = = = = = = = = = = = = = = = = = = = = = = = = = =
    PT. HOKA HOKI INDONESIA
    Shopping Arcade 2nd Floor B-03 Jakarta Garden City,
    Jl. Raya Cakung Cilincing KM. 0,5 Jakarta Timur 13910 Indonesia
    Phone : +62 21 29068484 Fax : +62 21 29068666
    Email : andijm.logistics@gmail.com
    Website : hokahoki.co.id

    Mr. Andi JM BBM : D9CE63FD
    Hp wa. 081908060678, 081385311679

    ReplyDelete
  14. These are the kind of networking skills that one may not even get from a networking class but from the experts. One thing I have known is that networking is very practical and can only be successful in a practical manner. As I learn on how to write Medical School Admittance essay, I will get used to these DHCP tips.

    ReplyDelete
  15. I do not have a router and i can only get a weak, slow signal on my ipod touch from a corner in my room. I am using my neighbors wifi and they suggested i got an linksys extender setup that i could put in my room where i get the signal and then it would magnify the signal. Any suggestion?

    ReplyDelete

C program to Read From a File

#include <stdio.h> #include <stdlib.h> void main() {     FILE *fptr;     char filename[15];     char ch;   ...