fixed IP address on LAN under Ubuntu 18.04 (netplan)












1














I've just installed Ubuntu for the first time and I want to set up a fixed IP address for my computer as a first step towards connecting from outside via ssh. I can find no menu in my router to associate an IP address to a MAC address, so instead I have gone to /etc/netplan where I see a file named 01-network-manager-all.yaml which contains:



# Let NetworkManager manage all devices on this system
network:
version: 2
renderer: NetworkManager


I append it to contain:



# Let NetworkManager manage all devices on this system
network:
version: 2
renderer: NetworkManager
wifis:
wlp5s0:
addresses: [192.168.0.100/24]
dhcp4: no
gateway4: 192.168.0.1
access-points:
sparrow:
password: my password


Next I run:



ian@sparrow:~$ sudo netplan --debug apply
** (generate:2459): DEBUG: 08:03:58.881: Processing input file //etc/netplan/01-network-manager-all.yaml..
** (generate:2459): DEBUG: 08:03:58.881: starting new processing pass
** (generate:2459): DEBUG: 08:03:58.881: wlp5s0: adding wifi AP 'sparrow'
** (generate:2459): DEBUG: 08:03:58.881: wlp5s0: setting default backend to 2
** (generate:2459): DEBUG: 08:03:58.882: Generating output files..
** (generate:2459): DEBUG: 08:03:58.882: networkd: definition wlp5s0 is not for us (backend 2)
DEBUG:no netplan generated networkd configuration exists
DEBUG:netplan generated NM configuration exists, restarting NM
DEBUG:replug enp4s0: unbinding 0000:04:00.0 from /sys/bus/pci/drivers/r8169
DEBUG:replug enp4s0: rebinding 0000:04:00.0 to /sys/bus/pci/drivers/r8169
DEBUG:replug wlp5s0: unbinding 0000:05:00.0 from /sys/bus/pci/drivers/iwlwifi
DEBUG:replug wlp5s0: rebinding 0000:05:00.0 to /sys/bus/pci/drivers/iwlwifi
DEBUG:device lo operstate is unknown, not replugging
DEBUG:netplan triggering .link rules for lo
ian@sparrow:~$


I am not sure what to make of this output.



To see what's going on, I reboot things and run:



ian@sparrow:/etc/netplan$ ip a
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
valid_lft forever preferred_lft forever
inet6 ::1/128 scope host
valid_lft forever preferred_lft forever
2: enp4s0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc fq_codel state DOWN group default qlen 1000
link/ether b0:6e:bf:0a:9a:5d brd ff:ff:ff:ff:ff:ff
3: wlp5s0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP group default qlen 1000
link/ether 00:e1:8c:7f:10:48 brd ff:ff:ff:ff:ff:ff
inet 192.168.0.102/24 brd 192.168.0.255 scope global dynamic noprefixroute wlp5s0
valid_lft 86003sec preferred_lft 86003sec
inet6 fe80::1d31:c36:616f:422c/64 scope link noprefixroute
valid_lft forever preferred_lft forever
ian@sparrow:/etc/netplan$


Which indicates that my attempt to get Ubuntu to ask for 192.168.0.100/24 has failed.

How do I fix my machine's LAN IP?



After generating 01-networkd.yaml as described below, I run ip a and I get:



1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
valid_lft forever preferred_lft forever
inet6 ::1/128 scope host
valid_lft forever preferred_lft forever
2: enp4s0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc fq_codel state DOWN group default qlen 1000
link/ether b0:6e:bf:0a:9a:5d brd ff:ff:ff:ff:ff:ff
3: wlp5s0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP group default qlen 1000
link/ether 00:e1:8c:7f:10:48 brd ff:ff:ff:ff:ff:ff
inet 192.168.0.102/24 brd 192.168.0.255 scope global dynamic noprefixroute wlp5s0
valid_lft 86003sec preferred_lft 86003sec
inet6 fe80::1d31:c36:616f:422c/64 scope link noprefixroute
valid_lft forever preferred_lft forever
ian@sparrow:/etc/netplan$


Correction: output from sudo netplan --debug generate is:



Processing input file //etc/netplan/01-networkd.yaml..
starting new processing pass
wlp5s0: adding wifi AP 'sparrow
enp4s0: setting default backend to 1
wlp5s0: setting default backend to 1
Generating output files..
NetworkManager: definition enp4s0 is not for us (backend 1)
wlp5s0: Creating wpa_supplicant configuration file run/netplan/wpa-wlp5s0.conf
Creating wpa_supplicant service enablement link /run/systemd/system/multi-user.target.wants/netplan-wpa@wlp5s0.service
NetworkManager: definition wlp5s0 is not for us (backend 1)









share|improve this question
























  • Why not simply set the addresses in Network Manager? Welcome to Ask Ubuntu.
    – chili555
    Oct 11 at 0:47










  • I have no network manager. I gave up trying to guess where that functionality had been moved to in 18.04 and went for the command line alternative. Have just realised that sudo apt-get install network-manager is my friend.
    – Ian Atkinson
    Oct 12 at 10:17










  • Then "renderer: NetworkManager" is incorrect.
    – chili555
    Oct 14 at 0:35










  • Clarification. When I said I have no Network Manager, I was referring to the absence of the "network" icon in the top-right section of the screen. Saying "sudo apt-get install network-manager" generates output indicating that it is already installed and up to date. Accessing the GUI is the problem. I have found that either "sudo nm-connection-editor" or clicking the "wireless" icon in the top-right and then wi-fi settings and then the pressing the button on that network, will get me to the IPv4 menu area described in heynnema's screenshot below.
    – Ian Atkinson
    Oct 14 at 21:09










  • If you have NM installed and running, then that is where to make your change. I suggest that you revert the additions to netplan.
    – chili555
    Oct 14 at 21:14
















