网络连通性检查
nc
语法
例子
$ nc -zv 127.0.0.1 80
Connection to 127.0.0.1 80 port [tcp/http] succeeded!
$ nc -zv 127.0.0.1 90
nc: connect to 127.0.0.1 port 90 (tcp) failed: Connection refused
telnet
语法
例子
$ telnet 127.0.0.1 80
Trying 127.0.0.1...
Connected to 127.0.0.1.
Escape character is '^]'.
^CConnection closed by foreign host.
$ telnet 127.0.0.1 90
Trying 127.0.0.1...
telnet: Unable to connect to remote host: Connection refused