NetworkManager 与 DNS 服务器存在问题

NetworkManager 与 DNS 服务器存在问题

我有两块网卡,一块是板载的,另一块是添加的 PCI 卡。我还创建了一个桥接接口供我的 KVM 虚拟机使用,所以我的桌面(主机)使用enp3s0接口和虚拟机(客户机)使用enp4s3通过我创建的名为 VM-NetBridge 的桥接器连接接口。以下是 ip a 命令:

1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host 
       valid_lft forever preferred_lft forever
2: enp3s0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
    link/ether 30:5a:3a:0b:43:1b brd ff:ff:ff:ff:ff:ff
    inet 192.168.0.35/24 brd 192.168.0.255 scope global enp3s0
       valid_lft forever preferred_lft forever
    inet6 fe80::325a:3aff:fe0b:431b/64 scope link 
       valid_lft forever preferred_lft forever
3: enp4s6: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast master VM-NetBridge state UNKNOWN group default qlen 1000
    link/ether 00:e0:7d:75:cd:d7 brd ff:ff:ff:ff:ff:ff
    inet6 fe80::2e0:7dff:fe75:cdd7/64 scope link 
       valid_lft forever preferred_lft forever
4: VM-NetBridge: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default qlen 1000
    link/ether 00:e0:7d:75:cd:d7 brd ff:ff:ff:ff:ff:ff
    inet 192.168.0.110/24 brd 192.168.0.255 scope global VM-NetBridge
       valid_lft forever preferred_lft forever
    inet6 fe80::2e0:7dff:fe75:cdd7/64 scope link 
       valid_lft forever preferred_lft forever
5: virbr0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue state DOWN group default qlen 1000
    link/ether 00:00:00:00:00:00 brd ff:ff:ff:ff:ff:ff
    inet 192.168.122.1/24 brd 192.168.122.255 scope global virbr0
       valid_lft forever preferred_lft forever
6: virbr0-nic: <BROADCAST,MULTICAST> mtu 1500 qdisc pfifo_fast state DOWN group default qlen 1000
    link/ether 52:54:00:82:71:44 brd ff:ff:ff:ff:ff:ff
7: virbr1: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue state DOWN group default qlen 1000
    link/ether 00:00:00:00:00:00 brd ff:ff:ff:ff:ff:ff
    inet 192.168.100.1/24 brd 192.168.100.255 scope global virbr1
       valid_lft forever preferred_lft forever
8: virbr1-nic: <BROADCAST,MULTICAST> mtu 1500 qdisc pfifo_fast state DOWN group default qlen 1000
    link/ether 52:54:00:55:a9:3a brd ff:ff:ff:ff:ff:ff
9: vnet0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast master VM-NetBridge state UNKNOWN group default qlen 1000
    link/ether fe:54:00:bf:f8:70 brd ff:ff:ff:ff:ff:ff

现在,我遇到了名称服务器问题:每次启动时,我都必须删除一个文件并更新 resolvconf。我制作了一个脚本,如下所示:

#! /bin/zsh

if [ -f /run/resolvconf/interface/NetworkManager ]; then
    sudo rm /run/resolvconf/interface/NetworkManager
    sudo resolvconf -u
fi

这解决了这个问题,但我不知道为什么NetworkManager会自动创建这个文件()/run/resolvconf/interface/以及如何避免这种情况。

我还无法配置第二张网卡,因为它显示它“不受管理”。

快照 NetworkManager 小程序

相关内容