The below is my named server configuration .
#vi /etc/named.conf
Code:
acl "trusted" {
192.168.1.100; # ns1 - can be set to localhost
"
};
"
allow-query { any; };
"
include "/etc/named/named.conf.local";
#vi /etc/named/named.conf.local
Code:
zone "mydomain.com" {
type master;
file "/etc/named/zones/db.mydomain.com"; # zone file path
};
# vi /etc/named/zones/db.mydomain.com
Code:
@ IN SOA ns1.mydomain.com. admin.mydomain.com. (
3 ; Serial
604800 ; Refresh
86400 ; Retry
2419200 ; Expire
604800 ) ; Negative Cache TTL
; name servers - NS records
IN NS ns1.mydomain.com.
; name servers - A records
ns1.mydomain.com. IN A 192.168.1.100
test.mydomain.com IN A 192.168.1.100
I use another server which in the same subnet , I added the below line in /etc/resolv.conf , it do not work.
Code:
nameserver 192.168.1.100
it works if I added this lines .
Code:
server mydomain.com
nameserver 192.168.1.100
I just would like to ask , why I need to add "server mydomain.com" to resolv.conf , if I setup the name server IP address ( 192.168.1.100 ) in our client ( the client server may be is windows server ) , how to set "server mydomain.com" in client side ? or is it the reason that it needs the line "server mydomain.com" is because my name server configuration has problem ?