Potentially lost of connection with the Nethserver instance


#1

Hello,

I want to submit a fact that occurred with me and I want to share with you to see how to avoid lost connection with the Nethserver instance…

For exemple.
I configure the network with a static IP address( i.e. 192.168.200.1 ) and configure a DHCP server to distribute a range of IP (192.168.200.100 to 192.168.200.254 )
Now, I go to change the static IP address for 192.168.2.1… If I go to the configuration / network module and edit the ip configuration, I will lost the connection because the DHCP server will continue to distribute the older IP range.
You will tell me it’s easy to change the client IP address temporary to reconnect to the Nethserver instance, but If the client is a WIFI client, and the AP point is in the DHCP range… The connection is really lost.

I will make the suggestion when there`s a DHCP server attach on a static IP address. When a static IP address is change, to check the DHCP server to eventually change the IP range too.


(Stefano) #2

sorry but this is, IMHO, not a NS issue…
no appliance (pinters, AP and so on ) should be on dhcp, 'cause such a setup is prone to many troubles
moreover, changing lan addressing range is not a thing you do frequently… in a production environment, almost never
delegating all the “smartness” to NS is not smart, 'cause this approach will lead to less control


#3

I’m 98% agree with you except two things…
I use the dnsmasq capacity to apply pseudo static IP addresses to my AP and my printer


(Stefano) #4

if so, it’s a choice of yours. :slight_smile:

almost any other product dhcp server capable out there behave in the same way than NS… and the reason is that some things can not be delegated, but they depends on “smartness” of the guy sitting between keyboard and chair :wink:


#5

So, I make the suggestion when there`s a DHCP server attach on a static IP address. When a static IP address is change, to check the DHCP server to eventually allow to change the IP range too.
and/or put an advertisement that the change will affect the DHCP server and allow to change the DHCP server before apply change…
To make things smarter :sunglasses:


(Artem Fedai) #6

it is an Enchancement , i’ll check code , thanks to @Jim


(Artem Fedai) #7

@giacomo @filippo_carletti
https://github.com/NethServer/nethserver-dnsmasq/blob/master/root/etc/e-smith/events/actions/dhcp-range-cleanup
doesnot clean up dhcp db :
DhcpRangeEnd=10.1.31.254
DhcpRangeStart=10.1.0.1

that is why dnsmasq restart with old paramets


(Davide Principi) #8

This is not a bug, it’s a missing feature (I would not implement) :wink:


(Artem Fedai) #9

Why? It is so :slight_smile:


(Davide Principi) #10

It’s only my point of view:

Where do you fix this bug? what file/line of code must be changed?

  • The code does not exist yet => it’s a new feature/enhancement
  • The code exists => it’s a bug

Someone else may think (in a more debatable way):

What is the actual behavior of the system? is this what I expect?

  • expectation failed => bug

#11

For @nas it’s a bug, for @davidep it’s a missing feature, personnally, I don’t know, but.:

  • when you want to change the ip adress, the Dhcp server isn’t update with the new ip adress and ip range. You can lost the connection with Netserver.
  • when you want to change in first the dhcp server for the future Ip change… You can’t. The Dhcp server must be setup on an existing adress…

So, what do do? There’s a little trap here !


#12

Todat, with my electrical provider… I had an system injury, one of my NIC was fried.

With lot of chance, it was only the NIC daugther board than fry, the two NIC in the motherboard still okay.

But I had to change configuration… And lost the connection with the NethServer instance due to the DHCP server that was not change at the same time the IP configuration is.


(Artem Fedai) #13

@Jim it is a known issue, maybe in 7 developers will fix such behaviour.


#14

I know but nobody can’t escape this trap!
It must be corrected