0

I'm trying to do a speed test with iperf.

I've set up two linux virtual machines, running this command on one:

iperf3 -s

and this command on the other:

iperf3 -c <ip-address of server>

The client gives me the following error:

unable to connect to server: no route to host

I have turned off the firewall on both machines and I have checked to see if the two runs the same version of iperf (which they do). I have configured the client to have a different IP from the server (they both still have the same MAC-address though. What am I doing wrong?

Edit: I gave the client and the server different MAC-addresses now but I still face the same error

Edit 2: The problem was that I was running both VMs on NAT which made my IP addresses incorrect since they didn't match the one on my host. I solved it by changing to bridged adapter and configured the IP addresses accroing to this https://www.nakivo.com/blog/virtualbox-network-setting-guide/

Then I also had to change the broadcast address to x.x.x.255 on both the server and client (x.x.x being the first 3 parts of my host IP). By doing this, the both VMs will act as if they are on the same LAN. This I did with

sudo  ifconfig enp0s3 x.x.x.x  netmask 255.255.255.0 broadcast x.x.x.255

Where x.x.x.x are my chosen IP for the server/client

Now it works just fine :)

Creepzzz
  • 1
  • 1
  • 2

0 Answers0