LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 10-05-2012, 12:39 PM   #1
dazdaz
Member
 
Registered: Aug 2003
Location: Europe
Distribution: RHEL, CentOS, Ubuntu
Posts: 333

Rep: Reputation: 17
Why not to use DHCP on a Linux Server


Why should a Linux corproate server in a datacenter not use DHCP ?

There are static VIP's on these systems, which have firewall rules defined, however for the system host address on eth0, why is it not a good idea to not use DHCP on this.

Last edited by dazdaz; 10-05-2012 at 12:42 PM.
 
Old 10-05-2012, 01:18 PM   #2
ShadowCat8
Member
 
Registered: Nov 2004
Location: San Bernardino, CA
Distribution: Gentoo, Arch, (RedHat4.x-9.x, FedoraCore 1.x-4.x, Debian Potato-Sarge, LFS 6.0, etc.)
Posts: 261

Rep: Reputation: 52
Greetings,

Well, the most obvious reason is to always know where the linux server is on the network. Servers tend not to move much, so assigning a static IP outside of the DHCP range will help cut down on possible confusion and/or network issues down the road.

Also, how solid is the DNS <=> DHCP binding on the network? Does the DHCP server add a DNS entry for each system it assigns an address to? A few do, but most don't. If yours doesn't, then how are you going to know where the server is when the DHCP lease gets renewed?

HTH. Let us know.
 
1 members found this post helpful.
Old 10-05-2012, 02:43 PM   #3
JaseP
Senior Member
 
Registered: Jun 2002
Location: Eastern PA, USA
Distribution: K/Ubuntu 18.04-14.04, Scientific Linux 6.3-6.4, Android-x86, Pretty much all distros at one point...
Posts: 1,802

Rep: Reputation: 157Reputation: 157
At dazdaz,...

Are you referring to the network's server also being the DHCP server for the network,... or being another DHCP client of a router on the network?
 
Old 10-05-2012, 03:15 PM   #4
jefro
Moderator
 
Registered: Mar 2008
Posts: 21,937

Rep: Reputation: 3619Reputation: 3619Reputation: 3619Reputation: 3619Reputation: 3619Reputation: 3619Reputation: 3619Reputation: 3619Reputation: 3619Reputation: 3619Reputation: 3619
In many situations one might wish to have a full static network. They usually tend to come up faster and always stay up on the known addresses. Some vlan's/tunnels could be broken when dhcp renews. Many sites like to have templates of systems so that they know each computer in some place is always on. They don't have to trouble shoot any dhcp issues. There is sometimes a delay or loss of data on renews.
Server rooms are not like normal users. They don't really need many of the uses for dhcp like moving around, lack of ip addresses or pushing services like pxe boot and such.
 
1 members found this post helpful.
Old 10-05-2012, 03:26 PM   #5
dazdaz
Member
 
Registered: Aug 2003
Location: Europe
Distribution: RHEL, CentOS, Ubuntu
Posts: 333

Original Poster
Rep: Reputation: 17
Quote:
Originally Posted by JaseP View Post
At dazdaz,...

Are you referring to the network's server also being the DHCP server for the network,... or being another DHCP client of a router on the network?
I am referring to a bunch of Linux server's being DHCP clients.
 
Old 10-05-2012, 05:41 PM   #6
JaseP
Senior Member
 
Registered: Jun 2002
Location: Eastern PA, USA
Distribution: K/Ubuntu 18.04-14.04, Scientific Linux 6.3-6.4, Android-x86, Pretty much all distros at one point...
Posts: 1,802

Rep: Reputation: 157Reputation: 157
Why not have one of them be the DHCP server?! Most of the time, when you have an internal network, once an IP address is assigned to an attached connected host's MAC it's more or less permanent anyway, or you can make it so, but still within a DHCP framework. One advantage to having one of them be DHCP server is that certain services that utilize auto detection can work better in a DHCP environment, whereas in a static IP environment, they might not work at all... Things like PXE booting and network appliance detection (embedded equipment) are the type things I have in mind... If a full blown PC is the DHCP server, firewall, and router (DD-WRT, for example).

My main server is my DHCP server for my LAN, as well as router, firewall, file server, multimedia back end, and soon,... internal Asterisk server (with at least one ATA to allow the system to grab POTS [Plain Old Telephone Service] lines). It actually sits inside another LAN (an "external" LAN, if you will). And that LAN acts as a DHCP server, router and firewall in its on write.
 
Old 10-06-2012, 04:17 PM   #7
wpeckham
LQ Guru
 
Registered: Apr 2010
Location: Continental USA
Distribution: Debian, Ubuntu, RedHat, DSL, Puppy, CentOS, Knoppix, Mint-DE, Sparky, VSIDO, tinycore, Q4OS,Manjaro
Posts: 5,507

Rep: Reputation: 2656Reputation: 2656Reputation: 2656Reputation: 2656Reputation: 2656Reputation: 2656Reputation: 2656Reputation: 2656Reputation: 2656Reputation: 2656Reputation: 2656
voice ov experience

This from a geek running WAY past foggyhood into true geezerhood:
Client machines on a network can have static or dynamic IP addresses, servers should always be static.

This is not ONLY true of network servers or major services, but also things like Jetdirect Print servers.

