我正试图在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我使用dhcpcd作为网络管理器。我读过dhcpcd自动将以太网设备的度量设置为200+,将无线局域网设备的度量设置为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 0 0 wlan0
10.42.0.0 0.0.0.0 255.255.255.0 U 202 0 0 eth0
192.168.0.0 0.0.0.0 255.255.255.0 U 304 0 0 wlan0
192.168.1.0 0.0.0.0 255.255.255.0 U 203 0 0 eth1在dhcpcd其他地方可以更改度量吗?因为在接口文件中,它根本不工作!
发布于 2016-01-04 09:44:28
dhcpcd的配置文件是/etc/dhcpcd.conf。
我只需要加上这两行:
interface eth1
metric 400https://askubuntu.com/questions/716504
复制相似问题