How to Lookup OUI (Organizationally Unique Identifier) In Linux

RSS
EMAIL
FACEBOOK
FACEBOOK
GOOGLE
GOOGLE
https://www.poftut.com/how-to-lookup-oui-organizationally-unique-identifier-in-linux/
PINTEREST
PINTEREST
INSTAGRAM

Network switches or Layer 2 technology Ethernet protocol uses MAC addresses in order to transfer frames between systems. MAC addresses are 48 bit value. This 48 bit value contains the device manufacturer ID as the first 24 bit. In this tutorial we will learn how to look, search and find the Organizationally Unique Identifier in Linux distributions like Ubuntu, Debian, Mint, Kali, Fedora, CentOS, RHEL etc.

Mac Address

As stated in previous part MAC address is used to address and route Ethernet frames. MAC address consist of 48 bit value and simply expressed as hexadecimal format. Here is an example MAC Address.

OUI (Organizationally Unique Identifier)

OUI or Organizationally Unique Identifier is first 24 bit or 6 hexadecimal value of the MAC address. IEEE is responsible with the OUI in MAC addresses. They provide the Ethernet card manufacturer company. In the previous example 00:50:56 is OUI of the MAC address.

Print MAC Address

First we will start by printing the MAC address of the system. There are a lot of command those have used to print MAC address but the ip link command is the easiest way.

Print MAC Address
Print MAC Address

Find OUI with get-oui Command

get-oui command is the most popular way to learn OUI . It is provided by arp-scan package. We can install arp-scan package like below.

Ubuntu, Debian, Mint, Kali

Ubuntu, Debian, Mint, Kali
Ubuntu, Debian, Mint, Kali

Fedora, CentOS, RHEL

Find OUI with ieee-data

ieee-data is another package which provides the oui.txt file . We can install this with the following commands

LEARN MORE  Python Script Change Mac Address Periodically

Ubuntu, Debian, Mint, Kali

Ubuntu, Debian, Mint, Kali
Ubuntu, Debian, Mint, Kali

Fedora, CentOS, RHEL

Search and Look For OUI In oui.txt

Installing previously explianed commands will create a file named oui.txt in the /usr/share/ieee-data/oui.txt this file provides the OUI data.

Search and Look For OUI In oui.txt
Search and Look For OUI In oui.txt

Lets look into oui.txt file to learn its format.

Search and Look For OUI In oui.txt
Search and Look For OUI In oui.txt

As we can see first column is about OUI and the second column provides the organization name and the address of the organization. OUI is written in two format first one is dash separated and other is without separator.

Lookup Using Less

We will lookup using less command provided by Linux system. We will open the oui.txt file and search with /

AND then put the OUI . In this example we search for 00179A or 00-17-9A

OR

Lookup Using Grep

We can also use grep command to search and filter OUI. We will provide the OUI part  and the oui.txt file like below. In this example we will search for 00179A or 00-17-9A

OR

Lookup Using Grep
Lookup Using Grep

Lookup Using Nmap Mac Prefixes File

nmap is a popular network scanner which provides a lot of features. One of them is the OUI information. OUI information is stored in a file /usr/share/nmap/nmap-mac-prefixes . We can search for a given OUI in this file with the grep command. First we need to install nmap package if it is not installed.

LEARN MORE  Windows Netstat Command Tutorial with Examples To List Network Ports and Connections

Ubuntu, Debian, Mint, Kali:

Install Nmap For Ubuntu, Debian, Mint, Kali:
Install Nmap For Ubuntu, Debian, Mint, Kali:

Fedora, CentOS, RHEL:

Now we will search with grep the OUI 0024A5 in this case.

Lookup Using Nmap Mac Prefixes File
Lookup Using Nmap Mac Prefixes File

RSS
EMAIL
FACEBOOK
FACEBOOK
GOOGLE
GOOGLE
https://www.poftut.com/how-to-lookup-oui-organizationally-unique-identifier-in-linux/
PINTEREST
PINTEREST
INSTAGRAM