ผลงานของ Hadyai Internet R&D LAB > คุยกับทีมวิจัย

วิธีตรวจสอบการทำงานของ Server เบื้องต้น

(1/5) > >>

admin:
หลาย ๆ ท่านอาจจะเจอปัญหา Server ทำงานผิดปกติ หรือไม่ตรงกับที่ต้องการ

วิธีการตรวจสอบการทำงานของ Server เบื้องต้น เพื่อหาสาเหตุว่าปัญหาเกิดจาก Service อะไร

1. ตรวจเช็คค่า IP / SUBNET / GATEWAY และ DNS ของเครื่องลูกข่าย


ถ้าเป็น Server ที่ติดตั้งจากทาง Hadyai Internet ให้ตั้งค่าดังนี้
เครื่องที่ 1
IP : 192.168.200.101
SUBNET : 255.255.255.0
GATEWAY : 192.168.200.1

DNS : 192.168.200.1

เครื่องถัดไป ก็ให้เปลี่ยนหมายเลข IP ไปตามลำดับ เช่น เครื่องที่ 2 IP 192.168.200.102 เป็นต้น

admin:
2. ตรวจสอบการเชื่อมต่อระหว่าง Server และ Client

ในการต่อสายของ Server ที่ติดตั้งจากทาง Hadyai Internet นั้น จะเป็นดังนี้

กรณีที่ Server มี LAN Card Onboard ให้ต่อ สาย จาก LAN Card Onboard เข้า Switch ของร้าน
และ LAN Card ที่เป็น PCI จะเรียงลำดับจาก บนลงล่างตามลำดับ
LAN Card อันบนสุด จะเป็น eth1 ต่อกับ Modem/Router ตัวที่ 1 เส้นที่ 1 ชื่อ ppp101
LAN Card อันถัดมา จะเป็น eth2 ต่อกับ Modem/Router ตัวที่ 2 เส้นที่ 2 ชื่อ ppp102
...
จนครบจำนวน

กรณีที่ Server ไม่มี LAN Card Onboard
LAN Card ที่เป็น PCI จะเรียงลำดับจาก บนลงล่างตามลำดับ
LAN Card อันบนสุด จะเป็น eth0 ต่อกับ Switch ของทางร้าน
LAN Card อันถัดมา จะเป็น eth1 ต่อกับ Modem/Router ตัวที่ 1 เส้นที่ 1 ชื่อ ppp101
LAN Card อันถัดมา จะเป็น eth2 ต่อกับ Modem/Router ตัวที่ 2 เส้นที่ 2 ชื่อ ppp102
...
จนครบจำนวน

ทดสอบการเชื่อมต่อระหว่าง Server และ Client โดยการ ping 192.168.200.1 จากเครื่อง Client

C:\Documents and Settings\Administrator>ping 192.168.200.1

Pinging 192.168.200.1 with 32 bytes of data:

Reply from 192.168.200.1: bytes=32 time<1ms TTL=64
Reply from 192.168.200.1: bytes=32 time<1ms TTL=64
Reply from 192.168.200.1: bytes=32 time<1ms TTL=64
Reply from 192.168.200.1: bytes=32 time<1ms TTL=64

Ping statistics for 192.168.200.1:
    Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
    Minimum = 0ms, Maximum = 0ms, Average = 0ms

หากผลที่ได้เป็น Request time out ให้ตรวจสอบข้อ 1 และ ข้อ 2 ใหม่อีกครั้ง

C:\Documents and Settings\Administrator>ping 192.168.200.1

Pinging 192.168.200.1 with 32 bytes of data:

Request timed out.
Request timed out.
Request timed out.
Request timed out.

Ping statistics for 192.168.200.1:
    Packets: Sent = 4, Received = 0, Lost = 4 (100% loss),

ให้ตรวจสอบสายที่เชื่อมต่อ ว่ามีการหลุดหรือหลวมหรือไม่

admin:
3. ตรวจสอบการเชื่อมต่อของ Internet Connection

จะต้องใช้โปรแกรม putty สามารถ download ได้จาก

http://the.earth.li/~sgtatham/putty/latest/x86/putty.exe


ใช้ user/pass จากทาง Hadyai Internet กำหนดให้

เมื่อทำการ Login เรียบร้อย ให้ใช้คำสั่ง ifconfig เพื่อดู interface ppp ที่เชื่อมต่ออยู่


ตรวจดู ppp101-102 ตามลำดับ หากมีมากกว่า 2 เส้น ก็ตรวจดูตามลำดับจนครบ

หากไม่มี ppp101-102 หรือ มีจำนวนไม่ครบ ให้ตรวจสอบ Modem/Router ของเส้นที่ต่ออยู่

ลองทำการปิด / เปิด Modem/Router ตัวนั้น และตรวจสอบสาย LAN ที่เชื่อมต่อกับ Server

