LinuxQuestions.org
View the Most Wanted LQ Wiki articles.
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-17-2007, 01:28 AM   #1
Kristijan
Member
 
Registered: Sep 2003
Location: Melbourne, Australia
Distribution: NetBSD 3.0.1, Slackware 10.1
Posts: 394

Rep: Reputation: 30
Handling multiple subnets with DHCP/DNS


Hi All,

I have a NetBSD box at the moment currently set up with DHCP, DNS and PF. There are currently two NICs in the box fxp0 & fxp1. The DHCP server also updates the DNS server with any new clients which obtain a new address.

At the moment, DHCP and DNS only look after a single address range 192.168.0.0/24. All this works fine, but Im now looking at incorporating in a wireless AP, but want to assign any wireless workstations address from the 192.168.1.0/24 subnet.

The NetBSD box will eventually have three NICs;

fxp0 192.168.0.0 Internal LAN
fxp1 10.0.0.0 (ppp0 bridge) Internet
fxp2 192.168.1.0 Wireless LAN (Which my AP will plug into)

My question is do I simply just add another subnet declaration in /etc/dhcpd.conf like this?

Code:
 subnet 192.168.0.0 netmask 255.255.255.0 {
        do-forward-updates true;
        range 192.168.0.50 192.168.0.100;
        option subnet-mask 255.255.255.0;
        option domain-name-servers 192.168.0.10;
        option domain-name "in.kristijan.org";
        option routers 192.168.0.10;
}

subnet 192.168.1.0 netmask 255.255.255.0 {
        do-forward-updates true;
        range 192.168.1.1 192.168.1.25;
        option subnet-mask 255.255.255.0;
        option domain-name-servers 192.168.0.10;
        option domain-name "in.kristijan.org";
        option routers 192.168.0.10;
}
And another entry in the zone updates declaration?

Code:
 zone 0.168.192.in-addr.arpa. {
        primary 127.0.0.1;
        key rndc-key;
}

zone in.kristijan.org. {
        primary 127.0.0.1;
        key rndc-key; 

}

zone 1.168.192.in-addr.arpa. {
        primary 127.0.0.1;
        key rndc-key;
}
If thats the case, how does DHCP know which address to assign which workstation? Example, if I plug a box into my switch, Id expect an address from the 192.168.0.0 subnet, but if a wireless box connected via the AP, Id expect an address from the 192.168.1.0 range.

Same question about the zone updates, how does DHCP know which zone file to update?

Hope this makes sense

Cheers,
-Kristijan
 
Old 03-17-2007, 07:54 PM   #2
ARC1450
Member
 
Registered: Jun 2005
Location: Odenton, MD
Distribution: Gentoo
Posts: 290

Rep: Reputation: 30
You'd give your WAP a 192.168.1.0/24 address, and yes, DHCP should figure out the rest.

But DHCP would also assume that if an address is coming into it's 192.168.1.0/24 interface, it would need a 192.168.1.0/24 address. Else, how would it get to a gateway?
 
Old 03-17-2007, 08:57 PM   #3
Kristijan
Member
 
Registered: Sep 2003
Location: Melbourne, Australia
Distribution: NetBSD 3.0.1, Slackware 10.1
Posts: 394

Original Poster
Rep: Reputation: 30
Hi ARC1450,

Thanks for the response. I'm just waiting on a 3rd NIC to come in so I can go and give this all a test run. I guess that the DHCP will be smart enough to update the correct DNS zone as well then.

Once it's all in and I've run through it a few times, I'll let you know how it all went

Cheers,
-Kristijan
 
  


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 subnets klnasveschuk Linux - Networking 2 11-18-2007 12:04 AM
DHCP for 2 subnets omlex Linux - Networking 11 03-04-2007 07:41 PM
Multiple Subnets lucasnishimura Linux - Networking 1 08-07-2005 12:32 PM
Routing multiple subnets to multiple wans raven1000x Linux - Networking 1 03-10-2004 03:29 AM
DHCP server with multiple nics and subnets hawkpaul Linux - Networking 6 12-20-2001 08:32 AM


All times are GMT -5. The time now is 03:59 AM.

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