1














I've just installed Ubuntu for the first time and I want to set up a fixed IP address for my computer as a first step towards connecting from outside via ssh. I can find no menu in my router to associate an IP address to a MAC address, so instead I have gone to /etc/netplan where I see a file named 01-network-manager-all.yaml which contains:



# Let NetworkManager manage all devices on this system
network:
version: 2
renderer: NetworkManager


I append it to contain:



# Let NetworkManager manage all devices on this system
network:
version: 2
renderer: NetworkManager
wifis:
wlp5s0:
addresses: [192.168.0.100/24]
dhcp4: no
gateway4: 192.168.0.1
access-points:
sparrow:
password: my password


Next I run:



ian@sparrow:~$ sudo netplan --debug apply
** (generate:2459): DEBUG: 08:03:58.881: Processing input file //etc/netplan/01-network-manager-all.yaml..
** (generate:2459): DEBUG: 08:03:58.881: starting new processing pass
** (generate:2459): DEBUG: 08:03:58.881: wlp5s0: adding wifi AP 'sparrow'
** (generate:2459): DEBUG: 08:03:58.881: wlp5s0: setting default backend to 2
** (generate:2459): DEBUG: 08:03:58.882: Generating output files..
** (generate:2459): DEBUG: 08:03:58.882: networkd: definition wlp5s0 is not for us (backend 2)
DEBUG:no netplan generated networkd configuration exists
DEBUG:netplan generated NM configuration exists, restarting NM
DEBUG:replug enp4s0: unbinding 0000:04:00.0 from /sys/bus/pci/drivers/r8169
DEBUG:replug enp4s0: rebinding 0000:04:00.0 to /sys/bus/pci/drivers/r8169
DEBUG:replug wlp5s0: unbinding 0000:05:00.0 from /sys/bus/pci/drivers/iwlwifi
DEBUG:replug wlp5s0: rebinding 0000:05:00.0 to /sys/bus/pci/drivers/iwlwifi
DEBUG:device lo operstate is unknown, not replugging
DEBUG:netplan triggering .link rules for lo
ian@sparrow:~$


I am not sure what to make of this output.



To see what's going on, I reboot things and run:



ian@sparrow:/etc/netplan$ ip a
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
valid_lft forever preferred_lft forever
inet6 ::1/128 scope host
valid_lft forever preferred_lft forever
2: enp4s0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc fq_codel state DOWN group default qlen 1000
link/ether b0:6e:bf:0a:9a:5d brd ff:ff:ff:ff:ff:ff
3: wlp5s0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP group default qlen 1000
link/ether 00:e1:8c:7f:10:48 brd ff:ff:ff:ff:ff:ff
inet 192.168.0.102/24 brd 192.168.0.255 scope global dynamic noprefixroute wlp5s0
valid_lft 86003sec preferred_lft 86003sec
inet6 fe80::1d31:c36:616f:422c/64 scope link noprefixroute
valid_lft forever preferred_lft forever
ian@sparrow:/etc/netplan$


Which indicates that my attempt to get Ubuntu to ask for 192.168.0.100/24 has failed.

How do I fix my machine's LAN IP?



After generating 01-networkd.yaml as described below, I run ip a and I get:



1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
valid_lft forever preferred_lft forever
inet6 ::1/128 scope host
valid_lft forever preferred_lft forever
2: enp4s0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc fq_codel state DOWN group default qlen 1000
link/ether b0:6e:bf:0a:9a:5d brd ff:ff:ff:ff:ff:ff
3: wlp5s0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP group default qlen 1000
link/ether 00:e1:8c:7f:10:48 brd ff:ff:ff:ff:ff:ff
inet 192.168.0.102/24 brd 192.168.0.255 scope global dynamic noprefixroute wlp5s0
valid_lft 86003sec preferred_lft 86003sec
inet6 fe80::1d31:c36:616f:422c/64 scope link noprefixroute
valid_lft forever preferred_lft forever
ian@sparrow:/etc/netplan$


Correction: output from sudo netplan --debug generate is:



Processing input file //etc/netplan/01-networkd.yaml..
starting new processing pass
wlp5s0: adding wifi AP 'sparrow
enp4s0: setting default backend to 1
wlp5s0: setting default backend to 1
Generating output files..
NetworkManager: definition enp4s0 is not for us (backend 1)
wlp5s0: Creating wpa_supplicant configuration file run/netplan/wpa-wlp5s0.conf
Creating wpa_supplicant service enablement link /run/systemd/system/multi-user.target.wants/netplan-wpa@wlp5s0.service
NetworkManager: definition wlp5s0 is not for us (backend 1)









