KvmWithBridge:主网络接口(wi-fi)

如何建立桥接网络?

thufir@dur:~$ thufir@dur:~$ cat /etc/network/interfaces # interfaces(5) file used by ifup(8) and ifdown(8) auto lo iface lo inet loopback thufir@dur:~$ thufir@dur:~$ tree /etc/network /etc/network ├── if-down.d │  ├── avahi-autoipd │  └── wpasupplicant -> ../../wpa_supplicant/ifupdown.sh ├── if-post-down.d │  ├── avahi-daemon -> ../if-up.d/avahi-daemon │  ├── bridge -> /lib/bridge-utils/ifupdown.sh │  ├── wireless-tools │  └── wpasupplicant -> ../../wpa_supplicant/ifupdown.sh ├── if-pre-up.d │  ├── bridge -> /lib/bridge-utils/ifupdown.sh │  ├── wireless-tools │  └── wpasupplicant -> ../../wpa_supplicant/ifupdown.sh ├── if-up.d │  ├── avahi-autoipd │  ├── avahi-daemon │  ├── openssh-server │  └── wpasupplicant -> ../../wpa_supplicant/ifupdown.sh ├── interfaces └── interfaces.d 5 directories, 14 files thufir@dur:~$ thufir@dur:~$ head /etc/network/if-pre-up.d/bridge #!/bin/sh # You don't usually need to touch this file at all, the full configuration # of the bridge can be done in a standard way on /etc/network/interfaces. # Have a look at /usr/share/doc/bridge-utils/README.Debian if you want # more info about the way on wich a bridge is set up on Debian. if [ ! -x /sbin/brctl ] then thufir@dur:~$ 

示例interfaces附带eth0定义 – 我正在使用Wi-Fi。 虽然有一个以太网端口,但它没有被使用。

没有部分上述interface文件The primary network interface 。 这是网络信息:

 thufir@dur:~$ thufir@dur:~$ ifconfig eno1: flags=4099 mtu 1500 ether c8:9c:dc:28:86:ca txqueuelen 1000 (Ethernet) RX packets 0 bytes 0 (0.0 B) RX errors 0 dropped 0 overruns 0 frame 0 TX packets 0 bytes 0 (0.0 B) TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0 device interrupt 20 memory 0xfe700000-fe720000 lo: flags=73 mtu 65536 inet 127.0.0.1 netmask 255.0.0.0 inet6 ::1 prefixlen 128 scopeid 0x10 loop txqueuelen 1000 (Local Loopback) RX packets 5815 bytes 531107 (531.1 KB) RX errors 0 dropped 0 overruns 0 frame 0 TX packets 5815 bytes 531107 (531.1 KB) TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0 virbr0: flags=4099 mtu 1500 inet 192.168.122.1 netmask 255.255.255.0 broadcast 192.168.122.255 ether 52:54:00:20:ba:e1 txqueuelen 1000 (Ethernet) RX packets 0 bytes 0 (0.0 B) RX errors 0 dropped 0 overruns 0 frame 0 TX packets 0 bytes 0 (0.0 B) TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0 wlx74da3889c88b: flags=4163 mtu 1500 inet 192.168.1.5 netmask 255.255.255.0 broadcast 192.168.1.255 inet6 fe80::cde:e1f7:5175:b3c0 prefixlen 64 scopeid 0x20 ether 74:da:38:89:c8:8b txqueuelen 1000 (Ethernet) RX packets 72332 bytes 72736092 (72.7 MB) RX errors 0 dropped 0 overruns 0 frame 0 TX packets 61239 bytes 9854513 (9.8 MB) TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0 thufir@dur:~$ 

它是wlx74da3889c88b ,表示与路由器的Wi-Fi连接,默认网关为192.168.1.1 。 使用wlx74da3889c88b作为“主网络接口”?

也许它根本不适用于Wi-Fi。