Fortinet white logo
Fortinet white logo

Cookbook

SNMP v1/v2c communities

SNMP v1/v2c communities

An SNMP community is a grouping of equipment for network administration purposes. A single device can belong to multiple communities.

You must add an SNMP community to the FortiGate so that the SNMP manager can receive traps and system information. Up to three communities can be added.

To create a n SNMP v1/v2c community in the GUI:

  1. Go to System > SNMP.
  2. In the SNMP v1/v2c table, click Create New.

  3. Enter a Community Name and enable the community.
  4. In the Hosts section, enter the IP Address and select the Host Type for each SNMP manager.
  5. In the Queries section, enable or disable v1 and v2c queries, then enter the port numbers that the SNMP managers in this community use for them.
  6. In the Traps section, enable or disable v1 and v2c traps, then enter the local and remote port numbers that the SNMP managers in this community use for them.
  7. In the SNMP Events section, enable or disable the events that activate traps in this community.
  8. Click OK.

To create a n SNMP v1/v2c community in the CLI:

config system snmp community
    edit 2
        set name <string>
        set status {enable | disable}
        config hosts
            edit <host_id>
                set ip <ip/mask>
                set source-ip <class_ip>
                set ha-direct {enable | disable}
                set host-type {any | query | trap}
            next
        end
        set query-v1-port <port_number>
        set query-v1-status {enable | disable}
        set query-v2c-port <port_number>
        set query-v2c-status {enable | disable}
        set trap-v1-lport <port_number>
        set trap-v1-rport <port_number>
        set trap-v1-status {enable | disable}
        set trap-v2c-lport <port_number>
        set trap-v2c-rport <port_number>
        set trap-v2c-status {enable | disable}
        set events <events>
    next
end

SNMP v1/v2c communities

SNMP v1/v2c communities

An SNMP community is a grouping of equipment for network administration purposes. A single device can belong to multiple communities.

You must add an SNMP community to the FortiGate so that the SNMP manager can receive traps and system information. Up to three communities can be added.

To create a n SNMP v1/v2c community in the GUI:

  1. Go to System > SNMP.
  2. In the SNMP v1/v2c table, click Create New.

  3. Enter a Community Name and enable the community.
  4. In the Hosts section, enter the IP Address and select the Host Type for each SNMP manager.
  5. In the Queries section, enable or disable v1 and v2c queries, then enter the port numbers that the SNMP managers in this community use for them.
  6. In the Traps section, enable or disable v1 and v2c traps, then enter the local and remote port numbers that the SNMP managers in this community use for them.
  7. In the SNMP Events section, enable or disable the events that activate traps in this community.
  8. Click OK.

To create a n SNMP v1/v2c community in the CLI:

config system snmp community
    edit 2
        set name <string>
        set status {enable | disable}
        config hosts
            edit <host_id>
                set ip <ip/mask>
                set source-ip <class_ip>
                set ha-direct {enable | disable}
                set host-type {any | query | trap}
            next
        end
        set query-v1-port <port_number>
        set query-v1-status {enable | disable}
        set query-v2c-port <port_number>
        set query-v2c-status {enable | disable}
        set trap-v1-lport <port_number>
        set trap-v1-rport <port_number>
        set trap-v1-status {enable | disable}
        set trap-v2c-lport <port_number>
        set trap-v2c-rport <port_number>
        set trap-v2c-status {enable | disable}
        set events <events>
    next
end