1

The case I want to cover is to send different DNS server for one, isolated VLAN, which purpose is to give internet-only access - for our guests. It has no access to our internal network, so it shouldn't use DNS referring to internal addresses.

The problem, that is caused by setting that DNS is, that, if our employers are up to use that guest-only VLAN for some reason, they have no access to our mail server, as it tries to connect via internal address, which is not reachable from that subnet.

Example:

Guest only VLAN is 1000, subnet provided there via DHCP is 192.168.1.0/26,
traffic is limited to that subnet and to internet only,
that DHCP server has also pools 192.168.1.128/25, 192.168.2.0/23 and 192.168.4.0/22,
which are getting DNS servers from 192.168.1.64/26, but for the 192.168.1.0/26 subnet
I'd like to provide google DNSes: 8.8.8.8 and 8.8.4.4

Is such configuration possible at single DHCP server - the 'per subnet dns' configuration? If not, is it possible to run 2 instances of ISC DHCP server at single physical/virtual machine, with different configs(and how do I achieve that)?

2
  • Have you tried it? What happened when you tried it?
    – Zoredache
    Dec 12, 2013 at 20:05
  • No, I haven't tried it, as I didn't know I can use option domain-name-server in subnet directive.
    – tymik
    Dec 12, 2013 at 20:54

1 Answer 1

2

Yes, it is possible. You can create multiple subnet entries and give each its own DNS config, something like this:

# guests
subnet 192.168.1.0 netmask 255.255.255.192 {
    option routers 192.168.1.1;
    option subnet-mask 255.255.255.192;
    option domain-name-servers 8.8.8.8 8.8.8.4;
    # other config statements here
}
# trusted
subnet 192.168.2.0 netmask 255.255.254.0 {
    option routers 192.168.2.1;
    option subnet-mask 255.255.254.0;
    option domain-name-servers 192.168.1.64;
    # other config statements here
}
 # trusted
subnet 192.168.4.0 netmask 255.255.252.0 {
    option routers 192.168.4.1;
    option subnet-mask 255.255.252.0;
    option domain-name-servers 192.168.1.64;
    # other config statements here
}
3
  • Ok, thank you, I didn't success googling similiar solution. I'll test it tomorrow and tell, if it worked.
    – tymik
    Dec 12, 2013 at 20:56
  • 1
    It definitely works. Full documentation: linux.die.net/man/5/dhcpd.conf
    – Chris S
    Dec 12, 2013 at 21:00
  • Yep, got numerous VLANs on one ISC DHCP server running here.
    – Teun Vink
    Dec 12, 2013 at 21:09

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .