我有一个接口eth0,我希望给它一个额外的虚拟IP。我要做到这一点的办法如下:
ifconfig eth0:0 ip.address.goes.here netmask subnet.address.goes.here但是,当我重新启动时,这是丢失的。
我尝试过编辑/etc/network/interfaces以添加以下内容:
auto eth0:0 iface eth0:0 inet static
address ip.address.goes.here
netmask subnet.address.goes.here但是,在重新启动时,eth0的静态ip是很好地加载的,但是根本没有加载eth0:0虚拟IP。
那么,如何永久地添加eth0:0虚拟IP呢?
发布于 2014-03-20 04:33:09
如果您想以“传统”的方式做事,/etc/network/interfaces的相关部分应该如下所示:
auto eth0:0
iface eth0:0 inet static
address ip.address.goes.here
netmask subnet.address.goes.here而不是这样,你犯了一个错误:
auto eth0:0 iface eth0:0 inet static
address ip.address.goes.here
netmask subnet.address.goes.herehttps://askubuntu.com/questions/83171
复制相似问题