I need to build a device emulator which can communicate over real IP address
I need to create as many instances I can for the device. With one IP and MAC address for each emulator instance
Can can any one guide me how this can be achieved?
I need to build a device emulator which can communicate over real IP address
I need to create as many instances I can for the device. With one IP and MAC address for each emulator instance
Can can any one guide me how this can be achieved?
you need to study the datalink layer in depth in the part of coding -- then you can understand the how it get mac address and the communication b/w mac and ip
depending on what kind of device you need, you may be happy with a number of virtual PC engines, the overhead is high (whole PC is emulated instead of just a network interface) so you won't end up with 1000 machines, but this is an "out of the box" solution - and each virtual PC can have a number of virtual network cards.
Virtual PC 2007
.
Virtual Machine Network Driver
.
VMware Player: Windows
Five or six years ago, I was stuck writing a network emulation layer for a PS2 game. I was told that all the classic behaviors of an internet connection had to be displayed; realistic loss characteristics, packet reordering, latency, rush-induced packet loss. Essentially, I was told to implement the internet in a couple weeks.
I suggested just bouncing all our game traffic off a remote echo server. When I was told that it was absolutely forbidden to send development traffic out over public wires, I simply created a server that everyone pointed their PS2 devkits at that would store every packet it received and send a doppleganger (full of an id for the original packet plus a bunch of random garbage to make it the same size) out to the echo servers I ran. When the doppleganger was received, I would pass the original packet on to its original destination.
Boom. Internet simulation with all the thorns in less than 8 hours.
I suggest you better not start reinventing the wheel. There are hardware as well as software solutions for this particular problem. They are also very well suited to network load (and throughput)-tests.
The downside is such devises are quite expensive.
Add a Range of Virtual IPs in Windows
See the February 21st, 2006, 1:18 pm post reply by gil.elessar
.
For your reference:
Netsh commands for Interface IP
You can use commands in the Netsh Interface IP context to configure the TCP/IP protocol (including addresses, default gateways, DNS servers, and WINS servers) and to display configuration and statistical information.
A simple idea woul be to used User-Mode Linux (UML), a port of the Linux kernel in user space. It allows multiple virtual Linux systems (known as guests) to run as an application within a normal Linux system (known as the host).
It very light, in CPU and memory. For instance I'm using more than 10 UML in the same time on a "not-too-recent" PC, using Netkit, a network simulator based on UML. UML is light because it's a native application, not heavy virtualisation (vmware, virtualbox, qemu) neither para-virtualisation (xen).
As the network interfaces are implemented to be able to connect to other UML machines (using uml_switch), you can have any MAC address you want. If you need to connect these UML machines to your system or external hosts, you can create virtual devices using TUN/TAP.
PS: If you're on Windows, you can try CoLinix, port of Linux Kernel for M$ OS, I don't know if it has same characteristics than UML.
You could try using loopback adapters. Using this you can set any IP or mac address. Works great for emulating various network connections.