oui

Look up MAC addresses for their vendor in the IEEE OUI database

oui

Look up MAC addresses for their vendor in the IEEE OUI database

$ npm i --save oui
var oui = require("oui");
console.log(oui("20:37:06:11:22:33"));
//=> Cisco Systems, Inc 
//=> 80 West Tasman Drive 
//=> San Jose CA 94568 
//=> United States 
$ npm i -g oui
$ oui 20:37:06
Cisco Systems, Inc
80 West Tasman Drive
San Jose CA 94568
United States

You can, for example, omit the colons and it'll just take the first 6 valid hex characters.

To update the local OUI database from the official IEEE source:

$ oui --update
  • input: The input string. Non-hexadecimal characters and characters after 6 hex characters are found are ignored unless options.strict is set.
  • options: An optional options object.

Returns either a string, or null if no matches are found. Throws if input is not a string.

  • cb: The callback function receives err (if any).

If true, only these formats of MACs are accepted:

  • 000000
  • 00:00:00
  • 00-00-00
  • 000000000000
  • 0000.0000.0000
  • 00:00:00:00:00:00
  • 00-00-00-00-00-00

A lookup will throw when an invalid format is supplied strict mode.

© 2014-2015 silverwind, distributed under BSD licence