![OVS——开放 vSwitch](https://linux22.com/image/1086664/OVS%E2%80%94%E2%80%94%E5%BC%80%E6%94%BE%20vSwitch.png)
我安装了 OVS 并在 vSwitch 中添加了 WLAN0 接口。它工作正常,但重启 PC 后,Linux 找不到 WLAN0 接口,无法连接到接入点。
Ifconfig 无法显示 WLAN0。我认为需要在 /etc/network/interfaces 中添加一些内容,但我尝试过,但失败了。
抱歉,我不是 Linux 专家,但我知道 Linux 基础知识 :P
PS. 如果我在 vSwitch 中添加了 eth0(没有 WLAN0 接口),情况也是一样的 :D
答案1
可以通过 udev 创建接口的永久名称。请参阅以下基于接口 MAC 地址的永久以太网 (eth0) 和 WiFi (wlan0-3) 名称的示例。
# cat /etc/udev/rules.d/70-persistent-net.rules
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="f0:de:f1:bb:18:7b", ATTR{dev_id}=="0x0", ATTR{type}=="1", KERNEL=="eth*", NAME="eth0"
# 03:00.0 Intel Corporation Centrino Advanced-N 6205 [Taylor Peak] [8086:0085]
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="10:0b:a9:3b:5c:6c", ATTR{dev_id}=="0x0", ATTR{type}=="1", KERNEL=="wlan*", NAME="wlan0"
# No name; 148f:5370 Ralink Technology, Corp. RT5370 Wireless Adapter
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:13:ef:c2:01:86", ATTR{dev_id}=="0x0", ATTR{type}=="1", KERNEL=="wlan*", NAME="wlan1"
# TP-Link TL-WDN3200; 148f:5572 Ralink Technology, Corp. RT5572 Wireless Adapter
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="64:70:02:27:d6:42", ATTR{dev_id}=="0x0", ATTR{type}=="1", KERNEL=="wlan*", NAME="wlan2"
# No name; 148f:5370 Ralink Technology, Corp. RT5370 Wireless Adapter
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:13:ef:c2:04:7e", ATTR{dev_id}=="0x0", ATTR{type}=="1", KERNEL=="wlan*", NAME="wlan3