TCPmag.com for Cisco Internetworking Professionals Tuesday, February 09, 2010  
Search:
Advanced Search        
-- advertisement --
  Resources
  Articles
  Community
.. Home .. Q & A .. Q & A Answers
Service Availabilty Tool -- free software download from Fluke Networks
TechMentor Conferences
 
print article printable format
e-mail article e-mail to a friend
comment on the newscomment on article

More Q & A
read... Video Killed the Data Stream
read... Distance Training with IS-IS
read... Theory, Reality and Total T-1 Bandwidth
read... 'Area 257' De-Classified
read... Follow That Packet!
read... Back-to-Back Connections and ADSL
read... Split-Scope DHCP Servers
read... VRRP Implementation

Q & A Archive


Q & A

Let's Add DHCP Services to the VLAN

by Scott Morris

Question:

November 18, 2003

Scott,

We have a virtual LAN (VLAN), and I want to add DHCP services to it. What configuration do I need to add to my core switch?

Thanks very much
-- Fadel Hassan

Answer:

Fadel,

It really isn’t very difficult to set up your switch to be a DHCP server, but before I go into the configuration aspect, I want to question you about it. Do you really want to do that?

It kinda disturbs me that you mention your “core switch” in the same thought with wanting to set it up as a DHCP server. The core of your network should be concerned with nothing but moving things around as fast as possible. And you want to now assign a new task to that switch as well.

-- advertisement (story continued below) --

Judging by the fact that you mentioned “a VLAN” in the singular, I assume that you’re a relatively small organization without very many users/machines to assign addresses to. So we’ll work under that premise where the processing power is still within the realm of sanity.

So now, onto the configuration! Everything with the DHCP server configuration is done in global mode (IOS-based switches). If your network uses 172.27.5.1 to 172.27.5.254for its host addresses, then the configuration would be:

Switch(config)#ip dhcp pool CoreNet
Switch(dhcp-config)#network 172.27.5.0/24
Switch(dhcp-config)#default-router 172.27.5.1
Switch(dhcp-config)#dns-server 172.27.5.10 172.27.5.20 172.27.5.30
Switch(dhcp-config)#netbios-name-server 172.27.5.15 172.27.5.25
Switch(dhcp-config)#domain-name mycore.net

That enables your switch to start responding to DHCP broadcasts to the network shown in the network command. It will specify the default gateway (default-router) to be used by the hosts, as well as a domain name, DNS servers and WINS servers.

It’s also a good idea to exclude pre-assigned addresses from the pool. That’s a separate set of global commands, and not a pool configuration option. Notice that the servers listed above top out at .30. Hopefully, in the design of your network, there’s already a set delineation between “server IP addresses” and “host IP addresses.” This is a good design practice to make your life easier in the long-term maintenance of the network.

Switch(config)#ip dhcp excluded-address 172.27.5.1 172.27.5.35

One of the bad reasons for using your switch as the DHCP server is that it assigns addresses in a sequential order, but really does nothing in terms of keeping a database by default. So if the power recycles on your switch for any reason, it will start assigning addresses out at the very beginning of the pool again.

For this, we like the switch to ping addresses before assigning them to a client. You may determine how many ping packets are sent out. The timeout value is in milliseconds.

Switch(config)#ip dhcp ping packet 5
Switch(config)#ip dhcp ping timeout 500

In order to see if anything goes bad, I would also recommend logging the information about IP address conflicts.

Switch(config)#ip dhcp conflict logging

Now, with that all being said, it’s a much better decision to place a small machine on your network to be the DHCP server in a “real” fashion. DHCPD is a free service within the Unix operating system (many of them also free). There’s a DHCP server that comes with Windows NT Server (not very robust) and Windows Server 2000/2003 (much better).

Due to the fact that other servers (without paying any more money) do a much better job at processing under the load of DHCP requests, like when users all come in at the beginning of business hours, it’s recommended that you get a service that will work better. Purpose-built DHCP servers will also maintain a database that survives power cycles. They allow reservations by MAC address, and many other options to certain machines (servers?) continue to receive the same IP assignment all the time no matter the reboot status of the server.

Think about these options during your network implementation. But ultimately, yes, it’s certainly possible to have your switch act as the DHCP server.

Hope this helps.
-- Scott

Send your toughest CCIE-level technical questions to editor@tcpmag.com.
Scott Morris, quadruple CCIE, JNCIE and all-around uber-geek, can often be seen traveling around the world consulting and delivering CCIE training. He recently accepted a new Senior CCIE Instructor position with Internetwork Expert! For more information on him check out http://www.uber-geek.net or for CCIE training check out http://www.internetworkexpert.com. You can contact Scott via editor@tcpmag.com. You can contact Scott about "Let's Add DHCP Services to the VLAN" at editor@tcpmag.com.

