Re: ISC DHCP - Two subnets on one physical interface.
- From: Philippe WEILL <Philippe.Weill@xxxxxxxxxxxxxxx>
- Date: Tue, 31 Jul 2007 17:59:58 +0200
Dan wrote:
I'm having some trouble trying to get dhcp to serve two subnets on one
interface.
The first is 10.0.0.0/24 which is for office workstations and
equipment. Everyone in here is assigned a static ip via mac address.
The second is a 'guest' network which is 10.0.10.0/24.
I was able to get dhcp to assign the ip address for both subnets by
making the subnet declaration 10.0.0.0/16. The problem is that there
are other settings that need to be set like the default route, dns,
netmask, etc.
In my first attempt, I made a pool and set all the settings to be that
of the guest network. I would then override those settings in the
host declarations for the office equipment. The problem is that it
didn't like having options such as routers,domain-name-servers, etc in
the host declarations.
Does anyone know how I can do this without a second NIC?
man dhcpd.conf
see shared-network
it's what's you need
.
Below is my current config.
################ Current Config #################
max-lease-time 86400;
default-lease-time 14400;
ddns-update-style interim;
log-facility local4;
subnet 10.0.0.0 netmask 255.255.0.0 {
authoratative;
range 10.0.10.10 10.0.10.250; ## Guest Network
# don't let clients update A records for ddns
ignore client-updates;
# options
option subnet-mask 255.255.255.0;
option broadcast-address 10.0.0.255;
option domain-name "domain.tld";
#option domain-name-servers 65.106.1.196,65.106.7.196;
#option routers 10.0.10.1;
option domain-name-servers 10.0.0.225;
option routers 10.0.0.1;
option ntp-servers 10.0.0.250;
option netbios-scope "";
option netbios-node-type 8;
host ws1 {hardware ethernet 00:13:21:d0:3f:0b;fixed-address 10.0.0.3;}
host ws2 {hardware ethernet 00:0d:9d:4c:94:4d;fixed-address 10.0.0.5;}
host ws3 {hardware ethernet 00:0d:9d:4b:35:bd;fixed-address 10.0.0.6;}
host ws4 {hardware ethernet 00:0b:cd:c3:ee:03;fixed-address 10.0.0.7;}
}
########################################
The following is what I would have liked to set up. Understandably
the following won't work because the two networks are not physically
separated, and there is only one NIC available for dhcp.
max-lease-time 86400;
default-lease-time 14400;
ddns-update-style interim;
log-facility local4;
subnet 10.0.10.0 netmask 255.255.255.0 {
authoratative;
range 10.0.10.10 10.0.10.250; ## Guest Network
# don't let clients update A records for ddns
ignore client-updates;
# options
option subnet-mask 255.255.255.0;
option broadcast-address 10.0.10.255;
option domain-name "guest.domain.tld";
option domain-name-servers 65.106.1.196,65.106.7.196;
option routers 10.0.10.1;
}
subnet 10.0.0.0 netmask 255.255.255.0 {
authoratative;
# don't let clients update A records for ddns
ignore client-updates;
# options
option subnet-mask 255.255.255.0;
option broadcast-address 10.0.0.255;
option domain-name "domain.tld";
option domain-name-servers 10.0.0.225;
option routers 10.0.0.1;
option ntp-servers 10.0.0.250;
option netbios-scope "";
option netbios-node-type 8;
host ws1 {hardware ethernet 00:13:21:d0:3f:0b;fixed-address 10.0.0.3;}
host ws2 {hardware ethernet 00:0d:9d:4c:94:4d;fixed-address 10.0.0.5;}
host ws3 {hardware ethernet 00:0d:9d:4b:35:bd;fixed-address 10.0.0.6;}
host ws4 {hardware ethernet 00:0b:cd:c3:ee:03;fixed-address 10.0.0.7;}
}
- Follow-Ups:
- References:
- Prev by Date: Re: rehat linux9.0 ppp error messages
- Next by Date: Re: Ebtables to stop DHCP and ARP
- Previous by thread: ISC DHCP - Two subnets on one physical interface.
- Next by thread: Re: ISC DHCP - Two subnets on one physical interface.
- Index(es):
Relevant Pages
|