Enable SNMPv1 & SNMPv2 on Juniper

The lab that we are currently making is starting to look really good, in the past week we decided to use an Observium server for our management server and set it up on a BananaPi which is currently up and running. The thing that we are lacking now is an SNMP and Security configuration on our devices.

Enable SNMPv1 & SNMPv2 on Juniper

The configuration that we use is pretty simple and easy to deploy. To configure SNMP on the EX4200 simply copy the sections bellow and use the following command.

load merge terminal

There is something additional for the SRX240 which i’ll mention a little bit later in this post. Press right click on the terminal and the code will paste.

snmp {
    location lab;
    contact "labguy@juniper.net";
    community private {
        authorization read-write;
    }
}

After you see that everything is pasted use Ctrl+D to end the input. Then commit and if you show the configuration you should be able to see the SNMP section. Keep in mind the indentation.

run show configuration

Some of our devices are SRX’s and they disable such access to the devices, to enable that we had to configure some security zones. Again use

load merge terminal
security {
    zones {
        security-zone trust {
            interfaces {
                ge-0/0/0.0 {
                    host-inbound-traffic {
                        system-services {
                            snmp;
                        }
                    }
                }
            }
        }
    }
}

Ctrl+D and commit should do the job. In this specific case we enabled SNMP service only for interface ge-0/0/0 since this is our management interface on the SRX’s.

Leave a comment