Fortinet white logo
Fortinet white logo

CLI Reference

config hosts

config hosts

Description: Configures SNMP hosts settings.

Config hosts

Edit <name>

Set *host-ip {ipv4-address}

Set host-type [any | query | trap]

Unset

Next

Show

Abort

End

Delete <name>

Purge

Show

End

Show

End

Sample command:

FX201E5919000057 (snmp) # show
config snmp
    config sysinfo
        set status enable
        set description this is a test comment
        set contact-info +15082558567
        set location
    end
    config community
        edit comm1
            set name 1
            set status enable
            set hosts host1
            set query-v1-status enable
            set query-v1-port 161
            set query-v2c-status disable
            set query-v2c-port 161
            set trap-v1-status disable
            set trap-v1-lport 162
            set trap-v1-rport 162
            set trap-v2c-status disable
            set trap-v2c-lport 162
            set trap-v2c-rport 162
            set events data-exhausted fgt-backup-mode-switch
        next
    end
    config user
        edit user1
            set name user1
            set status enable
            set notify-hosts host1
            set trap-status enable
            set trap-lport 162
            set trap-rport 162
            set queries disable
            set query-port 161
            set events data-exhausted fgt-backup-mode-switch low-signal-strength
            set security-level auth-priv
            set auth-proto sha1
            set auth-pwd ******
            set priv-proto aes
            set priv-pwd ******
        next
    end
    config hosts
        edit host1
            set host-ip 192.168.1.100/24
            set host-type any
        next
    end
end

config hosts

config hosts

Description: Configures SNMP hosts settings.

Config hosts

Edit <name>

Set *host-ip {ipv4-address}

Set host-type [any | query | trap]

Unset

Next

Show

Abort

End

Delete <name>

Purge

Show

End

Show

End

Sample command:

FX201E5919000057 (snmp) # show
config snmp
    config sysinfo
        set status enable
        set description this is a test comment
        set contact-info +15082558567
        set location
    end
    config community
        edit comm1
            set name 1
            set status enable
            set hosts host1
            set query-v1-status enable
            set query-v1-port 161
            set query-v2c-status disable
            set query-v2c-port 161
            set trap-v1-status disable
            set trap-v1-lport 162
            set trap-v1-rport 162
            set trap-v2c-status disable
            set trap-v2c-lport 162
            set trap-v2c-rport 162
            set events data-exhausted fgt-backup-mode-switch
        next
    end
    config user
        edit user1
            set name user1
            set status enable
            set notify-hosts host1
            set trap-status enable
            set trap-lport 162
            set trap-rport 162
            set queries disable
            set query-port 161
            set events data-exhausted fgt-backup-mode-switch low-signal-strength
            set security-level auth-priv
            set auth-proto sha1
            set auth-pwd ******
            set priv-proto aes
            set priv-pwd ******
        next
    end
    config hosts
        edit host1
            set host-ip 192.168.1.100/24
            set host-type any
        next
    end
end