WLAN configutation error: setup host server with wifi instead of using ethernet

tabita

New Member
Sep 16, 2021
2
0
1
43
Hi all,

I'm trying use my old laptop as a proxmox testing server.
I do not want it to be attached to ethernet and i want it to connect to my network via wifi.

To configure it i'm connected via ethernet using ssh protocol.

I did some research and found this wiki https://pve.proxmox.com/wiki/WLAN.
I followed the instructions available there.

From there i went through the instructions for WPA_supplicant https://wiki.debian.org/WiFi/HowToUse#wpa_supplicant.

Code:
#install wpasupplicant
apt-get install wpasupplicant -y

#restrict the permissions of /etc/network/interfaces
chmod 0600 /etc/network/interfaces

#calc WPA PSK hash for mySSID and pipe it into /etc/wpa_supplicant/wpa_supplicant.conf
su -l -c "wpa_passphrase myssid my_very_secret_passphrase > /etc/wpa_supplicant/wpa_supplicant.conf"

#check /etc/wpa_supplicant/wpa_supplicant.conf and add the below
ctrl_interface=/run/wpa_supplicant # Giving configuration update rights to wpa_cli
ctrl_interface_group=wheel
update_config=1

ap_scan=1 # AP scanning

country=US # ISO/IEC alpha2 country code in which the device is operating
network={
        ssid="myssid"
        #psk="my_very_secret_passphrase"
        psk=ccb290fd4fe6b22935cbae31449e050edd02ad44627b16ce0151668f5f53c01b
}

#save the file

systemctl reenable wpa_supplicant.service
service wpa_supplicant restart
service dhcpcd restart # failed to restart dhcpd.service: Unit dhcp.service not found
wpa_supplicant -B -Dwext -i <interface> -c/etc/wpa_supplicant/wpa_supplicant.conf

ifup <interface>
ifconfig <interface> up

After the above configuration my wifi interface still seem to be down and not connecting

Code:
debugging

>>>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: enp0s31f6: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast master vmbr0 state UP group default qlen 1000
    link/ether 48:ba:4e:ef:08:f2 brd ff:ff:ff:ff:ff:ff
3: wlp2s0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue state DOWN group default qlen 1000
    link/ether f8:34:41:f4:0b:73 brd ff:ff:ff:ff:ff:ff
    inet 192.168.1.15/24 scope global wlp2s0
       valid_lft forever preferred_lft forever
4: vmbr0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default qlen 1000
    link/ether 48:ba:4e:ef:08:f2 brd ff:ff:ff:ff:ff:ff
    inet 192.168.1.10/24 scope global vmbr0
       valid_lft forever preferred_lft forever
    inet6 fe80::4aba:4eff:feef:8f2/64 scope link
       valid_lft forever preferred_lft forever


>>>ip r

default via 192.168.1.1 dev vmbr0 proto kernel onlink
192.168.1.0/24 dev vmbr0 proto kernel scope link src 192.168.1.10
192.168.1.0/24 dev wlp2s0 proto kernel scope link src 192.168.1.15 linkdown <---- Linkdown is because the wifi interface is down?

>>>cat /etc/network/inferfaces

auto lo
iface lo inet loopback

iface enp0s31f6 inet manual

allow-hotplug wlp2s0
iface wlp2s0 inet static
        address 192.168.1.15/24
        gateway 192.168.1.1
        wpa-ssid myssid
        wpa-psk ccb290fd4fe6b22935cbae31449e050edd02ad44627b16ce0151668f5f53c01b

auto vmbr0
iface vmbr0 inet static
        address 192.168.1.10/24
        gateway 192.168.1.1
        bridge-ports enp0s31f6
        #bridge-ports none
        bridge-stp off
        bridge-fd 0

        #post-up echo 1 > /proc/sys/net/ipv4/ip_forward
        #post-up iptables -t nat -A POSTROUTING -s '192.168.1.0/24' -o wlp2s0 -j MASQUERADE
        #post-down iptables -t nat -D POSTROUTING -s '192.168.1.0/24' -o wlp2s0 -j MASQUERADE

>>>iwconfig wlp2s0

wlp2s0    IEEE 802.11  ESSID:off/any
          Mode:Managed  Access Point: Not-Associated   Tx-Power=-2147483648 dBm
          Retry short limit:7   RTS thr:off   Fragment thr:off
          Encryption key:off
          Power Management:on

>>> ifup wlp2s0 -v

