Enlarge your netmask

NethServer Version: 7.8.2003
Module: nsdc

(Sorry for my bad english)
I have a network of computer with address 192.168.1.x/24 and my nethserver is 192.168.1.253/24 but now i need to add other machine and i need more ip than 256. On my nethserver i change netmask from 24 to 16, my nethserver now is 192.168.1.253/16 via web interface.
No i have some problem to join the new machine.
I think the problem is on the nsdc service because have address 192.168.1.251 but i don’t know the netmask. It’s possible to change the netmask of nsdc service? Can it resolve my problem?

@gecco

Hi Carlo

AFAIK, as soon as you have AD setup (any AUTH Provider for NethServer) you can’t simply change IP or name anymore…

https://docs.nethserver.org/en/v7/accounts.html
here it says: Be aware of the following rule about account providers:

Once NethServer has been bound to an account provider the FQDN cannot be changed any more

This does not say IP, just name…

It may be possible to add in another (new) network to NethServer (This means another NIC must be available)

I’m not sure if and how the netmask can be changed for the NSDC - or if it needs to be changed…
Can you ping the AD IP from the machine on you new subnet (The new box)…?

My 2 cents
Andy

1 Like

no, i can’t

@gecco

Hi

The configuration seems to be stored in

/var/lib/nethserver/db/configuration

-> The NSDC of my home NethServer (Also AD) only contains the IP, no netmask.

It seems this is derived from NethServer (They both have to be in the same network…).
Does a reboot of your NethServer help? (NSDC restart might be sufficient.)

BTW: Is this a native install, or virtualized?

My 2 cents
Andy

yes i found it

if i change netmask of if of nethserver it’s work but if i reboot the ndsc service don’t start, if i start manually it return an error

virtual

@gecco

Actually, it may be easier just to add in another NIC / subnet. Using VMs make thie really easy, no screwdrivers required… :slight_smile:
With your IP range full, you probably have to many AD-dependent hosts to play around…

If changing the Netmask, 23 might be a better choice than 16 (It doubles your Network to 512 hosts…). But still presents the AD problem - changing IP works, but not the subnetmask…

-> Next time you plan / build a network, use maybe IPs not out of 192.168.0.0/24 or 192.168.1.0/24 range.
At home, I’m using 192.168.31.0/24… (31 is a random figure).
If anyone buys a WLan-AP and hooks it into your Network, chances are high the network will stop working, as these use often IPs from that range, and are configured to be DHCP and default gateway.

If making a larger network, use IPs from the 172.16.0.0-172.31.255.255 Range, or a 10.x.x.x network… This gives you more IPs from the outset - and is according to IP best practices… :slight_smile:

Make a Backup of the whole VM before any changes!

My 2 cents
Andy

2 Likes

The netmask is inherited from the bridge: https://github.com/NethServer/nethserver-dc/blob/master/root/etc/e-smith/templates/var/lib/machines/nsdc/etc/systemd/network/green.network/10base#L11

You can try to change the nsdc IP from Cockpit, just select the same IP and it should do the job.

Otherwise try this:

expand-template /var/lib/machines/nsdc/etc/systemd/network/green.network
systemctl restart nsdc

Please @davidep correct me if I’m wrong.

1 Like

ip

:slight_smile:

Change it two times :slight_smile:

2 Likes

yes i know… i post it only for jocking :slight_smile:

1 Like