testing我的负载均衡器

为了testing我的负载均衡器,我需要创build几个TCP / IP连接(从一个主机)。 哪个工具可以用来创build不同的源IP地址这个会话? (不用担心,只有在我的私人局域网)。

最简单的做法是将多个IP分配给主机,然后使用可以绑定到特定源IP的东西。 由于这是TCP / IP,你需要处理这个响应,制作可能只是一个痛苦。

在linux下,如果你正在使用的是http连接,你可以使用Curl:

--interface <name> Perform an operation using a specified interface. You can enter interface name, IP address or host name. An example could look like: curl --interface eth0:1 http://www.netscape.com/ 

同样在Linux下,如果你想要更低级别的tcp,你可能会考虑netcat nc