ปัญหา DNS lookup ครับ
ตอนนี้ผมใช้ Debian Linux 4.0 ครับ
ผมต่อเน็ต ADSL ผ่าน router แล้วผมตั้งค่าใน Windows Me อย่างนี้ครับ
IP addr : 192.168.1.5
Subnet : 255.255.255.0
Gateway : 192.168.1.1
host name: WINDOW
DNS server search order : 192.168.1.1
ค่านี้ใช้กับ Windows ได้ปกติ แล้วผมตั้งค่าใน Debian ด้วยค่านี้ครับ
พอผมเข้าเว็บด้วย browser ปรากฏว่า เข้าทุกเว็บด้วยชื่อไม่ได้เลย
แต่เว็บที่คีย์เป็น IP address จะเข้าได้ครับ
พอผมลองใช้คำสั่งทดสอบที่ shell ก็เป็นอย่างนี้ครับ
window@WINDOW:~$ telnet www.google.com 80
Trying 1.0.0.0...
window@WINDOW:~$ nslookup www.google.com
Server: 192.168.1.1
Address: 192.168.1.1#53
Non-authoritative answer:
www.google.com canonical name = www.l.google.com.
Name: www.l.google.com
Address: 64.233.189.147
Name: www.l.google.com
Address: 64.233.189.99
Name: www.l.google.com
Address: 64.233.189.104
window@WINDOW:~$ telnet www.google.com 80
Trying 64.233.189.147...
Connected to www.google.com.
Escape character is '^]'.
GET / HTTP/1.0
HTTP/1.0 302 Found
Location: http://www.google.co.th/
Cache-Control: private
Set-Cookie: PREF=ID=f69ebf71a454d5bf:TM=1207278753:LM=1207278753:S=jCDV3IUwz2wc8Mlu; expires=Sun, 04-Apr-2010 03:12:33 GMT; path=/; domain=.google.com
Content-Type: text/html
Server: gws
Content-Length: 221
Date: Fri, 04 Apr 2008 03:12:33 GMT
Connection: Close
302 Moved
302 Moved
The document has moved
here.
Connection closed by foreign host.
window@WINDOW:~$
คือต้องทำ DNS lookup (หรือไม่ก็ ping)เว็บนั้นก่อนจะเข้าครับ
ถ้าไม่ทำ มันจะไปที่ 1.0.0.0 ตลอดเลยครับ แล้วถ้าหยุด ping
หรือหยุดโหลดซักพัก มันจะเข้าไม่ได้อีกครับ
ใน /etc/resolv.conf มีค่านี้อยู่ครับ แต่ก็ไม่ช่วยอะไรเลย
nameserver 192.168.1.1
search 192.168.1.1
ต้องตั้งค่าที่ไหนบ้างครับถึงจะเข้าเว็บได้ตามปกติ
|
ลิขสิทธิ์ของบทความเป็นของเจ้าของบทความแต่ละชิ้น ผลงานนี้ ใช้สัญญาอนุญาตของครีเอทีฟคอมมอนส์แบบ แสดงที่มา-อนุญาตแบบเดียวกัน 3.0 ที่ยังไม่ได้ปรับแก้ |














