Enable SNMP on a Juniper Switch (EX2200)

The following was used to enable SNMP on Juniper EX2200 series switches. It will apply to JunOS based switches aswell. I use SNMP with Cacti, an oldie but a goodie. I also use the data to populate and create network weathermaps. That’s another post.

Create a ‘public’ SNMP community, and associate that with a list of intended clients/subnets.

Dive into configure mode on your switch and use something like the following :

configure
set snmp contact "Company IT"
set snmp name “NZ-Auck-ALB-01” 
set snmp description “Office”
set snmp location “Rack 1” contact “[email protected]”
set snmp community public authorization read-only
set snmp client-list list0 192.168.2.16/32
set snmp community public client-list-name list0
commit and-quit

The command “show snmp” should now give you something that looks a bit like this :

snmp
   name “NZ-Auck-ALB-01”;
   contact "Company IT";
   description “Albany Office”;
   location "Rack 1";
   client-list list0 {
       192.168.2.16/32;
   }
   community public {
       authorization read-only;
       client-list-name list0;
   }

You can do a quick test from one of the valid clients. Retrieve the switches uptime using “snmpget”.

snmpget -v2c -mALL 192.168.27.15 -c public .1.3.6.1.2.1.1.3.0

Boom. You’re good to get some data.

Enable SNMP on a Juniper Switch (EX2200)