2

I am positively pulling my hair out over this.

Yesterday I did a fresh install (via Windows 10 Hyper-V Quick Create) of Ubuntu 18.04. I then did a full software update.

Today, all I want to do is set my IP address to static, but it's not working. It's like the config change isn't being saved. I've been Googling for the last four hours and not finding an answer.

  • Click the little LAN icon in the upper right corner of the desktop
  • Clicked "Wired Connected"
  • Clicked "Wired Settings"
  • Clicked the little Gear next to the Wired connection
  • Selected "Manual" for IPv4 Method
  • Clicked the IPv4 tab and put in 10.0.0.5/255.255.255.0/10.0.0.1 for the address info
  • Put in the DNS server (10.0.0.1, my router is DNS too) and toggled Automatic to OFF
  • Toggled Automatic to OFF next to Routes
  • Clicked APPLY
  • I also disable IPv6.
  • Then turned the connection off/on (each time it asks for password which I provide)

No change. If I review all my settings in the tabs, they're all there. But, if I close the Settings window and start over at step 1, everything is back to "automatic." It's like nothing is being saved.

Yes, I know that I can set my router to provide a static-DHCP address, but that's not the point -- What am I missing??

0

Have you tried netplan?

The default configuration file is located at /etc/netplan/50-cloud-init.yaml

Fire that up in your favorite text editor and set it up like this

network:
    ethernets:
        enp0s3:
            addresses: [10.0.0.5/8] 
            gateway4: 10.0.0.1
            nameservers:
              addresses: [10.0.0.1,8.8.8.8]
            dhcp4: no
    version: 2

Then run sudo netplan apply and you should be good to go.

For clarification, enp0s3 is your network interface. Yours might have a different name. Under addresses, you want to set the desired IP and the CIDR subnet mask (in your case, /8). gateway4 is your default gateway (your router), and the addresses under nameservers are your DNS servers.

source

  • Hey, @Cody, thanks for that. Yeah, I was aware of that as a last resort, but it smells kinda like a hack or workaround, I’m just very curious why the prescribed and documented procedure isn’t working on a brand new and freshly updated LTS install. – TonyPh12345 May 5 at 2:02
0

After you click "Apply", you have to turn off the wired connection by the toggle and turn it on again.

Edit

First you need delete all connections by sudo nmtui and then set it up again.

  • Yeah, I know that (it's the last bullet on my list above.). – TonyPh12345 May 5 at 15:01
  • Sorry that I missed it. Then it is a bug as some sites say. First delete all connections by sudo nmtui . Then try to set it up again. – MR. ROBOT May 5 at 15:13
  • Will give that a try. I'm stuck between a rock and a hard place. The Quick VM is "buggy," but the Real ISO method I describe in my answer has horrible GUI performance. Hmmmm. Thanks! – TonyPh12345 May 5 at 15:17
  • So yes, I can manage the interface using nmtui -- but ONLY with that tool. The GUI still complains (only via syslog -- nothing on screen) that privs are insufficient. – TonyPh12345 May 5 at 15:23
0

(Sorta) figured it out. Since 18.04's logs are much different arrangement than 14.x, it took me a while to find it, but syslog is showing the below as soon as "Apply" is clicked.

NetworkManager[838]: <info>  [1557068379.1226] audit: op="connection-update" uuid="92b70d1e-9f51-3077-8146-a242004d5432" name="Wired connection 1" pid=11225 uid=1000 result="fail" reason="Insufficient privileges."
mars gnome-control-c[11225]: Failed to commit changes: Insufficient privileges.

I tried it twice more on two fresh Quick Create VMs -- exact same issue.

I tried a fresh install using the Ubuntu ISO -- and it works just fine, and behaves differently. In the Quick Create VMs, each time I toggle the connection on or off, it asks me to authenticate. The true Ubuntu ISO does not. It just does what it's told.

So something is apparently mucked up in Microsoft/Canonical's (customized?) Quick Create package, possibly involving different/broken polkit policies. Whether that's an issue for Microsoft or Canonical, I have no idea.

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.