share|improve this question
























  • Why not simply set the addresses in Network Manager? Welcome to Ask Ubuntu.
    – chili555
    Oct 11 at 0:47










  • I have no network manager. I gave up trying to guess where that functionality had been moved to in 18.04 and went for the command line alternative. Have just realised that sudo apt-get install network-manager is my friend.
    – Ian Atkinson
    Oct 12 at 10:17










  • Then "renderer: NetworkManager" is incorrect.
    – chili555
    Oct 14 at 0:35










  • Clarification. When I said I have no Network Manager, I was referring to the absence of the "network" icon in the top-right section of the screen. Saying "sudo apt-get install network-manager" generates output indicating that it is already installed and up to date. Accessing the GUI is the problem. I have found that either "sudo nm-connection-editor" or clicking the "wireless" icon in the top-right and then wi-fi settings and then the pressing the button on that network, will get me to the IPv4 menu area described in heynnema's screenshot below.
    – Ian Atkinson
    Oct 14 at 21:09










  • If you have NM installed and running, then that is where to make your change. I suggest that you revert the additions to netplan.
    – chili555
    Oct 14 at 21:14














1












1








1







I've just installed Ubuntu for the first time and I want to set up a fixed IP address for my computer as a first step towards connecting from outside via ssh. I can find no menu in my router to associate an IP address to a MAC address, so instead I have gone to /etc/netplan where I see a file named 01-network-manager-all.yaml which contains:



# Let NetworkManager manage all devices on this system
network:
version: 2
renderer: NetworkManager


I append it to contain:



# Let NetworkManager manage all devices on this system
network:
version: 2
renderer: NetworkManager
wifis:
wlp5s0:
addresses: [192.168.0.100/24]
dhcp4: no
gateway4: 192.168.0.1
access-points:
sparrow:
password: my password


Next I run:



ian@sparrow:~$ sudo netplan --debug apply
** (generate:2459): DEBUG: 08:03:58.881: Processing input file //etc/netplan/01-network-manager-all.yaml..
** (generate:2459): DEBUG: 08:03:58.881: starting new processing pass
** (generate:2459): DEBUG: 08:03:58.881: wlp5s0: adding wifi AP 'sparrow'
** (generate:2459): DEBUG: 08:03:58.881: wlp5s0: setting default backend to 2
** (generate:2459): DEBUG: 08:03:58.882: Generating output files..
** (generate:2459): DEBUG: 08:03:58.882: networkd: definition wlp5s0 is not for us (backend 2)
DEBUG:no netplan generated networkd configuration exists
DEBUG:netplan generated NM configuration exists, restarting NM
DEBUG:replug enp4s0: unbinding 0000:04:00.0 from /sys/bus/pci/drivers/r8169
DEBUG:replug enp4s0: rebinding 0000:04:00.0 to /sys/bus/pci/drivers/r8169
DEBUG:replug wlp5s0: unbinding 0000:05:00.0 from /sys/bus/pci/drivers/iwlwifi
DEBUG:replug wlp5s0: rebinding 0000:05:00.0 to /sys/bus/pci/drivers/iwlwifi
DEBUG:device lo operstate is unknown, not replugging
DEBUG:netplan triggering .link rules for lo
ian@sparrow:~$


I am not sure what to make of this output.



To see what's going on, I reboot things and run:



ian@sparrow:/etc/netplan$ ip a
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
valid_lft forever preferred_lft forever
inet6 ::1/128 scope host
valid_lft forever preferred_lft forever
2: enp4s0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc fq_codel state DOWN group default qlen 1000
link/ether b0:6e:bf:0a:9a:5d brd ff:ff:ff:ff:ff:ff
3: wlp5s0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP group default qlen 1000
link/ether 00:e1:8c:7f:10:48 brd ff:ff:ff:ff:ff:ff
inet 192.168.0.102/24 brd 192.168.0.255 scope global dynamic noprefixroute wlp5s0
valid_lft 86003sec preferred_lft 86003sec
inet6 fe80::1d31:c36:616f:422c/64 scope link noprefixroute
valid_lft forever preferred_lft forever
ian@sparrow:/etc/netplan$


Which indicates that my attempt to get Ubuntu to ask for 192.168.0.100/24 has failed.

How do I fix my machine's LAN IP?



After generating 01-networkd.yaml as described below, I run ip a and I get:



1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
valid_lft forever preferred_lft forever
inet6 ::1/128 scope host
valid_lft forever preferred_lft forever
2: enp4s0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc fq_codel state DOWN group default qlen 1000
link/ether b0:6e:bf:0a:9a:5d brd ff:ff:ff:ff:ff:ff
3: wlp5s0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP group default qlen 1000
link/ether 00:e1:8c:7f:10:48 brd ff:ff:ff:ff:ff:ff
inet 192.168.0.102/24 brd 192.168.0.255 scope global dynamic noprefixroute wlp5s0
valid_lft 86003sec preferred_lft 86003sec
inet6 fe80::1d31:c36:616f:422c/64 scope link noprefixroute
valid_lft forever preferred_lft forever
ian@sparrow:/etc/netplan$


Correction: output from sudo netplan --debug generate is:



