LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   DNS with VLAN (https://www.linuxquestions.org/questions/linux-networking-3/dns-with-vlan-346568/)

syl20 07-25-2005 10:47 AM

DNS with VLAN
 
Hi,
I will cut my LAN in different VLAN.(VLAN 100 for servers : 192.168.100.0/24, VLAN 101 : 192.168.101.0/24, VLAN 103 : 192.168.3.0/24)
My linux box is used as a gw, a DNS server, a firewall and a mail server.
eth1 is for the internet, eth0.100 , eth0.101 and eth0.103 for vlan 100, 101, 103.
is it possible to configure etc/named.conf like this :
Code:

zone "." IN {
        type hint;
        file "root.hints";
};

zone "0.0.127.in-addr.arpa" IN {
        type master;
        file "zone/127.0.0";
};

zone "foo.bar.com" IN {
        type master;
        file "zone/foo.bar.com";
};

zone "100.168.192.in-addr.arpa" IN {
        type master;
        file "zone/192.168.100";
};

zone "101.168.192.in-addr.arpa" IN {
        type master;
        file "zone/192.168.101";
};

zone "3.168.192.in-addr.arpa" IN {
        type master;
        file "zone/192.168.3";
};

and how will I configure the 192.168.100 file, 192.168.101 file and 192.168.3 file? This for each?

Code:

$TTL 86400
@      IN      SOA    gw.foo.bar.com.fr. root.gw.foo.bar.com.  (
                        2005072801
                        21600
                        3600
                        3600000
                        86400
                                        )
                        IN      NS      gw.foo.bar.com.


1    IN      PTR    gw.foo.bar.com.

Is it possible to have "IN NS gw.foo.bar.com." in each file?

Thx a lot for u help.

mpeg4codec 07-26-2005 07:31 PM

As far as I can tell, I believe your setup will work. You can have one zone for resolving hosts to IPs and three separate zones for resolving those IPs to hosts.

As for using NS gw.foo.bar.com , in make sure you give it three separate IP addresses in your foo.bar.com zone and define the reverse address for the proper zone in each respective in-addr.arpa zone file. You should have lines like this:

Code:

gw        IN A        192.168.100.1
gw        IN A        192.168.101.1
gw        IN A        192.168.103.1

Even if on your 100 VLAN, the DNS server returns 192.168.101.1 as the address of your gateway, it won't matter as long as the default route is set to that gateway.

If you have any more questions, feel free to ask.


All times are GMT -5. The time now is 12:10 AM.