Author Topic: เครื่องมือ command เอาไว้ช่วยตรวจสอบปัญหา link บน server บน ipv6 และ ipv4  (Read 8842 times)

golfreeze

  • Administrator
  • Hero Member
  • *****
  • Posts: 2140
    • View Profile
    • นั่งสมาธิ สติปัฏฐานสี่ พาเที่ยววัด แนะนำวัด แจกcd ธรรมะฟรี
    • Email
ปกติเราสามารถตรวจสอบปัญหาลิ้ง ในฝั่ง server ได้ครับ
ว่าเป็นปัญหาที่ hop ไหน
ก็เลยทำเป็นเครื่องมือ command เอาไว้ช่วยตรวจสอบปัญหา link บน server บน ipv6 และ ipv4
ลองใช้งานกันดูนะครับผม

########  Ping ######### (F.BSD) , (Linux)
ตัวแรกคือ ping ครับเอาไว้เชคการตอบกลับของ packet ได้

[root@wm00 golf]# ping google.co.th
PING google.co.th (74.125.135.94) 56(84) bytes of data.
64 bytes from ni-in-f94.1e100.net (74.125.135.94): icmp_seq=1 ttl=49 time=38.0 ms
64 bytes from ni-in-f94.1e100.net (74.125.135.94): icmp_seq=2 ttl=49 time=37.9 ms
64 bytes from ni-in-f94.1e100.net (74.125.135.94): icmp_seq=3 ttl=48 time=40.1 ms

--- google.co.th ping statistics ---
3 packets transmitted, 3 received, 0% packet loss, time 2002ms
rtt min/avg/max/mdev = 37.955/38.738/40.187/1.050 ms

ตัวนี้ทำการ เทส ping ไป 3 packet แล้วไม่มี loss packet เกิดขึ้นเลยครับ

หรือจะทำการ test ping ผ่าน ipv6 ก็จะเป็น command "ping6" นะครับ
[root@lb00 ha.d]# ping6 2403:28xx:x:x::A

PING 2403:2800:0:9::A(2403:2800:0:9::a) 56 data bytes
64 bytes from 2403:28xx:x:x::a: icmp_seq=0 ttl=59 time=33.1 ms
64 bytes from 2403:28xx:x:x::a: icmp_seq=1 ttl=59 time=49.2 ms
64 bytes from 2403:28xx:x:x::a: icmp_seq=2 ttl=59 time=54.4 ms

--- 2403:28xx:x:x::A ping statistics ---
3 packets transmitted, 3 received, 0% packet loss, time 2000ms
rtt min/avg/max/mdev = 33.108/45.584/54.407/9.070 ms, pipe 2


########  Ping #########

########  traceroute ######### (F.BSD) , (Linux)
command นี้เอาไว้เชคดู packet แต่ละ hop ที่วิ่งไปได้ สามารถช่วยวิเคราห์ได้เพิ่มเติมว่า packet ช้าที่ hop ไหน

[root@xx cgi-bin]# traceroute  207.131.159.158
traceroute to 207.131.159.158 (207.131.159.158), 30 hops max, 40 byte packets
 1  192.168.2.115 (192.168.2.115)  0.427 ms  0.607 ms  0.603 ms
 2  unspec207131.honda.com (207.131.5.108)  2.465 ms  2.467 ms  2.603 ms
 3  unspec207131.honda.com (207.131.159.225)  3.196 ms  3.606 ms  3.877 ms
 4  unspec207131.honda.com (207.131.159.246)  3.253 ms  3.266 ms  3.446 ms
 5  10.248.0.2 (10.248.0.2)  5.334 ms  5.466 ms  5.500 ms
 6  WAS51T (207.131.159.158)  4.936 ms  5.530 ms  1.464 ms

ตัวนี้เอาไว้ใช้ในกรณีต้องการ traceroute ไปที่ host ที่เป็น ipv6 นะครับผม

[root@xx ha.d]# traceroute -6 google.co.th
traceroute to google.co.th (2404:6800:4001:c01::5e), 30 hops max, 40 byte packets
 1  2403:2800:1:946::1 (2403:2800:1:946::1)  0.907 ms  1.321 ms  1.564 ms
 2  2403:2800:1:face:dc:946:1:2 (2403:2800:1:face:dc:946:1:2)  2.517 ms  2.511 ms  2.896 ms
 3  2403:2800:1:dc::a (2403:2800:1:dc::a)  2.128 ms  2.116 ms  2.097 ms


########  traceroute #########

