'Linux下用iperf测试网络时出现unabletoconnecttoserver:Noroutetohost'
linuxiperf网卡性能测试Noroutetohost
Problem
为了验证虚拟网卡驱动的性能,需要两台主机之间互相收发数据,我使用iperf工具进行测试,报错“unabletoconnecttoserver:Noroutetohost”,但是两台主机之间可以ping通。
Solvent
Google了一下,发现是防火墙的问题,需要将防火墙关掉,大部分搜索到的结果都是:
serviceiptablesstop
iptables-F
执行此操作后并没有解决问题(我用的是中标麒麟V5.0系统),我就把系统防火墙firewalld全部关闭,问题解决。指令如下:
systemctlstopfirewalld
systemctldisablefirewalld
systemctlstopfirewalld.service
systemctldisablefirewalld.service
Noroutetohost怎么办
在vmvare里面配了两台mysql,发现用mysql连不上mysql服务器,用telnet登录mysql的3306端口,发现居然是noroutetohost;
[zhoulei@localhost~]$telnet192.168.2.483306
Trying192.168.2.48...
觉得甚是差异,估计是虚拟机装了有问题,就把虚拟机中的防火墙给清了一下,发现可行。
总之,linuxiperf网卡性能测试Noroutetohost给大家简单的介绍了一些,希望大家多看看。