Processing input file //etc/netplan/01-networkd.yaml..
starting new processing pass
wlp5s0: adding wifi AP 'sparrow
enp4s0: setting default backend to 1
wlp5s0: setting default backend to 1
Generating output files..
NetworkManager: definition enp4s0 is not for us (backend 1)
wlp5s0: Creating wpa_supplicant configuration file run/netplan/wpa-wlp5s0.conf
Creating wpa_supplicant service enablement link /run/systemd/system/multi-user.target.wants/netplan-wpa@wlp5s0.service
NetworkManager: definition wlp5s0 is not for us (backend 1)









share|improve this question















I've just installed Ubuntu for the first time and I want to set up a fixed IP address for my computer as a first step towards connecting from outside via ssh. I can find no menu in my router to associate an IP address to a MAC address, so instead I have gone to /etc/netplan where I see a file named 01-network-manager-all.yaml which contains:



# Let NetworkManager manage all devices on this system
network:
version: 2
renderer: NetworkManager


I append it to contain:



# Let NetworkManager manage all devices on this system
network:
version: 2
renderer: NetworkManager
wifis:
wlp5s0:
addresses: [192.168.0.100/24]
dhcp4: no
gateway4: 192.168.0.1
access-points:
sparrow:
password: my password


Next I run:



ian@sparrow:~$ sudo netplan --debug apply
** (generate:2459): DEBUG: 08:03:58.881: Processing input file //etc/netplan/01-network-manager-all.yaml..
** (generate:2459): DEBUG: 08:03:58.881: starting new processing pass
** (generate:2459): DEBUG: 08:03:58.881: wlp5s0: adding wifi AP 'sparrow'
** (generate:2459): DEBUG: 08:03:58.881: wlp5s0: setting default backend to 2
** (generate:2459): DEBUG: 08:03:58.882: Generating output files..
** (generate:2459): DEBUG: 08:03:58.882: networkd: definition wlp5s0 is not for us (backend 2)
DEBUG:no netplan generated networkd configuration exists
DEBUG:netplan generated NM configuration exists, restarting NM
DEBUG:replug enp4s0: unbinding 0000:04:00.0 from /sys/bus/pci/drivers/r8169
DEBUG:replug enp4s0: rebinding 0000:04:00.0 to /sys/bus/pci/drivers/r8169
DEBUG:replug wlp5s0: unbinding 0000:05:00.0 from /sys/bus/pci/drivers/iwlwifi
DEBUG:replug wlp5s0: rebinding 0000:05:00.0 to /sys/bus/pci/drivers/iwlwifi
DEBUG:device lo operstate is unknown, not replugging
DEBUG:netplan triggering .link rules for lo
ian@sparrow:~$


I am not sure what to make of this output.



To see what's going on, I reboot things and run:



ian@sparrow:/etc/netplan$ ip a
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
valid_lft forever preferred_lft forever
inet6 ::1/128 scope host
valid_lft forever preferred_lft forever
2: enp4s0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc fq_codel state DOWN group default qlen 1000
link/ether b0:6e:bf:0a:9a:5d brd ff:ff:ff:ff:ff:ff
3: wlp5s0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP group default qlen 1000
link/ether 00:e1:8c:7f:10:48 brd ff:ff:ff:ff:ff:ff
inet 192.168.0.102/24 brd 192.168.0.255 scope global dynamic noprefixroute wlp5s0
valid_lft 86003sec preferred_lft 86003sec
inet6 fe80::1d31:c36:616f:422c/64 scope link noprefixroute
valid_lft forever preferred_lft forever
ian@sparrow:/etc/netplan$


Which indicates that my attempt to get Ubuntu to ask for 192.168.0.100/24 has failed.

How do I fix my machine's LAN IP?



After generating 01-networkd.yaml as described below, I run ip a and I get:



1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
valid_lft forever preferred_lft forever
inet6 ::1/128 scope host
valid_lft forever preferred_lft forever
2: enp4s0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc fq_codel state DOWN group default qlen 1000
link/ether b0:6e:bf:0a:9a:5d brd ff:ff:ff:ff:ff:ff
3: wlp5s0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP group default qlen 1000
link/ether 00:e1:8c:7f:10:48 brd ff:ff:ff:ff:ff:ff
inet 192.168.0.102/24 brd 192.168.0.255 scope global dynamic noprefixroute wlp5s0
valid_lft 86003sec preferred_lft 86003sec
inet6 fe80::1d31:c36:616f:422c/64 scope link noprefixroute
valid_lft forever preferred_lft forever
ian@sparrow:/etc/netplan$


Correction: output from sudo netplan --debug generate is:



Processing input file //etc/netplan/01-networkd.yaml..
starting new processing pass
wlp5s0: adding wifi AP 'sparrow
enp4s0: setting default backend to 1
wlp5s0: setting default backend to 1
Generating output files..
NetworkManager: definition enp4s0 is not for us (backend 1)
wlp5s0: Creating wpa_supplicant configuration file run/netplan/wpa-wlp5s0.conf
Creating wpa_supplicant service enablement link /run/systemd/system/multi-user.target.wants/netplan-wpa@wlp5s0.service
NetworkManager: definition wlp5s0 is not for us (backend 1)






networking netplan






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Oct 20 at 1:10

























asked Oct 10 at 21:31









Ian Atkinson

62




