Fortinet white logo
Fortinet white logo

CLI Reference

config switch-controller snmp-community

config switch-controller snmp-community

Note

This command is available for model(s): FortiGate 1000D, FortiGate 100EF, FortiGate 100E, FortiGate 100F, FortiGate 101E, FortiGate 101F, FortiGate 1100E, FortiGate 1101E, FortiGate 1200D, FortiGate 140E-POE, FortiGate 140E, FortiGate 1500DT, FortiGate 1500D, FortiGate 2000E, FortiGate 200E, FortiGate 200F, FortiGate 201E, FortiGate 201F, FortiGate 2200E, FortiGate 2201E, FortiGate 2500E, FortiGate 3000D, FortiGate 300D, FortiGate 300E, FortiGate 301E, FortiGate 3100D, FortiGate 3200D, FortiGate 3300E, FortiGate 3301E, FortiGate 3401E, FortiGate 3600E, FortiGate 3601E, FortiGate 3700D, FortiGate 3800D, FortiGate 3815D, FortiGate 3960E, FortiGate 3980E, FortiGate 400D, FortiGate 400E Bypass, FortiGate 400E, FortiGate 401E, FortiGate 40F 3G4G, FortiGate 40F, FortiGate 4200F, FortiGate 4201F, FortiGate 4400F, FortiGate 4401F, FortiGate 500D, FortiGate 500E, FortiGate 501E, FortiGate 600D, FortiGate 600E, FortiGate 601E, FortiGate 60E DSLJ, FortiGate 60E DSL, FortiGate 60E-POE, FortiGate 60E, FortiGate 60F, FortiGate 61E, FortiGate 61F, FortiGate 800D, FortiGate 80E-POE, FortiGate 80E, FortiGate 80F Bypass, FortiGate 80F-POE, FortiGate 80F, FortiGate 81E-POE, FortiGate 81E, FortiGate 81F-POE, FortiGate 81F, FortiGate 900D, FortiGate 90E, FortiGate 91E, FortiGateRugged 60F 3G4G, FortiGateRugged 60F, FortiWiFi 40F 3G4G, FortiWiFi 40F, FortiWiFi 60E DSLJ, FortiWiFi 60E DSL, FortiWiFi 60E, FortiWiFi 60F, FortiWiFi 61E, FortiWiFi 61F, FortiWiFi 80F 2R, FortiWiFi 81F 2R 3G4G-POE, FortiWiFi 81F 2R-POE, FortiWiFi 81F 2R.

It is not available for: FortiGate 5001D, FortiGate 5001E1, FortiGate 5001E.

Configure FortiSwitch SNMP v1/v2c communities globally.

config switch-controller snmp-community
    Description: Configure FortiSwitch SNMP v1/v2c communities globally.
    edit <id>
        set events {option1}, {option2}, ...
        config hosts
            Description: Configure IPv4 SNMP managers (hosts).
            edit <id>
                set ip {user}
            next
        end
        set name {string}
        set query-v1-port {integer}
        set query-v1-status [disable|enable]
        set query-v2c-port {integer}
        set query-v2c-status [disable|enable]
        set status [disable|enable]
        set trap-v1-lport {integer}
        set trap-v1-rport {integer}
        set trap-v1-status [disable|enable]
        set trap-v2c-lport {integer}
        set trap-v2c-rport {integer}
        set trap-v2c-status [disable|enable]
    next
end

config switch-controller snmp-community

Parameter

Description

Type

Size

Default

events

SNMP notifications (traps) to send.

option

-

cpu-high mem-low log-full intf-ip ent-conf-change

Option

Description

cpu-high

Send a trap when CPU usage too high.

mem-low

Send a trap when available memory is low.

log-full

Send a trap when log disk space becomes low.

intf-ip

Send a trap when an interface IP address is changed.

ent-conf-change

Send a trap when an entity MIB change occurs (RFC4133).

id

SNMP community ID.

integer

Minimum value: 0 Maximum value: 4294967295

0

name

SNMP community name.

string

Maximum length: 35

query-v1-port

SNMP v1 query port.

integer

Minimum value: 0 Maximum value: 65535

161

query-v1-status

Enable/disable SNMP v1 queries.

option

-

enable

Option

Description

disable

Disable SNMP v1 queries.

enable

Enable SNMP v1 queries.

query-v2c-port

SNMP v2c query port.

integer

Minimum value: 0 Maximum value: 65535

161

query-v2c-status

Enable/disable SNMP v2c queries.

option

-

enable

Option

Description

disable

Disable SNMP v2c queries.

enable

Enable SNMP v2c queries.

status

Enable/disable this SNMP community.

option

-

enable

Option

Description

disable

Disable SNMP community.

enable

Enable SNMP community.

trap-v1-lport

SNMP v2c trap local port.

integer

Minimum value: 0 Maximum value: 65535

162

trap-v1-rport

SNMP v2c trap remote port.

integer

Minimum value: 0 Maximum value: 65535

162

trap-v1-status

Enable/disable SNMP v1 traps.

option

-

enable

Option

Description

disable

Disable SNMP v1 traps.

enable

Enable SNMP v1 traps.

trap-v2c-lport

SNMP v2c trap local port.

integer

Minimum value: 0 Maximum value: 65535

162

trap-v2c-rport

SNMP v2c trap remote port.

integer

Minimum value: 0 Maximum value: 65535

162

trap-v2c-status

Enable/disable SNMP v2c traps.

option

-

enable

Option

Description

disable

Disable SNMP v2c traps.

enable

Enable SNMP v2c traps.

config hosts

Parameter

Description

Type

Size

Default

id

Host entry ID.

integer

Minimum value: 0 Maximum value: 4294967295

0

ip

IPv4 address of the SNMP manager (host).

