[命令] Linux 命令 ping (检测网络联通性)

内容一:ping 命令选项

1) -c 设置 ping 的次数
2) -i 设置间隔时间,建议值为 0.4
3) -I 指定去 ping 的硬件设备或者 IP 地址
4) -m 设置标记
5) -l 设置发送恒多不等待回复的数据包
6) -q 不显示输出
7) -t 设置 ping 包的生存时间(TLL)
8) -v 输出详细信息
9) -w 设置 deadline,建议值为 0.8

内容二:ping 命令案例
2.1 案例一:让本服务器的某一个 IP 地址 ping 目标 IP 地址

# ping -I <IP address of this server> <target IP address>

2.2 案例二:让本服务器的某一个网卡 ping 目标 IP 地址


# ping -I <IP address of local server> <target IP address>

2.3 案例三:快速检测网络联通行

# ping -c 3 -i 0.4 -w 0.8 <target IP address>

[步骤] Linux 全局加密 SSL 的设置 (CentOS 8 & RHEL 8 版)

步骤一:查看当前 SSL 全局加密 SSL 的状况

# update-crypto-policies --show
DEFAULT

(补充:这里的 DEFAULT 表示可以使用 2048 位及以上位数的 SSL)

步骤二:切换当前 SSL 全局加密 SSL

# update-crypto-policies --set FUTURE


补充:
1) 这里以将全局加密 SSL 切换到 FUTURE 状态为例
2) 此时只能使用 4096 位及以上位数的 SSL

[命令] Linux 命令 curl (访问并测试网页速度)

案例一:

# curl -o /dev/null -s -w %{http_code}:%{http_connect}:%{content_type}:%{time_namelookup}:%{time_redirect}:%{time_pretransfer}:%{time_connect}:%{time_starttransfer}:%{time_total}:%{speed_download} eternalcenter.com

(补充:这里以访问并测试 eternalcenter.com ,并显示测试过程为例)

案例二:

# curl -o /dev/null -w %{http_code}:%{http_connect}:%{content_type}:%{time_namelookup}:%{time_redirect}:%{time_pretransfer}:%{time_connect}:%{time_starttransfer}:%{time_total}:%{speed_download} https://api.weixin.qq.com/sns/user

(补充:这里以访问并测试 eternalcenter.com ,并不显示测试过程为例)