SNMP v1/v2c communities
An SNMP community is a grouping of equipment for network administration purposes. You must configure your FortiPortal to belong to at least one SNMP community so that community’s SNMP managers can query the FortiPortal system information and receive SNMP traps from it.
These SNMP communities do not refer to the FortiGate devices the FortiPortal system is managing. |
Each community can have a different configuration for SNMP traps and can be configured to monitor different events. You can add the IP addresses of up to eight hosts to each community. Hosts can receive SNMP device traps and information.
To create an SNMP community, use the following CLI syntax:
config system snmp community
edit <index_number>
set status {enable | disable}
set name <community_name>
set query-v1-port <integer>
set query-v1-status {enable | disable}
set query-v2c-port <integer>
set query-v2c-status {enable | disable}
set trap-v1-rport <integer>
set trap-v1-status {enable | disable}
set trap-v2c-rport <integer>
set trap-v2c-status {enable | disable}
set events <events_list>
config hosts
edit <host_number>
set interface <interface_name>
set ip <ipv4_address>
end
end
Variable |
Description |
---|---|
<index_number> |
Enter the index number of the community in the SNMP communities table. Enter an unused index number to create a new SNMP community. |
status {enable | disable} |
Enable/disable this SNMP community. Default: |
name <community_name> |
Enter a name to identify the SNMP community. Note: This name cannot be edited later. |
query-v1-port <integer> |
Enter the SNMPv1 query port number the FortiPortal unit uses to send a v1 query to the FortiPortal unit in this community. Note: By default, the SNMPv1 query port number is 161. Range: 1 to 65535. |
query-v1-status {enable | disable} |
Enable/disable SNMPv1 queries for this SNMP community. Default: |
query-v2c-port <integer> |
Enter the SNMPv2c query port number the FortiPortal unit uses to send a v2c query to the FortiPortal unit in this community. Note: By default, the SNMPv2c query port number is 161. Range: 1 to 65535. |
query-v2c-status {enable | disable} |
Enable/disable SNMPv2c queries for this SNMP community. Default: |
trap-v1-rport <integer> |
Enter the remote port number the FortiPortal unit uses to send v1 traps to the FortiPortal unit in this community. Note: By default, the remote port number is 162. Range: 1 to 65535. |
trap-v1-status {enable | disable} |
Enable/disable SNMPv1 traps for this SNMP community. Default: |
trap-v2c-rport <integer> |
Enter the remote port number the FortiPortal unit uses to send v2c traps to the FortiPortal unit in this community. Note: By default, the remote port number is 162. Range: 1 to 65535. |
trap-v2c-status {enable | disable} |
Enable/disable SNMPv2c traps for this SNMP community. Default: |
events <events_list> |
Enable the events that will cause SNMP traps to be sent to the community.
Default: All events enabled. Note:The |
hosts variable |
|
<host_number> |
Enter the index number of the host in the table. Enter an unused index number to create a new host. |
interface <interface_name> |
Enter the name of the interface that connects to the network where this SNMP manager is located. Note: This must be done if the SNMP manager is on the Internet or behind a router. |
ip <ipv4_address> |
Enter the IP address and netmask of an SNMP manager. Note: By default, the IP address is 0.0.0.0 so that any SNMP manager can use this SNMP community. |
Example
This example shows how to add a new SNMP community named SNMP_Com1.
In this example, the community is added, given a name, and all v2c functionality is disabled because this community is SNMP v1 compatible. After the community is configured, the host, or the SNMP manager is added.
The SNMP manager IPv4 is 192.168.20.34, and the interface is internal.
config system snmp community
edit 1
set name SNMP_Com1
set query-v2c-status disable
set trap-v2c-status disable
config hosts
edit 1
set interface internal
set ip 192.168.10.34
end
end