user

Not Specified

config switch-controller snmp-community

config switch-controller snmp-community

Note

This command is available for model(s): FortiGate 1000D, FortiGate 100EF, FortiGate 100E, FortiGate 100F, FortiGate 101E, FortiGate 101F, FortiGate 1100E, FortiGate 1101E, FortiGate 1200D, FortiGate 140E-POE, FortiGate 140E, FortiGate 1500DT, FortiGate 1500D, FortiGate 2000E, FortiGate 200E, FortiGate 200F, FortiGate 201E, FortiGate 201F, FortiGate 2200E, FortiGate 2201E, FortiGate 2500E, FortiGate 3000D, FortiGate 300D, FortiGate 300E, FortiGate 301E, FortiGate 3100D, FortiGate 3200D, FortiGate 3300E, FortiGate 3301E, FortiGate 3401E, FortiGate 3600E, FortiGate 3601E, FortiGate 3700D, FortiGate 3800D, FortiGate 3815D, FortiGate 3960E, FortiGate 3980E, FortiGate 400D, FortiGate 400E Bypass, FortiGate 400E, FortiGate 401E, FortiGate 40F 3G4G, FortiGate 40F, FortiGate 4200F, FortiGate 4201F, FortiGate 4400F, FortiGate 4401F, FortiGate 500D, FortiGate 500E, FortiGate 501E, FortiGate 600D, FortiGate 600E, FortiGate 601E, FortiGate 60E DSLJ, FortiGate 60E DSL, FortiGate 60E-POE, FortiGate 60E, FortiGate 60F, FortiGate 61E, FortiGate 61F, FortiGate 800D, FortiGate 80E-POE, FortiGate 80E, FortiGate 80F Bypass, FortiGate 80F-POE, FortiGate 80F, FortiGate 81E-POE, FortiGate 81E, FortiGate 81F-POE, FortiGate 81F, FortiGate 900D, FortiGate 90E, FortiGate 91E, FortiGateRugged 60F 3G4G, FortiGateRugged 60F, FortiWiFi 40F 3G4G, FortiWiFi 40F, FortiWiFi 60E DSLJ, FortiWiFi 60E DSL, FortiWiFi 60E, FortiWiFi 60F, FortiWiFi 61E, FortiWiFi 61F, FortiWiFi 80F 2R, FortiWiFi 81F 2R 3G4G-POE, FortiWiFi 81F 2R-POE, FortiWiFi 81F 2R.

It is not available for: FortiGate 5001D, FortiGate 5001E1, FortiGate 5001E.

Configure FortiSwitch SNMP v1/v2c communities globally.

config switch-controller snmp-community
    Description: Configure FortiSwitch SNMP v1/v2c communities globally.
    edit <id>
        set events {option1}, {option2}, ...
        config hosts
            Description: Configure IPv4 SNMP managers (hosts).
            edit <id>
                set ip {user}
            next
        end
        set name {string}
        set query-v1-port {integer}
        set query-v1-status [disable|enable]
        set query-v2c-port {integer}
        set query-v2c-status [disable|enable]
        set status [disable|enable]
        set trap-v1-lport {integer}
        set trap-v1-rport {integer}
        set trap-v1-status [disable|enable]
        set trap-v2c-lport {integer}
        set trap-v2c-rport {integer}
        set trap-v2c-status [disable|enable]
    next
end

config switch-controller snmp-community

Parameter

Description

Type

Size

Default

events

SNMP notifications (traps) to send.

option

-

cpu-high mem-low log-full intf-ip ent-conf-change

Option

Description

cpu-high

Send a trap when CPU usage too high.

mem-low

Send a trap when available memory is low.

log-full

Send a trap when log disk space becomes low.

intf-ip

Send a trap when an interface IP address is changed.

ent-conf-change

Send a trap when an entity MIB change occurs (RFC4133).

id

SNMP community ID.

integer

Minimum value: 0 Maximum value: 4294967295

0

name

SNMP community name.

string

Maximum length: 35

query-v1-port

SNMP v1 query port.

integer

Minimum value: 0 Maximum value: 65535

161

query-v1-status

Enable/disable SNMP v1 queries.

option

-

enable

Option

Description

disable

Disable SNMP v1 queries.

enable

Enable SNMP v1 queries.

query-v2c-port

SNMP v2c query port.

integer

Minimum value: 0 Maximum value: 65535

161

query-v2c-status

Enable/disable SNMP v2c queries.

option

-

enable

Option

Description

disable

Disable SNMP v2c queries.

enable

Enable SNMP v2c queries.

status

Enable/disable this SNMP community.

option

-

enable

Option

Description

disable

Disable SNMP community.

enable

Enable SNMP community.

trap-v1-lport

SNMP v2c trap local port.

integer

Minimum value: 0 Maximum value: 65535

162

trap-v1-rport

SNMP v2c trap remote port.

integer

Minimum value: 0 Maximum value: 65535

162

trap-v1-status

Enable/disable SNMP v1 traps.

option

-

enable

Option

Description

disable

Disable SNMP v1 traps.

enable

Enable SNMP v1 traps.

trap-v2c-lport

SNMP v2c trap local port.

integer

Minimum value: 0 Maximum value: 65535

162

trap-v2c-rport

SNMP v2c trap remote port.

integer

Minimum value: 0 Maximum value: 65535

162

trap-v2c-status

Enable/disable SNMP v2c traps.

option

-

enable

Option

Description

disable

Disable SNMP v2c traps.

enable

Enable SNMP v2c traps.

config hosts

Parameter

Description

Type

Size

Default

id

Host entry ID.

integer

Minimum value: 0 Maximum value: 4294967295

0

ip

IPv4 address of the SNMP manager (host).

user

Not Specified