LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 05-27-2020, 09:44 AM   #1
qajaq
Member
 
Registered: Sep 2008
Location: north-central Florida
Distribution: Lubuntu 19.04, Kubuntu 18.04
Posts: 120

Rep: Reputation: 15
Netplan file for static wifi IP is ignored


I have recently installed Kubuntu 20.04 after having successfully used earlier LTS versions for over 10 years, and have set up static IP addresses (in order to use openSSH on my home network) for most of that time. In earliest versions, I configured the /etc/network/interfaces file manually. In later versions, that didn't work, but I was able to configure the static IP using WICD. But now WICD apparently is no longer available for Kubuntu 20.04 -- at least, I haven't been able to find how to install it.

Now I've learned that the CLI file /etc/netplan/01-network-manager-all.yaml is what I have to use to configure a static IP address for my wireless connections. I've written the file according to several sources I've found online, but the static IP assignment is ignored.

The result of running ifconfig is (in part):
Quote:
wlp2s0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
....inet 192.168.0.102 netmask 255.255.255.0 broadcast 192.168.0.255
My /etc/netplan/01-network-manager-all.yaml file is:
Quote:
network:
....version: 2
....renderer: NetworkManager
....wifis:
........wlp2s0:
............dhcp4: no
............dhcp6: no
............addresses: [192.168.0.20/24]
............gateway4: 192.168.0.1
............nameservers:
................addresses: [8.8.8.8,8.8.4.4]
............access-points:
................"Tustumena2.4":
....................password: "mypassword"
[I'm using dots, here, to simulate the indentations in the actual file, but which are ignored in this posting environment.]

I can run netplan generate without getting any error messages, and running netplan apply shuts down my current wifi connection, then brings it back up. However, the IP address remains the same as before (102, when I'm trying to assign it as 20).

FWIW, the wifi on another machine (running Lubuntu 18.04) on my network will still successfully log on at the static IP assigned to it with WICD.
 
Old 05-28-2020, 03:51 AM   #2
berndbausch
LQ Addict
 
Registered: Nov 2013
Location: Tokyo
Distribution: Mostly Ubuntu and Centos
Posts: 6,316

Rep: Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002
Since it's NetworkManager, use nmcli to dig around.
Code:
nmcli con   # list of connections
nmcli -f ipv4 show blabla    # ipv4 settings of connection blabla
Also use troubleshooting instructions at https://netplan.io/troubleshooting.
 
Old 05-28-2020, 11:30 AM   #3
scasey
LQ Veteran
 
Registered: Feb 2013
Location: Tucson, AZ, USA
Distribution: CentOS 7.9.2009
Posts: 5,732

Rep: Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212
Quote:
Originally Posted by qajaq View Post
[I'm using dots, here, to simulate the indentations in the actual file, but which are ignored in this posting environment.]
If you use code tags instead of quote tags, the indentations will be preserved.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
LXer: Configuring static and dynamic IP Addresses in Ubuntu using Netplan LXer Syndicated Linux News 0 02-18-2020 04:24 AM
How to set a static IP using netplan? (running Ubuntu Bionic server) mrjayviper Linux - Networking 4 03-21-2019 05:04 AM
Ubuntu 17.04, netplan, bring up interface without ip da1 Ubuntu 3 01-24-2018 10:04 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 03:46 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration