Hello, everyone!
Today I will continue to show you the SNMP configuration. I will show useful commands for security and commands for check SNMP configuration. This is the last article about SNMP protocol.
5. Command for display information about target host:
TEST(config)#display snmp-agent target-host
{ <cr>||<K> }:
Command:
display snmp-agent target-host
Traphost list:
Target host name: acs
Traphost address: x.x.x.x
Traphost portnumber: 162
Target host parameter: xxx
Target host VPN instance: -
Traphost total number is 1
Informhost list:
Informhost total number is 0
Parameter list trap target host:
Target host parameter: xxx
Parameter name of the target host: xxx
Message mode of the target host: SNMPV2C
Trap version of the target host: v2
Security name of the target host: xxxx
Filter profile name: xxx
Total number is 1
With this command, we can see name, ip address and parametres of the target host.
6. Commands for SNMP security:
TEST(config)#sysman firewall snmp enable
TEST(config)#sysman ip-access snmp x.x.x.x x.x.x.y
These commands are for security – firewall configuration for SNMP protocol. We can use these commands for SNMP, TELNET and SSH. The first command enables a firewall for SNMP protocol, the second command defines ip address for access on the OLT. We have to put a start and end ip address.
With the next commands, we can check the firewall for SNMP:
TEST(config)#display sysman firewall snmp
{ <cr>||<K> }:
Command:
display sysman firewall snmp
Firewall is enabled
TEST(config)#display sysman ip-access snmp
{ <cr>||<K> }:
Command:
display sysman ip-access snmp
IP-Access Table:
----------------------------------------------
Index Start-IPAddr End-IPAddr
----------------------------------------------
1 X.X.1.2 X.X.1.2
----------------------------------------------
7. Command for display statistics:
TEST(config)#display snmp-agent statistics
{ <cr>||<K> }:
Command:
display snmp-agent statistics
109283 Messages delivered to the SNMP entity
0 Messages which were for an unsupported version
0 Messages which used an SNMP community name not known
0 Messages which represented an illegal operation for the community supplied
0 ASN.1 or BER errors in the process of decoding
109283 Messages passed from the SNMP entity
0 SNMP PDUs which had badValue error-status
0 SNMP PDUs which had genErr error-status
0 SNMP PDUs which had noSuchName error-status
0 SNMP PDUs which had tooBig error-status
0 MIB objects retrieved successfully
187 MIB objects altered successfully
0 GetRequest-PDU accepted and processed
0 GetNextRequest-PDU accepted and processed
109208 GetBulkRequest-PDU accepted and processed
109283 GetResponse-PDU sent
75 SetRequest-PDU accepted and processed
0 Trap-PDU sent
0 Inform-PDU sent
0 Inform-PDU received with no acknowledgement
0 Inform-PDU received with acknowledgement
0 SNMP PDUs which had a usmStatsUnsupportedSecLevels error
0 SNMP PDUs which had a usmStatsNotInTimeWindows error
0 SNMP PDUs which had a usmStatsUnknownUserName error
0 SNMP PDUs which had a usmStatsUnknownEngineIDs error
0 SNMP PDUs which had a usmStatsWrongDigests error
0 SNMP PDUs which had a usmStatsDecryptionErrors error
8. Command for display MIB:
TEST(config)#display snmp-agent mib-view
{ <cr>|view-name<S><Length 1-32>||<K> }:
Command:
display snmp-agent mib-view
View name: ViewDefault
MIB Subtree: internet
Subtree mask: (Hex)
Storage-type: nonVolatile
View Type: included
View status: active
View name: ViewDefault
MIB Subtree: iso.0.8802
Subtree mask: (Hex)
Storage-type: nonVolatile
View Type: included
View status: active
...
Total count is 6
9. Command for display MIB modules:
TEST(config)#display snmp-agent mib modules
{ <cr>||<K> }:
Command:
display snmp-agent mib modules
BRIDGE-MIB:
resource : allmibs_mib.bin
mib : BRIDGE-MIB.mib
CLAB-TOPO-MIB:
resource : allmibs_mib.bin
mib : CLAB-TOPO-MIB.mib
DOCS-CABLE-DEVICE-MIB:
resource : allmibs_mib.bin
mib : DOCS-CABLE-DEVICE-MIB.mib
DOCS-DIAG-MIB:
resource : allmibs_mib.bin
mib : DOCS-DIAG-MIB.mib
DOCS-DRF-MIB:
resource : allmibs_mib.bin
mib : DOCS-DRF-MIB.mib
DOCS-IETF-BPI2-MIB:
resource : allmibs_mib.bin
mib : DOCS-IETF-BPI2-MIB.mib
Thank you!
Reference:
Training material for HCIP Acess, V2.5





