Fortinet white logo
Fortinet white logo

CLI Reference

config switch-controller snmp-community

config switch-controller snmp-community

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 l2mac

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).

l2mac

Send a trap for Learning event (add/delete/movefrom/moveto).

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 (default = 161).

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 (default = 161).

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 (default = 162).

integer

Minimum value: 0 Maximum value: 65535

162

trap-v1-rport

SNMP v2c trap remote port (default = 162).

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 (default = 162).

integer

Minimum value: 0 Maximum value: 65535

162

trap-v2c-rport

SNMP v2c trap remote port (default = 162).

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

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 l2mac

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).

l2mac

Send a trap for Learning event (add/delete/movefrom/moveto).

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 (default = 161).

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 (default = 161).

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 (default = 162).

integer

Minimum value: 0 Maximum value: 65535

162

trap-v1-rport

SNMP v2c trap remote port (default = 162).

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 (default = 162).

integer

Minimum value: 0 Maximum value: 65535

162

trap-v2c-rport

SNMP v2c trap remote port (default = 162).

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