我經常使用 Android 智慧型手機的 USB 網路共享功能。如果網路管理員建立連接,網路幾乎每次都會獲得新的網路名稱(以「網路 1」開始,每次都會在「網路」之後遞增數字)。
我懷疑智慧型手機每次都會為虛擬乙太網路設備使用另一個 MAC 位址,它啟動虛擬設備,或啟動作業系統或其他什麼。我對所使用的技術沒有足夠的了解,無法明確地說。
如果我能一次又一次地刪除舊網絡,那對我來說就沒問題了。我以為,用指令刪除就好了netsh lan
,結果卻只有下面這樣
C:\Windows\system32> netsh lan show profiles
The Wired AutoConfi Service (dot3svc) is not running
所以我開始了:
C:\Windows\system32> sc.exe config dot3svc start= auto
此後,該命令netsh lan show interface
顯示我的硬體乙太網路介面(Realtek PCIe),但不顯示虛擬介面。netsh int show int
列出它(它是德語):
C:\Windows\system32>netsh int show int
Verw.-status Status Typ Schnittstellenname
-------------------------------------------------------------------------
Deaktiviert Getrennt Dediziert WiFi
Aktiviert Verbunden Dediziert Ethernet 2
Aktiviert Getrennt Dediziert Ethernet
虛擬乙太網路設備列印名稱SAMSUNG Mobile USB Remote NDIS Network Device
。如何透過命令列控制 NDIS 設備? (如果可以的話,圖形化也可以)
答案1
列表指令:
C:\Windows\system32>netsh mbn show interfaces
連接命令:
C:\Windows\system32>netsh mbn connect interface="interface_name" connmode=name name="connection_name"
斷開連線指令:
C:\Windows\system32>netsh mbn disconnect interface="interface_name"