Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to mimic an IP Address - Device Simulator Required

I'm new here...been digging around for some help but figured I would join and ask for some guidance.

I'm looking to create an app that can create multiple "fake" devices. They need an IP Address and I'm guessing able to respond to ping. Being able to respond to WMI would also be nice. Kinda like a simulator. I'd like to create up to 50,000 devices but even starting with 1 would help.

What is needed for such an app? TCP Client/Listener? I've never done something like this before so please be gentle :)

like image 276
user1786176 Avatar asked Oct 30 '12 16:10

user1786176


1 Answers

You may install Virtual Network Adapter's (driver is included with Windows OS), but i have never used this. Driver for Virtual Network Adapter is here: %WINDIR%\Inf\Netloop.inf

You may use Command line tool called DevCon to add devices by script, like this:

devcon -r install %WINDIR% \Inf\Netloop.inf *MSLOOP

Installation unfortunatelly takes few seconds (on my Core Duo 2.0 laptop).

If you need to configure a lot of network cards you may use command line netsh.

Examples:

netsh in ip set address "Local Area Connection" static 10.0.0.1 255.0.0.0 10.0.0.1 1
netsh in ip add address "Local Area Connection" 10.0.0.2 255.0.0.0
netsh in ip set address "Local Area Connection 2" 10.0.0.3 255.0.0.0
netsh in ip set address "Local Area Connection 3" 10.0.0.4 255.0.0.0
netsh in ip set dns "Local Area Connection" static 10.0.0.250
netsh in ip set wins "Local Area Connection" static 10.0.0.250

You may dump/export current network configuration to a file (to see how current config looks):

netsh interface dump > file.txt

More netsh examples

Edit: removed informations not useful in this case.

like image 125
Kamil Avatar answered Oct 12 '22 23:10

Kamil