telnet和ping的区别

ping通常是用来检查网络是否通畅或者网络连接速度的命令。而telnet是用来探测指定ip是否开放指定端口的。

ping用法:

  Usage: ping [-t] [-a] [-n count] [-l size] [-f] [-i TTL] [-v TOS] [-r count] [-s count] [[-j host-list] | [-k host-list]] 

  [-w timeout] [-R] [-S srcaddr] [-4] [-6] target_name 

  选项:

-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. 

扫描二维码关注公众号,回复: 9331563 查看本文章

-f             Set Don't Fragment flag in packet (IPv4-only). 

-i TTL         Time To Live. 

-v TOS         Type Of Service (IPv4-only). 

-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             Trace round-trip path (IPv6-only). 

-S srcaddr     Source address to use (IPv6-only). 

-4             Force using IPv4. 

-6             Force using IPv6.

Telnet用法:

 telnet [-a][-e escape char][-f log file][-l user][-t term][host [port]] 

-a      企图自动登录。除了用当前已登陆的用户名以外,与 -l 选项相同。 

-e      跳过字符来进入 telnet 客户端提示。 

-f      客户端登录的文件名 

-l      指定远程系统上登录用的用户名称。 

要求远程系统支持 TELNET ENVIRON 选项。 

-t      指定终端类型。 

支持的终端类型仅是: vt100, vt52, ansi 和 vtnt。 

host    指定要连接的远程计算机的主机名或 IP 地址。 

port    指定端口号或服务名。

选自:https://www.cnblogs.com/Jtianlin/p/4045021.html

发布了120 篇原创文章 · 获赞 24 · 访问量 6万+

猜你喜欢

转载自blog.csdn.net/woainilixuhao/article/details/101021758