LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 08-29-2007, 03:30 AM   #1
csuetians
LQ Newbie
 
Registered: Aug 2007
Posts: 2

Rep: Reputation: 0
Problem arises from two DHCP Server ?


My question is that I have 100 linux computers that are connected to a linux server in a subnet and they use DHCP to obtain their IPs. The problem is that If some one from client make its own DHCP Server.this make two dhcp servers on the LAN.tHEN WHAT HAPPENED? I want all systems to get the IPs from main DHCP Server and reject any other DHCP How i can manage it ???

The problem is that I am not really sure how can I configure the SERVER and clients of DHCP to select only ONE main DHCP Server for IPs,and no one canot make any DHCP Server so how can I configure them??

Can someone help me???
 
Old 08-29-2007, 04:21 AM   #2
zhjim
Senior Member
 
Registered: Oct 2004
Distribution: Debian Squeeze x86_64
Posts: 1,748
Blog Entries: 11

Rep: Reputation: 233Reputation: 233Reputation: 233
Quote:
Originally Posted by csuetians View Post
tHEN WHAT HAPPENED?
If two DHCP-Server share the same network the one who comes first, marks first. Say the one that faster gives out the answer for the request will win and set the ip of the client.

Quote:
Originally Posted by csuetians View Post
The problem is that I am not really sure how can I configure the SERVER and clients of DHCP to select only ONE main DHCP Server for IPs,and no one canot make any DHCP Server so how can I configure them??
Thinking about it i don't come up with any configuration options that would prevent a rogue server to send out dhcp-offers. So the best way to keep people from setting up their own dhcp is to not give them any administration privileges. Which can be quite hard if you have someone come along with their own labtop or similar.

there are a lot of tools now a days that check for rogue dhcp servers. Try arpwatch or similar.

Also consider that DHCP-Broadcast normaly stops at physical network boundries, namely switches (?HUBS?). If you have switches that use broadcast redirect you might also have the option to restrictid this redirect with a mac filter. That would keep the rogue server out of most network segments. BUt it still would linger around in one...

If you have some programming skil you might think about using a dhclient on the dhcp server and look if it gets the dhcp-offer from the right server. Whith the right configuration you should not get any ip through dhcp when no other dhcp is running.

There are definetly more solutions to this problem, but those are the ones that came to my mind. Just do a search with "rogue dhcp" and see if you find something useful for you.

Greetings Zhjim
 
Old 08-29-2007, 05:30 AM   #3
vedang
Member
 
Registered: May 2006
Posts: 89

Rep: Reputation: 15
Lightbulb Twin Dhcp Problem.

First of all keep one thing always in mind that one can setup a DHCP server only and only when his computer have a static IP configured. If that fellow is getting IP from your server he cannot setup his own DHCP server.

Also you can reserve IP address according for mac address of each NIC this will prevent you from any person coming with laptop getting an IP from your DHCP server.

So do not allow them to configure IP manually.


I am also finding out what else can be done.


Wairt for my next reply.

Last edited by vedang; 08-29-2007 at 05:33 AM.
 
Old 08-30-2007, 12:56 AM   #4
csuetians
LQ Newbie
 
Registered: Aug 2007
Posts: 2

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by csuetians View Post
My question is that I have 100 linux computers that are connected to a linux server in a subnet and they use DHCP to obtain their IPs. The problem is that If some one from client make its own DHCP Server.this make two dhcp servers on the LAN.tHEN WHAT HAPPENED? I want all systems to get the IPs from main DHCP Server and reject any other DHCP How i can manage it ???

The problem is that I am not really sure how can I configure the SERVER and clients of DHCP to select only ONE main DHCP Server for IPs,and no one canot make any DHCP Server so how can I configure them??

Can someone help me???
there is another requirement for administration rites in the network also. i bind ip with mac address. but how i can control that no one itself assign static ip to system which will same as assigned by dhcp server on the network...???
 
Old 08-30-2007, 04:19 AM   #5
vedang
Member
 
Registered: May 2006
Posts: 89

Rep: Reputation: 15
Smile DHCP Problem.

If all 100 computer users are logging in with their account, there is no question of that user will assign a static IP to the computer.

Because if a user is logging in with a account which is no administrative or he is not member of administrativr groups he cannot assign an IP to the computer.

So reserving IP with mac address must work.
 
Old 08-31-2007, 09:27 PM   #6
fur
Member
 
Registered: Dec 2003
Distribution: Debian, FreeBSD
Posts: 310

Rep: Reputation: 35
Just because a host has a dynamic IP doesn't cause the DHCP process to not bind to that interface. Static vs dynamic doesn't matter.

As far as fixes, unless your switches have some packet filtering options there is no real way to totally block this.

Any machine that is in the same broadcast domain as the rouge DHCP server will potentially get an invalid lease if another host is running a DHCP server.
 
Old 08-31-2007, 10:01 PM   #7
fur
Member
 
Registered: Dec 2003
Distribution: Debian, FreeBSD
Posts: 310

Rep: Reputation: 35
You may also want to scan for rouge DHCP servers so you can track them down before they become a larger problem.

There are tools like nmap, and dhcping that can help in doing this.

For example

for i in `seq 1 254`; do dhcping -s 192.168.0.$i -t1 ;grep "Got answer from"; done

Will check for DHCP servers from 192.168.0.1 - 192.168.0.254. It has a timeout of 1 second so it will take about 4 minutes to complete a /24 subnet.

You could modify this to email you if it detects another server. Then add to cron, and run every hour or something.
 
Old 06-13-2008, 04:33 PM   #8
tbeehler
Member
 
Registered: Aug 2003
Location: Washington State, USA
Distribution: Mainly RH 9.0
Posts: 227

Rep: Reputation: 30
Quote:
Originally Posted by fur View Post
You may also want to scan for rouge DHCP servers so you can track them down before they become a larger problem.

There are tools like nmap, and dhcping that can help in doing this.

For example

for i in `seq 1 254`; do dhcping -s 192.168.0.$i -t1 ;grep "Got answer from"; done

Will check for DHCP servers from 192.168.0.1 - 192.168.0.254. It has a timeout of 1 second so it will take about 4 minutes to complete a /24 subnet.

You could modify this to email you if it detects another server. Then add to cron, and run every hour or something.
This is PERFECT! I was looking all over the place for something simple to help me find rogue DHCP servers. Thanks!
 
  


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
Dhcp Server problem Pluster Linux - Networking 4 12-21-2006 02:10 PM
Problem with DHCP Server. Hambone_20003 Linux - Networking 2 11-22-2005 06:25 PM
problem with dhcp server egyptian Linux - Networking 4 10-24-2004 02:56 AM
DHCP Server Problem bally Linux - General 1 11-10-2003 11:30 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 03:57 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