Files
CmiiDeploy/997-项目VPN虚拟机/0-虚拟IP内容.md
2026-05-19 14:28:44 +08:00

39 lines
581 B
Markdown
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

192.168.11.158
192.168.11.159
192.168.11.160
192.168.11.161
192.168.11.162
192.168.11.163
192.168.11.164
192.168.11.169
192.168.11.170
192.168.11.171
#!/usr/bin/env bash
IPS=(
192.168.11.158
192.168.11.159
192.168.11.160
192.168.11.161
192.168.11.162
192.168.11.163
192.168.11.164
192.168.11.169
192.168.11.170
192.168.11.171
)
for ip in "${IPS[@]}"; do
echo "检测 $ip ..."
# -c 3 表示发送3个包-W 1 表示单个包超时1秒
if ping -c 3 -W 1 "$ip" >/dev/null 2>&1; then
echo "[$ip] ✅ 连通"
else
echo "[$ip] ❌ 不通"
fi
echo "------------------------"
done