Score:-2

Small network using ubuntu server 20.04LTS

kr flag

I am trying to setup a small server and I want to know how I can set the computers up to be on the same network. These system will not have internet access. I tried using regular ubuntu and I was able to ping both machines when I connected them to the same router. But with ubuntu server, they don't seem to be getting IPs. Do I have to separately install a DHCP server on one of the machines when using ubuntu server for all the systems to get an IP address? Does ubuntu desktop come with this pre-installed while ubuntu server does not?

anx avatar
fr flag
anx
desktop installations default to NetworkManager for managing network configuration, whereas server installations default to netplan, possibly in turn managed by cloud-init.
user3397008 avatar
kr flag
@anx thank you. That's useful to know. at least that might explain why Server doesnt get an IP address at all.
Score:1
vn flag

Generally your router will have a DHCP server in it to provide addresses for your machines, and desktop Linux will generally have DHCP enabled so it can accept addresses from the router. Ubuntu server may not; my own experience is that it generally does enable DHCP by default, but that experience is several years old. If you have a spare router, connect both the server and the desktop to the LAN side of the router; if you don't need Internet, you can leave the WAN socket empty. Check the network settings of your Ubuntu server to ensure that the network card has DHCP enabled. And with that you should be good.

user3397008 avatar
kr flag
Thank you! Yes, that's exactly what I did. Its odd that it works fine when both machines are running Ubuntu desktop but not Ubuntu server. regarding enabling the network card, both machines connect to the internet just fine when I try that. So that is what leads me to wonder if I need DHCP explicitly enabled on at least one machine when using Server? and that this is automatically done when using Ubuntu Desktop.
tsc_chazz avatar
vn flag
I think the operative thing here is that you need to ensure that your server is also set to use DHCP to get its network address. The Ubuntu desktop is set that way by default; if the server is not, it will be unreachable. Typically the router will be a DHCP server, so you would only need both the desktop and the server to be DHCP clients.
user3397008 avatar
kr flag
I just have a regular router, so I'm not sure if it has a DHCP server. Could I just install a DHCP server on the controller for my server instead?
tsc_chazz avatar
vn flag
You could; a simple example is `dnsmasq`. But I have to say that I have never seen a home router (one with a WAN port) that doesn't have a DHCP server in it. It may be disabled, in which case the quickest way to get it back, if you don't have the router admin password, is to reset it to factory defaults.
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.