oui

IEEE OUI database lookup utility

oui

Lookup MAC adresses or their prefixes in the IEEE database.

$ [sudo] npm install -g oui
$ npm install oui
$ oui 20:37:06

will print:

CISCO SYSTEMS, INC.
170 W. TASMAN DRIVE
M/S SJA-2
SAN JOSE CA 95134-1706
UNITED STATES

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

$ [sudo] oui --update
var oui = require("oui");
oui(input, [options], callback);
  • input: The input string. Can be pretty much any format as long as 6 charactes containing hexadecimal are provided.
  • options: An object containing module options.
  • callback: The callback function receives err (if any) and result.

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

oui.update(callback);
  • callback: The callback function receives err (if any).
var oui = require("oui");
oui("20:37:06", function(errresult) {
    if (err) {
        console.error(err);
    } else {
        console.log(result);
    }
});

options is an object containing below (optional) options:

oui(input, {strict: true}, callback);

In strict mode, 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

© 2014-2015 silverwind, distributed under BSD licence