LinuxQuestions.org
Review your favorite Linux distribution.
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 03-15-2010, 09:58 PM   #1
lulu_go
LQ Newbie
 
Registered: Mar 2010
Location: Montevideo-Uruguay
Distribution: Debian
Posts: 4

Rep: Reputation: 0
ask a dhcp server to respond a petition only if a condition happens


Hello forum, this is my first question in a forum, most of the times I had found the answers in internet but not this time (I apologize for my english I speak spanish)

My problem is this, I have two dhcp server (dhcp3) in the same network, this network is a link layer network so every host is seen as directly connected. The two servers have debian lenny and there are near 13 AP mikrotik to give connection to the XO laptops (from the project one laptop per child). This is for two public schools (each one with one server) that are connected via a p2p connection and each one provides internet for the school and outdoor too. The servers are also file servers, proxy, etc.

Each time a laptop asks for an IP, it sends a broadcast message and this petition gets to both servers, now a days the first server that reply is the one the laptop associate with. What I want to do is, knowing the bandwith use of the ADSL, the clients connected to the server, and the cost to the AP that the laptop associate with, decide wich is the best server to be connected to. What I want to achive is to balance the load and to decide the optimum connection, because now it could happen that one server is very loaded and the other is free.

I tried to run dhcp with inetd and use tcp wrappers to invoke a script to check a condition before responding and, in case to be the best server, reply to the laptop, but i couldn't get the dhcp server to respond when I run it with inetd. Actually I don't know if this is the best thing to do to solve the problem

here is my inetd.conf
bootps dgram udp wait root /usr/sbin/tcpd dhcpd3

thank you very very much for your help
lulu
 
Old 03-15-2010, 10:31 PM   #2
Drakeo
Senior Member
 
Registered: Jan 2008
Location: Urbana IL
Distribution: Slackware, Slacko,
Posts: 3,716
Blog Entries: 3

Rep: Reputation: 483Reputation: 483Reputation: 483Reputation: 483Reputation: 483
did you think about some simple routers.That control intra-net This way you can route the mac address before they get to your dhcp servers.
since this is a public school and you have the same people everyday set up mac filter or set the number of connection plus mac filter. Since this is a public school I will not address the cost thing but I am sure there are plenty of programs that read the log and configure time and money.
I have a couple hundred people on my net and that is how I handle it. I leave a couple connections open for guest. all of these laptops do wifi so they go through the wifi router. If hard wired same thing mac address.
set your connection and speed on your router per device. or mac or connection.
I am no net work wizard. but the hole thing comes down to which server gets what device.And that is routing.
good luck
 
Old 03-15-2010, 11:16 PM   #3
catkin
LQ 5k Club
 
Registered: Dec 2008
Location: Tamil Nadu, India
Distribution: Debian
Posts: 8,578
Blog Entries: 31

Rep: Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208
Hello lulu :-)

Sorry -- I don't know how to solve your problem -- but I would like to thank you for the clearly expressed question. No need to apologise for your English! There are a few unusual expressions but the meaning is crystal clear. Thank you. I hope LQ is able to solve your issue.
 
Old 03-17-2010, 06:24 AM   #4
Drakeo
Senior Member
 
Registered: Jan 2008
Location: Urbana IL
Distribution: Slackware, Slacko,
Posts: 3,716
Blog Entries: 3

Rep: Reputation: 483Reputation: 483Reputation: 483Reputation: 483Reputation: 483
http://compnetworking.about.com/od/h...rconfigure.htm
Check it out.
 
Old 03-17-2010, 02:22 PM   #5
lulu_go
LQ Newbie
 
Registered: Mar 2010
Location: Montevideo-Uruguay
Distribution: Debian
Posts: 4

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by Drakeo View Post
Hi, thank you very much for replying!

The thing is this, you are right about the router, everything will be easier if I could work in layer 3, but I can't change any of that, I have to solve the problem of deciding wich server is better to associate with but I can't add equipment such as routers or changing too much the way the network was planned to work. This is a project from my university that was given to me but the decisions made of how the schools were going to operate was made many time ago.

I thought of comparing many data from snmp consults and decide wich server is optimum, that condition is the one both servers must check before responding. So I have to add some line maybe in the dhcpd.conf or make the inetd work with dhcp (I am begining to give up on that) so the servers can check that condition before responding.

Now I am also thinking in moving the dhcp service to hear in other port (let's say 50000) and put a script made by myself in 67 port, check that condition and if the server is the optimum redirect the discover packet to the 50000 port

Any ideas?

again thank you very much

P.S.:The thing about blocking the clients from the other school or the outdoor clients is, that is not the solution I was asked to do in fact they want the clients to associate to the optimum server despite where they are.
 
Old 03-18-2010, 12:20 PM   #6
arty
Member
 
Registered: Nov 2008
Posts: 66

Rep: Reputation: 17
when you say "optimum server"
you mean optimum as how many clients are connected to the dhcpd?
or how many clients are actually using the network at the given time?
 
Old 03-18-2010, 12:27 PM   #7
frieza
Senior Member
 
Registered: Feb 2002
Location: harvard, il
Distribution: Ubuntu 11.4,DD-WRT micro plus ssh,lfs-6.6,Fedora 15,Fedora 16
Posts: 3,233

Rep: Reputation: 406Reputation: 406Reputation: 406Reputation: 406Reputation: 406
a bit of a tedious way of doing it would be to gather all the MAC addresses and configure thhe DHCP servers hand out IP reservations to said mac addresses, or only respond to said mac addresses
it's been such a long time since i've configured ip reservations by hand i forget the exact syntax though
 
  


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
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
[SOLVED] Server ceases to respond me_spearhead SUSE / openSUSE 1 10-26-2008 10:03 AM
Exim4, sender condition, and MS Exchange Server Murdock1979 Linux - Server 0 07-20-2008 05:01 AM
Qmail smtp server does not respond kmashraf Linux - Networking 3 02-25-2005 12:51 PM

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

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