Hello,
I'm maintaining a network with Linux machines as servers. I have one machine as the DNS server, one as DHCP server. I need to poing my MSSQL server "sqlserver" to a private ip (10.180.1.5) for all my clients.
Since all my clients are assigned ip address through DHCP they all are using my dns server as the DNS server. So i though instead of adding a new zone file for just one record i'll just make "sqlserver" resolve to 10.180.1.5 in my DNS server and then it will be resolved in all the machins (since they query DNS server).
My problem, starts here
[root@dns etc]# cat /etc/hosts
# Do not remove the following line, or various programs
# that require network functionality will fail.
127.0.0.1 localhost.localdomain localhost
10.180.1.5 sqlserver
[root@dns etc]# host sqlserver
Host sqlserver not found: 3(NXDOMAIN)
[root@dns etc]# cat nsswitch.conf | grep host
#hosts: db files nisplus nis dns
hosts: files dns
[root@gw etc]# cat resolv.conf
nameserver 10.180.1.11
nameserver 10.180.1.25
nameserver xxx.xxx.xx.1
Here y machine ip is 10.180.1.11, 1.25 is the dns backup server and the xxx.xxx.xx.1 is my ISP nameserver (I have just replaced it with XXX for privacy)
As posted above my problem is that the ipcannot be resolved even after it have been added in the hosts file.
Somebody please help
I'm maintaining a network with Linux machines as servers. I have one machine as the DNS server, one as DHCP server. I need to poing my MSSQL server "sqlserver" to a private ip (10.180.1.5) for all my clients.
Since all my clients are assigned ip address through DHCP they all are using my dns server as the DNS server. So i though instead of adding a new zone file for just one record i'll just make "sqlserver" resolve to 10.180.1.5 in my DNS server and then it will be resolved in all the machins (since they query DNS server).
My problem, starts here
[root@dns etc]# cat /etc/hosts
# Do not remove the following line, or various programs
# that require network functionality will fail.
127.0.0.1 localhost.localdomain localhost
10.180.1.5 sqlserver
[root@dns etc]# host sqlserver
Host sqlserver not found: 3(NXDOMAIN)
[root@dns etc]# cat nsswitch.conf | grep host
#hosts: db files nisplus nis dns
hosts: files dns
[root@gw etc]# cat resolv.conf
nameserver 10.180.1.11
nameserver 10.180.1.25
nameserver xxx.xxx.xx.1
Here y machine ip is 10.180.1.11, 1.25 is the dns backup server and the xxx.xxx.xx.1 is my ISP nameserver (I have just replaced it with XXX for privacy)
As posted above my problem is that the ipcannot be resolved even after it have been added in the hosts file.
Somebody please help