判断端口通不通的几种方法
判断端口通不通的几种方法 1、使用telnet判断telnet是windows标准服务,可以直接用;如果是linux机器,需要安装telnet.用法: telnet ip port1)先用telnet连接不存在的端口[root@localhost ~]# telnet 10.0.250.3 80Trying 10.0.250.3...telnet: connect to address 10.0.250.3: Connection refused #直接提示连接被拒绝2)再连接存在的端口[root@localhost ~]# telnet localhost 22Trying ::1...Connected to localhost. #看到Connected就连接成功了Escape character is '^]'.SSH-2.0-OpenSSH_5.3aProtocol mismatch.Connection closed by foreign host.2、使用ssh判断ssh是linux的标准配置并且最常用,可以用来判断端口吗?用法: ssh -v -p port username@ip-v 调试模式(会打印日志).-p 指定端口username可以随意1)连接不存在端口[root@localhost ~]# ssh 10.0.250.3 -p 80ssh: connect to host 10.0.250.3 port 80: Connection refused[root@localhost ~]# ssh 10.0.250.3 -p 80 -vOpenSSH_5.3p1, OpenSSL 1.0.1e-fips 11 Feb 2013debug1: Reading configuration data /etc/ssh/ssh_configdebug1: Applying options for *debug1: Connecting to 10.0.250.3 [10.0.250.3] port 80.debug1: connect to address 10.0.250.3 port 80: Connection refused ssh: connect to host 10.0.250.3 port 80: Connection refused
1、使用telnet判断 telnet是windows标准服务,可以直接用;如果是linux机器,需要安装telnet.用法: telnet ip port1)先用telnet连接不存在的端口[root@localhost ~]# telnet 10.0.250.3 80Trying 10.0.250.3...telnet: connect to address 10.0.250.3: Connection refused #直接提示连接被拒绝2)再连接存在的端口[root@localhost ~]# telnet localhost 22Trying ::1...Connected to localhost. #看到Connected就连接成功了Escape character is '^]'.SSH-2.0-OpenSSH_5.3aProtocol mismatch.Connection closed by foreign host.2、使用ssh判断ssh是linux的标准配置并且最常用,可以用来判断端口吗看用法: ssh -v -p port username@ip-v 调试模式(会打印日志).-p 指定端口username可以随意1)连接不存在端口[root@localhost ~]# ssh 10.0.250.3 -p 80ssh: connect to host 10.0.250.3 port 80: Connection refused[root@localhost ~]# ssh 10.0.250.3 -p 80 -vOpenSSH_5.3p1, OpenSSL 1.0.1e-fips 11 Feb 2013debug1: Reading configuration data /etc/ssh/ssh_configdebug1: Applying options for *debug1: Connecting to 10.0.250.3 [10.0.250.3] port 80.debug1: connect to address 10.0.250.3 port 80: Connection refusedssh: connect to host 10.0.250.3 port 80: Connection refused2)连接存在的端口[root@localhost ~]# ssh ... -pa^]^C[root@localhost ~]# ssh ... -p -vOpenSSH_.p, OpenSSL ..e-fips Febdebug: Reading configuration data /etc/ssh/ssh_configdebug: Applying options for *debug: Connecting to ... [...] port .debug: Connection established.debug: permanently_set_uid: /debug: identity file /root/.ssh/identity type -debug: identity file /root/.ssh/identity-cert type -debug: identity file /root/.ssh/id_rsa type -debug: identity file /root/.ssh/id_rsa-cert type -debug: identity file /root/.ssh/id_dsa type -debug: identity file /root/.ssh/id_dsa-cert type -a^C不用-v选项也可以咯3、使用wget判断wget是linux下的下载工具,需要先安装.用法: wget ip:port1)连接不存在的端口[root@localhost ~]# wget ...:---- ::--Connecting to ...:... failed: Connection refused.2)连接存在的端口[root@localhost ~]# wget ...:---- ::--Connecting to ...:... connected. HTTP request sent, awaiting response...