62












  • Why not simply set the addresses in Network Manager? Welcome to Ask Ubuntu.
    – chili555
    Oct 11 at 0:47










  • I have no network manager. I gave up trying to guess where that functionality had been moved to in 18.04 and went for the command line alternative. Have just realised that sudo apt-get install network-manager is my friend.
    – Ian Atkinson
    Oct 12 at 10:17










  • Then "renderer: NetworkManager" is incorrect.
    – chili555
    Oct 14 at 0:35










  • Clarification. When I said I have no Network Manager, I was referring to the absence of the "network" icon in the top-right section of the screen. Saying "sudo apt-get install network-manager" generates output indicating that it is already installed and up to date. Accessing the GUI is the problem. I have found that either "sudo nm-connection-editor" or clicking the "wireless" icon in the top-right and then wi-fi settings and then the pressing the button on that network, will get me to the IPv4 menu area described in heynnema's screenshot below.
    – Ian Atkinson
    Oct 14 at 21:09










  • If you have NM installed and running, then that is where to make your change. I suggest that you revert the additions to netplan.
    – chili555
    Oct 14 at 21:14


















  • Why not simply set the addresses in Network Manager? Welcome to Ask Ubuntu.
    – chili555
    Oct 11 at 0:47










  • I have no network manager. I gave up trying to guess where that functionality had been moved to in 18.04 and went for the command line alternative. Have just realised that sudo apt-get install network-manager is my friend.
    – Ian Atkinson
    Oct 12 at 10:17










  • Then "renderer: NetworkManager" is incorrect.
    – chili555
    Oct 14 at 0:35










  • Clarification. When I said I have no Network Manager, I was referring to the absence of the "network" icon in the top-right section of the screen. Saying "sudo apt-get install network-manager" generates output indicating that it is already installed and up to date. Accessing the GUI is the problem. I have found that either "sudo nm-connection-editor" or clicking the "wireless" icon in the top-right and then wi-fi settings and then the pressing the button on that network, will get me to the IPv4 menu area described in heynnema's screenshot below.
    – Ian Atkinson
    Oct 14 at 21:09










  • If you have NM installed and running, then that is where to make your change. I suggest that you revert the additions to netplan.
    – chili555
    Oct 14 at 21:14
















Why not simply set the addresses in Network Manager? Welcome to Ask Ubuntu.
– chili555
Oct 11 at 0:47




Why not simply set the addresses in Network Manager? Welcome to Ask Ubuntu.
– chili555
Oct 11 at 0:47












I have no network manager. I gave up trying to guess where that functionality had been moved to in 18.04 and went for the command line alternative. Have just realised that sudo apt-get install network-manager is my friend.
– Ian Atkinson
Oct 12 at 10:17




I have no network manager. I gave up trying to guess where that functionality had been moved to in 18.04 and went for the command line alternative. Have just realised that sudo apt-get install network-manager is my friend.
– Ian Atkinson
Oct 12 at 10:17












Then "renderer: NetworkManager" is incorrect.
– chili555
Oct 14 at 0:35




Then "renderer: NetworkManager" is incorrect.
– chili555
Oct 14 at 0:35












Clarification. When I said I have no Network Manager, I was referring to the absence of the "network" icon in the top-right section of the screen. Saying "sudo apt-get install network-manager" generates output indicating that it is already installed and up to date. Accessing the GUI is the problem. I have found that either "sudo nm-connection-editor" or clicking the "wireless" icon in the top-right and then wi-fi settings and then the pressing the button on that network, will get me to the IPv4 menu area described in heynnema's screenshot below.
– Ian Atkinson
Oct 14 at 21:09




Clarification. When I said I have no Network Manager, I was referring to the absence of the "network" icon in the top-right section of the screen. Saying "sudo apt-get install network-manager" generates output indicating that it is already installed and up to date. Accessing the GUI is the problem. I have found that either "sudo nm-connection-editor" or clicking the "wireless" icon in the top-right and then wi-fi settings and then the pressing the button on that network, will get me to the IPv4 menu area described in heynnema's screenshot below.
– Ian Atkinson
Oct 14 at 21:09












If you have NM installed and running, then that is where to make your change. I suggest that you revert the additions to netplan.
– chili555
Oct 14 at 21:14




If you have NM installed and running, then that is where to make your change. I suggest that you revert the additions to netplan.
– chili555
Oct 14 at 21:14










1 Answer
1






active

oldest

votes


















1














If you must use Netplan...



remove /etc/netplan/01-network-manager-all.yaml



create /etc/netplan/01-networkd.yaml...



network:
version: 2
renderer: networkd
ethernets:
enp4s0:
dhcp4: true
optional: true
wifis:
wlp5s0:
dhcp4: no
dhcp6: no
addresses: [192.168.0.100/24]
gateway4: 192.168.0.1
nameservers:
addresses: [192.168.0.1, 8.8.8.8]
access-points:
"sparrow":
password: "**********"


sudo netplan --debug generate



sudo netplan apply



reboot



If you decide to stick with NetworkManager...



remove all unnecessary .yaml files in /etc/netplan



create /etc/netplan/01-network-manager-all.yaml...



# Let NetworkManager manage all devices on this system
network:
version: 2
renderer: NetworkManager


sudo netplan --debug generate



sudo netplan apply



reboot



Connect to the desired wireless network.



Disconnect from the wireless network.



