<br><br><div class="gmail_quote">On Mon, Nov 29, 2010 at 3:09 PM, Tom H <span dir="ltr"><<a href="mailto:tomh0665@gmail.com">tomh0665@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
<div class="im">On Mon, Nov 29, 2010 at 4:16 AM, Kaushal Shriyan<br>
<<a href="mailto:kaushalshriyan@gmail.com">kaushalshriyan@gmail.com</a>> wrote:<br>
> On Mon, Nov 29, 2010 at 1:16 PM, Tom H <<a href="mailto:tomh0665@gmail.com">tomh0665@gmail.com</a>> wrote:<br>
>><br>
</div><div class="im">>> What's the output of<br>
>> grep hosts /etc/nsswitch.conf<br>
>> dig +trace office_server<br>
>> dig +trace +nosearch office_server<br>
><br>
</div><div class="im">> kaushal@kaushal-laptop:~$ grep hosts /etc/nsswitch.conf<br>
> hosts: files mdns4_minimal [NOTFOUND=return] dns mdns4<br>
><br>
> kaushal@kaushal-laptop:~$ dig +trace 172.26.0.1<br>
</div><div class="im">> ;; connection timed out; no servers could be reached<br>
><br>
> kaushal@kaushal-laptop:~$ dig +trace +nosearch 172.26.0.1<br>
</div><div class="im">> ;; connection timed out; no servers could be reached<br>
><br>
> kaushal@kaushal-laptop:~$ping 172.26.0.1<br>
</div><div class="im">> 64 bytes from <a href="http://172.26.0.1" target="_blank">172.26.0.1</a>: icmp_seq=1 ttl=64 time=2.96 ms<br>
><br>
</div><div class="im">> kaushal@kaushal-laptop:~$netstat -r | grep -w default<br>
> default 172.26.0.1 0.0.0.0 UG 0 0 0 eth0<br>
><br>
> kaushal@kaushal-laptop:~$host <a href="http://off.example.com" target="_blank">off.example.com</a><br>
> <a href="http://off.example.com" target="_blank">off.example.com</a> has address publicIP<br>
><br>
</div><div class="im">> I dont know why <a href="http://off.example.com" target="_blank">off.example.com</a> resolves to my External Outgoing Public IP<br>
> and not Internal LAN Gateway IP.<br>
<br>
</div>I've never used "host" so I can't comment on the above.<br>
<br>
If you supply dig with an ip address, you have to pass the "-x" option.<br>
<div class="im"><br>
What's the output of<br>
</div>$ dig +trace <a href="http://off.example.com" target="_blank">off.example.com</a><br>
$ dig +trace -x 172.26.0.1<br>
<br>
(By the way, since "<a href="http://off.example.com" target="_blank">off.example.com</a>" is a box, your "resolv.conf"<br>
search line with "search <a href="http://off.example.com" target="_blank">off.example.com</a>" is incorrect.)<br>
<font color="#888888"><br>
--<br></font></blockquote><div><br>Hi Tom,<br><br>kaushal@kaushal-laptop:~$ dig +trace <a href="http://off.example.com">off.example.com</a><br><br>; <<>> DiG 9.7.0-P1 <<>> +trace <a href="http://off.example.com">off.example.com</a><br>
;; global options: +cmd<br>;; connection timed out; no servers could be reached<br>kaushal@kaushal-laptop:~$ dig +trace -x 172.26.0.1<br><br>; <<>> DiG 9.7.0-P1 <<>> +trace -x 172.26.0.1<br>;; global options: +cmd<br>
;; connection timed out; no servers could be reached<br>kaushal@kaushal-laptop:~$ telnet 172.26.0.1 53<br>Trying 172.26.0.1...<br>Connected to 172.26.0.1.<br>Escape character is '^]'.<br>^]<br><br>telnet> Connection closed.<br>
kaushal@kaushal-laptop:~$<br><br>Thanks<br><br>Kaushal<br></div></div>