如何测试某个tcp端口是否可以联通
首先端口分tcp、udp之分,所以同一个端口号还有tcp协议和udp协议之分。 我们一般最常见的工具是telnet,但是telnet使用的是tcp协议,换句话说telnet只能检测tcp的这个端口打开了没。方法很简单,假设我们要看192.192.193.211这个IP的tcp22端口是否打开,则运行telnet192.192.193.21122来查看,如果出现下列信息,则表示该端口已打开。如果出现下面信息,表是该端口未打开。除了telnet以外,还有一个命令nc也可查看端口是否打开。同样查看tcp22端口是否打开,可以运行nc-z192.192.193.21122,打开着就会出现下列信息:那如果想要查看udp22端口是否打开,用什么可以做到呢?nc也可以噢~运行nc–uz192.192.193.21122,打开这就会出现这些信息:如果查询的端口没有打开,会出现以下输出:nc 还可以一次性查看多了端口

如何检测(远程)主机上的某个端口是否开启
1.安装Telnet组件。转到程序控制面板,然后转到打开或关闭窗口功能,Telnet客户端和Telnet服务器勾选,从而安装Telnet组件。2.测试端口是否打开。它是由机器打开的虚拟机的地址,192.168.106.128,端口22。在CMD下输入Telnet后,将出现一个窗口,提示您输入帮助以查看选项。3.接下来,o型192.168.106.12822表明端口连接失败,表明港口可能占领或不开放(我这次连接失败,因为Ubuntu就安装在虚拟机没有SSH服务,所以我成功地连接到SSH服务后使用命令sudoapt-get安装SSH)。如果打开另外一个窗口,说明连接成功。4.你可以用自己的机器做实验。在CMD下输入netstat-anpTCP,查看当前主机TCP打开了哪些端口。
1、安装telnet。我的win7下就没有telnet,在cmd下输入telnet提示没有该命令。于是我们进入控制面板---->程序---->打开或关闭windows功能。然后等一段时间,在出来的对话框把telnet客户端和telnet服务器勾选上,其他的不用管,然后点击确定。这样就安装好了telnet组件了。 2、 下面开始测试某个端口是否开启,比如我测的是192.168.3.42的2121这个端口。在cmd下输入start /min telnet 192.168.3.42 2121之后会出现一个窗口,是最小化的,你等一会,如果窗口自动关闭了,说明端口是关闭的或主机ping不通,反之端口开放.比如这个2121端口是开放的,就出现如图所以的窗口,否则窗口关闭。3、你可以用自己的机子做实验.在CMD下输入netstat -anp tcp可以查看当前主机tcp开放了哪些端口.最后 ping命令是不能检测端口,只能检测你和相应IP是否能连通.补充: Linux下检测本机的端口是否被占用:netstat –apn | grep 8080又或者在,windows下在cmd里面使用netstat -an命令来查看 开放的TCP和UDP端口。在cmd里面使用start /min telnet 127.0.0.1 某端口,之后会出现一个窗口,是最小化的,你等一会,如果窗口自动关闭了,说明端口是关闭,反之端口开放。Linux下如windows下使用telnet的方法使用nc命令nc检测端口的用法:nc -z -w 10 %ip% %PORT%-z表示检测或者扫描端口-w表示超时时间-u表示使用UDP协议例如:# nc -z -w 10 -u 127.0.0.1 53Connection to 127.0.0.1 53 port [udp/domain] succeeded!# nc -z -w 10127.0.0.1 53Connection to 127.0.0.1 53 port [tcp/domain] succeeded!# echo $?0# nc -z -w 10 8.8.8.7 53# echo $?1# 端口成功联通返回值是0,提示succeeded;否则返回1,不提示任何数据。linux下未作测试,自行测试。

