1

I am trying a configure a 2811 Cisco router on packet tracer to be a DHCP server for 3 hosts.

Here is the running config I have as of now:

Building configuration...

Current configuration : 657 bytes
!
version 12.4
no service timestamps log datetime msec
no service timestamps debug datetime msec
no service password-encryption
!
hostname r1
!
!
!
!
!
ip dhcp pool stackexchange
 network 192.168.0.0 255.255.255.0
 default-router 192.168.0.1
!
!
!
!
!
!
interface FastEthernet0/0
 ip address 192.168.0.1 255.255.255.0
 duplex auto

The configuration is as suggested by @Andrey Prokhorov but now I found no "lease" command.

enter image description here

I must be able to have the DHCP service working on all 3 host.

enter image description here

9
  • 1
    Resource recommendations are explicitly off topic here. You can rephrase your question and show us what configuration you've tried and what problems you ran into. Then the question may be on topic and people may be able to help you. – Teun Vink Jun 14 '17 at 8:20
  • You got it... I will work on that – Azaam Alfi - CCNA Security Jun 14 '17 at 8:21
  • lease parameter can be absent in PacketTracer, as it's simplified version of real Cisco IOS – Andrey Prokhorov Jun 14 '17 at 11:58
  • @AndreyProkhorov , is the lease parameter necessary to complete the setup? – Azaam Alfi - CCNA Security Jun 14 '17 at 12:11
  • @AzaamAlfi-PSM no, it's not necessary – Andrey Prokhorov Jun 14 '17 at 12:14
3

Lets assume you want to deliver IP addresses to your interface Gi0/0 (addr 192.168.0.1) network 192.168.0.0/24, also you have DNS server 192.168.0.5. Then you should define DHCP pool with options:

service dhcp
ip dhcp pool NET_192.168.0.0
 network 192.168.0.0 255.255.255.0
 default-router 192.168.0.1
 dns-server 192.168.0.5
 lease 7
 domain-name net.local

This will enable DHCP service for your 192.168.0.0/24 network with lease time for each address in 7 days.

Also, you can exclude IP addresses from distributed scope by entering command:

ip dhcp excluded-address 192.168.0.1 192.168.0.10

This will prevent issuance of addresses 192.168.0.1 thru 192.168.0.10. You can add many of that entries. Exclude records can consist of only one address:

ip dhcp excluded-address 192.168.0.200

You can find more about configuring DHCP server in Cisco IOS here - Configuring DHCP

2
  • Andrey, I do not have a DNS server in my packet tracer setup... – Azaam Alfi - CCNA Security Jun 14 '17 at 7:57
  • @AzaamAlfi-PSM, ok, just don't specify dns-server name/address if you don't need it. – Andrey Prokhorov Jun 14 '17 at 8:41

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.