It’s quite easy to implement a DHCP configuration but how about if you have different subnetworks with different needs ?

I have at home a server which I use for “playing” with different technologies and also for dns-caching, proxy-caching, etc…

So I have two NIC in it and therefore two different subnetworks.  I did all the routing table but I also needed to edit my dhcpd.conf in order to have it working on different subnets.  Here it goes the conf file:

/*START OF DHCPD.CONF CONFIG FILE*/

authoritative;
ddns-update-style interim;

default-lease-time 900;
max-lease-time 9200;

subnet 192.168.1.0 netmask 255.255.255.240 {
option subnet-mask 255.255.255.240;
option domain-name-servers 192.168.1.1;
option routers 192.168.1.1;
range 192.168.1.3 192.168.1.14;
}   ## On this network, we have the subnet 255.255.255.240, which means, only 14 usable hosts, where the 192.168.1.1 is the gateway for this network and 192.168.1.2 runs the WLAN AP ##

subnet 192.168.0.0 netmask 255.255.255.248 {
option subnet-mask 255.255.255.248;
option domain-name-servers 192.168.0.1;
option routers 192.168.0.3;
range 192.168.0.3 192.168.0.6;
}
##Same thing, but here the netmask is 255.255.255.248, which means only 6 usable hosts, the 192.168.0.3 is the gateway and the 192.168.0.1 and 192.168.0.2 are not here because I use it as static hosts##

/*END OF DHCPD.CONF CONFIG FILE*/

————————

References:

http://en.wikipedia.org/wiki/Subnetwork

Advertisements