Tomcat
December 27th, 2004, 08:32 AM
This may not strictly be a programming problem, but I hope someone can point me in the right direction anyway.
I'm trying to test the performance of a switch using a single PC with two NICs, by sending data on one NIC and receiving it on the other. My problem is that I can't get W2K to send the data on the NIC - it passes it to the receiver internally.
My setup:
NIC 1: 192.168.0.1 ----- Switch (port 1)
NIC 2: 192.168.0.2 ----- Switch (port 2)
The server app binds the TCP listen socket to 192.168.0.1.
The client app binds its socket to 192.168.0.2 and then connects to 192.168.0.1.
(HKLM\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters\IPEnableRouter is set to 0)
Everything looks fine except that I can send ~100 Mbps (the speed of the NIC) even when the switch has been turned off. :confused:
Does anyone have any ideas what else I can do, programmatically or otherwise?
*Added*
The socket option SO_USELOOPBACK looked like a possible solution, but it apparently doesn't work in any Windows version (WSAENOPROTOOPT). :(
I'm trying to test the performance of a switch using a single PC with two NICs, by sending data on one NIC and receiving it on the other. My problem is that I can't get W2K to send the data on the NIC - it passes it to the receiver internally.
My setup:
NIC 1: 192.168.0.1 ----- Switch (port 1)
NIC 2: 192.168.0.2 ----- Switch (port 2)
The server app binds the TCP listen socket to 192.168.0.1.
The client app binds its socket to 192.168.0.2 and then connects to 192.168.0.1.
(HKLM\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters\IPEnableRouter is set to 0)
Everything looks fine except that I can send ~100 Mbps (the speed of the NIC) even when the switch has been turned off. :confused:
Does anyone have any ideas what else I can do, programmatically or otherwise?
*Added*
The socket option SO_USELOOPBACK looked like a possible solution, but it apparently doesn't work in any Windows version (WSAENOPROTOOPT). :(