Edit these settings in the (18.04.1) wireless profile...



enter image description here



Update #1:




  • added code for enp4s0 LAN connection

  • added reboot

  • added info about using NetworkManager






share|improve this answer























  • Tried this and lost contact with the LAN altogether.
    – Ian Atkinson
    Oct 12 at 10:18










  • Did the WLAN or LAN lose contact? You didn't say that you were using LAN. If you are using LAN, then my example code is not complete, and you would loose LAN connection. Did you reboot?
    – heynnema
    Oct 12 at 12:26












  • I have found my way to the IPV4 menu via both nm-connection-editor and via GUI and entered network descriptions with and without various DNS alternatives (having reverted to the original 01-network-manager-all.yaml). Upon reboot the computer is in a state where the "wireless" icon is replaced with a question mark. My dropbox is greyed out and Firefox can't connect to the internet. Clicking the ? icon gets to the usual wireless menus but the system reports that I am already connected (therefore cannot click "connect").
    – Ian Atkinson
    Oct 14 at 21:21










  • What files are in /etc/netplan? If you have (only) 01-network-manager-all.yaml, does it look like my example? Did you issue the THREE commands that I call out? Have you rebooted?
    – heynnema
    Oct 14 at 22:02










  • I removed the .yaml.bup and .txt files that I had accumulated in /etc/netplan and created 01-networkd.yaml exactly as described. sudo netplan --debug generate gave no output. sudo netplan apply also gave none. reboot. Wifi icon absent, Wifi settings lists no visible networks. I will attempt to put output from ip a onto this site (not sure how).
    – Ian Atkinson
    Oct 15 at 8:01











Your Answer








StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "89"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});

function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});


}
});














draft saved

draft discarded


















StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1082754%2ffixed-ip-address-on-lan-under-ubuntu-18-04-netplan%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown

























1 Answer
1






active

oldest

votes








1 Answer
1






active

oldest

votes









active

oldest

votes






active

oldest

votes









1














If you must use Netplan...



remove /etc/netplan/01-network-manager-all.yaml



create /etc/netplan/01-networkd.yaml...



network:
version: 2
renderer: networkd
ethernets:
enp4s0:
dhcp4: true
optional: true
wifis:
wlp5s0:
dhcp4: no
dhcp6: no
addresses: [192.168.0.100/24]
gateway4: 192.168.0.1
nameservers:
addresses: [192.168.0.1, 8.8.8.8]
access-points:
"sparrow":
password: "**********"


sudo netplan --debug generate



sudo netplan apply



reboot



If you decide to stick with NetworkManager...



remove all unnecessary .yaml files in /etc/netplan



create /etc/netplan/01-network-manager-all.yaml...



# Let NetworkManager manage all devices on this system
network:
version: 2
renderer: NetworkManager


sudo netplan --debug generate



sudo netplan apply



reboot



Connect to the desired wireless network.



Disconnect from the wireless network.



Edit these settings in the (18.04.1) wireless profile...



enter image description here



Update #1:




  • added code for enp4s0 LAN connection

  • added reboot

  • added info about using NetworkManager






share|improve this answer























  • Tried this and lost contact with the LAN altogether.
    – Ian Atkinson
    Oct 12 at 10:18










  • Did the WLAN or LAN lose contact? You didn't say that you were using LAN. If you are using LAN, then my example code is not complete, and you would loose LAN connection. Did you reboot?
    – heynnema
    Oct 12 at 12:26












  • I have found my way to the IPV4 menu via both nm-connection-editor and via GUI and entered network descriptions with and without various DNS alternatives (having reverted to the original 01-network-manager-all.yaml). Upon reboot the computer is in a state where the "wireless" icon is replaced with a question mark. My dropbox is greyed out and Firefox can't connect to the internet. Clicking the ? icon gets to the usual wireless menus but the system reports that I am already connected (therefore cannot click "connect").
    – Ian Atkinson
    Oct 14 at 21:21










  • What files are in /etc/netplan? If you have (only) 01-network-manager-all.yaml, does it look like my example? Did you issue the THREE commands that I call out? Have you rebooted?
    – heynnema
    Oct 14 at 22:02










  • I removed the .yaml.bup and .txt files that I had accumulated in /etc/netplan and created 01-networkd.yaml exactly as described. sudo netplan --debug generate gave no output. sudo netplan apply also gave none. reboot. Wifi icon absent, Wifi settings lists no visible networks. I will attempt to put output from ip a onto this site (not sure how).
    – Ian Atkinson
    Oct 15 at 8:01
















1














If you must use Netplan...



remove /etc/netplan/01-network-manager-all.yaml



create /etc/netplan/01-networkd.yaml...



network:
version: 2
renderer: networkd
ethernets:
enp4s0:
dhcp4: true
optional: true
wifis:
wlp5s0:
dhcp4: no
dhcp6: no
addresses: [192.168.0.100/24]
gateway4: 192.168.0.1
nameservers:
addresses: [192.168.0.1, 8.8.8.8]
access-points:
"sparrow":
password: "**********"


sudo netplan --debug generate



sudo netplan apply



reboot



If you decide to stick with NetworkManager...



remove all unnecessary .yaml files in /etc/netplan



create /etc/netplan/01-network-manager-all.yaml...



