DHCP, Dynamic Host Configuration Protocol is the protocol used by network devices like a PC or a printer (DHCP clients) to obtain IP Address, Default Gateway, Domain Name, DNS Servers, NetBIOS servers and more that helps the device to work properly in an IP Network.
While in an ideal scenario, most if not all organisations run the DHCP server on a Windows server or a Linux/Unix server. While this is justfiable in bigger corporate and enterprise networks, a smaller network like a branch office can be supported by a local Router, Switch or a Firewall can run a DHCP server without the need of an additional server hardware to run DHCP. Most of the routers, firewalls and some switches do have a DHCP server builtin. Most of the new Cisco Routers and Switches running Cisco IOS can run a DHCP server.
The following procedure helps you to setup a Cisco Router or a Catalyst Switch as DHCP server (I use a Cisco Router here):
Enable DHCP Service on the Router
dhcp-router# conf t
dhcp-router(config)# service dhcp
Create DHCP IP Pool
dhcp-router(config)# ip dhcp pool IP-POOL
where IP-POOL is the name of the DHCP IP Pool
Add Network & subnet mask to the DHCP Pool
dhcp-router(dhcp-config)# network 192.168.1.0 /24
Add Default Gateway for the clients
Specify the Domain Name for the clients
dhcp-router(dhcp-config)# domain-name mycompany.com
Specify the DNS Servers for the Clients
dhcp-router(dhcp-config)# dns-server 192.168.1.10 192.168.1.11
where 188.8.131.52&11 are the IP address of the local DNS servers
Specify the NetBIOS WINS Servers for the Clients (if any)
dhcp-router(dhcp-config)# netbios-name-server 192.168.1.12
where 184.108.40.206 is the Microsoft WINS server
Set the lease period
dhcp-router(dhcp-config)# lease 8
Sets the Lease for 8 days.
Add Exclusion list (if any)
dhcp-router(config)# ip dhcp exclude-address 192.168.1.25 192.168.1.35
Where 192.168.1.25 & 192.168.1.35 are the Start and End IPs for the range of IPs to be excluded.
This will configure the DHCP server on a Cisco Router or Switch.
If you're new here, you may want to subscribe to my RSS feed. Thanks for visiting!
i did not find specified answer which i am looking for.
i will b very greatful if you can advice me
What were you looking for?
it is ip dhcp excluded-address
Ive shown an example to exclude IP Addresses from the Pool of Ip address in the last part of the article.
A little more detail on your problem might help!
The DHCP discovery follow four steps:
The client send a DHCPDISCOVER in broadcast to find a DHCP server.
The server sends a DHCPOFFER to the client in unicast. In this phase the DHCP server sends a proposed configuration to the DHCP client.
The clients sends a DHCPREQUEST in broadcast, if the clients finds the offer agreeable. Why in broadcast? Because the DHCPDISCOVER sended by the client might have reached more than one DHCP server.
The server sends a DHCPACK unicast to the client
If the client detects that the ip is already in use it sends a DHCPDECLINE
If the client receives a DHCPNAK from the server, it restart the process
If there is no conflict with the ip address, the client can â€˜autoconfigureâ€™ the NIC.
I don’t see how this is applicable to a specific port. I have have several ports with /30 networks on them and they all need to hand out different IPs, gateways, etc.
SEND ME STEP BY STEP OF CONFIGURING A CISCO SWITCH WITH GENERAL CONFIGURATIONS.
This will not work on a switch….
how to disable a dhcp configured on router///
please send my conclusive answer regarding this issue immediately// thanks
This works on switches as well. I just configured mine using the above instructions. Of course, the switch has be a multi-layer switch. I don’t know if it’ll work on layer 2 only switches.
Send me the step by step configurations of dhcp on a switch
I want to use several dsl routers only as switches (they will be all networked to one router connected to the internet). When used only as switches, do I need to deactivate DHCP? Thank you for your advice
I would like to disable the dhcp server on my cisco switch, how can I do this?
Netgear told me that I will not be able to access my wireless router unless I disable the network switch.
Just type this command.
no ip dhcp pool <>
note the pool name must much with the pool name configured
<> then you will know the name of pool
wireless connected but no internet connection?
I had access to my work wireless connection. I had to connect to a wired connection for some time. When i try to get back with wireless it’s connected, but no internet connection.
Can any one help please.
I am posting the log i got back.
Windows IP Configuration
Host Name . . . . . . . . . . . . : 37HW000026
Primary Dns Suffix . . . . . . . :
Node Type . . . . . . . . . . . . : Peer-Peer
IP Routing Enabled. . . . . . . . : No
WINS Proxy Enabled. . . . . . . . : No
Ethernet adapter Local Area Connection:
Media State . . . . . . . . . . . : Media disconnected
Description . . . . . . . . . . . : Intel(R) 82577LM Gigabit Network Con
Physical Address. . . . . . . . . : F0-DE-F1-07-B1-7E
Ethernet adapter Wireless Network Connection:
Connection-specific DNS Suffix . :
Description . . . . . . . . . . . : Intel(R) Centrino(R) Advanced-N 6200
Physical Address. . . . . . . . . : 00-27-10-4B-9C-58
Dhcp Enabled. . . . . . . . . . . : No
IP Address. . . . . . . . . . . . : 192.168.0.1
Subnet Mask . . . . . . . . . . . : 255.255.255.0
Default Gateway . . . . . . . . . :
Ping request could not find host http://www.google.com. Please check the name and try again.
Default gateway is missing i guess.
Can any one help please.
AFTER THAT ARE NEED TO CONFIGURE DNS SERVER AND HOW TO CON FIGURE CLINT
What about configuring DHCP on two routers utilizing GLBP? I believe I should split up the IP ranges with exclude statements, but what about static DHCP assignments?
How to trouble shoot DHCP on cisco switch 4503. It is not releaseing the dhcp