Sebastien Roy wrote:
> Manoj Joseph wrote:
>> Any clues as to what might be wrong?
>
> What's in /etc/nsswitch.conf for hosts and ipnodes? I'm guessing "nis"
> appears on those lines for some reason. "nis" has no business doing name
> resolution if you have a working DNS infrastructure. The lines should be:
>
> hosts: files dns
> ipnodes: files dns
Thanks Sebastian.
I do not use nis. But the problem is that "dns" is not listed in
/etc/nsswitch.conf.
When I boot without enabling pcn0 (on vmware) and then enable it after
boot, this is what I see:
-bash-3.2# cat /etc/nsswitch.conf | egrep "^hosts|^ipnodes"
hosts: files
ipnodes: files
-bash-3.2# ifconfig pcn0
pcn0: flags=201004843<UP,BROADCAST,RUNNING,MULTICAST,DHCP,IPv4,CoS> mtu
1500 index 2
inet 0.0.0.0 netmask ff000000
ether 0:c:29:ab:2:14
-bash-3.2# ifconfig pcn0
pcn0: flags=201004843<UP,BROADCAST,RUNNING,MULTICAST,DHCP,IPv4,CoS> mtu
1500 index 2
inet 192.168.0.107 netmask ffffff00 broadcast 192.168.0.255
ether 0:c:29:ab:2:14
-bash-3.2# ifconfig pcn0 dhcp start
-bash-3.2# ifconfig pcn0 up
-bash-3.2# ping 64.233.167.99
64.233.167.99 is alive
-bash-3.2# ping google.com
ping: unknown host google.com
-bash-3.2# nslookup google.com
Server: 202.106.116.1
Address: 202.106.116.1#53
Non-authoritative answer:
Name: google.com
Address: 64.233.167.99
Name: google.com
Address: 64.233.187.99
Name: google.com
Address: 72.14.207.99
-bash-3.2# cat /etc/nsswitch.conf | egrep "^hosts|^ipnodes"
hosts: files
ipnodes: files
When things work (NIC enabled on boot) this is how things are.
-bash-3.2# cat /etc/nsswitch.conf | egrep "^hosts|^ipnodes"
hosts: files dns # Added by DHCP
ipnodes: files dns # Added by DHCP
So, that begs the question, why does "ifconfig pcn0 dhcp start" not add
dns to nsswitch.conf? Is this a but or is it working as designed?
Adding "dns" manually to /etc/nsswitch.conf fixes the lookup issue.
Regards,
Manoj
_______________________________________________
networking-discuss mailing list
[email protected]