Impossible to add good network values "Validation failed: IP address can't be the network or broadcast address" - OVH (ESXI/Proxmox) with screenshots

Hello,

There is a problem in Dashboard → Network, and impossible to change bad values by good.
I have added screenshots to show the problem.

OVH settings for VM (IP is not the same range than GATEWAY_IP):

  • GATEWAY_IP: XXX.XXX.XXX.254
  • IP: YYY.YYY.YYY.0 (in this case, ending by 0, but it is only one)
  • NETMASK: 255.255.255.255

There is this error: Validation failed: IP address can't be the network or broadcast address.

Screenshots:






And it is impossible to change the green LAN interface to red WAN interface because impossible to change values in this interface.

I have installed NethServer on ESXI and in OVH, I have different problems:

Same problem with Proxmox VE because it is identical settings.

It is asking for a specific single IP address not the network address (x.x.x.0), that’s why the validation fails.

1 Like

@dnutan: Thanks for your answer but it is the good network settings:

There is a bug.

@ElKorbo - No, there is no bug there.

https://www.2000trainers.com/cisco-ccna-05/ccna-ip-addressing-rules/

https://jodies.de/ipcalc

@GG_jr: You can look here the configuration with ESXI and Proxmox VE:

The “IP_FAILOVER” for VM is linked to MAC Address of the VM, it is not same than ESXI/Proxmox VE (main IP is for server management).

Example of dedicated server (ESXI or Proxmox VE):

  • IP: 195.XXX.XXX.XXX
  • Gateway: 195.XXX.XXX.254

VM (number 1, etc):

  • IP_FAILOVER: 100.XXX.XXX.XXX
  • Gateway: 195.XXX.XXX.254
  • Netmask: 255.255.255.255

It is: 100.XXX.XXX.XXX/32.

These just aren’t valid. The netmask isn’t valid at all (you have to leave at least 2 bits for the “host” portion of the address, so 252 is the highest valid value for the last octet), it’s unlikely the IP address is valid (unless you’re on a subnet larger than Class C), and the IP and its gateway both need to be in the same subnet (which is literally impossible with the subnet mask you’ve given). Either OVH gave you bogus information, you misunderstood what they gave you, or you’ve redacted it in such a way that makes it impossible to understand what’s happening.

Edit: Why are you posting links to information on configuring ESXi and Proxmox? Neither of those appears to be relevant to what you’re trying to do in Nethserver.

1 Like

The configuration specified by OVH is good.

The problem in NethServer is not new, example here:

I use both VMWare and Proxmox, on both platforms having several NethServer VMs, and I have never encountered the problem reported by you.

I try to explain you the difference between main dedicated server IP (ESXI/Proxmox) for management and VM (like NethServer) IP and I have shown you the details of the VM configuration specified in OVH docs (RedHat/CentOS) with IP/GW/NR…

@danb35, @GG_jr: CentOS VM configuration details:

You can see other people with the problem here:

The problem is that the Cockpit Dashboard - Network section can not permit to add the configuration, screenshots previously here:

When we edit manually (without Cockpit Dashboard), it works (but it is modified by NethServer when we update/change other settings) after manually edition of /etc/sysconfig/network-scripts/ifcfg-ensXXX and creation of /etc/sysconfig/network-scripts/route-ensXXX.

These instructions don’t say to use a .0 IP address for your VM, nor do they say to use a /32 subnet mask.

IMO, this has nothing to do with installing NethServer on OVH, just configuring NIC on NethServer.
I think you are facing two different problems.

Of course, all “IP_FAILOVER” from OVH is possible, it is automatically generated after new IP payement.
The problem is not the IP but the configuration is impossible in Cockpit Dashboard - Network.

When we do a manual edition of file, it works but it is remove when we change settings, updates, …

Yes, it is. A .0 IP (on a Class C or smaller subnet) means it’s a network address, not a host address. That’s why Cockpit is (rightly) refusing to use it.

It does not work with Cockpit Dashboard - Network but it works if we edit manually files but it is removed when we change settings, updates, …

It is same with XXX.XXX.XXX.1.

The problem is the IP is not on the same gateway.

Example:

  • IP: 1.2.3.4
  • Gateway: 1.2.3.254 works
  • Gateway: 5.6.7.8 does not work

@filippo_carletti: I have seen that you have worked on a part of this problem previously, maybe you can add a feature to have the good network in all place (Cockpit Dashboard - Network and /etc/sysconfig/network-scripts/ifcfg-ensXXX) and the route /etc/sysconfig/network-scripts/route-ensXXX?

In this case, the network card is ensXXX but it can be ethX etc.

For the first part, I think that the solution will be to add:
A feature to accept an IP address with a gateway in another range.

Maybe you can add the “HWADDR” form too?

Please check that your setup is working fine using the network configuration database (using your example data):

db networks setprop ensXXX gateway 5.6.7.8
signal-event interface-update

Thanks for your reply!

db networks setprop ensXXX role red and db networks setprop ensXXX gateway 5.6.7.8 work and without signal-event interface-update

Screenshots:

Note: 192.168.1.1 and 255.255.255.0 are always in Cockpit Dashboard - Network instead of the good IP and the 255.255.255.255 specified in files.

@filippo_carletti: This line works perfectly, for example:
db networks set ensXXX ethernet role red hwaddr XX:XX:XX:XX:XX:XX ipaddr XX.XXX.XXX.0 netmask 255.255.255.255 gateway XXX.XXX.XXX.254 onboot yes bootproto none nm_controlled no userctl no ipv6init no peerdns no arp yes name ensXXX defroute yes

The /etc/sysconfig/network-scripts/ifcfg-ensXXX has all lines.

After a signal-event interface-update, the connection is down, the route has been removed, I create again with vi /etc/sysconfig/network-scripts/route-ensXXX and it works:

GATEWAY_IP dev ensXXX
default via GATEWAY_IP dev ensXXX

Screenshots:

The problem is in Cockpit Dashboard - Network, how it is possible to solve the main bug (Validation failed: IP address can't be the network or broadcast address) and add the feature for OVH (and other ISP) by default without manual modifications/adding?