SNMP devices emulation - linux

We have network management system under linux, C/C++, perl and we need to test performance of this system. Is there a tool or way that would allow us to emulate 50 000 SNMP devices?
I don't know what more to say here... Please let me know if I should provide more information.
Any idea is appreciated.
Thank you
Bogdan

There are a few tools out there that will let you do that, however what I've seen is usually commercial software.
Adventnet SNMP Agent Simulator
MIMIC SNMP Agent Simulator

You can try Raddle - it is open-source, written in Perl and based on honeyd, which should be able to emulate up to 65536 hosts.

Thank you for your answers. Here's the way we solve this problem right now:
We have a linux VM up with 1 interface (eth0).
We add 50'000 virtual interfaces (eth0:1, eth0:2 etc).
An SNMP daemon is up and replies on requests through all the ip addresses.
This way we have 50K IP adresses in the network that reply to SNMP requests.
Though, I'm investigating Raddle. Maybe if it suits we'll switch to this solution.
Thanks,
Bogdan

If the devices are sending traps, you could use Net-SNMP's snmptrap to simulate the effects of that many traps being sent.

The snmpsim tool reportedly can sustain the simulation of ~50K agents. It can simulate different agents by responding at different IPs or to distinct SNMPv1/v2c community names or SNMPv3 context names.
There are also the hints on performance optimization.

Related

Monitoring switch port (service) per interface

My actual goal is to monitor the traffic going through a zyxel USG60 switch (v4.15). For that I use zabbix.
The problem I got is that I actually monitor the interfaces of the switch, but I need to go deeper (if you know what I mean), in the term that my boss asked me if I could monitor on each interface, the different traffic port by port (I mean service, like port 80 is for http), to check precisely who is using bandwidth and for what.
I tried to see if snmp can do that, but it seems it didn't go further the interface level. Since I don't know where to start or search, I need your help and advice.
One last precision, the monitoring server will be run under ubuntu 14.04 .
You need to collect additional data using NetFlow/sFlow protocols to get the detailed traffic information.

How to get Network Statistics of a Remote PC

H!
I have to make an application in vc++ which can get the network statics of remote PC.
Is any one can help me to solve my problem?
Since you said vc++, therefore, I assume that you have to do this in Windows environment. Have a look at SNMP protocol. And How it can be used to get information of remote machines.
Look at this SO Question as well.
Depending on the network statistics that you want to capture, you may find that (as Aamir suggested) SNMP is a good choice.
There are standard MIBs defined that will provide a number of network statistics. Three that are worth investigation are:
IF-MIB,
RMON, and
Etherlike MIB
NET-SNMP is a good library for accessing SNMP information and is available for Windows (as you've mentioned vc++). Others are available.
This does assume that you have an SNMP agent running and accessible on the remote machines that you wish to monitor.

Determine whether MAC address is physical or virtual on Linux

I have tried using several commands as well as couple of examples using C/C++ but am still not able to find a flawless method that can differentiate between physical or virtual ethernet adapters. Physical means, on that available on your board or installed externally and virtual means created by virtualization apps such as VirtualBox/VMWare/Virtual PC or VPN etc.
Any pointers?
There is no flawless method. A virtual adapter can have any MAC address, including one that might have been assigned by a constructor to a physical device. And the other way around, given that one can change the MAC address of a physical adapter. You can only make an educated guess.
You might find it easier to detect if you are running virtualized at all, rather than look for specific information about the NICs. The virt-what(1) tool looks through aspects of the running system to guess if the system is virtualized or not. (The script isn't as smart as you think, but it does have a lot of small information gathering tools in one place.)
Someone intentionally trying to bypass a license check would probably not find it difficult to defeat this mechanism.
Maybe one can use mii-tool and check if it fails, which it does for virtual:
mii-tool vmbr2
SIOCGMIIPHY on 'vmbr2' failed: Operation not supported
mii-tool eno1
eno1: negotiated 1000baseT-FD flow-control, link ok
EDIT:
What is mii-tool: view, manipulate media-independent interface status
This utility checks or sets the status of a network interface's
Media Independent Interface (MII) unit. Most fast ethernet
adapters use an MII to autonegotiate link speed and duplex
setting.
https://www.man7.org/linux/man-pages/man8/mii-tool.8.html

Simulation tool for Bluetooth

Can any body suggest me the best simulation tool now a days for Bluetooth Networks. in order to test various algorithoms about Routing and Roaming issue.
There are two that I know of: NS-2 (with the UCBT: Bluetooth Extension) and QualNet. Of those, NS2 is probably the most used.
There is ns3 those ns2 is still the most widely used simulator. The network simulation 2 and 3 are opensource projects with lots of implementations and protocol models already available to you. In such case all you need to do is, write the code of your network setup on a tcl file and execute. Voila, you have ur output on the trace file.
Qualnet is propitiatory and very expensive to license, but is definitely more easy to use. Also the support you get from their team is great.
So if you have the dough to get qualnet, I would recommend that else opensource projects rule... :)
Is it possible in Matlab to do simulation for Bluetooth algorithoms

Doing ARP and Inverse ARP on Linux 2.6.21 (glibc 2.3.5)

I need to store persistent reference to third party device on an arbitrary IP network where the IP address of the devices may be static or randomly assigned by DHCP. I don't control the devices on the network and I can't rely on DNS and other ad-hoc networking protocols existing or working with the devices.
So I have been instructed to investigate using hardware addresses and ARP. This will work but I don't want to duplicate code. The kernel must manage an ARP table. On Windows you can access it using GetIpNetTable etc.
I am hoping there is an API to answer these two questions:
How do I translate from IP to MAC address? (ARP)
How do I translate from MAC to IP address? (InARP)
If not then I may have to do it more manually:
How do I read the kernel's ARP table?
How do I add an entry if I have the determined a mapping myself?
/proc/net/arp
K
ARP tables tend to be fairly local and short-lived. If you examine the protocol, the real MAC addresses are generally only provided when the given IP address is in the local subnet.
Otherwise, the packet is forwarded to the local router, which is then responsible for forwarding it.
If you do "arp -g" on Windows or "arp -a" on UNIX, you'll see the table, but I don't think it will do you any good, due to the reasons mentioned above. That command and
That's really what DNS is for but, as you say, it may not be an option for you.
You may well have to write your own 'ARP' database at your application level.
As for ARP:
You could use system("/usr/bin/arp -option_of_choice"); and parse the output, but that's an ugly hack. -- Not my recommendation.
Take a look at /usr/include/linux/sockios.h -- At the SIOCGARP, SIOCDARP, and SIOCSARP details. Those are ioctls that you can perform to manage the ARP table on linux. Of course, you'll have to perform these ioctls on a socket fd.
Here's some examples: SIOCGARP examples
I'm sure you can find many other examples in several other languages as well. As I'm assuming that you're using C.
As for RARP:
A quote from the linux rarp manpage:
" This program is obsolete. From version 2.3, the Linux kernel no longer
contains RARP support. For a replacement RARP daemon, see ftp://ftp.demen-
tia.org/pub/net-tools"
So you'll have to install rarpd on the target system.

Resources