【问题标题】:How to set NetworkManager interface priority如何设置 NetworkManager 接口优先级
【发布时间】:2015-08-31 04:50:28
【问题描述】:

我目前有两个接口 wlan0 和 eth0

网络管理器会自动为 eth0 创建一堆默认网关,以及一个 dns 解析路由,全部用于 eth0。

Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
default         mediabadger.loc 0.0.0.0         UG    0      0        0 eth0
default         BThomehub.home  0.0.0.0         UG    1024   0        0 wlan0
google-public-d mediabadger.loc 255.255.255.255 UGH   0      0        0 eth0
192.168.0.0     *               255.255.255.0   U     0      0        0 wlan0
192.168.101.0   *               255.255.255.0   U     0      0        0 eth0
mediabadger.loc *               255.255.255.255 UH    0      0        0 eth0

但是,我想指定哪个接口应该具有优先级,因此是唯一的默认网关。

我正在通过一些代码直接编辑/etc/NetworkManager/system-connections/Wired connection 1

所以想知道用什么设置,我试过了,以下没有成功:

[ipv4]
method=manual
dns=8.8.8.8
dns-search=local
addresses1=192.168.101.1;24;0.0.0.0;
never-default=true

提前致谢

【问题讨论】:

    标签: ubuntu networking routing default


    【解决方案1】:

    经过调查,问题是实施了 connman。禁用 connman,或将以下行添加到 /etc/connman.conf 即可解决。

    NetworkInterfaceBlacklist=*
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2011-05-09
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多