Brocade SAN switch SNMP configuration and testing(How to Article) Part 2


STEP 4:-
Once the SNMP server IPs are configured and settings are applied, the next step is to verify the settings and do modifications in case required.

To check the SNMP settings, issue the command as below,

switch01:FID128:admin> snmpconfig --show snmpv1
SNMPv1 community and trap recipient configuration:
  [...]
  Community 5: public (ro)
    Trap recipient: 192.168.1.110
    Trap port: 162
    Trap recipient Severity level: 4
  [....]
Note:- Output is truncated

switch01:FID128:admin> snmpconfig --show snmpv3
SNMP Informs = 0 (OFF)
SNMPv3 USM configuration:
User 1 (rw): snmpadmin1
        Auth Protocol: noAuth
        Priv Protocol: noPriv
[...]
SNMPv3 Trap configuration:
Trap Entry 1:     192.168.1.10
    Trap Port: 162
    Trap User: snmpadmin1
    Trap recipient Severity level: 4
[....]
Note:- Output is truncated

Once the configuration is in place, the next step is to identify the traps which has to be forwarded to generate tickets. to perform that task we have to modify the MIB capability of the Brocade swith.

STEP 5:-

The management information base (MIB) is a database of monitored and managed information on a device.For Brocade, there are two main MIB trap choices:
• FibreAlliance MIB trap - Associated with the Fibre Alliance MIB (FA-MIB), this MIB manages SANswitches and devices from any company that complies with Fibre Alliance specifications.
• Brocade-specific MIB trap - Associated with the Brocade-specific Brocade MIB (SW-MIB),manages Brocade switches only

To read in depth please click here

TO view the traps which are currently enabled for a switch, issue the command as below.

switch01:FID128:admin> snmpconfig --show mibcapability
FE-MIB: YES
SW-MIB: YES
FA-MIB: YES
FICON-MIB: NO
HA-MIB: NOFCIP-MIB: NO
ISCSI-MIB: NO
IF-MIB: YES
BD-MIB: NOSW-TRAP: YES
[...]
Note:- Output is truncated.
Observe that, HA-MIB and BD-MIB are turned off here.ideally, this should be enabled to receive status change notifications.

To modify the MIB capabilty for a brocade switch, we have issue snmpconfig command along with the --set option as described below.

switch01:FID128:admin> snmpconfig --set mibcapability
[...]
FE-MIB (yes, y, no, n): [yes]
SW-MIB (yes, y, no, n): [yes]
FA-MIB (yes, y, no, n): [yes]
FICON-MIB (yes, y, no, n): [no]
HA-MIB (yes, y, no, n): [no]
FCIP-MIB (yes, y, no, n): [no]
ISCSI-MIB (yes, y, no, n): [no]
IF-MIB (yes, y, no, n): [yes]
BD-MIB (yes, y, no, n): [no]
SW-TRAP (yes, y, no, n): [yes]
        swFault (yes, y, no, n): [yes]
        swSensorScn (yes, y, no, n): [yes]
        swFCPortScn (yes, y, no, n): [yes]
        swEventTrap (yes, y, no, n): [yes]
                DesiredSeverity: (0..4) [0]
        swFabricWatchTrap (yes, y, no, n): [yes]
                DesiredSeverity: (0..4) [0]
        swTrackChangesTrap (yes, y, no, n): [yes]
        swIPv6ChangeTrap (yes, y, no, n): [yes]
        swPmgrEventTrap (yes, y, no, n): [yes]
        swFabricReconfigTrap (yes, y, no, n): [no]
        swFabricSegmentTrap (yes, y, no, n): [no]
        swExtTrap (yes, y, no, n): [yes]
        swStateChangeTrap (yes, y, no, n): [no]
        swPortMoveTrap (yes, y, no, n): [no]
        swBrcdGenericTrap (yes, y, no, n): [no]
FA-TRAP (yes, y, no, n): [yes]
        connUnitStatusChange (yes, y, no, n): [yes]
        connUnitDeletedTrap (yes, y, no, n): [yes]
        connUnitEventTrap (yes, y, no, n): [yes]
        connUnitSensorStatusChange (yes, y, no, n): [yes]
        connUnitPortStatusChange (yes, y, no, n): [yes]
IF-TRAP (yes, y, no, n): [no] yes
        linkDown (yes, y, no, n): [no] yes
        linkUp (yes, y, no, n): [no] yes
Operation succeeded
Operation succeeded


STEP 6:-
It's time to test the setup. On older firmware versions, to test SNMP forwarding, we normally enable/disable the ports. With the latest versions, we have "snmptraps" which can be used to simulate the error condition.

Let's try it now,

you have to mention the trap name and ip address of the SNMP server while using snmptraps command.

switch01:FID128:admin> snmptraps --send -trap_name cp-status-change-trap -ip_address 192.168.1.110
Unable to send trap: cp-status-change-trap : MIB is disabled

Oops, the test is failed and the reason is the status change notification MIB is disabled(hope you have noticed it on the previous step!)

Let's see it once again,
switch01:FID128:admin> snmpconfig --show mibcapability
[...]
HA-MIB: NO
[...]
HA-TRAP: NO
        fruStatusChanged: NO
        cpStatusChanged: NO
        fruHistoryTrap: NO
[...]

To enable this traps, we don't have go through all the way on setting the mibcapability. There is a non interactive approach available and its quite easy to set it up.
All you need the MIB name and the trap name and this can be enabled in a single line command.

switch01:FID128:admin> snmpconfig --set mibcapability -mib_name HA-MIB -bitmask 1
Operation succeeded

I have enabled HA-MIB, now I need to enable specific traps. here it goes,

switch01:FID128:admin> snmpconfig --enable mibcapability -mib_name HA-MIB -trap_name fruStatusChanged
Operation succeeded
switch01:FID128:admin> snmpconfig --enable mibcapability -mib_name HA-MIB -trap_name cpStatusChanged
Operation succeeded
I have enabled frustatuschange and cpuchange traps. Now we can try to generate the traps.

switch01:FID128:admin> snmptraps --send -trap_name cp-status-change-trap -ip_address 192.168.1.110
Number of traps sent : 1

that's it. it worked well.


1 comment :

Admin Helpline™ © , All Rights Reserved.
Privacy Policy