如何检测远程ip上的端口是否开启?
1、安装telnet组件。进入控制面板里面的程序,接着进入打开或关闭windows功能,把telnet客户端和telnet服务器勾选上,这样就安装好了telnet组件了。2、测试某个端口是否开启。测的是本机开启的虚拟机地址,192.168.106.128,22端口。在cmd下输入telnet之后会出现一个窗口,按照提示输入help可以查看选项。3、接下来输入 o 192.168.106.128 22,提示在该端口连接失败,说明端口可能正在占用或者未打开(我的这次连接失败是因为虚拟机刚刚安装的Ubuntu没有ssh服务,使用 sudo apt-get install ssh 命令安装ssh服务后连接成功)。如果打开另外一个窗口,说明连接成功。4、可以用自己的机子做实验。在CMD下输入netstat -anp tcp可以查看当前主机tcp开放了哪些端口。
1、在cmd里面使用netstat -an命令来查看 开放的TCP和UDP端口。 2、在cmd里面使用start /min telnet 127.0.0.1 某端口,之后会出现一个窗口,是最小化的,等一会,如果窗口自动关闭了,说明端口是关闭,反之端口开放。telnet 198.52.202.1 1723,输入命令回车执行后,如果没有报错,默认显示空白,则说明端口已打开。如果显示报错连接失败,则表示检测端口关闭。注意,telnet命令不支持UDP端口检测。 3、如果需要批量扫描检测,显然手动敲CMD是不太现实的,可以使用Nmap和X-scan等专业软件。
不用工具,在CMD下有个技巧可检测相应IP主机指定端口是否开启(比如你想检测222.214.179.230的30端口是否开启,可以这样): 在CMD下输入:start /min telnet 222.214.179.230 30之后会出现一个窗口,是最小化的,你等一会,如果窗口自动关闭了,说明端口是关闭的或主机ping不通,反之端口开放.你可以用自己的机子做实验.在CMD下输入netstat -anp tcp可以查看当前主机tcp开放了哪些端口. ping命令是不能检测端口,只能检测你和相应IP是否能连通.
ping一下

判断端口通不通的几种方法
1、使用telnet判断 telnet是windows标准服务,可以直接用;如果是linux机器,需要安装telnet.用法: telnet ip port1)先用telnet连接不存在的端口[root@localhost ~]# telnet 10.0.250.3 80Trying 10.0.250.3...telnet: connect to address 10.0.250.3: Connection refused #直接提示连接被拒绝2)再连接存在的端口[root@localhost ~]# telnet localhost 22Trying ::1...Connected to localhost. #看到Connected就连接成功了Escape character is '^]'.SSH-2.0-OpenSSH_5.3aProtocol mismatch.Connection closed by foreign host.2、使用ssh判断ssh是linux的标准配置并且最常用,可以用来判断端口吗?用法: ssh -v -p port username@ip-v 调试模式(会打印日志).-p 指定端口username可以随意1)连接不存在端口[root@localhost ~]# ssh 10.0.250.3 -p 80ssh: connect to host 10.0.250.3 port 80: Connection refused[root@localhost ~]# ssh 10.0.250.3 -p 80 -vOpenSSH_5.3p1, OpenSSL 1.0.1e-fips 11 Feb 2013debug1: Reading configuration data /etc/ssh/ssh_configdebug1: Applying options for *debug1: Connecting to 10.0.250.3 [10.0.250.3] port 80.debug1: connect to address 10.0.250.3 port 80: Connection refusedssh: connect to host 10.0.250.3 port 80: Connection refused2)连接存在的端口[root@localhost ~]# ssh ... -pa^]^C[root@localhost ~]# ssh ... -p -vOpenSSH_.p, OpenSSL ..e-fips Febdebug: Reading configuration data /etc/ssh/ssh_configdebug: Applying options for *debug: Connecting to ... [...] port .debug: Connection established.debug: permanently_set_uid: /debug: identity file /root/.ssh/identity type -debug: identity file /root/.ssh/identity-cert type -debug: identity file /root/.ssh/id_rsa type -debug: identity file /root/.ssh/id_rsa-cert type -debug: identity file /root/.ssh/id_dsa type -debug: identity file /root/.ssh/id_dsa-cert type -a^C不用-v选项也可以咯3、使用wget判断wget是linux下的下载工具,需要先安装.用法: wget ip:port1)连接不存在的端口[root@localhost ~]# wget ...:---- ::--http://.../Connecting to ...:... failed: Connection refused.2)连接存在的端口[root@localhost ~]# wget ...:---- ::--http://...:/Connecting to ...:... connected. HTTP request sent, awaiting response...
"端口"是英文port的意译,可以认为是设备与外界通讯交流的出口。端口可分为虚拟端口和物理端口,其中虚拟端口指计算机内部或交换机路由器内的端口,不可见。例如计算机中的80端口、21端口、23端口等。物理端口又称为接口,是可见端口,计算机背板的rj45网口,交换机路由器集线器等rj45端口。电话使用rj11插口也属于物理端口的范畴。

本文由 在线网速测试 整理编辑,转载请注明出处。