我有以下/ etc /networking/接口
# The loopback network interface auto lo iface lo inet loopback auto eth0 iface eth0 inet manual bond-master bond0 bond-primary eth0 auto eth1 iface eth1 inet manual bond-master bond0 auto bond0 iface bond0 inet static address 172.17.1.210 netmask 255.255.255.0 gateway 172.17.1.1 bond-mode 1 bond-miimon 100 bond-slaves none iface bond0:1 inet static address 172.17.1.215 netmask 255.255.255.0 gateway 172.17.1.1
如果我尝试手动调出别名接口bind0:1我得到以下错误,但接口确实出现。
chris@abc1:~$ ifconfig bond0:1 bond0:1 Link encap:Ethernet HWaddr d4:ae:52:ce:25:4b UP BROADCAST RUNNING MASTER MULTICAST MTU:1500 Metric:1 chris@abc1:~$ sudo ifup bond0:1 RTNETLINK answers: File exists Failed to bring up bond0:1. chris@abc1:~$ ifconfig bond0:1 bond0:1 Link encap:Ethernet HWaddr d4:ae:52:ce:25:4b inet addr:172.17.1.215 Bcast:172.17.1.255 Mask:255.255.255.0 UP BROADCAST RUNNING MASTER MULTICAST MTU:1500 Metric:1
如果我尝试将接口closures,则出现错误,接口不能closures。
chris@abc1:~$ sudo ifdown bond0:1 ifdown: interface bond0:1 not configured chris@abc1:~$ ifconfig bond0:1 bond0:1 Link encap:Ethernet HWaddr d4:ae:52:ce:25:4b inet addr:172.17.1.215 Bcast:172.17.1.255 Mask:255.255.255.0 UP BROADCAST RUNNING MASTER MULTICAST MTU:1500 Metric:1
我已经在两个全新安装的Ubuntu 12.04.3上复制了这种行为,在两个完全独立的networking上(在不同的站点上)使用不同的拓扑(即eth连接到一个站点上的两个交换机,并且两个eth连接到另一个交换机上的另一个交换机)。
我有一个类似的别名界面在eth0:1上的另一台机器上工作 – 所以我想我正在运行正确的命令。
我也有一个类似的系统在Ubuntu 10.04上工作 – 但是在12.04之前改变了如何configuration绑定。
任何人都可以解释我做错了什么? 这是一个错误?
您应该删除别名接口的gateway线路,因为您只能有一个默认网关。
从别名界面中删除gateway线路。