LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
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 05-21-2006, 08:48 PM   #1
zamri
Member
 
Registered: May 2004
Location: Malaysia
Distribution: Mandrake,Slackware,RedHat
Posts: 157

Rep: Reputation: 30
2 or more dhcp servers in a LAN


Hi all,

I administered a LAN at my office. Some of the PCs are configured to get IP address from a DHCP server. I noticed that there's another PC in the LAN acting as a DHCP server by giving false network information e.g IP,netmask,gateway and DNS. This makes the PC cannot connect to the internet. By not searching for the *false* DHCP server and shut the service, is it possible to set priority which DHCP server should be giving network info for the LAN? or any other way.
 
Old 05-21-2006, 10:13 PM   #2
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682
You probably should locate that computer and shut down that service, or isolate it if you can. Seems to me a rogue DHCP server, could be very dangerous. For example, setting the gateway IP to a man-in-the-middle gateway to intercept all outgoing traffic before sending it off to the real gateway.
 
Old 05-21-2006, 11:19 PM   #3
alistair100
LQ Newbie
 
Registered: Sep 2004
Posts: 3

Rep: Reputation: 0
Surely there should only be one DCHP server on your LAN? Assuming that your router does DHCP, seems best to use that and turn off any others.
 
Old 05-21-2006, 11:59 PM   #4
zamri
Member
 
Registered: May 2004
Location: Malaysia
Distribution: Mandrake,Slackware,RedHat
Posts: 157

Original Poster
Rep: Reputation: 30
It seems out of control to control lots of PCs in a LAN. Some PCs may have dhcpd up and running. I read there's authoritative options that we can use in dhcpd.conf. How effective the option is?
 
Old 05-22-2006, 03:59 AM   #5
timmeke
Senior Member
 
Registered: Nov 2005
Location: Belgium
Distribution: Red Hat, Fedora
Posts: 1,515

Rep: Reputation: 61
If it's anything like DNS, authoritative settings only make DHCP servers dependent on each other (for updating their info - ie the IP addresses in use).
However, think about what would happen if your authoritative DHCP server is temporarily unavailable.
Since DHCP basically works via broadcasts, your PCs will most likely end up contacting the -potentially malicious- false DHCP server.

So, I agree with jschiwal and the others. The rogue DHCP server must be blocked from sending/receiving DHCP messages (blocking broadcasting may do the trick) and/or have it's DHCP service terminated.

Quote:
It seems out of control to control lots of PCs in a LAN.
That seems an poor excuse to me. If you're administering the LAN, you'll HAVE to lay down the law.
The administrator must be the boss of his/her own LAN.
Think about all the complaints from other users if you don't shut down the rogue server, for instance...

A hint: firewalls are not only used to keep out unwanted intruders. They are also useful to prevent malicious users on a LAN from doing harm to other users.
 
Old 05-22-2006, 05:21 AM   #6
zamri
Member
 
Registered: May 2004
Location: Malaysia
Distribution: Mandrake,Slackware,RedHat
Posts: 157

Original Poster
Rep: Reputation: 30
Quote:
Originally Posted by timmeke
So, I agree with jschiwal and the others. The rogue DHCP server must be blocked from sending/receiving DHCP messages (blocking broadcasting may do the trick) and/or have it's DHCP service terminated.
How do i block the broadcasting from the rogue server(s)?
 
Old 05-22-2006, 05:49 AM   #7
timmeke
Senior Member
 
Registered: Nov 2005
Location: Belgium
Distribution: Red Hat, Fedora
Posts: 1,515

Rep: Reputation: 61
Edit:
After a little searching, I found that I was mistaken.
It's the DHCP client that broadcasts across the network to get a DHCP server to respond.

Blocking the DHCP broadcasts would thus only prevent clients from using DHCP to get IP addresses.

Blocking the broadcasts from reaching some specific hosts (ie the rogue servers) may not be so straight-forward.

So, sorry for the confusion. I was mistaken.

Last edited by timmeke; 05-22-2006 at 06:41 AM.
 
Old 05-22-2006, 07:07 AM   #8
zamri
Member
 
Registered: May 2004
Location: Malaysia
Distribution: Mandrake,Slackware,RedHat
Posts: 157

Original Poster
Rep: Reputation: 30
oo. it's ok. let's discuss the matter. I have read in other thread that Windows clients are too picky in searching DHCP server. Meaning that it will get the IP from the one that can respond faster. If there's another DHCP server in a LAN nearer, it will definitely get from that one first.
 
Old 05-22-2006, 07:45 AM   #9
timmeke
Senior Member
 
Registered: Nov 2005
Location: Belgium
Distribution: Red Hat, Fedora
Posts: 1,515

Rep: Reputation: 61
I believe that's not only true for Windows DHCP clients.
Basically, DHCP works like this:
* clients don't know their own IP address nor that of the DHCP server,
so they issue a network wide broadcasted DHCP request
* broadcast is received by all DHCP servers
* all servers respond
* clients "picks" a server (usually the fastest/nearest one, since it's reply is simply
received first)
* client then finalize the DHCP request by contacting the picked server.
* all other servers don't get a reply, probably time out or something and then say that the
IP address they proposed to the client is once again "open" for all DHCP clients to claim.

That seems logical, no?

Most clients will use the first DHCP answer they get, so the "pickyness" you described is probably the
standard client behaviour.

If you know the IP of the rogue server, you can probably block
some or all network traffic to it, but this may not necessarily work for the broadcasts.
However, the client does send an "acknowledgement" to the server, so that the server knows that the IP
it has suggested is now occupied by the client who sent the broadcast (ie the server knows it has been "picked"). Maybe you could block such acknowledgement messages. They aren't IP broadcasts, of course.

Then again, if you know the server's IP address, you could also locate it and make sure the DHCP service is shut down.
 
Old 05-24-2006, 03:16 AM   #10
zamri
Member
 
Registered: May 2004
Location: Malaysia
Distribution: Mandrake,Slackware,RedHat
Posts: 157

Original Poster
Rep: Reputation: 30
yes. I know the server's IP address but I am thinking of ways to prevent this automatically even without clients reconfiguration if that's possible/permissible.
 
  


Reply



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
Failing to assign DNS servers to lan in DHCP Samhein Linux - Networking 3 01-25-2006 09:56 AM
Two DHCP Servers mesh2005 Linux - Networking 3 10-16-2005 05:26 AM
DHCP problems - multiple DHCP servers sat86 Linux - Networking 4 10-02-2005 05:43 AM
Finding out DHCP Servers warned Linux - Networking 2 04-15-2004 02:44 AM
Changing DHCP servers albean Linux - Networking 1 12-10-2002 12:39 PM

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

All times are GMT -5. The time now is 05:32 PM.

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