Score:0

How to configure Ubuntu 20.04.5 with static IP addressing?

va flag

I see users of other Ubuntu versions have asked this question, but those answers don't apply here. I am having the worst time configuring static IP addressing on 20.04.5 from the command line. Having messed with this so much, I now have a broken 00-installer-config.yaml file contained within /etc/netplan. I am a 25-year networking IT pro, so I'm good with subnetting and being my workplace's network manager. I am editing the file with nano, and currently the file reads:

#This is the network config written by 'subiquity'
network:
  version: 2
  ethernets:
  renderer: networkd
     enp3s0f0: 
       dhcp4: true
     enp3s0f1: 
       dhcp4: true
     enp4s0f0:
       dhcp4: true

And I have no good networking connections. First of all, is there a way to completely reset networking to out-of-the-box status? I was fine with enp4s0f0 grabbing a DHCP-issued address, but now I have no connections at all. So the first question is how to restore networking without having to reinstall the OS, and secondly after I have that fixed, how to configure a NIC with static addressing. I thought I was correctly applying all of the YAML rules regarding spacing (and not tabs), but I always get the following error on random lines:

Invalid YAML: inconsistent indentation

My YAML file seems to get rejected no matter what I do. This forum will not seem to retain my formatting of the YAML, so it's hard for me to post how it currently appears.

Thanks!

guiverc avatar
cn flag
I'd check you've applied all security fixes if your 20.04.5 is correct; a fully upgraded Ubuntu 20.04 LTS system will report itself as 20.04.6 (https://fridge.ubuntu.com/2023/03/23/ubuntu-20-04-6-lts-released/ shows the ISO release date, but installed systems upgraded prior to this date)
chili555 avatar
cn flag
Please see the template at: `cat /usr/share/doc/netplan/examples/static.yaml` Welcome to Ask Ubuntu.
I sit in a Tesla and translated this thread with Ai:

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.