FortiGate
FortiGate Next Generation Firewall utilizes purpose-built security processors and threat intelligence security services from FortiGuard labs to deliver top-rated protection and high performance, including encrypted traffic.
AnthonyH
Staff
Staff
Article Id 269626
Description This articles describes how to fix an error that occurs when assigning an IP address to the interface.
Scope FortiGate.
Solution

The network interface follows an IP address and subnet requirement. Depending on the subnet mask, such as 192.168.1.0/24, there are reserved IP addresses that cannot be used. In this case, the first three octets are for the network portion and the last address (.255) is for the broadcast address.

 

The following error may be encountered when trying to assign an IP address to an interface:

 

Picture1.png

 

Error in the CLI:

 

FortiGate # config system interface

FortiGate (interface) # edit "port5"

FortiGate (port5) # set ip 192.168.1.0 255.255.255.0

ip address is illegal

 

value parse error before '255.255.255.0'
Command fail. Return code -8

 

When assigning an IP address/netmask, the value provided is assessed based on the subnet mask provided. There is a network portion that is reserved and a host portion for usable addresses.

 

In a /24 subnet, red is the network portion that cannot be used, and blue are the the usable IP addresses: 192.168.1.1-254.

 

A /24 subnet (255.255.255.0) has a valid range of 2^(32-24) - 2 valid IP addresses (254). This means any non-reserved IP address can be chosen from 192.168.1.1-192.168.1.254.

 

Below is an example of an available IP address which is not a used address, a broadcast address, or a part of the network address:

 

Picture2.png

 

Related article

Technical Tip: Getting error message 'IP address is illegal' on setting an IP address to the interfa...