在 Debian 上从命令行设置无线连接

在 Debian 上从命令行设置无线连接

我有一台带有专有 Intel wifi 卡的笔记本电脑,我试图用它连接到 WPA/WPA2 网络(简称为“网络”)

我已经安装了 iwlwifi、网络工具和网络管理器

我运行 nmtui 来设置 wifi,一切似乎都很好,nmtui 报告已连接,但当我尝试 ping 8.8.4.4 时,网络无法访问。由于某种原因 nm[cli|tui] 不起作用。我也尝试过 wpa_supplicant,但也没能走得太远。

我希望我设置无线接口时出现一些错误,有人可以发现并帮助我修复。

我知道“网络”有效,因为我在 Debian 系统旁边双启动 Ubuntu,并且我有 wifi 与 Ubuntu 配合使用。

配置文件

wlo1      IEEE 802.11  ESSID:"Network"  
          Mode:Managed  Frequency:2.442 GHz  Access Point: A2:63:91:25:81:67   
          Bit Rate=72.2 Mb/s   Tx-Power=22 dBm   
          Retry short limit:7   RTS thr:off   Fragment thr:off
          Power Management:on
          Link Quality=53/70  Signal level=-57 dBm  
          Rx invalid nwid:0  Rx invalid crypt:0  Rx invalid frag:0
          Tx excessive retries:0  Invalid misc:1   Missed beacon:0

纳米克利

wlo1: connected to Network
    "Intel Wireless 3165 (Dual Band Wireless AC 3165)"
    wifi (iwlwifi), B8:81:98:51:75:5C, hw
    ip4 default
    inet4 192.168.1.23/24
    inet6 fe80::bd90:9bfa:c408:e458/64

enp1s0: unmanaged
    "Realtek RTL8101/2/6E PCI Express Fast/Gigabit Ethernet controller"
    ethernet (r8169), EC:8E:B5:A3:5C:02, hw, mtu 1500

lo: unmanaged
    loopback (unknown), 00:00:00:00:00:00, sw, mtu 65536

DNS configuration:
    servers: 192.168.1.1
    interface: wlo1

Use "nmcli device show" to get complete information about known devices and
"nmcli connection show" to get an overview on active connection profiles.

Consult nmcli(1) and nmcli-examples(5) manual pages for complete usage details.

nmcli 设备显示

GENERAL.DEVICE:                         wlo1
GENERAL.TYPE:                           wifi
GENERAL.HWADDR:                         B8:81:98:51:75:5C
GENERAL.MTU:                            0
GENERAL.STATE:                          100 (connected)
GENERAL.CONNECTION:                     Network
GENERAL.CON-PATH:                       /org/freedesktop/NetworkManager/ActiveConnection/6
IP4.ADDRESS[1]:                         192.168.1.23/24
IP4.GATEWAY:                            192.168.1.1
IP4.DNS[1]:                             192.168.1.1
IP6.ADDRESS[1]:                         fe80::bd90:9bfa:c408:e458/64
IP6.GATEWAY:                            --

GENERAL.DEVICE:                         enp1s0
GENERAL.TYPE:                           ethernet
GENERAL.HWADDR:                         EC:8E:B5:A3:5C:02
GENERAL.MTU:                            1500
GENERAL.STATE:                          10 (unmanaged)
GENERAL.CONNECTION:                     --
GENERAL.CON-PATH:                       --
WIRED-PROPERTIES.CARRIER:               off
IP4.ADDRESS[1]:                         192.168.1.35/24
IP4.GATEWAY:                            192.168.1.1
IP4.ROUTE[1]:                           dst = 169.254.0.0/16, nh = 0.0.0.0, mt = 1000
IP6.ADDRESS[1]:                         fe80::ee8e:b5ff:fea3:5c02/64
IP6.GATEWAY:                            --

GENERAL.DEVICE:                         lo
GENERAL.TYPE:                           loopback
GENERAL.HWADDR:                         00:00:00:00:00:00
GENERAL.MTU:                            65536
GENERAL.STATE:                          10 (unmanaged)
GENERAL.CONNECTION:                     --
GENERAL.CON-PATH:                       --
IP4.ADDRESS[1]:                         127.0.0.1/8
IP4.GATEWAY:                            --
IP6.ADDRESS[1]:                         ::1/128
IP6.GATEWAY:                            --

nmcli 连接显示

NAME      UUID                                  TYPE             DEVICE 
Network   21931e14-0cda-46b2-91c2-120447e287bd  802-11-wireless  wlo1   
SAndroid  62d7a99d-8ef7-404c-b18b-df31ebb3b7bc  802-11-wireless  --     

猫 /etc/网络/接口

# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).

source /etc/network/interfaces.d/*

# The loopback network interface
auto lo
iface lo inet loopback

# The primary network interface
allow-hotplug enp1s0
iface enp1s0 inet dhcp

LSPCI | grep 无线

05:00.0 Network controller: Intel Corporation Wireless 3165 (rev 81)

路线-n

Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
0.0.0.0         192.168.1.1     0.0.0.0         UG    600    0        0 wlo1
169.254.0.0     0.0.0.0         255.255.0.0     U     1000   0        0 wlo1
192.168.1.0     0.0.0.0         255.255.255.0   U     600    0        0 wlo1

答案1

这是一个驱动程序问题

有同样问题的朋友请运行命令

apt-get install linux-firmware linux-firmware-free linux-firmware-nonfree

相关内容