Changes between Version 2 and Version 3 of NSM2021/Agenda/SNMP-Hands-on
- Timestamp:
- May 10, 2021, 2:10:11 PM (4 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
NSM2021/Agenda/SNMP-Hands-on
v2 v3 73 73 == Configuration of SNMP Agent on Routers and Switches == 74 74 75 ==== Cisco ====75 ==== Cisco Router ==== 76 76 77 77 connect to your router and go to configure mode. … … 84 84 {{{ 85 85 Router(config)# access-list 99 permit 192.248.6.0 255.255.255.0 86 Router(config)# snmp-server community <class passowrd>ro 9987 Router(config)# snmp-server group ReadGroupv3 auth access 9988 Router(config)# snmp-server user admin ReadGroupv3 auth sha <Class Password>86 Router(config)# snmp-server community NetCommunity ro 99 87 Router(config)# snmp-server group GroupR v3 auth access 99 88 Router(config)# snmp-server user admin GroupR v3 auth sha <Class Password> 89 89 Router(config)# snmp-server ifindex persist 90 Now let's exit and save this new configuration to the routers permanent config. 90 91 After all make sure to save the configuration to the router. 91 92 92 93 Router(config)# exit … … 95 96 }}} 96 97 97 ==== HP ==== 98 === Cisco Switch === 99 {{{ 100 Router(config)# access-list 99 permit 192.248.6.0 255.255.255.0 101 Switch(config)# snmp-server group GroupR v3 auth access 99 102 Switch(config)# snmp-server community NetCommunity ro 99 103 Switch(config)# snmp-server user admin GroupR v3 auth sha NetAdmin 104 Switch(config)# snmp-server contact Lalantha <lalantha@learn.ac.lk> 105 Switch(config)# snmp-server location ICT-Center, Peradeniya 106 107 ==== HP Router ==== 98 108 Connect to the Router and go to config mode 99 109 {{{ … … 112 122 }}} 113 123 124 === HP Aruba/Procurve === 125 {{{ 126 Switch-HP#conf 127 Switch-HP(config)# snmpv3 enable 128 SNMPv3 Initialization process. 129 Creating user 'initial' 130 Authentication Protocol: MD5 131 Enter authentication password: ******** 132 Privacy protocol is DES 133 Enter privacy password: ******** 134 User 'initial' has been created 135 Would you like to create a user that uses SHA? [y/n] y 136 Enter user name: admin 137 Authentication Protocol: SHA 138 Enter authentication password: ******** 139 Privacy protocol is DES 140 Enter privacy password: ******** 141 User creation is done. SNMPv3 is now functional. 142 Would you like to restrict SNMPv1 and SNMPv2c messages to have read only 143 access (you can set this later by the command 'snmp restrict-access')? [y/n] n 144 }}} 145 146 Now you can add the user to the group GroupR, 147 {{{ 148 Switch-HP(config)# snmpv3 group GroupR user admin sec-model ver3 149 }}} 150 151 Later you can remove initial user, 152 {{{ 153 Switch-HP(config)#no snmpv3 user initial 154 }}} 155 114 156 == Testing SNMP == 115 157 Now we have both a SNMP Manager and SNMP Agent. To check that your SNMP installation works, run the snmpstatus command on the SNMP Manager host.