-2

I was asked to build a simulator that pretend to be 5000 UDP clients, each with a unique IP address.

Can this simulator be a PC application?If it can, can it be build on Windows, or Linux.

Or has to build a hardware only?

Thanks

Lewis Liu
  • 67
  • 5

1 Answers1

1

You can do this in software. There are two different approaches:

  • Use IP aliasing. With IP aliasing, you can create multiple virtual network interfaces that map to a single physical interface. Each interface has its own IP address. You then create a separate socket for each address and send traffic on it. See this post for more details.
  • Use raw sockets to "forge" UDP packets with the desired IP address. This has the disadvantage that the server cannot successfully reply to the client, since there is no network interface corresponding to the forged address. See this for instructions on how to craft UDP packets using raw sockets.
Community
  • 1
  • 1
Craig S. Anderson
  • 6,966
  • 4
  • 33
  • 46
  • Actually, you can use any address in `127.0.0.0/8` without setting up any sort of virtual network network. Though any local technique will still behave differently than a real network - but usually those steps can be tested separately. – o11c Jun 15 '15 at 00:19