Cockpit UI Network Config Error

Trying to use the new Cockpit UI to fix the “Green interface can’t be DHCP” issue and it doesn’t seem to work:

So I go to configure, change it to static, and get this message:
Validation failed: IP address can't be the network or broadcast address

It’s not very clear what the issue is or how to resolve it. When I went to the legacy interface I was able to change it to static.

However, I notice that now whenever I make a network change (like changing a GREEN interface to RED, changing the type from DHCP to Static) all the network interfaces go down, according to ip a. I have to reboot the server, and then things come back up with the changes set correctly. Are these related?

The above has you using the same IP address on 2 network interfaces.

Someone with better networking knowledge than myself will know better but maybe it is due to repeated address and also could be the netmask (lower the netmask):
https://ipcalculator.net/
https://www.calculator.net/ip-subnet-calculator.html?cclass=a&csubnet=32&cip=10.0.0.2&ctype=ipv4&printit=0&x=61&y=17

1 Like

That’s interesting, because I did not add anything manually.

Here’s what I did:

  1. I added a Private IP to my VM through the provider’s control panel
  2. I configured it as LAN (DHCP) in the Cockpit interface
  3. I tried to change it to Static through the Cockpit interface
  4. I got the error message shown above (even when there was only 1 WAN and 1 LAN
  5. I used the Legacy interface to change the LAN to Static
  6. All my network interfaces went down (ip a showed DOWN status)
  7. I restarted the machine
  8. It came back online with the LAN connection showing a static IP
  9. I created ANOTHER LAN in my admin console connection to try to reproduce this issue:
    image
  10. I restarted NethServer again
  11. I went to the Cockpit Network page to try to change the network type and got the error above.

I do see that they are showing the same IP, but I’m not sure why because I never typed in any IPs manually, and you can see from the VM admin panel that they are on different subnets.

Taking a closer look at the results of ip a we can see that for some reason eth1 has IPs on both 10.1.* and 10.0.*

I’m not sure what caused this. I will play around to see if I can get rid of the duplicate IP and get back to a single LAN DHCP connection that I’m trying to convert to static.

Edit:
I got it back to 1 LAN using DHCP, trying to switch it to static shows the same error.

This is what ip a shows. I’ve never typed in any of this so, I’m not sure where these defaults are coming from but they seem to be conflicting.

image

255.255.255.255 is not a subnet, it’s only a single address. I think the problem is like @dnutan says the netmask. You should try to change it. Look at the picture he posted, usable host are zero.

Thanks - I gave that a try and it does work fine. I’m a bit curious why the default netmask is 255.255.255.255, If we’re setting a LAN connection isn’t the default LAN mask something like 255.255.255.0 at a minimum?

Also, maybe the message should say something about it not being an available IP address instead of being the network or broadcast address?

When I changed the netmask it did the same thing as usual, it shows this:
image

And then the network interfaces fail to come back up. How can I find out the cause of this?

Maybe explaining a bit better the subnet and connections status of your setup.

Please try

systemctl start network

and post the output.

Here’s the output:
image

To clarify, if I manually do the ifup ... commands, it comes back up, and the networking command you gave me works as well. What I mean is that whenever I make any network change (DHCP / Static) in Cockpit, the network interfaces go down but do not come back until I give them a push, or restart the server.

It’s better to open a new thread about the new problem and link it here.
At the new thread you should give us some more information about your actual network config (interfaces with their configuration).
If you have opened the thread, I can move the replies to the new thread.

Good point - thanks. This topic has been cleared up well enough. If I get tired of the network resets I’ll make a new topic for it.

Thank you all for your support.

1 Like

Hey! I was trying to setup nethserver on a Hetzner VPS and I’m facing these issues as well. I’ve tried the things suggested in the “shorewall spam” issue, here, and the db fixes. I’ve also tried setting up the static network before installing nethserver and I stop being able to connect to my VPS (eg. SSH doesn’t work).
I’m open to some help debugging or fixes…

@ruilvo

Hi

And welcome to the NethServer Community!

Try this:

https://wiki.nethserver.org/doku.php?id=virtual_network_interface&s[]=dummy

It worked for me, also on Hetzner!
Adapt the IPs as needed.

My 2 cents
Andy

Hey!
I guess you only used the external facing IP + that dummy interface… I was trying to do it with a Hetzner-provided internal network!
I’ll give a try, thanks!

Also:
When I tried to do static configs of the interfaces, I can see in the KVM console saying both eth0 link is not ready and eth1 link is not ready. Dunno why.

Edit:
Yeah it works with the dummy interface.

2 Likes