How to perform a network loopback test using TTCP or IPERF?

I reviewed the help for IPERF and I think I got it now.

On server side:

C:\>iperf -s -B 10.1.1.1
------------------------------------------------------------
Server listening on TCP port 5001
Binding to local address 10.1.1.1
TCP window size: 8.00 KByte (default)
------------------------------------------------------------
[160] local 10.1.1.1 port 5001 connected with 10.1.1.2 port 35202
[ ID] Interval       Transfer     Bandwidth
[160]  0.0-10.0 sec   420 MBytes   352 Mbits/sec

s

On client side:

C:\>iperf -c 10.1.1.1 -B 10.1.1.2
------------------------------------------------------------
Client connecting to 10.1.1.1, TCP port 5001
Binding to local address 10.1.1.2
TCP window size: 8.00 KByte (default)
------------------------------------------------------------
[132] local 10.1.1.2 port 35202 connected with 10.1.1.1 port 5001
[ ID] Interval       Transfer     Bandwidth
[132]  0.0-10.0 sec   420 MBytes   352 Mbits/sec

C:\>

c

Let me know if you see any errors here.

I would still like to know if this is possible, and how to do it using TTCP? If you know the answer to this, please post it.


IP works by choosing the best route from source to destination. Loopback within a host is better than the Ethernet interface out from a host, so even if you think you are testing the Ethernet loop you wired between your two network adapters, you will find that the traffic sent between two IP addresses of your machine does not pass through it, instead it short-circuits through loopback.

You would need to run two distinct routing instances on a device and only make one of the external interfaces known to each if you want traffic to loop around the outside. If your device were a router, you would use VRF (Virtual Routing Facility) to separate the routing instances.

Since your machine is a host, your best bet is to install a VM and pass one of the network interfaces to the virtual machine while the other is handled by the "bare metal".