1

I have my own LAN for a computing cluster which is separate from my household LAN. The cluster LAN has a WiFi router in it which provides DHCP services. The cluster LAN has no connection to the public internet of its own, the public internet can be accessed from the household LAN only.

I have configured my desktop computer (Ubuntu 16.04) to share its internet access (which it gets from a WiFi connection to the household LAN) to the cluster LAN via Ethernet. I am doing this by setting the Ethernet settings in Ubuntu's Network Manager to "Shared to other computers". This works fine and when the desktop is powered up and connected to both WiFi and Ethernet, I can access the public internet from the cluster LAN.

However, if I boot the machines on the cluster LAN after the desktop is booted, they do not receive their reserved IP addresses from the DHCP server running on the WiFi router in the cluster LAN, but different addresses instead. I would assume that this is because Ubuntu's Network Manager also provides a DHCP server built-in and this is taking precedence over the DHCP server in the cluster LAN.

Is it possible to disable the DHCP server that network manager (presumably) provides when sharing internet connection in this way, or will I have to resort to a different method to share the internet connection only?

  • This is an XY Problem. Please edit your question and specify what you're trying to accomplish here as I see two solutions: Manual and 3 instead of 2 routers or 2 routers with the second one being in the DMZ of the first one but Shared to other computers is definitely not the way to go if I think I guessed right what you're trying to accomplish here... ¯\_(ツ)_/¯ – Fabby Aug 5 '19 at 18:44
0

By sharing its internet connection, your desktop is acting as a router to the cluster LAN. You should be able to see the instance of dnsmasq running on your desktop that provides those IP addresses:

lar@rpi-lgr13-0199:~$ ps ax | grep dnsmasq
  817 ?        S      0:00 /usr/sbin/dnsmasq --conf-file --no-hosts --keep-in-foreground --bind-interfaces --except-interface=lo --clear-on-reload --strict-order --listen-address=10.42.0.1 --dhcp-range=10.42.0.10,10.42.0.254,60m --dhcp-option=option:router,10.42.0.1 --dhcp-lease-max=50 --pid-file=/var/run/nm-dnsmasq-enxb827eb017088.pid --conf-dir=/etc/NetworkManager/dnsmasq-shared.d
 1013 ?        S      0:00 /usr/sbin/dnsmasq --no-resolv --keep-in-foreground --no-hosts --bind-interfaces --pid-file=/var/run/NetworkManager/dnsmasq.pid --listen-address=127.0.1.1 --cache-size=0 --conf-file=/dev/null --proxy-dnssec --enable-dbus=org.freedesktop.NetworkManager.dnsmasq --conf-dir=/etc/NetworkManager/dnsmasq.d
 6987 pts/2    S+     0:00 grep --color=auto dnsmasq

Note → --dhcp-range=10.42.0.10,10.42.0.254,60m. If you were to disable the DHCP assignment, the LAN computers would need to learn about the new route to the internet some other way.

Perhaps better than having competing DHCP servers is to assign static IP addresses on devices. Or you could try using the shared internet connection range as your WiFi DHCP range too.

|improve this answer|||||

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.