wlan1 接口从 ifconfig 中消失

wlan1 接口从 ifconfig 中消失

我试图通过编辑在我的 wlan1 卡上创建一个虚拟接口(就像在 Windows 中设置托管网络)/etc/network/interfaces

auto wlan1:0 
iface wlan1:0 inet static
address 192.168.4.1
netmask 255.255.255.0 
wireless-mode ad-hoc

当失败时我尝试过ap-hotspot

sudo apt-get install ap-hotspot
cd /tmp && wget http://archive.ubuntu.com/ubuntu/pool/universe/w/wpa/hostapd_1.0-3ubuntu2.1_i386.deb && sudo dpkg -i hostapd*.deb && sudo apt-mark hold hostapd
sudo ap-hotspot configure

这也失败了。之后我安装了默认设置network-manager,我注意到我可以看到周围的 wifi 网络,但无法连接到它们。我尝试重新安装 wlan 驱动程序,但没有任何效果。

我将提供一些关于它在我的系统上如何显示的信息

sudo airmon-ng
Interface   Chipset     Driver

wlan1       Unknown     iwlwifi - [phy0]

sudo gedit /etc/udev/rules.d/70-persistent-net.rules
# PCI device 0x8086:0x4237 (iwlwifi)
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:24:d6:5f:8f:94", ATTR{dev_id}=="0x0", ATTR{type}=="1", KERNEL=="wlan*", NAME="wlan1"

此外,这个虚拟 wlan1:0 接口仍然在系统上,不会被删除ifdown

 sudo lshw -C network
     *-network               
           description: Wireless interface
           product: PRO/Wireless 5100 AGN [Shiloh] Network Connection
           vendor: Intel Corporation
           physical id: 0
           bus info: pci@0000:02:00.0
           logical name: wlan1
           version: 00
           serial: 00:24:d6:5f:8f:94
           width: 64 bits
           clock: 33MHz
           capabilities: pm msi pciexpress bus_master cap_list ethernet physical wireless
           configuration: broadcast=yes driver=iwlwifi driverversion=3.13.0-46-lowlatency firmware=8.83.5.1 build 33692 latency=0 link=no multicast=yes wireless=IEEE 802.11abgn
           resources: irq:45 memory:90700000-90701fff
      *-network
           physical id: 2
           logical name: mon.wlan1

 sudo ifconfig 
    eth1
    lo
    mon.wlan1:0: error fetching interface information: Device not found

(请注意,为了清晰起见,我已删除 eth1 和 lo 配置)。有关接口和驱动程序的更多信息:

    :/sys/class/net$ ls -alh
    total 0
    drwxr-xr-x  2 root root 0 mar 14  2015 .
    drwxr-xr-x 54 root root 0 mar 14  2015 ..
    lrwxrwxrwx  1 root root 0 mar 14 20:11 eth1 -> ../../devices/pci0000:00/0000:00:1c.5/0000:03:00.0/net/eth1
    lrwxrwxrwx  1 root root 0 mar 14  2015 lo -> ../../devices/virtual/net/lo
    lrwxrwxrwx  1 root root 0 mar 14 20:11 mon.wlan1:0 -> ../../devices/pci0000:00/0000:00:1c.1/0000:02:00.0/net/mon.wlan1:0
    lrwxrwxrwx  1 root root 0 mar 14 20:11 wlan1 -> ../../devices/pci0000:00/0000:00:1c.1/0000:02:00.0/net/wlan1

 :lspci -vvnn | grep -A 9 Network
02:00.0 Network controller [0280]: Intel Corporation PRO/Wireless 5100 AGN [Shiloh] Network Connection [8086:4237]
    Subsystem: Intel Corporation WiFi Link 5100 AGN [8086:1311]
    Physical Slot: 1
    Control: I/O- Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx+
    Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx-
    Latency: 0, Cache Line Size: 64 bytes
    Interrupt: pin A routed to IRQ 45
    Region 0: Memory at 90700000 (64-bit, non-prefetchable) [size=8K]
    Capabilities: <access denied>

我怎样才能摆脱这个 wlan1:0 接口并使 wlan1 显示和工作?

答案1

您以非常令人困惑的方式呈现了大量信息,但我认为您的问题并不严重。您说您的接口文件包含:

auto wlan1:0
iface wlan1:0 inet static
address 192.168.4.1
netmask 255.255.255.0
wireless-mode ad-hoc

请将其更改为:

auto wlan1
iface wlan1 inet static
address 192.168.4.1
netmask 255.255.255.0

然后重新启动。

如果仍然不起作用,请删除 ap-hotspot 和 network-manager,因为您确实手动安装了它们。

相关内容