How to set IP address on an interface in Fortigate CLI?

Rizwan picture Rizwan · Nov 28, 2019 · Viewed 10.1k times · Source

I want to set IP address on Port1 of Fortinet Fortigate CLI.

I am trying to use the following command:

set ip 192.168.176.0 255.255.255.0

but I am getting the following error before 255.255.255.0:

IP address is illegal Value parse the error

I have tried a lot but failed to understand the reason behind this issue.

Answer

mehrdad rafiee picture mehrdad rafiee · Apr 13, 2020

configure the port1 IP address and netmask.

For example:

config system interface
    edit port1
        set ip 192.168.0.100 255.255.255.0
    end