# Let NetworkManager manage all devices on this system
network:
version: 2
renderer: NetworkManager


sudo netplan --debug generate



sudo netplan apply



reboot



Connect to the desired wireless network.



Disconnect from the wireless network.



Edit these settings in the (18.04.1) wireless profile...



enter image description here



Update #1:




  • added code for enp4s0 LAN connection

  • added reboot

  • added info about using NetworkManager






share|improve this answer























  • Tried this and lost contact with the LAN altogether.
    – Ian Atkinson
    Oct 12 at 10:18










  • Did the WLAN or LAN lose contact? You didn't say that you were using LAN. If you are using LAN, then my example code is not complete, and you would loose LAN connection. Did you reboot?
    – heynnema
    Oct 12 at 12:26












  • I have found my way to the IPV4 menu via both nm-connection-editor and via GUI and entered network descriptions with and without various DNS alternatives (having reverted to the original 01-network-manager-all.yaml). Upon reboot the computer is in a state where the "wireless" icon is replaced with a question mark. My dropbox is greyed out and Firefox can't connect to the internet. Clicking the ? icon gets to the usual wireless menus but the system reports that I am already connected (therefore cannot click "connect").
    – Ian Atkinson
    Oct 14 at 21:21










  • What files are in /etc/netplan? If you have (only) 01-network-manager-all.yaml, does it look like my example? Did you issue the THREE commands that I call out? Have you rebooted?
    – heynnema
    Oct 14 at 22:02










  • I removed the .yaml.bup and .txt files that I had accumulated in /etc/netplan and created 01-networkd.yaml exactly as described. sudo netplan --debug generate gave no output. sudo netplan apply also gave none. reboot. Wifi icon absent, Wifi settings lists no visible networks. I will attempt to put output from ip a onto this site (not sure how).
    – Ian Atkinson
    Oct 15 at 8:01














1












1








1






If you must use Netplan...



remove /etc/netplan/01-network-manager-all.yaml



create /etc/netplan/01-networkd.yaml...



network:
version: 2
renderer: networkd
ethernets:
enp4s0:
dhcp4: true
optional: true
wifis:
wlp5s0:
dhcp4: no
dhcp6: no
addresses: [192.168.0.100/24]
gateway4: 192.168.0.1
nameservers:
addresses: [192.168.0.1, 8.8.8.8]
access-points:
"sparrow":
password: "**********"


sudo netplan --debug generate



sudo netplan apply



reboot



If you decide to stick with NetworkManager...



remove all unnecessary .yaml files in /etc/netplan



create /etc/netplan/01-network-manager-all.yaml...



# Let NetworkManager manage all devices on this system
network:
version: 2
renderer: NetworkManager


sudo netplan --debug generate



sudo netplan apply



reboot



Connect to the desired wireless network.



Disconnect from the wireless network.



Edit these settings in the (18.04.1) wireless profile...



enter image description here



Update #1:




  • added code for enp4s0 LAN connection

  • added reboot

  • added info about using NetworkManager






share|improve this answer














If you must use Netplan...



remove /etc/netplan/01-network-manager-all.yaml



create /etc/netplan/01-networkd.yaml...



network:
version: 2
renderer: networkd
ethernets:
enp4s0:
dhcp4: true
optional: true
wifis:
wlp5s0:
dhcp4: no
dhcp6: no
addresses: [192.168.0.100/24]
gateway4: 192.168.0.1
nameservers:
addresses: [192.168.0.1, 8.8.8.8]
access-points:
"sparrow":
password: "**********"


sudo netplan --debug generate



sudo netplan apply



reboot



If you decide to stick with NetworkManager...



remove all unnecessary .yaml files in /etc/netplan



create /etc/netplan/01-network-manager-all.yaml...



# Let NetworkManager manage all devices on this system
network:
version: 2
renderer: NetworkManager


sudo netplan --debug generate



sudo netplan apply



reboot



Connect to the desired wireless network.



Disconnect from the wireless network.



Edit these settings in the (18.04.1) wireless profile...



enter image description here



Update #1:




  • added code for enp4s0 LAN connection

  • added reboot

  • added info about using NetworkManager







share|improve this answer














share|improve this answer



share|improve this answer








edited Dec 13 at 14:53

























answered Oct 10 at 23:25









heynnema

18k22054




