I have developed an SNMP scanner for my college project. It will scan all the SNMP devices connected to the network and store the information to the inventory. I have successfully done the basic scanning of System properties, Interfaces and Device specific properties.
I have a periodic schedule to do SNMPWalk over the network again to update the inventory. I am formulating a way to update already scanned devices without creating duplicates in the inventory.
As of now, I have planned to use Physical address of the interface (Network adapter) to update the device apart from hostname.
OID to fetch PhysicalAddress for interface,
1.3.6.1.2.1.2.2.1.6
But the problem is, obviously there would be multiple interfaces which might result in multiple PhysicalAddress.
Usually, If I want to take a computer's MacAddress, I will take MacAddress for the network adapter whose IPEnabled is true.
But here I am not able to arrive at some Primary MacAddress to use for update the device.
I have planned to go with use the first MacAddress in the list of Interfaces as of now, which is a workaround and not obviously a better solution, then hostname of the device for update.
Any suggestions on this?
Related
I'm working on a project that has server and client roles. I would like to have servers and clients automatically detecting each other. At a first glance, zeroconf seems to be the best solution. But it would add a dependency, Bonjour, to the project. I use Qt for the GUI and Qt has native support of broadcast and multicast. So I'm wondering if it's feasible to just use those features to replace zeroconf?
Here is a decent post about how zeroconf works.
I don't think I need the features of obtaining an IP Address and obtaining a Hostname from zeroconf. All I want is let one instance be aware of other instance's existence.
My current plan is combining broadcast and multicast. Each server chooses a unique multicast group and broadcast this group to the others. When a client wants to connect a to specific server, it joins the corresponding group.
Some people mention that it's normal that routers blocking local broadcast. If this is true, my plan would not be feasible.
Is there any standard way to implement this rather than using zeroconf?
Is it possible that to identify a network adapter by only its MAC Adress?
I know that it is possible to find out the vendor, but i need the exact Name/Description, e.g. "Intel Ethernet I217-LM".
Update (more info):
Let's say I have 10 MAC addresses. I want to paste them into a (online) tool that gives me then name of the adapter.
Is this even possible? The 6 first digits are vendor specific, I know that but, is there any other scheme?
No, the MAC Address is simply a unique Identifier for each network adapter. You can think of it as a unique random number coded directly into the networking hardware, so that it can never change. You can figure out the vendor, because "blocks" of MAC addresses are assigned to each vendor, in order to ensure that no one gets a card with a duplicate address. To which models the addresses are assigned is up to the vendor, and it is highly unlikely that a vendor will publish such a list.
In order to obtain the information you need, you will have to use a OS/Programming language specific function. If you can tell us what environment you are working on, maybe someone can help you figure out how to get the information.
We are considering Riak for use in an embedded device context (embedded Linux) where devices are dynamically addressed (DHCP).
Is this a viable choice?
We can assume that appropriate auto-discovery protocols are in place to enable devices to discover each other. Upon joining the network, a device would obviously need to do a riak-admin cluster join <other device>. Other than this, would Riak be capable of handling devices leaving and re-joining the network on a fairly non-frequent basis? Or, does it play much more nicely in a statically-addressed environment?
DHCP doesn't necessarily mean the device has to join when it boots. If the node names are resolvable via DNS or hosts file, and the listeners are configured to 0.0.0.0, the Riak nodes should communicate quite happily even if their IPs change on reboot.
I have a sensor gateway which is connected to the serial port. My java program basically a desktop application which is collecting sensor data and storing in a public mysql database. Now I am wanting to access the serial port through internet with a web application which is using the same public mysql database. I have think a bit but I think it is not a proper way. If I would keep a table in the database, if any command is generated through internet via the web application this table store the command for a period of time and my desktop application continuous monitoring the table if data available get the data and pass it through serial port. I am seeking for a proper way to access serial port through internet/cloud which is connected to remote machine or something like an expert opinion.
That's certainly the simplest method. Much simpler than say a web service that stores it in memory, or again in the database and you get safety which you wouldn't get if you just relied on the file system to lock a file. You might need some method of clearing out the output from the DB.
I am currently developing an embedded uP based appliance which can be remotely controlled via ethernet from a PC using its own SNMP manager software.
I have implemented all the private commands, i.e. using a private community password and under the enterprise tree OID (1.3.6.1.4.1.MY_PEN...etc) So from that point of view the unit is working OK.
What I am not too sure is whether the appliance should also respond to other SNMP OID branch queries (e.g. 1.3.6.1.2.1...or others ) Not for the benefit of my PC software, but for the benefit of other PC managers who may or may not want to know whether my device "exists" on the system.
I am aware this is not an essential requirement (my device doesn't need to be known to others) but perhaps there is an established "polite" requirement for SNMP agents in a network to be visible as such. In which case there may be a minimum subset of OID queries that such agents should at least respond to to any PC manager out there.
I cannot find anything about this on the internet, does such a thing exist?
Any comments (or at least a pointer to the "right" RFC as there are so many of them!
Thanks in advance
For devices that I've worked on, the MIB-II system group (sysName, sysLocation, etc) is usually implemented. Other standards are only implemented where a definite need exists. See RFC 1213.