小编use*_*037的帖子

更改 dhcpcd 的指标

我正在尝试在 eth1 上为我的 ubuntu 盒子建立后备连接(它实际上是一个华为 HiLink 移动宽带调制解调器)。这是我的接口文件的内容:

auto lo
iface lo inet loopback

auto eth0
allow-hotplug eth0
iface eth0 inet manual

auto eth1
allow-hotplug eth1
iface eth1 inet manual
    metric 400            # does not work
Run Code Online (Sandbox Code Playgroud)

我使用 dhcpcd 作为网络管理器。我读过 dhcpcd 自动将以太网设备的指标设置为 200+,将 wlan 设备的指标设置为 300+。这是我的输出route -n

Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
0.0.0.0         10.42.0.1       0.0.0.0         UG    202    0        0 eth0
0.0.0.0         192.168.1.1     0.0.0.0         UG    203    0        0 eth1
0.0.0.0         192.168.0.1     0.0.0.0         UG    304 …
Run Code Online (Sandbox Code Playgroud)

networking

4
推荐指数
1
解决办法
5251
查看次数

标签 统计

networking ×1