Monitoring, Management & Location Tracking

 View Only
last person joined: one year ago 

Articles relating to existing and legacy HPE Aruba Networking products and solutions including AirWave, Meridian Apps, ALE, Central / HPE Aruba Networking Central, and UXI / HPE Aruba Networking User Experience Insight

Inserting custom OUIs into AirWave Database 

Jun 25, 2014 06:51 PM

So this is the structure of the oui table:

airwave=> \d oui
Table "public.oui"
Column | Type | Modifiers
---------------+-------------------+--------------------------------------------------
id | integer | not null default nextval('oui_id_seq'::regclass)
mac | character(12) |
vendor | character varying |
is_wifi_maker | smallint | default 0
is_ap | smallint | default 0
is_soho | smallint | default 0
device_type | character varying | default ''::character varying
Indexes:
"oui_pkey" PRIMARY KEY, btree (id)
"oui_mac_idx" UNIQUE, btree (mac)

You can insert values into this table via the CLI:

Example:

# dbc “INSERT INTO oui (mac, vendor, is_wifi_maker, is_ap, is_soho) values ('123456000000', 'Test Vendor', 1, 0, 0);”

Please replace the ‘123456000000’ with the OUI of your test products and the Vendor string with your desired vendor information.

Please note all manual OUI table changes *WILL* get flushed during any AirWave upgrade and you’ll need to reinsert your test OUIs. There is some protection to prevent duplicate OUIs from being inserted into the table, if you attempt to insert an OUI that already exists then you should receive the following error:

[root@decibel custom]# dbc "INSERT INTO oui (mac, vendor, is_wifi_maker, is_ap, is_soho) values ('123456000000', 'Test Vendor', 1, 0, 0);"
ERROR: duplicate key value violates unique constraint "oui_mac_idx"

If you’re attempting to change the vendor name of an existing OUI then you’ll need to do an update instead of an insert:

# dbc “UPDATE oui set vendor = ‘Test Vendor 2’ where mac = ‘123456000000’;”

If you’re attempting to delete an OUI from the table then you’ll need a delete:

# dbc “DELETE FROM oui WHERE mac = '923456000000';”

Please note that if you fail to specify ‘where mac = <OUI MAC>’ correctly you may delete/overwrite all of the vendor OUI data in AirWave which will require an AirWave database restore to fix. So please be careful!

Statistics
0 Favorited
1 Views
0 Files
0 Shares
0 Downloads

Related Entries and Links

No Related Resource entered.