●snmp
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
snmpwalk -v 1 -c コミュニテイ IPアドレス
snmpwalk -v 2c -c コミュニテイ IPアドレス
vi /etc/rc.conf
snmpd_enable="YES"
snmpd_flags="-a -p /var/run/snmpd.pid"
snmptrapd_enable="YES"
snmptrapd_flags="-a -p /var/run/snmptrapd.pid"
/usr/local/etc/rc.d/snmptrapd.sh start
/usr/local/etc/rc.d/snmpd.sh start