cd /usr/ports
portinstall net-mgmt/net-snmp
cp /usr/local/share/snmp/snmpd.conf.example /usr/local/share/snmp/snmpd.conf
# sec.name source community
com2sec local localhost コミュニテイ
com2sec mynet 192.168.1.0/24 コミュニテイ
####
# Second, map the security names into group names:
# sec.model sec.name
group mygroup1 v1 local
group mygroup1 v2c local
group mygroup1 usm local
group mygroup2 v1 mynet
group mygroup2 v2c mynet
group mygroup2 usm mynet
####
# Third, create a view for us to let the groups have rights to:
# incl/excl subtree mask
view all included .1 80
####
# Finally, grant the 2 groups access to the 1 view with different
# write permissions:
# context sec.model sec.level match read write notif
access mygroup1 "" any noauth exact all none none
access mygroup2 "" any noauth exact all all none