你可以試試底下幾種方式~
測試線路的方法:
(1) 使用 iperf
# yum install iperf
# iperf -c 168.95.1.1 -t 30 -i 1 -p 80 -d -w 1M
(2) 使用 tcptraceroute
# yum install tcptraceroute
# tcptraceroute 168.95.1.1
(3) 使用 mtr
# yum install mtr
# mtr 168.95.1.1
(4) 使用 haproxy
# yum install haproxy
# vi /etc/haproxy/haproxy.cfg
QUOTE:
global# service haproxy restart
log 127.0.0.1 local0
log 127.0.0.1 local1 notice
maxconn 50000
user haproxy
group haproxy
daemon
nbproc 1
pidfile /var/run/haproxy.pid
tune.ssl.default-dh-param 1024
defaults
log global
mode http
option httplog
option dontlognull
timeout server 30s
timeout connect 30s
timeout client 30s
retries 2
frontend internet
bind *:80
mode http
default_backend elb
backend elb
mode http
server elb1 www.aaa.com.tw
server elb2 www.bbb.com.tw
listen stats :8080
mode http
stats enable
stats hide-version
stats realm Haproxy\ Statistics
stats uri /
stats auth admin:admin
stats refresh 10s