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

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