Current TCPmag.com user comments for "Let's Add DHCP Services to the VLAN"
1/20/04 - Brian in CA  says: Excellent prescriptive response.
2/8/04 - Naser  from India says: I want to design a network with three Vlans (20 nodes in every VLan). I have one DHCP server (DHCP server is on VLAN1 (management VLan)). How i will configure the nodes in other Vlan to get IP Address from the DHCP Server located in Vlan1.
3/4/04 - Shalom Bhooshi  from London UK says: I just read your reply to the question about DHCP and VLANS.... I would like to know if a router is connected to a switche which have VLANS configured through interface Eth0. And a DHCP server on another interface of the router say eth1. If the router is configured with the 'IP helper ' command to point to the DHCP server, will the router pass DHCP traffic on and will it discrimintate the hosts in differnt VLANS? Basically, i would like as much insight into how the router treats the VLAN header feild and ISL tags when performing the IP helper. I would appreciate as much info as possible or pointers to resources...many thanks
10/8/09 - janeairzo  from Russia says: http://hufadifi.pop3.ru http://jmapi.sqweebs.com http://cenilu.free-site-host.com ïîðíî êîìèêñû íà http://nicuxa.freehostingz.com http://hitila.freewebhostx.com http://tawuxa.fromru.su î÷åíü âîëîñàòàÿ ïèçäà vrotmnenogi
10/9/09 - janeairzm  from Russia says: http://vuvoja.easyfreehosting.com http://qomati.emenace.com http://cekpo.easyfreehosting.com áðèòíè ñïèðç ïîðíî http://somahti.emenace.com http://nizama.hostific.com http://vikifeju.hostific.com ãåé çíàêîìñòâà ñî÷è vrotmnenogi
10/10/09 - janeairzm  from Russia says: http://kovunu.sqweebs.com http://rqixeji.rack111.com http://polahci.emenace.com ïîðêà áàìáóêîâîé ïàëêîé http://jemaqi.easyfreehosting.com http://zahena.emenace.com http://kobapoge.1gb.bg ïîðíî ôåñòèâàëü ã êàííû vrotmnenogi
10/10/09 - Pharma101  from USA says: Very nice site!
10/11/09 - janeairzm  from Russia says: http://maxmoxon.t35.com http://maxmoxonxx.t35.com http://zahena.emenace.com ôîòî ãîëàÿ rihana http://jxahale.freewebhostx.com http://qumodamo.co.cc http://hekoleka.freewebhostx.com æåñòîêîå ïîðíî ôîòî ãðóáîå vrotmnenogi
10/11/09 - buy adipex in florid  from New York says: Very interesting site. Hope it will always be alive!
10/11/09 - tramadol dog no pres  from New York says: It is the coolest site, keep so!
10/12/09 - tramadol 50 mgs  from New York says: Beautiful site!
10/12/09 - janeairzm  from Russia says: http://datexubo.sqweebs.com http://zazezi.free-site-host.com http://dihugo.pop3.ru òåêóùèå ïèñüêè http://hlelu.sqweebs.com http://jerohe.sqweebs.com http://coqoda.blackapplehost.com ãîëàÿ ñêàðëåò éåõàíñîí vrotmnenogi
10/12/09 - tramadol and hydroco  from New York says: Great site. Keep doing.
10/12/09 - how often to take ci  from New York says: I bookmarked this link. Thank you for good job!
10/12/09 - cod tramadol online   from New York says: Excellent site. It was pleasant to me.
10/12/09 - tramadol no rx overn  from New York says: Great site. Good info.
10/13/09 - tramadol antidepress  from New York says: Very interesting site. Hope it will always be alive!
10/13/09 - tramadol hydochlorid  from New York says: Very interesting site. Hope it will always be alive!
Display Page: 01 02 03 04 05 06 07 08 09 10 11 12 13 14 15 16 17 18 19 20
21 22
Post your comment about " Let's Add DHCP Services to the VLAN" here:
Name: (optional)
Location: (optional)
E-mail Address: (optional)
Comments:  
 
top


home | certification basics | features | exams | exam reviews | salary surveys
forums | link state update | news | q & a | article archive | tech library webcasts | Rss Feeds from TCPmag.com
Application Development Trends | Campus Technology | CertCities.com | The Data Warehousing Institute
E-Gov | EduHound | ENTmag.com | Enterprise Systems | Federal Computer Week | FTPOnline.com | Government Health IT
IT Compliance Institute | MCPmag.com | Recharger | Redmond Developer News | Redmond
Redmond Channel Partner | Redmond Events | Redmond Report | T.H.E. Journal | TechMentor Conferences
Virtualization Review | Visual Studio Magazine | VSLive!
Free Print or Digital Subscriptions: Redmond | Redmond Channel Partner | Redmond Developer News
Virtualization Review | Visual Studio Magazine
Copyright 1996-2009 1105 Media, Inc. See our Privacy Policy.
1105 Redmond Media Group