sanduzxcvbnm

方法一:ping 网站域名

ping -t pk.jdd966.com

参数:
-t :连续不停的ping 
-n num : 指定ping次数

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.

网速反应的时间单位为毫秒,如果时间值小于50,就说明网络情况很好,
如果时间值在50和100之间,说明网络情况只是一般。
如果网络值在100到300之间,就说明网络比较差。
如果网络值大于300,那么网络就是特别差。

方法二:tracert路由跟踪

tracert pk.jdd966.com

一般10个节点以内可以完成跟踪的网站,访问速度都是不错的;
10到15个节点之内才完成跟踪的网站,访问速度则比较差,
如果超过30个节点都没有完成跟踪的网站,则可以认为目标网站是无法访问的。

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.

方法三:网络带宽吞吐量及稳定性测试

要求:入口IP和出口IP是同一个,使用NAT网关的主机不适合用这个

Iperf3是C/S(客户端/服务器端)架构模式,在使用iperf3测试时,要同时在server端与client端都各执行一个程序,让它们互相传送报文进行测试。

软件下载地址: https://iperf.fr/iperf-download.php

安装iperf3

在CentOS 7上使用下列命令即可安装:nginx1主机安装,安全组放行65201端口
# yum install iperf3

windows端安装:
下载解压安装包,进入dos切换到iperf3解压目录,执行iperf3即可运行.

服务端:

# iperf3 -s -p 65201
-----------------------------------------------------------
Server listening on 65201
-----------------------------------------------------------

服务端命令行参数
-s 表示服务器端;
-p 定义端口号,默认端口号:5201
-i 设置每次报告之间的时间间隔,单位为秒,如果设置为非零值,就会按照此时间间隔输出测试报告,默认值为零
-D 以服务方式运行iperf,eg:iperf -s -D

客户端:

iperf3.exe -c 36.99.165.94 -p 65201

比如:iperf3 -c 服务端ip -p 监听的端口号 -b 带宽 -i 时间间隔(单位秒) -t 持续时间(单位秒) -R(反向传输) -u(采用udp模式)

客户端命令行参数
-c 表示服务器的IP地址;
-p 表示服务器的端口号;
-t 参数可以指定传输测试的持续时间,Iperf在指定的时间内,重复的发送指定长度的数据包,默认是10秒钟.
-i 设置每次报告之间的时间间隔,单位为秒,如果设置为非零值,就会按照此时间间隔输出测试报告,默认值为零;
-w 设置套接字缓冲区为指定大小,对于TCP方式,此设置为TCP窗口大小,对于UDP方式,此设置为接受UDP数据包的缓冲区大小,限制可以接受数据包的最大值.
--logfile 参数可以将输出的测试结果储存至文件中.
-J 来输出JSON格式测试结果.
-R 反向传输,缺省iperf3使用上传模式:Client负责发送数据,Server负责接收;如果需要测试下载速度,则在Client侧使用-R参数即可.

参数说明:http://linux.51yip.com/search/iperf

分类:

技术点:

相关文章: