微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

Ubuntu Linux,Bonding和VLAN – 我可以配置所有要标记的接口吗? IE:在没有IP地址的情况下启动BOND0接口

我有一个服务器,在bond,bond0中有多个适配器.

我不确定(即使经过大量研究)如何在没有IP地址的情况下启动bond0设备.我希望VLAN使用bond0,但服务器上没有未标记的接口.

auto eth0
iface eth0 inet manual
        bond-master bond0
auto eth1
iface eth1 inet manual
        bond-master bond0
auto bond0
iface bond0 inet static
        address 192.168.1.100
        netmask 255.255.255.0
        network 192.168.1.0
        bond-slaves none
        bond-miimon 100
        bond-mode 802.3ad
auto vlan50
iface vlan50 inet static
        address 192.168.248.241
        netmask 255.255.255.0
        network 192.168.248.0
        vlan-raw-device bond0

上面的配置工作正常,但bond0的地址不在标记的vlan上.

交换机设置正确. VLAN工作正常.服务器是多个VLAN的成员,上面的配置被简化,因为配置的其余部分与我的问题无关.

是的,我可以在bond0接口中输入一个虚拟地址,但这对我来说似乎并不干净.

我试过以下:

https://wiki.debian.org/NetworkConfiguration#Bringing_up_an_interface_without_an_IP_address

但是,这不起作用,并使bond0取消配置,因此没有网络连接.

操作系统:Ubuntu 14.04.2 LTS

我认为这样的事情应该有效:
auto lo
iface lo inet loopback

auto bond0
iface bond0 inet static
   pre-up ifconfig     bond0 up
   pre-up ifenslave    bond0 eth0 || /bin/true
   pre-up ifenslave    bond0 eth1 || /bin/true

   down   ifenslave -d bond0 eth0 || /bin/true
   down   ifenslave -d bond0 eth1 || /bin/true

auto bond0.50
iface bond0.50 inet static
   address 192.168.248.241
   netmask 255.255.255.0
   network 192.168.248.0

原文地址:https://www.jb51.cc/ubuntu/347919.html

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。

相关推荐