Friday, April 10, 2009

Wireshark complains about MIB modules, finds no Interface?

When you launch Wireshark on your Leopard and get following errors...

The following errors were found while loading the MIBS:
-:0 1 module-not-found failed to locate MIB module `IP-MIB'
-:0 1 module-not-found failed to locate MIB module `IF-MIB'
-:0 1 module-not-found failed to locate MIB module `TCP-MIB'
-:0 1 module-not-found failed to locate MIB module `UDP-MIB'
-:0 1 module-not-found failed to locate MIB module `SNMPv2-MIB'
-:0 1 module-not-found failed to locate MIB module `RFC1213-MIB'
-:0 1 module-not-found failed to locate MIB module `IPV6-ICMP-MIB'
-:0 1 module-not-found failed to locate MIB module `IPV6-MIB'
-:0 1 module-not-found failed to locate MIB module `SNMP-COMMUNITY-MIB'
-:0 1 module-not-found failed to locate MIB module `SNMP-FRAMEWORK-MIB'
-:0 1 module-not-found failed to locate MIB module `SNMP-MPD-MIB'
-:0 1 module-not-found failed to locate MIB module `SNMP-NOTIFICATION-MIB'
-:0 1 module-not-found failed to locate MIB module `SNMP-PROXY-MIB'
-:0 1 module-not-found failed to locate MIB module `SNMP-TARGET-MIB'
-:0 1 module-not-found failed to locate MIB module `SNMP-USER-BASED-SM-MIB'
-:0 1 module-not-found failed to locate MIB module `SNMP-USM-DH-OBJECTS-MIB'
-:0 1 module-not-found failed to locate MIB module `SNMP-VIEW-BASED-ACM-MIB'
The Current Path is: /usr/local/share/mibs/ietf:/usr/local/share/mibs/iana:/usr/local/share/mibs/irtf:/usr/local/share/mibs/site:/usr/local/share/mibs/tubs:/usr/local/share/pibs/ietf:/usr/local/share/pibs/site:/usr/local/share/pibs/tubs

Do not be panic. This annoying errors can be solved with these steps:
  1. Go to Edit menu and select Preferences
  2. From the left pane, select Name Resolution
  3. For SMI (MIB and PIB) paths, click Edit button
  4. Click New button, in the SMI paths windows
  5. In the name text box, type /usr/share/snmp/mibs/
  6. Click OK..OK..OK
  7. Restart Wireshark.
You may also have trouble capturing anything at this point. Because Wireshark don't see any interface. To solve this issue, do this on your shell:

chgrp admin /dev/bpf*
chmod g+rw /dev/bpf*

Restart Wireshark and everything should work smooth.
All the best! Happy sniffing! :-)