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 網絡,但無法連接到它們。我嘗試過重新安裝無線區域網路驅動程序,但沒有任何效果。

我將提供一些有關它在我的系統上的外觀的信息

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,因為您確實手動安裝了它們。

相關內容