模拟多IP访问

模拟多IP访问

有没有办法从一台机器模拟特定应用程序(我的应用程序)的多个 IP 访问?我确实根据客户端 IP 创建了一些有趣的事实/报告,这与应用程序功能没有任何关系,所以我需要从大量客户端/IP(比如 500 个左右)进行测试。感谢任何帮助/建议

答案1

我需要更多信息,但会尝试做出猜测(假设您可以使用 Linux 发行版):

If ("multiple IP access" doesn't mean different IPs)
{
    If (your application doesn't need interaction, but only an http request)
    {
        I would try several wget in parallel launched from a shell script
    }
    else // == your application needs interaction
    {
        Can you program a light client (let's say python, java...) to simulate one client and launch several simultaneously?
    }
}
else // == you need different IPs
{
    If (the IPs need to be public)
    {
        I would try to work on wget/light client accesing different proxy servers on the Internet.
    }
    else // == they can be private
    {
        I would first try to create about 500 subinterfaces (eth0:n). This means 2 /24, and some work on address space on your private site. Once you have the subinterfaces, I would try the wget/light client over different subinterfaces.
    }
}

答案2

只有一个建议。在 IPv6(最好说是双栈)演进路径中,IPv4 用户位于 CGNAT44 后面的情况非常普遍;这意味着多个用户将位于同一个公共 IPv4 地址后面。因此,多个用户可能会在同一个公共 IPv4 地址上访问您的应用程序。因此,您不应该依赖“一个 IP 意味着一个用户”这一信念来开发应用程序。

相关内容