Quote:
why the path is not :
to 192.168.1.1(my net gateway on local net)
directly to 220.181.57.217
I have set /etc/hosts `220.181.57.217 baidu.com`.
|
dig is a dns testing tool, so it uses exclusively nameservers to resolve a domain
Other tools/commands like ping are first using the entries in /etc/hosts and then dns lookups
You can use "127.0.0.1 baidu.com" in /etc/hosts and then ping baidu.com to see what happens
Regards