deban 中的网络接口:wifi 和 USB-以太网

deban 中的网络接口:wifi 和 USB-以太网

刚刚在 iMac5,1 上安装了 Debian。

X11 根本不起作用,所以这一切都在命令行上。

我有内置以太网连接到我的家庭宽带集线器。都好。

我想让无线网络正常工作。

# lspci
...
03:00.0 Network controller: Broadcom Limited BCM4321 802.11a/b/g/n (rev 01)
...
# apt-get install firmware-b43-installer
# apt-get install iw
# apt-get install wireless-tools
# apt-get install connman
# connmanctl
connmanctl> enable wifi
Error wifi: Method "SetProperty" with signature "sv" on interface "net.connman.Technology" doesn't exist

connmanctl>

怎么办?!如何判断驱动程序是否确实安装并正常工作?

第二:我有一个 USB 以太网适配器——最终我想要桥接网络。

# lsusb
...
Bus 001 Device 002: ID 0b95:772a ASIX Electronics Corp. AX88772A Fast Ethernet
...

再说一次:现在怎么办?

第三个接口:是wifi还是USB?

# 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: enp2s0: <BROADCAST,MULTICAST,DYNAMIC,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
    link/ether 00:16:cb:9c:eb:ce brd ff:ff:ff:ff:ff:ff
    inet 192.168.1.51/24 brd 192.168.1.255 scope global enp2s0
       valid_lft forever preferred_lft forever
    inet 192.168.2.14/24 brd 192.168.2.255 scope global enp2s0
       valid_lft forever preferred_lft forever
    inet6 fe80::216:cbff:fe9c:ebce/64 scope link
       valid_lft forever preferred_lft forever
3: enx00808e8c92f8: <NO-CARRIER,BROADCAST,MULTICAST,DYNAMIC,UP> mtu 1500 qdisc pfifo_fast state DOWN group default qlen 1000
    link/ether 00:80:8e:8c:92:f8 brd ff:ff:ff:ff:ff:ff

(我希望机器具有静态地址 192.168.1.51 并进行了/etc/network/interfaces相应的设置,但它似乎忽略了这一点并从路由器获取另一个地址。)

更新:wlan0 出现并且接口被忽略

root@imac51:~# cat /etc/network/interfaces
# 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 enp2s0
auto enp2s0
iface enp2s0 inet static
        address 192.168.1.51
        netmask 255.255.255.0
        gateway 192.168.1.1
root@imac51:~#
root@imac51:~# 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: enp2s0: <BROADCAST,MULTICAST,DYNAMIC,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
    link/ether 00:16:cb:9c:eb:ce brd ff:ff:ff:ff:ff:ff
    inet 192.168.2.14/24 brd 192.168.2.255 scope global enp2s0
       valid_lft forever preferred_lft forever
    inet6 fe80::216:cbff:fe9c:ebce/64 scope link
       valid_lft forever preferred_lft forever
3: enx00808e8c92f8: <NO-CARRIER,BROADCAST,MULTICAST,DYNAMIC,UP> mtu 1500 qdisc pfifo_fast state DOWN group default qlen 1000
    link/ether 00:80:8e:8c:92:f8 brd ff:ff:ff:ff:ff:ff
4: wlan0: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN group default qlen 1000
    link/ether 00:17:f2:99:7b:9b brd ff:ff:ff:ff:ff:ff
root@imac51:~#

重新启动似乎已经出现wlan0并且connmann正在做一些事情。一个案例将其关闭并再次打开...

摆弄了一下connmanctrl,现在似乎已经连接了——在再次重新启动之后。是否可以更改路由器上显示的计算机名称?

答案1

看起来它对connmanDHCP 做了一些事情。无论如何都没有必要,所以最好不要使用它。使用iw(使用 wifi 执行操作的命令) 和wpasupplicant(将wpa-命令添加到/etc/network/interfaces) 以及以下内容/etc/network/interfaces

auto wlan0
allow-hotplug wlan0
iface wlan0 inet dhcp
        wpa-ssid RWB
        wpa-psk password

请注意,对于这台机器,WiFi 硬件是 Broadcom 4321,正确的包是firmware-bc43-installer;安装程序猜测另一个错误的包,结果是它会加入 AP 但无法访问网络。这会影响 Ubuntu 20 和 Mint 10 安装程序。

相关内容