admin:
4. ตรวจสอบสัญญาณอินเตอร์เน็ตของแต่ละเส้น

เมื่อเช็คว่า ppp ครบตามจำนวนสายเน็ตที่มีอยู่ ขั้นตอนต่อไป ให้ทำการตรวจสอบสัญญาณอินเตอร์เน็ตของแต่ละเส้น ว่าปกติหรือไม่

โดยใช้คำสั่ง  ping -c 5 -I ppp101 203.144.244.1
ค่า ppp101 ให้เปลี่ยนเป็น ppp ที่ต้องการตามจำนวนเส้นที่ต้องการเช็ค

ทดสอบเส้น ppp101

root@cyren:~# ping -c 5 -I ppp101 203.144.244.1
PING 203.144.244.1 (203.144.244.1) from 61.7.167.170 ppp101: 56(84) bytes of data.
64 bytes from 203.144.244.1: icmp_seq=1 ttl=249 time=26.5 ms
64 bytes from 203.144.244.1: icmp_seq=2 ttl=249 time=24.8 ms
64 bytes from 203.144.244.1: icmp_seq=3 ttl=249 time=31.3 ms
64 bytes from 203.144.244.1: icmp_seq=4 ttl=249 time=25.9 ms
64 bytes from 203.144.244.1: icmp_seq=5 ttl=249 time=26.4 ms

--- 203.144.244.1 ping statistics ---
5 packets transmitted, 5 received, 0% packet loss, time 4004ms
rtt min/avg/max/mdev = 24.809/27.003/31.319/2.245 ms
root@cyren:~#

ทดสอบเส้น ppp102

root@cyren:~# ping -c 5 -I ppp102 203.144.244.1
PING 203.144.244.1 (203.144.244.1) from 58.147.54.130 ppp102: 56(84) bytes of data.
64 bytes from 203.144.244.1: icmp_seq=1 ttl=245 time=49.4 ms
64 bytes from 203.144.244.1: icmp_seq=2 ttl=245 time=44.2 ms
64 bytes from 203.144.244.1: icmp_seq=3 ttl=245 time=60.5 ms
64 bytes from 203.144.244.1: icmp_seq=4 ttl=245 time=75.6 ms
64 bytes from 203.144.244.1: icmp_seq=5 ttl=245 time=43.2 ms

--- 203.144.244.1 ping statistics ---
5 packets transmitted, 5 received, 0% packet loss, time 4009ms
rtt min/avg/max/mdev = 43.241/54.647/75.670/12.181 ms
root@cyren:~#

ถ้ามี timeout หรือ unreachable หรือค่าอื่น ๆ ให้ตรวจสอบกับ ISP ดูว่า user/pass มีปัญหาหรือไม่

admin:
5. ตรวจสอบการทำงานของ DNS Server

DNS จะมีความสำคัญในการใช้งาน Internet มาก และปัญหาส่วนใหญ่จะมาจาก DNS มีปัญหา ให้ทำการตรวจสอบดังนี้

ใช้คำสั่ง nslookup www.google.com
หรือชื่อเวปอื่น ๆ ที่ต้องการตรวจสอบ

root@cyren:~# nslookup www.google.com
Server:         127.0.0.1
Address:        127.0.0.1#53

Non-authoritative answer:
www.google.com  canonical name = www.l.google.com.
Name:   www.l.google.com
Address: 64.233.189.104
Name:   www.l.google.com
Address: 64.233.189.99
Name:   www.l.google.com
Address: 64.233.189.147

root@cyren:~#

ถ้า DNS ทำงานปกติ จะตอบค่า หมายเลข IP ของชื่อเวปดังกล่าวออกมา

แต่ถ้าไม่สามารถตอบค่ามาได้ เช่น

root@cyren:~# nslookup www.maxnet.co.th
Server:         127.0.0.1
Address:        127.0.0.1#53

** server can't find www.maxnet.co.th: NXDOMAIN

root@cyren:~#

แสดงว่า DNS มีัปัญหาไม่สามารถ resolve IP ได้

ถ้ามีปัญหาไม่สามารถ resolve ได้ทุกชื่อ ให้ตรวจสอบค่า DNS ในไฟล์  /etc/resolv.conf
ถ้ามีปัญหาไม่สามารถ resolve ได้เฉพาะบางชื่อ ให้ลองทำการเปลี่ยน DNS ในไฟล์ /etc/resolv.conf

แล้วทำการทดสอบใหม่อีกครั้ง จนได้ค่า DNS ที่เหมาะสมที่สุด

ตัวอย่างไฟล์ resolv.conf สำหรับเน็ต TT&T

nameserver 127.0.0.1
nameserver 202.69.137.83
nameserver 202.69.137.84

เป็นต้น

นำร่อง

[0] ดัชนีข้อความ

[#] หน้าถัดไป

Go to full version