Anonymous
Anonymous asked in 電腦與網際網路軟體 · 2 decades ago

dig與nslookup的差異 ?

想問一下為何有時候dig指令會找到其他主機(我再內網架設一台主機,有時候卻抓到網外的)?

而nslookup的作用是什麼呢?

麻煩解釋一下作用~

1 Answer

Rating
  • Andy
    Lv 7
    2 decades ago
    Favorite Answer

    dig @168.95.1.1 yahoo.comdig 在168.95.1.1 這一台name server, 查看yahoo.com的name server.[andy@tw ~]$ dig @168.95.1.1 yahoo.com; <<>> DiG 9.2.5 <<>> @168.95.1.1 yahoo.com; (1 server found);; global options:  printcmd;; Got answer:;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 29562;; flags: qr rd ra; QUERY: 1, ANSWER: 2, AUTHORITY: 5, ADDITIONAL: 5;; QUESTION SECTION:;yahoo.com.                     IN      A;; ANSWER SECTION:yahoo.com.              249     IN      A       66.94.234.13yahoo.com.              249     IN      A       216.109.112.135;; AUTHORITY SECTION:yahoo.com.              143548  IN      NS      ns1.yahoo.com.yahoo.com.              143548  IN      NS      ns2.yahoo.com.yahoo.com.              143548  IN      NS      ns3.yahoo.com.yahoo.com.              143548  IN      NS      ns4.yahoo.com.yahoo.com.              143548  IN      NS      ns5.yahoo.com.;; ADDITIONAL SECTION:ns1.yahoo.com.          132537  IN      A       66.218.71.63ns2.yahoo.com.          132698  IN      A       66.163.169.170ns3.yahoo.com.          132053  IN      A       217.12.4.104ns4.yahoo.com.          132028  IN      A       63.250.206.138ns5.yahoo.com.          144075  IN      A       216.109.116.17;; Query time: 548 msec;; SERVER: 168.95.1.1#53(168.95.1.1);; WHEN: Wed Oct 19 21:26:36 2005;; MSG SIZE  rcvd: 229[andy@tw ~]$ nslookup> yahoo.comServer:         168.95.1.1Address:        168.95.1.1#53Non-authoritative answer:Name:   yahoo.comAddress: 66.94.234.13Name:   yahoo.comAddress: 216.109.112.135>問題想問一下為何有時候dig指令會找到其他主機(我再內網架設一台主機,有時候卻抓到網外的)? 就用 dig @name server名稱 something.com這樣就指定好至於nslookup?你自己看一下我上面的範例嘍 :-)

Still have questions? Get your answers by asking now.