18k22054












  • Tried this and lost contact with the LAN altogether.
    – Ian Atkinson
    Oct 12 at 10:18










  • Did the WLAN or LAN lose contact? You didn't say that you were using LAN. If you are using LAN, then my example code is not complete, and you would loose LAN connection. Did you reboot?
    – heynnema
    Oct 12 at 12:26












  • I have found my way to the IPV4 menu via both nm-connection-editor and via GUI and entered network descriptions with and without various DNS alternatives (having reverted to the original 01-network-manager-all.yaml). Upon reboot the computer is in a state where the "wireless" icon is replaced with a question mark. My dropbox is greyed out and Firefox can't connect to the internet. Clicking the ? icon gets to the usual wireless menus but the system reports that I am already connected (therefore cannot click "connect").
    – Ian Atkinson
    Oct 14 at 21:21










  • What files are in /etc/netplan? If you have (only) 01-network-manager-all.yaml, does it look like my example? Did you issue the THREE commands that I call out? Have you rebooted?
    – heynnema
    Oct 14 at 22:02










  • I removed the .yaml.bup and .txt files that I had accumulated in /etc/netplan and created 01-networkd.yaml exactly as described. sudo netplan --debug generate gave no output. sudo netplan apply also gave none. reboot. Wifi icon absent, Wifi settings lists no visible networks. I will attempt to put output from ip a onto this site (not sure how).
    – Ian Atkinson
    Oct 15 at 8:01


















  • Tried this and lost contact with the LAN altogether.
    – Ian Atkinson
    Oct 12 at 10:18










  • Did the WLAN or LAN lose contact? You didn't say that you were using LAN. If you are using LAN, then my example code is not complete, and you would loose LAN connection. Did you reboot?
    – heynnema
    Oct 12 at 12:26












  • I have found my way to the IPV4 menu via both nm-connection-editor and via GUI and entered network descriptions with and without various DNS alternatives (having reverted to the original 01-network-manager-all.yaml). Upon reboot the computer is in a state where the "wireless" icon is replaced with a question mark. My dropbox is greyed out and Firefox can't connect to the internet. Clicking the ? icon gets to the usual wireless menus but the system reports that I am already connected (therefore cannot click "connect").
    – Ian Atkinson
    Oct 14 at 21:21










  • What files are in /etc/netplan? If you have (only) 01-network-manager-all.yaml, does it look like my example? Did you issue the THREE commands that I call out? Have you rebooted?
    – heynnema
    Oct 14 at 22:02










  • I removed the .yaml.bup and .txt files that I had accumulated in /etc/netplan and created 01-networkd.yaml exactly as described. sudo netplan --debug generate gave no output. sudo netplan apply also gave none. reboot. Wifi icon absent, Wifi settings lists no visible networks. I will attempt to put output from ip a onto this site (not sure how).
    – Ian Atkinson
    Oct 15 at 8:01
















Tried this and lost contact with the LAN altogether.
– Ian Atkinson
Oct 12 at 10:18




Tried this and lost contact with the LAN altogether.
– Ian Atkinson
Oct 12 at 10:18












Did the WLAN or LAN lose contact? You didn't say that you were using LAN. If you are using LAN, then my example code is not complete, and you would loose LAN connection. Did you reboot?
– heynnema
Oct 12 at 12:26






Did the WLAN or LAN lose contact? You didn't say that you were using LAN. If you are using LAN, then my example code is not complete, and you would loose LAN connection. Did you reboot?
– heynnema
Oct 12 at 12:26














I have found my way to the IPV4 menu via both nm-connection-editor and via GUI and entered network descriptions with and without various DNS alternatives (having reverted to the original 01-network-manager-all.yaml). Upon reboot the computer is in a state where the "wireless" icon is replaced with a question mark. My dropbox is greyed out and Firefox can't connect to the internet. Clicking the ? icon gets to the usual wireless menus but the system reports that I am already connected (therefore cannot click "connect").
– Ian Atkinson
Oct 14 at 21:21




I have found my way to the IPV4 menu via both nm-connection-editor and via GUI and entered network descriptions with and without various DNS alternatives (having reverted to the original 01-network-manager-all.yaml). Upon reboot the computer is in a state where the "wireless" icon is replaced with a question mark. My dropbox is greyed out and Firefox can't connect to the internet. Clicking the ? icon gets to the usual wireless menus but the system reports that I am already connected (therefore cannot click "connect").
– Ian Atkinson
Oct 14 at 21:21












What files are in /etc/netplan? If you have (only) 01-network-manager-all.yaml, does it look like my example? Did you issue the THREE commands that I call out? Have you rebooted?
– heynnema
Oct 14 at 22:02




What files are in /etc/netplan? If you have (only) 01-network-manager-all.yaml, does it look like my example? Did you issue the THREE commands that I call out? Have you rebooted?
– heynnema
Oct 14 at 22:02












I removed the .yaml.bup and .txt files that I had accumulated in /etc/netplan and created 01-networkd.yaml exactly as described. sudo netplan --debug generate gave no output. sudo netplan apply also gave none. reboot. Wifi icon absent, Wifi settings lists no visible networks. I will attempt to put output from ip a onto this site (not sure how).
– Ian Atkinson
Oct 15 at 8:01




I removed the .yaml.bup and .txt files that I had accumulated in /etc/netplan and created 01-networkd.yaml exactly as described. sudo netplan --debug generate gave no output. sudo netplan apply also gave none. reboot. Wifi icon absent, Wifi settings lists no visible networks. I will attempt to put output from ip a onto this site (not sure how).
– Ian Atkinson
Oct 15 at 8:01


















draft saved

draft discarded




















































Thanks for contributing an answer to Ask Ubuntu!


  • Please be sure to answer the question. Provide details and share your research!

But avoid



  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.


To learn more, see our tips on writing great answers.





Some of your past answers have not been well-received, and you're in danger of being blocked from answering.


Please pay close attention to the following guidance:


  • Please be sure to answer the question. Provide details and share your research!

But avoid



  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.


To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1082754%2ffixed-ip-address-on-lan-under-ubuntu-18-04-netplan%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

flock() on closed filehandle LOCK_FILE at /usr/bin/apt-mirror

Mangá

Eduardo VII do Reino Unido