DNS not being populated in resolv.conf

Tom H tomh0665 at gmail.com
Mon Nov 29 11:30:03 UTC 2010


On Mon, Nov 29, 2010 at 4:55 AM, Kaushal Shriyan
<kaushalshriyan at gmail.com> wrote:
> On Mon, Nov 29, 2010 at 3:09 PM, Tom H <tomh0665 at gmail.com> wrote:
>> On Mon, Nov 29, 2010 at 4:16 AM, Kaushal Shriyan
>> <kaushalshriyan at gmail.com> wrote:
>> > On Mon, Nov 29, 2010 at 1:16 PM, Tom H <tomh0665 at gmail.com> wrote:
>> >>
>> >> What's the output of
>> >> grep hosts /etc/nsswitch.conf
>> >> dig +trace office_server
>> >> dig +trace +nosearch office_server
>> >
>> > kaushal at kaushal-laptop:~$ grep hosts /etc/nsswitch.conf
>> > hosts:          files mdns4_minimal [NOTFOUND=return] dns mdns4
>> >
>> > kaushal at kaushal-laptop:~$ dig +trace 172.26.0.1
>> > ;; connection timed out; no servers could be reached
>> >
>> > kaushal at kaushal-laptop:~$ dig +trace +nosearch 172.26.0.1
>> > ;; connection timed out; no servers could be reached
>> >
>> > kaushal at kaushal-laptop:~$ping 172.26.0.1
>> > 64 bytes from 172.26.0.1: icmp_seq=1 ttl=64 time=2.96 ms
>> >
>> > kaushal at kaushal-laptop:~$netstat -r | grep -w default
>> > default         172.26.0.1    0.0.0.0         UG        0 0          0
>> > eth0
>> >
>> > kaushal at kaushal-laptop:~$host off.example.com
>> > off.example.com has address publicIP
>> >
>> > I dont know why off.example.com resolves to my External Outgoing Public
>> > IP and not Internal LAN Gateway IP.
>>
>> I've never used "host" so I can't comment on the above.
>>
>> If you supply dig with an ip address, you have to pass the "-x" option.
>>
>> What's the output of
>> $ dig +trace off.example.com
>> $ dig +trace -x 172.26.0.1
>
> kaushal at kaushal-laptop:~$ dig +trace off.example.com
> ;; connection timed out; no servers could be reached
>
> kaushal at kaushal-laptop:~$ dig +trace -x 172.26.0.1
> ;; connection timed out; no servers could be reached

I've just looked at the host man page. It queries the dns servers
listed in "resolv.conf" so it shouldn't produce a result that is
different from dig.

What's the output of
host -v off.example.com




More information about the ubuntu-users mailing list