10

I'm new to Ubuntu server and want set up my netplan so that I can use two different IP addresses for two separate interfaces (Wifi and Ethernet). So far, Ethernet works fine, but I can't get the wifi to connect.

After I run sudo netplan apply and check networkctl, I can see that my wifi interface has no carrier, and is stuck configuring. Below is the netplan I'm using

network:
version: 2
renderer: networkd
ethernets:
  enp2s0:
    dhcp4: no
    dhcp6: no
    addresses: [192.168.0.210/24]
    gateway4: 192.168.0.1
    nameservers:
      addresses: [8.8.8.8,8.8.4.4]
wifis:
  wlx00265abdaf50:
    dhcp4: no
    dhcp6: no
    addresses: [192.168.0.211/24]
    gateway4: 192.168.0.1
    nameservers:
      addresses: [192.168.0.1, 8.8.8.8]
    access-points:
      "myNetwork":
        password: "myPassword"

I'm also unsure of having the two instances of the nameserver bit - I couldn't find an example of someone trying to do the same thing.

Wifi adapter is: D-Link System DWA-130 802.11n Wireless N Adapter(rev.E) [Realtek RTL8191SU]

3
  • 1
    Do you have the wpasupplicant package installed? It is not automatically installed as a dependency of netplan.io since wifi support is optional on servers.
    – slangasek
    Jun 5, 2018 at 23:33
  • I just installed it and tried setting it up as per archlinux wiki page. I got this: Successfully initialized wpa_supplicant nl80211: Driver does not support authentication/association or connect commands nl80211: deinit ifname=wlx00265abdaf50 disabled_11b_rates=0 wlx00265abdaf50: Failed to initialize driver interface when I tried initializing. Its possible that the adapter I have is just a piece of garbage. Jun 7, 2018 at 0:59
  • Ok I've added an answer which I believe addresses your original question. If the wifi hardware is not functional with wpasupplicant or with the Linux driver, that's not something I have a solution for.
    – slangasek
    Jun 8, 2018 at 2:44

2 Answers 2

17

To use wifi with netplan.io and systemd-networkd, you need to manually install the wpasupplicant package. It is not automatically installed as a dependency since wifi support is optional on servers.

2
  • 1
    tyvm for this! I was trying to get wifi to work for 4 hours!
    – kdelmonte
    Feb 15, 2019 at 5:04
  • thank you @kdelmonte!!!
    – stevo
    May 13, 2020 at 20:05
0

Also eth and wireless need to be in different subnets eg 192.168.1.2 and 192.168.2.2 as they are different controllers

1
  • 1
    This is just wrong. There is no reason why these 2 interfaces can't be on the same subnet, in fact this is VERY common for a laptop connected via wireless and ethernet - I'm typing this on a laptop connected that manner. Jan 23, 2023 at 20:39

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .