วันเสาร์ที่ 24 กันยายน พ.ศ. 2559

การใช้งานคำสั่งต่าง ๆ บน Windows ตรวจสอบระบบเครือข่าย

คำสั่งพื้นฐานในการตรวจสอบระบบเครือข่าย
คำสั่ง ping
  เป็นคำสั่งทดสอบการเชื่อมต่อเครือข่ายไปยังเครื่องคอมพิวเตอร์ปลายทาง
หมายเลขเครื่องปลายทางคือ 8.8.8.8 ก็พิมพ์ ping 8.8.8.8 หรือ ping www.google.com
#ถ้าขึ้นข้อความ Reply form... คือ เครื่องคอมพิวเตอร์ได้เชื่อมต่ออินเทอร์เน็ตแล้ว
#ถ้าขึ้นข้อความ Request timed out คือ เครื่องคอมพิวเตอร์ไม่เชื่อมต่ออินเทอร์เน็ต

Usage: ping [-t] [-a] [-n count] [-l size] [-f] [-i TTL] [-v TOS]
            [-r count] [-s count] [[-j host-list] | [-k host-list]]
            [-w timeout] [-R] [-S srcaddr] [-c compartment] [-p]
            [-4] [-6] target_name

Options:
    -t             Ping the specified host until stopped.
                   To see statistics and continue - type Control-Break;
                   To stop - type Control-C.
    -a             Resolve addresses to hostnames.
    -n count       Number of echo requests to send.
    -l size        Send buffer size.
    -f             Set Don't Fragment flag in packet (IPv4-only).
    -i TTL         Time To Live.
    -v TOS         Type Of Service (IPv4-only. This setting has been deprecated
                   and has no effect on the type of service field in the IP
                   Header).
    -r count       Record route for count hops (IPv4-only).
    -s count       Timestamp for count hops (IPv4-only).
    -j host-list   Loose source route along host-list (IPv4-only).
    -k host-list   Strict source route along host-list (IPv4-only).
    -w timeout     Timeout in milliseconds to wait for each reply.
    -R             Use routing header to test reverse route also (IPv6-only).
                   Per RFC 5095 the use of this routing header has been
                   deprecated. Some systems may drop echo requests if
                   this header is used.
    -S srcaddr     Source address to use.
    -c compartment Routing compartment identifier.
    -p             Ping a Hyper-V Network Virtualization provider address.
    -4             Force using IPv4.
    -6             Force using IPv6.

คำสั่ง ipconfig
  เป็นคำสั่งสำหรับการตรวจสอบหมายเลข IP Address ของเครื่องตัวเอง
มีพารามิเตอร์เพิ่มเติมที่น่าสนใจ เช่น /all จะแสดงรายละเอียดทั้งหมด ตั้งแต่ IP Address / Subnet Mask / Gateway / DNS ของเครื่องเรา

USAGE:
    ipconfig [/allcompartments] [/? | /all |
                                 /renew [adapter] | /release [adapter] |
                                 /renew6 [adapter] | /release6 [adapter] |
                                 /flushdns | /displaydns | /registerdns |
                                 /showclassid adapter |
                                 /setclassid adapter [classid] |
                                 /showclassid6 adapter |
                                 /setclassid6 adapter [classid] ]

where
    adapter             Connection name
                       (wildcard characters * and ? allowed, see examples)

    Options:
       /?               Display this help message
       /all             Display full configuration information.
       /release         Release the IPv4 address for the specified adapter.
       /release6        Release the IPv6 address for the specified adapter.
       /renew           Renew the IPv4 address for the specified adapter.
       /renew6          Renew the IPv6 address for the specified adapter.
       /flushdns        Purges the DNS Resolver cache.
       /registerdns     Refreshes all DHCP leases and re-registers DNS names
       /displaydns      Display the contents of the DNS Resolver Cache.
       /showclassid     Displays all the dhcp class IDs allowed for adapter.
       /setclassid      Modifies the dhcp class id.
       /showclassid6    Displays all the IPv6 DHCP class IDs allowed for adapter.
       /setclassid6     Modifies the IPv6 DHCP class id.


The default is to display only the IP address, subnet mask and
default gateway for each adapter bound to TCP/IP.

For Release and Renew, if no adapter name is specified, then the IP address
leases for all adapters bound to TCP/IP will be released or renewed.

For Setclassid and Setclassid6, if no ClassId is specified, then the ClassId is removed.

Examples:
    > ipconfig                       ... Show information
    > ipconfig /all                  ... Show detailed information
    > ipconfig /renew                ... renew all adapters
    > ipconfig /renew EL*            ... renew any connection that has its
                                         name starting with EL
    > ipconfig /release *Con*        ... release all matching connections,
                                         eg. "Wired Ethernet Connection 1" or
                                             "Wired Ethernet Connection 2"
    > ipconfig /allcompartments      ... Show information about all
                                         compartments
    > ipconfig /allcompartments /all ... Show detailed information about all
                                         compartments

คำสั่ง net view
  เป็นคำสั่งที่ใช้สำหรับตรวจสอบระบบเครือข่ายในเวิร์กกรุ๊ปเดียวกัน ว่ามีเครื่องคอมพิวเตอร์เชื่อมอยู่ในวง ทั้งหมดกี่เครื่อง
ในกรณีที่ต้องการตรวจสอบเครื่องคอมพิวเตอร์ที่อยู่ต่างโดเมน หรือต่างเวิร์กกรุ๊ปกัน แต่อยู่บน Hub/Switch ตัวเดียวกัน ให้ใช้คำสั่ง net view/ชื่อ domain นั้น
และถ้าต้องการดูรายละเอียดทรัพยากรที่ต่อกับเครื่องคอมพิวเตอร์นั้น ก็พิมพ์ net view \\ชื่อคอมพิวเตอร์เครื่องนั้น

คำสั่ง tracert
  เป็นคำ tracert สั่งสำหรับตรวจสอบ ตามเส้นทางของแพ็กเก็จข้อมูลที่วิ่งไป ว่าผ่าน Router ตัวไหนบ้าง
สามารถตรวจสอบว่าคุณกำลังใช้งานอยู่บนเครื่องไหน IP Address อะไร
คำสั่ง tracert มีพารามิเตอร์ย่อยหลายตัว

Usage: tracert [-d] [-h maximum_hops] [-j host-list] [-w timeout]
               [-R] [-S srcaddr] [-4] [-6] target_name

Options:
    -d                 Do not resolve addresses to hostnames.
    -h maximum_hops    Maximum number of hops to search for target.
    -j host-list       Loose source route along host-list (IPv4-only).
    -w timeout         Wait timeout milliseconds for each reply.
    -R                 Trace round-trip path (IPv6-only).
    -S srcaddr         Source address to use (IPv6-only).
    -4                 Force using IPv4.
    -6                 Force using IPv6.

คำสั่ง nslookup
  เป็นคำสั่งที่ใช้ทดสอบ DNS Server ที่เราใช้งานอยู่ สามารถตอบสนองการทำงาน หรือไม่
เมื่อพิมพ์เข้าไปแล้ว จะเป็นการเปิดคำสั่ง nslookup ทดสอบว่าโดเมนนี้ตรงกับหมายเลข IP Address อะไร และยังสามารถตรวจสอบได้ว่า DNS ที่คุณใช้งานอยู่ ยังบริการให้กับคุณอยู่หรือไม่

Usage:
   nslookup [-opt ...]             # interactive mode using default server
   nslookup [-opt ...] - server    # interactive mode using 'server'
   nslookup [-opt ...] host        # just look up 'host' using default server
   nslookup [-opt ...] host server # just look up 'host' using 'server'


สนับสนุนข้อมูลจาก powerclub-thailand