#########  mtr ############ (Linux)
ตัวนี้เป็นการผสมผสานระหว่าง ping + traceroute
ตัวนี้ก็เอาไว้ดู packet lost ได้พร้อมๆกับ การเชคไปในแต่ละ hop ได้เลยครับผม
ลองใช้งานกันดูนะครับ

[root@xx ha.d]# mtr 103.246.17.224

                                                                                    My traceroute  [v0.71]
packetlove.com (0.0.0.0)                                                                                                                   Fri Sep  5 16:12:09 2053
Keys:  Help   Display mode   Restart statistics   Order of fields   quit
                                                                                                                                         Packets               Pings
 Host                                                                                                                                  Loss%  Last   Avg  Best  Wrst StDev
 1. 10.0.0.254                                                                                                                       0.0%   0.9   1.2   0.7   3.8   0.9
 2. 10.99.0.2                                                                                                                         0.0%   2.0   2.3   1.9   5.1   0.9
 3. 10.1.0.253                                                                                                                       0.0%   2.0   1.9   1.7   2.3   0.2
 4. nttct-fw00.ntt.co.th                                                                                                          8.3%  47.0  67.8   2.1 208.7  66.5
 5. bkk0gw02.ntt.co.th                                                                                                           25.0%  54.6  37.5   4.6  99.6  35.7
 6. tig-net31-145.trueintergateway.com                                                                                    16.7%  11.2  61.1   4.4 215.0  82.8
 7. tig-net31-122.trueintergateway.com                                                                                    36.4%  36.0  36.9   4.3 113.8  40.1
 8. te-5-4-cbw33.d-idc.csloxinfo.net                                                                                        33.3%  75.4  88.6  10.7 223.1  67.6
 9. 203.146.101.59                                                                                                               33.3%  40.7  52.5  40.7  83.4  14.5
10. 27.254.37.250                                                                                                                25.0%  67.1  45.6  23.8  70.3  19.1
11. mail.packetlove.com                                                                                                          0.0%  69.2  62.8   4.2 152.5  47.8

ถ้าเป็นในส่วนของ ipv6 แล้วจะใช้งาน command นี้เพื่อเชค packet ก็
#mtr -6 google.co.th

                                                                                    My traceroute  [v0.71]
packetlove.com (::)                                                                                                                                                   Fri Sep  5 16:19:23 2053
Resolver: Received error response 2. (server failure)er of fields   quit
                                                                                                                                                       Packets               Pings
 Host                                                                                                                                               Loss%  Last   Avg  Best  Wrst StDev
 1. 2403:2800:1:946::1                                                                                                                 0.0%   0.8   0.9   0.8   1.0   0.0
 2. 2403:2800:1:face:dc:946:1:2                                                                                                   0.0%   5.5   5.6   2.2  10.8   3.3
 3. 2403:2800:1:dc::a                                                                                                                   0.0%  13.0   3.7   1.8  13.0   4.6
 4. 2403:2800:face:1::b                                                                                                               0.0%  16.2  16.9   2.9  52.0  17.8
 5. 2403:2800:0:1::2                                                                                                                   0.0%   2.4  29.6   2.4  91.9  34.2
 6. 2001:c38:5000:408::4651:1                                                                                                   0.0%  56.9  42.6  26.8  56.9  11.3
 7. 2001:c38:5000:142::1                                                                                                            0.0%  30.0  47.4  16.0  72.0  28.8
 8. 2001:c38:5000:143::2                                                                                                            0.0%  81.3  35.4   9.1  81.3  31.8
 9. 2001:4860:1:1:0:122b::                                                                                                          0.0%  94.9  62.9  42.0  94.9  22.7
10. 2001:4860::1:0:337f                                                                                                               0.0% 107.4  85.2  35.7 137.4  39.2
    2001:4860::1:0:1c5
11. 2001:4860::1:0:3c0                                                                                                                0.0%  92.2  74.8  45.6  92.2  17.3
    2001:4860::1:0:9d0
12. 2001:4860::2:0:3c6                                                                                                                0.0%  73.4  82.3  54.8 127.8  27.1
    2001:4860::2:0:3c7
13. ???
14. 2404:6800:4001:c01::5e                                                                                                      0.0%  47.2  78.8  46.2 116.8  32.9

ลองใช้งานกันดูนะครับผม
#########  mtr ############
« Last Edit: กันยายน 04, 2012, 04:21:46 PM by golfreeze »

zx10rnokzzx

  • Newbie
  • *
  • Posts: 1
    • View Profile
    • Positive Displacement Flow Meter
ขอบคุณมากๆเลยครับ