info: requesting link dump
info: requesting address dump
info: requesting netconf dump
info: loading builtin modules from ['/usr/share/ifupdown2/addons']
info: module openvswitch not loaded (module init failed: no /usr/bin/ovs-vsctl found)
info: module openvswitch_port not loaded (module init failed: no /usr/bin/ovs-vsctl found)
info: module ppp not loaded (module init failed: no /usr/bin/pon found)
info: module batman_adv not loaded (module init failed: no /usr/sbin/batctl found)
info: executing /sbin/sysctl net.bridge.bridge-allow-multiple-vlans
info: module mstpctl not loaded (module init failed: no /sbin/mstpctl found)
info: executing /bin/ip rule show
info: executing /bin/ip -6 rule show
info: module ethtool not loaded (module init failed: /sbin/ethtool: not found)
info: address: using default mtu 1500
info: address: max_mtu undefined
info: executing /usr/sbin/ip vrf id
info: mgmt vrf_context = False
info: dhclient: dhclient_retry_on_failure set to 0
info: executing /bin/ip addr help
info: address metric support: OK
info: module ethtool not loaded (module init failed: /sbin/ethtool: not found)
info: module ppp not loaded (module init failed: no /usr/bin/pon found)
info: module mstpctl not loaded (module init failed: no /sbin/mstpctl found)
info: module batman_adv not loaded (module init failed: no /usr/sbin/batctl found)
info: module openvswitch_port not loaded (module init failed: no /usr/bin/ovs-vsctl found)
info: module openvswitch not loaded (module init failed: no /usr/bin/ovs-vsctl found)
info: looking for user scripts under /etc/network
info: loading scripts under /etc/network/if-pre-up.d ...
info: loading scripts under /etc/network/if-up.d ...
info: loading scripts under /etc/network/if-post-up.d ...
info: loading scripts under /etc/network/if-pre-down.d ...
info: loading scripts under /etc/network/if-down.d ...
info: loading scripts under /etc/network/if-post-down.d ...
info: using mgmt iface default prefix eth
info: processing interfaces file /etc/network/interfaces
info: wlp2s0: running ops ...
info: executing /sbin/sysctl net.mpls.conf.wlp2s0.input=0
info: executing /etc/network/if-pre-up.d/wireless-tools
info: executing /etc/network/if-pre-up.d/wpasupplicant
error: wlp2s0 : wlp2s0: pre-up cmd '/etc/network/if-pre-up.d/wpasupplicant' failed: returned 1 (wpa_supplicant: /sbin/wpa_supplicant daemon failed to start
)
info: exit status 0

>>> lshw -class network
  *-network DISABLED
       description: Wireless interface
       product: Wireless 8260
       vendor: Intel Corporation
       physical id: 0
       bus info: pci@0000:02:00.0
       logical name: wlp2s0
       version: 3a
       serial: f8:34:41:f4:0b:73
       width: 64 bits
       clock: 33MHz
       capabilities: pm msi pciexpress bus_master cap_list ethernet physical wireless
       configuration: broadcast=yes driver=iwlwifi driverversion=5.11.22-4-pve firmware=36.ca7b901d.0 8000C-36.ucode ip=192.168.1.15 latency=0 link=no multicast=yes wireless=IEEE 802.11
       resources: irq:130 memory:e1100000-e1101fff

>>> rfkill list all
0: hci0: Bluetooth
        Soft blocked: no
        Hard blocked: no
1: phy0: Wireless LAN
        Soft blocked: no
        Hard blocked: no

>>> dmesg | grep -i firmware
[    0.187070] ACPI: [Firmware Bug]: BIOS _OSI(Linux) query ignored
[    8.138421] platform regulatory.0: Direct firmware load for regulatory.db failed with error -2
[    8.147672] Bluetooth: hci0: Firmware revision 0.0 build 10 week 41 2018
[    8.173003] i915 0000:00:02.0: [drm] Finished loading DMC firmware i915/skl_dmc_ver1_27.bin (v1.27)
[    8.183313] iwlwifi 0000:02:00.0: loaded firmware version 36.ca7b901d.0 8000C-36.ucode op_mode iwlmvm

From my understanding during the troubleshooting phase it seems that wpa_supplicant fails because the wifi interface seems to be down.
Even if i try to bring it up it does not come up.

I would really appreciate some help to resolve this issue.
Thanks
 
I found your post while trying to get wifi working on ubuntu server 20.04

what you posted helped me find success with a couple tweaks

try this...
# failed to restart dhcpd.service: Unit dhcp.service not found
install dhcpcd

$ sudo apt install dhcpcd5 -y

you may nned to disable dhcpcd after you're up and running to eliminate secondary addresses

$ sudo systemctl stop dhcpcd
$ sudo systemctl disable dhcpcd

you could also do your configurations inside /etc/dhcpcd.conf and set everything in /etc/network/interfaces to manual. then it should use dhcpcd.conf for configuration


disconnect ethernet and reboot. ping to test

$ ping google.com

good luck
 
Last edited:
I found your post while trying to get wifi working on ubuntu server 20.04

what you posted helped me find success with a couple tweaks

try this...

install dhcpcd

$ sudo apt install dhcpcd5 -y

you may nned to disable dhcpcd after you're up and running to eliminate secondary addresses

$ sudo systemctl stop dhcpcd
$ sudo systemctl disable dhcpcd

you could also do your configurations inside /etc/dhcpcd.conf and set everything in /etc/network/interfaces to manual. then it should use dhcpcd.conf for configuration


disconnect ethernet and reboot. ping to test

$ ping google.com

good luck

Hey,

I'm glad that my question helped you.

I'm still trying to get my wifi working. I installed dhcpcd but it did not work.
I really can't understand why it's not working.
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!