LinuxQuestions.org
Visit Jeremy's Blog.
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 03-02-2007, 12:06 PM   #1
Eicos
LQ Newbie
 
Registered: Mar 2007
Posts: 3

Rep: Reputation: 0
DHCP server and DHCP client in same box


Hello all. I'm running a DHCP server that listens on my wireless access point to provide internal network addresses to client computers. Then they are able to access my external interface through my shorewall. The problem is that DHCP does not want to start without a subnet declaration for the eth0 external interface, which is assigned via DHCP by my ISP. I have given it the current IP of the external interface in a subnet declaration just to shut it up and make it run, but the next time the IP changes, I'll have to update the DHCPD.conf, which I don't want to have to do all the time. Here are the contents of my current dhcpd.conf, including the interim subnet declaration


option domain-name-servers 65.24.7.3, 65.24.7.6;
default-lease-time 86400;
max-lease-time 604800;
authoritative;
subnet 192.168.0.0 netmask 255.255.255.0 {
range 192.168.0.200 192.168.0.229;
option subnet-mask 255.255.255.0;
option broadcast-address 192.168.0.255;
option routers 192.168.0.1;
}

subnet 65.189.128.0 netmask 255.255.252.0 {
}

Does anybody know how to make a subnet declaration for a segment that has a dynamic IP? Or, can I somehow circumvent this problem?

Thanks,
Danny
 
Old 03-02-2007, 12:33 PM   #2
MQMan
Member
 
Registered: Jan 2004
Location: Los Angeles
Distribution: Slack64 13.37
Posts: 536

Rep: Reputation: 36
What error are you getting. I run exactly the same here on my router/firewall, and don't have any issues. The only difference is, that I run a DNS server on the box as well.

Here's my settings:

Code:
# option definitions common to all supported networks...
option domain-name "BogoLinux.net";
option domain-name-servers The-Tardis.BogoLinux.net;
#option domain-name-servers 192.168.0.1;
option routers The-Tardis.BogoLinux.net;
#option routers 192.168.0.1;
option subnet-mask 255.255.255.0;
option broadcast-address 192.168.0.255;
#  don't let clients update DNS (only dhcpd manages ddns updates)
ignore client-updates;

default-lease-time 86400;
max-lease-time 604800;

subnet 192.168.0.0 netmask 255.255.255.0 {
  range 192.168.0.20 192.168.0.49;
}
Cheers.
 
Old 03-03-2007, 11:36 AM   #3
Eicos
LQ Newbie
 
Registered: Mar 2007
Posts: 3

Original Poster
Rep: Reputation: 0
Thanks for the info, MQM. It seems the problem was that I had to start DHCP with the interface I wanted it to listen to as an argument. Otherwise it would try to pay attention to its hardcoded target eth0, even though it's not in dhcpd.conf.

-danny.
 
Old 03-03-2007, 02:28 PM   #4
MQMan
Member
 
Registered: Jan 2004
Location: Los Angeles
Distribution: Slack64 13.37
Posts: 536

Rep: Reputation: 36
Oh yes. You need to restrict dhcpd to the interface that handles your internal network. If you accidentally start it on your "internet connection" interface, then your ISP will get very upset, when you start handing out IPs instead of them. LOL

Cheers.
 
  


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
dhcp client not getting IP from dhcp server jkmartha Linux - Networking 2 06-17-2005 09:12 AM
why DHCP client not sending own host name in DHCP request packet? sonika_singhi Linux - Networking 7 05-28-2005 06:18 AM
how can a DHCP client get the DHCP server IP? AshesOfTime Linux - Networking 3 11-24-2004 07:50 AM
XP Pro Build 2600/sp1 v.1105 DHCP Client to Redhat 8.0 DHCP Server - Problems atomant Linux - Networking 5 06-28-2003 12:24 PM
dhcp server and client diveguy Linux - Networking 4 02-20-2002 07:40 PM


All times are GMT -5. The time now is 03:45 PM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration