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

linux – 具有桥接和绑定接口的不稳定性

我昨天发布了一个工作设置,其中包含几个用于虚拟机的桥接接口(KVM / libvirt).

One of the bridged interface is just using eth3 as its ports while the second one (public traffic) is using an ethernet bonded interface.

该设置正在运行,但不是所有时间!我可以从虚拟机开始下载,然后停止并冻结!

所以我不知道我的桥接参数是否正确,你能检查下面的配置吗?

iface eth3 inet manual

auto bond0
iface bond0 inet manual
    slaves eth1 eth2
    pre-up ip link set bond0 up
    down ip link set bond0 down

auto br0
iface br0 inet static
    address 10.160.0.7
    netmask 255.255.255.128
    bridge_ports eth3
    bridge_fd 9
    bridge_hello 2
    bridge_maxage 12
    bridge_stp on

auto br0:1
iface br0:1 inet static
    address 10.160.0.9
    netmask 255.255.255.255

auto br0:2
iface br0:2 inet static
    address 10.160.0.10
    netmask 255.255.255.255

auto br1
iface br1 inet static
    address 217.4.40.242
    netmask 255.255.255.240
    gateway 217.4.40.241
    pre-up /etc/network/firewall start
    bridge_ports bond0
    bridge_fd 9
    bridge_hello 2
    bridge_maxage 12
    bridge_stp on

auto br1:1
iface br1:1 inet static
    address 217.4.40.252
    netmask 255.255.255.255

auto br1:2
iface br1:2 inet static
    address 217.4.40.253
    netmask 255.255.255.255

是的,它有时也会在主持人上谈到火星人:

kernel: [249146.055172] martian source 10.160.0.17 from 10.160.0.10,on dev vnet2
kernel: [249146.073122] ll header: ff:ff:ff:ff:ff:ff:54:52:00:76:c3:5c:08:06

解决方法

听起来像是我面临的一个问题.
这是KVM的桥接绑定配置的示例WORKING配置,但它同时只使用一个接口.也许这取决于开关(使用的是Planet GSD-802S和HP V1910).我在两个地方(使用不同的硬件和交换机)使用它.

cat /etc/modprobe.d/bonding.conf
别名bond0 bonding
选项绑定模式= 802.3ad miimon = 100 downdelay = 200 updelay = 200 ad_select = 0 lacp_rate = fast

cat / etc / network / interfaces
汽车公司
iface lo inet loopback

绑定的网络接口

汽车债券
iface bond0 inet manual
奴隶奴隶没有
绑定模式802.3ad
bond-miimon 100
bond_lacp_rate很快
bond_ad_select 0
up / sbin / ifenslave bond0 eth1 eth2
down / sbin / ifenslave bond0 -d eth1 eth2

奴役所有物理接口

卡#1 Nvidia千兆板载

汽车eth1
iface eth1 inet manual
债券 – 主债券

卡#2英特尔PRO / 1000 F服务器适配器 – FIBER

自动eth2
iface eth2 inet手册
债券 – 主债券

桥接到LAN用于虚拟网络KVM

自动br0
iface br0 inet static
地址10.0.0.254
网络掩码255.255.255.0
网络10.0.0.0
广播10.0.0.255
网关10.0.0.1
dns-nameservers 10.0.0.1 8.8.8.8
bridge-ports bond0
bridge-fd 9
桥你好2
桥梁最大12
桥 – 关

卡#3 – 互联网调制解调器

自动eth0
iface eth0 inet manual

虚拟网络KVM桥 – 调制解调器

iface br1 inet manualbridge_ports eth0bridge_stp关闭bridge_fd 0bridge_maxwait 0指标1自动br1

原文地址:https://www.jb51.cc/linux/396175.html

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

相关推荐