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

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?

Maybe I am the one noob/ignorant here, but… for what i know about routing, the interface is right. The gateway cannot be reached with that kind of IP/Subnet.
However… I never managed something similar for network connection.

And also, I don’t know if a manually configuration put into eSmith/Nethserver db could override data verification and been correctly applied.

@filippo_carletti: I have found one bug!

The IP is not in /etc/hosts but it works.

Please, list in detail all the steps needed to reproduce the bug.

@filippo_carletti: I have done several tests, I give you the process:

1/ Bug with Cockpit Dashboard Network: Impossible to select the good IP Address / Netmask / Gateway (Validation failed: IP address can't be the network or broadcast address.) and other options (there is only IP address / Netmask / Gateway / Label (optional)).

2/ Bug with the core: The /etc/sysconfig/network-scripts/route-ensXX1 manually route file is removed, I have found to add a “manual” action but it must be “automatic”.


In ESXI, for the NethServer VM:
2 virtual network cards, one for WAN with MAC Address, one for LAN.

Install NethServer “without connection”, after it, connect with root account in console.

WAN:

db networks set ensXX1 ethernet role red hwaddr AB:CD:EF:GH:IJ:KL
 ipaddr XXX.XXX.XXX.XXX netmask 255.255.255.255 gateway YYY.YYY.YYY.254
 onboot yes bootproto none nm_controlled no userctl no
 ipv6init no peerdns no arp yes
 name ensXX1 defroute yes

signal-event interface-update

LAN:

db networks set ensXX2 ethernet role green
 ipaddr 192.168.1.1 netmask 255.255.255.0 gateway 192.168.1.254
 name ensXX2

signal-event interface-update


There is a problem: ip route show:

default via 192.168.1.254 dev ensXX2
192.168.1.0/24 dev ensXX2 proto kernel scope link src 192.168.1.1

It is in the code:

I have done for ensXX1 configuration: defroute yes.

Now, I must to create an action, the ip route del default must not be in this file…

vi /etc/e-smith/events/actions/ovh-route

#!/bin/bash

ip route del default

GATEWAY_VM=YYY.YYY.YYY.254
INTERFACE=ensXX1

cat > /etc/sysconfig/network-scripts/route-$INTERFACE << EOF
$GATEWAY_VM dev $INTERFACE
default via $GATEWAY_VM dev $INTERFACE
EOF

ln -sf /etc/e-smith/events/actions/ovh-route /etc/e-smith/events/static-routes-save/S33ovh-route

chmod 0554 /etc/e-smith/events/static-routes-save/S33ovh-route
chown root:root /etc/e-smith/events/static-routes-save/S33ovh-route

signal-event interface-update

ip route show:

default via YYY.YYY.YYY.254 dev ensXX1
YYY.YYY.YYY.254 dev ensXX1 scope link
192.168.1.0/24 dev ensXX2 proto kernel scope link src 192.168.1.1

First Cockpit Dashboard connection:
→ FQDN
→ Organization settings
→ Updates

@filippo_carletti: What do you think about this bug?

In more, it is normal that the IP Address of the WAN (red role) is not in /etc/hosts file?

Maybe @giacomo can help too?

@filippo_carletti : Do you will reply about this problem and propose a solution?

I spent some time on it, but I failed to reproduce it in my lab.
Could you give me full access to yours?

I have prepared for you a VM with fresh NS install (with default setting) and only the edition of the ifcfg-ensXXX file and creation of the route-ensXXX file and ifdown ensXXX and ifup ensXXX to give you access to the VM.

I have done that I have specified here:

I have not done that I have noted here:

I have not done a first connection in Cockpit to show you all problems, when you will change the default FQDN, you will lost the connection, I will need to connect in console to add again the route.

After the second connection in Cockpit, you will need to change the company name.

You will see Network section and the next problem…

The ensXXX is not in red, impossible to change it, impossible to put the real good GATEWAY because the IP_FAILOVER (not the IP of the ESXI / Proxmox) / NETMASK, etc.

Please read the LAN part too here:

Note in Network section, there is a “Routing info” button, it is read-only: impossible to change in Cockpit.

I have sent you an email.

@filippo_carletti, @giacomo: I do not find the solution after several weeks of patience.
Can you solve it?

Regarding the cockpit validator, I can’t fix it.
Every time you need to bypass a validator, you need to use the configuration database as explained above.

@filippo_carletti: I have sent you an email.

I confirm that all problems exist to other outsourced hosting company…

More informations here:

These problems are for NethServer 7 and NethServer 8 too.

  • “Validation failed: IP address can’t be the network or broadcast address”
  • And the automatic bad default route: Code search results · GitHub

@ElKorbo

DigitalOcean provides it’s own NethServer droplet to use, works there correctly, so I don’t see why you put DigitalOcean here…

OVH: I thought all the smart customers left after the Strassbourg fire last year…

  • OVH was stupid enough to put the UPS on the lowest Container - the only thing that will burn!
  • OVH had no backups in the other three buildings. so all data lost!

My 2 cents
Andy

1 Like