Even if your DHCP server updates DNS instantly (ala dnsmasq, etc) most client machines on a network will have cached the OLD data when a server card or machine negotiates a new one. I have seen this kind of thing play out since Novell was the biggest word in networking in the world and milnet was GOING to be a good idea SOMEDAY. (Way before your time, I am sure.) Networks that allowed devices to 'float' to a new name or address (yes, even before TCP/IP) will have problems under some conditions. Those conditions are not always ones that the General or CEO is going to understand or forgive.

Wanna keep your rank, keep the servers static, stable, and available.
Break the rule, pay the price.
 
Old 10-06-2012, 04:50 PM   #8
suicidaleggroll
LQ Guru
 
Registered: Nov 2010
Location: Colorado
Distribution: OpenSUSE, CentOS
Posts: 5,573

Rep: Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142
I think the real question is, why WOULD you use DHCP for a server? It makes no sense, there is no advantage...only disadvantages.
 
1 members found this post helpful.
Old 10-07-2012, 06:02 AM   #9
dazdaz
Member
 
Registered: Aug 2003
Location: Europe
Distribution: RHEL, CentOS, Ubuntu
Posts: 333

Original Poster
Rep: Reputation: 17
The network admin is now thinking of a permanent IP reservation within the the DHCP server configuration based upon the server's MAC address.

Personally Im all for static IP adrdesses on servers, but I need to carefully justify the reason/s why.
 
Old 10-07-2012, 07:55 AM   #10
Celyr
Member
 
Registered: Mar 2012
Location: Italy
Distribution: Slackware+Debian
Posts: 321

Rep: Reputation: 81
I have to be honest I prefer your network admin way of doing things because with that you can change every network setting from a single position and a reboot. It's easier to manage.
The only problem with that is that if the DHCP server goes down then there could be issues.
 
Old 10-07-2012, 01:35 PM   #11
dazdaz
Member
 
Registered: Aug 2003
Location: Europe
Distribution: RHEL, CentOS, Ubuntu
Posts: 333

Original Poster
Rep: Reputation: 17
Yes, the DHCP server is a single point of failure, that is the best justification that I can think of, to use static IP addresses for a server system.

Thanks everyone for your input.
 
Old 10-11-2012, 01:02 PM   #12
JaseP
Senior Member
 
Registered: Jun 2002
Location: Eastern PA, USA
Distribution: K/Ubuntu 18.04-14.04, Scientific Linux 6.3-6.4, Android-x86, Pretty much all distros at one point...
Posts: 1,802

Rep: Reputation: 157Reputation: 157
Quote:
Originally Posted by suicidaleggroll View Post
I think the real question is, why WOULD you use DHCP for a server? It makes no sense, there is no advantage...only disadvantages.
How so?!?! On a typical home network, you have a DHCP server situated within a $45-$120 router, and yet you rarely hear of failures related to that... Now combine the same software, running on a more powerful machine, with greater admin access...

I don't see that as a particularly vulnerable failure point. Plus, you may have some equipment (maybe an ATA, for example) that expects to receive IP assignment via DHCP. And once again, PXE booting without DHCP is near-impossible without shoe-horning some kind of solution in...

As for letting DHCP run away with the farm, letting anyone making a DHCP request get an IP and potentially harmful access to the network,... you can limit the MAC addresses to a pool of specifically enabled ones (and yes, I know MACs are easily spoofed).
 
Old 10-11-2012, 01:12 PM   #13
suicidaleggroll
LQ Guru
 
Registered: Nov 2010
Location: Colorado
Distribution: OpenSUSE, CentOS
Posts: 5,573

Rep: Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142
Quote:
Originally Posted by JaseP View Post
How so?!?! On a typical home network, you have a DHCP server situated within a $45-$120 router, and yet you rarely hear of failures related to that... Now combine the same software, running on a more powerful machine, with greater admin access...

I don't see that as a particularly vulnerable failure point. Plus, you may have some equipment (maybe an ATA, for example) that expects to receive IP assignment via DHCP. And once again, PXE booting without DHCP is near-impossible without shoe-horning some kind of solution in...

As for letting DHCP run away with the farm, letting anyone making a DHCP request get an IP and potentially harmful access to the network,... you can limit the MAC addresses to a pool of specifically enabled ones (and yes, I know MACs are easily spoofed).
You seem to be misunderstanding the question behind this thread. The OP was not asking about using the server AS a DHCP server, the OP was asking about running the server as a DHCP client. That's what I was responding to. Running DHCP in your network is fine. Using one of the servers as the DHCP server is fine. But operating all of your servers on the network (file servers, mail servers, web servers, ftp servers...) under DHCP, with dynamic IP assignment, is just asking for trouble.

There are ways around the issues that arise from this, but why bother? What is the benefit in using DHCP versus static for your servers?

Last edited by suicidaleggroll; 10-11-2012 at 01:28 PM.
 
1 members found this post helpful.
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Linux DHCP with windows server 2008 active directory server baggins2000 Linux - Server 1 10-10-2011 01:25 PM
Problem on acquiring IP addr. on client from dhcp server through dhcp relay server haariseshu Linux - Server 5 08-10-2009 01:20 AM
Instead of Router DHCP Server, Pass DHCP Server control to Slackware orbit Slackware 6 05-11-2009 02:00 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 04:02 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration