I am making a Device Discovery windows application in C#. Is this possible to know the device type if I have MAC address or IP address?
device type means either it is computer or router or mobile or any other device?
Note: HostName entry is not useful for it because Host Name is defined by User. for example i may assign "Nokia N70" name to my computer.
Thanks in anticipation.
You can get the manufacturer from the MAC address. In order to get any more information you'd need to do a port scan to do a 'fingerprint' of the device in question.
Application such as NMAP use this approach.
Non-spoofed MAC addresses do include a manufacturers string at the start, but I don't know of any publicly available database that holds them. There is also no device mapping after this.
The matter is even more complex when you add in the use of virtual machines, which require there own MAC address.
IP addresses, no they are assigned by network administrators however they want, often virtually random.
So in short no.
IP Address: No. The Internet Protocol address can not help you figure out which device is being used
As for the MAC address: See this website.
Basicly, each vendor 'owns' a range of MAC addresses, this specific website can ever offer you the range used for each vendor. pretty neat.
来源:https://stackoverflow.com/questions/10700179/how-to-get-device-type-from-mac-or-ip-address