การทดสอบว่าบริการ DHCP server ที่ติดตั้ง สามารถใช้งานได้หรือไม่นั้น ต้องทดสอบจากเครื่องไคลเอนต์คอมพิวเตอร์ที่อยู่บนเครือข่าย โดยในที่นี้จะยกตัวอย่างเป็นเครื่องคอมพิวเตอร์ที่ใช้ระบบปฏิบัติการ Windows XP
การคอนฟิก Windows XP ให้รับค่าหมายเลขไอพีแอดเดรสจาก DHCP Server
1. คลิกขวาที่ My Network Places แล้วเลือก Properties
2. ในหน้าต่าง Network Connection ให้คลิกขวาที่ Local Area Connection แล้วเลือก Properties
3. ในหน้าต่าง Area Connection Properties ให้เลือกที่ Internet Protocol (TCP/IP) แล้วคลิก Properties
4. ในหน้าต่าง Internet Protocol (TCP/IP) Properties โดย default จะตั้งค่าเป็น Obtain an IP address Automatically และ Obtain DNS server address Automatically
5. คลิก OK เพื่อปิดหน้าต่าง Internet Protocol (TCP/IP) Properties
6. คลิก OK เพื่อปิดหน้าต่าง Area Connection Properties และจบการตั้งค่า IP Address
การตรวจสอบการรับค่าหมายเลขไอพีแอดเดรสของเครื่องไคลเอนต์
การตรวจสอบว่าเครื่องไคลเอนต์การรับค่าหมายเลขไอพีแอดเดรสได้หรือไม่นั้น สามารถทำได้โดยใช้คำสั่ง ipconfig ซึ่งเป็นคำสั่งที่รันจากคอมมานด์พร็อมพ์โดยการเรียกใช้งานนั้นทำได้ ตามขั้นตอนดังนี้
1. คลิก Start คลิก run พิมพ์ cmd ในช่อง Open แล้วกด enter
2. ในหน้าต่างคอมมานด์พร็อมพ์ให้พิมพ์ ipconfig /? แล้วกด enter เพื่อดูคำสั่งต่างๆ ที่สามารถใช้ได้ตัวอย่าง: การใช้คำสั่ง ipconfig ตรวจสอบการรับค่าหมายเลขไอพีแอดเดรส
- ดูค่า IP Address ของเครื่อง ให้รันคำสั่ง ipconfig ที่คอมมานด์พร็อมพ์
C:\>ipconfig
Windows IP Configuration
Connection-specific DNS Suffix . :
IP Address. . . . . . . . . . . . : 192.168.10.56
Subnet Mask . . . . . . . . . . . : 255.255.255.0
Default Gateway . . . . . . . . . : 192.168.10.1
C:\>
- ดูค่า IP Address ของเครื่องอย่างละเอียด ให้รันคำสั่ง ipconfig /all ที่คอมมานด์พร็อมพ์
C:\>ipconfig /all
Windows IP Configuration
Host Name . . . . . . . . . . . . : WinXP
Primary Dns Suffix . . . . . . . :
Node Type . . . . . . . . . . . . : Unknown
IP Routing Enabled. . . . . . . . : No
WINS Proxy Enabled. . . . . . . . : No
Connection-specific DNS Suffix . :
Description . . . . . . . . . . . : WAN (PPP/SLIP) Interface
Physical Address. . . . . . . . . : 00-53-45-00-00-00
Dhcp Enabled. . . . . . . . . . . : No
IP Address. . . . . . . . . . . . : 192.168.10.56
Subnet Mask . . . . . . . . . . . : 255.255.255.0
Default Gateway . . . . . . . . . : 192.168.10.1
DNS Servers . . . . . . . . . . . : 203.xxx.x.x
Primary WINS Server . . . . . . . : 203.xxx.x.x
NetBIOS over Tcpip. . . . . . . . : Disabled
C:\>
- ยกเลิกค่า IP Address ที่ได้จาก DHCP ให้รันคำสั่ง ipconfig /release ที่คอมมานด์พร็อมพ์
C:\>ipconfig /release
Windows IP Configuration
The operation failed as no adapter is in the state permissible for
this operation.
C:\>
- ขอรับค่า IP Address ที่ได้จาก DHCP ใหม่ ให้รันคำสั่ง ipconfig /renew ที่คอมมานด์พร็อมพ์
การทดสอบการทำงาน
ทดสอบโดยการใช้คำสั่ง ping ไปยังหมายเลขไอพีแอดเดรสของดีฟอลท์เกตเวย์ หรือของเครื่องใกล้เคียง หากได้รับข้อความตามลักษณะของตัวอย่างที่ 1 (Reply from x.x.x.x: bytes=32 time=xxms TTL=255) แสดงว่าการรับค่าหมายเลขไอพีแอดเดรสจาก DHCP เซิร์ฟเวอร์ น่าจะถูกต้อง หากได้รับข้อความตามลักษณะของตัวอย่างที่ 2 (Request timed out.) อาจเป็นไปได้ว่าการตั้งค่าไม่ถูกต้อง แต่หากได้รับข้อความตามลักษณะของตัวอย่างที่ 3 (Destination host unreachable) แสดงว่าเครื่องไคลเอนต์ยังไม่ได้รับค่าหมายเลขไอพีแอดเดรสจาก DHCP เซิร์ฟเวอร์ตัวอย่างที่ 1:
C:\>ping 192.168.2.35
Pinging 10.1.1.1 with 32 bytes of data:
Reply from 192.168.2.35: bytes=32 time=173ms TTL=255
Reply from 192.168.2.35: bytes=32 time=281ms TTL=255
Reply from 192.168.2.35: bytes=32 time=343ms TTL=255
Reply from 192.168.2.35: bytes=32 time=265ms TTL=255
Ping statistics for 192.168.2.35:
Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
Minimum = 173ms, Maximum = 343ms, Average = 265ms
C:\>
ไม่มีความคิดเห็น:
แสดงความคิดเห็น