| Linux - Server This forum is for the discussion of Linux Software used in a server related context. |
| Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
 |
GNU/Linux Basic Guide
This 255-page guide will provide you with the keys to understand the philosophy of free software, teach you how to use and handle it, and give you the tools required to move easily in the world of GNU/Linux. Many users and administrators will be taking their first steps with this GNU/Linux Basic guide and it will show you how to approach and solve the problems you encounter.
Click Here to receive this Complete Guide absolutely free. |
|
 |
02-15-2012, 03:25 PM
|
#1
|
|
Member
Registered: Aug 2010
Location: Atlanta
Distribution: ubuntu, redhat
Posts: 138
Rep:
|
dhcp3 and mysql
I have ubuntu 10.04 LTS dhcp servers.
I have a mysql table of customers with a flag for if their cable modem is in bridge mode or route mode. I want to give all router modems a public ip address. I want to give all bridge modems a private 10.x.x.x ip, because whatever is behind the bridge will be getting the public ip, and I dont want all the cable modems eating away at my public ip space.
Is there any way to make dhcp3-server interface with mysql for such a purpose?
The only solution I can think of is using cron jobs to write a chunk of config to be included by dhcpd.conf. It would have to set a huge list of mac's to some dhcp3 class, where I can allow or deny in a shared-subnet with 2 sets (public and private) of pools. I'd like to accomplish this in real time by making dhcp3-server look this info up in mysql when it gets the request, possibly by setting a class. Is this possible?
|
|
|
|
02-16-2012, 09:43 AM
|
#2
|
|
Guru
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 11,817
|
Quote:
Originally Posted by suprstar
I have ubuntu 10.04 LTS dhcp servers.
I have a mysql table of customers with a flag for if their cable modem is in bridge mode or route mode. I want to give all router modems a public ip address. I want to give all bridge modems a private 10.x.x.x ip, because whatever is behind the bridge will be getting the public ip, and I dont want all the cable modems eating away at my public ip space.
Is there any way to make dhcp3-server interface with mysql for such a purpose?
The only solution I can think of is using cron jobs to write a chunk of config to be included by dhcpd.conf. It would have to set a huge list of mac's to some dhcp3 class, where I can allow or deny in a shared-subnet with 2 sets (public and private) of pools. I'd like to accomplish this in real time by making dhcp3-server look this info up in mysql when it gets the request, possibly by setting a class. Is this possible?
|
You can use dnsmasq for doling out DHCP addresses, and it can be used with a MySQL backend:
http://thekelleys.org.uk/dnsmasq/doc.html
http://tournasdimitrios1.wordpress.c...ices-on-linux/
(old, but may be useful) http://www.howtoforge.com/mydns_mydn...on_ubuntu_edgy
May not be exactly what you're looking for, though.
|
|
|
|
02-21-2012, 07:19 AM
|
#3
|
|
Member
Registered: Aug 2010
Location: Atlanta
Distribution: ubuntu, redhat
Posts: 138
Original Poster
Rep:
|
Thanks, that looks interesting, but I see it's targeted at small lan's with up to 500 clients. This is for an ISP so scalability will probably be an issue..
I have this working in my lab environment:
Code:
class "BRIDGE" {
match hardware;
}
subclass "BRIDGE" 1:00:16:7e:20:9d:38;
subclass "BRIDGE" 1:00:16:7e:70:31:82;
subclass "BRIDGE" 1:00:16:7e:4f:1a:a1;
subclass "BRIDGE" 1:00:16:7e:a7:b3:bf;
subclass "BRIDGE" 1:00:16:7e:92:ba:7f;
subclass "BRIDGE" 1:00:16:7e:c3:65:31;
...
All those subclass lines are written to a file and included by dhcpd.conf. I'm concerned how well this scales up as well - I could possibly have tens of thousands of mac's listed here. Is there going to be a performance problem? I have a quad core xeon 2.4GHz/8MB cache cpu and 8gb ram in each server. Each server is doing mainly dns and dhcp for the customers. Load levels are currently acceptable, adding this kind of config wouldn't have a big impact on performance would it?
Last edited by suprstar; 02-21-2012 at 07:32 AM.
|
|
|
|
02-21-2012, 09:45 AM
|
#4
|
|
Guru
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 11,817
|
Quote:
Originally Posted by suprstar
Thanks, that looks interesting, but I see it's targeted at small lan's with up to 500 clients. This is for an ISP so scalability will probably be an issue..
I have this working in my lab environment:
Code:
class "BRIDGE" {
match hardware;
}
subclass "BRIDGE" 1:00:16:7e:20:9d:38;
subclass "BRIDGE" 1:00:16:7e:70:31:82;
subclass "BRIDGE" 1:00:16:7e:4f:1a:a1;
subclass "BRIDGE" 1:00:16:7e:a7:b3:bf;
subclass "BRIDGE" 1:00:16:7e:92:ba:7f;
subclass "BRIDGE" 1:00:16:7e:c3:65:31;
...
All those subclass lines are written to a file and included by dhcpd.conf. I'm concerned how well this scales up as well - I could possibly have tens of thousands of mac's listed here. Is there going to be a performance problem? I have a quad core xeon 2.4GHz/8MB cache cpu and 8gb ram in each server. Each server is doing mainly dns and dhcp for the customers. Load levels are currently acceptable, adding this kind of config wouldn't have a big impact on performance would it?
|
Honestly, I can't answer that. The biggest DHCP environment I've ever managed was for about 2,500 on a corporate LAN. You're trying to slay a different dragon.
If it was me, though, I'd implement it in a lab, and see how it goes, and watch the trends on load.
|
|
|
|
| Thread Tools |
Search this Thread |
|
|
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT -5. The time now is 04:20 PM.
|
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|