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:
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'
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:
Related article: |
The Fortinet Security Fabric brings together the concepts of convergence and consolidation to provide comprehensive cybersecurity protection for all users, devices, and applications and across all network edges.
Copyright 2025 Fortinet, Inc. All Rights Reserved.