ubuntu – 如何在绑定接口上放置一个桥?

前端之家收集整理的这篇文章主要介绍了ubuntu – 如何在绑定接口上放置一个桥?前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
我正在设置一个带有多个以太网接口的Ubuntu Server 11.10机箱,这些接口是为了冗余而绑定的.我打算将它用作KVM主机,所以我需要一个网桥.

为此,我安装了ifenslave和bridge-utils,然后编写了我的/ etc / network / interfaces文件.相关部分如下:

  1. auto br0
  2. iface br0 inet static
  3. address 10.1.254.101
  4. netmask 255.255.255.0
  5. network 10.1.254.0
  6. broadcast 10.1.254.255
  7. gateway 10.1.254.50
  8. dns-nameservers 10.1.254.252
  9. bridge_ports bond0
  10. bridge_stp off
  11.  
  12. iface bond0 inet manual
  13. bond-slaves eth0 eth3
  14. bond_mode balance-rr
  15. bond_miimon 100

不幸的是,这不是给我连接. ifup br0给我“无法将bond0添加到桥接br0:无效参数”,而ifdown br0给我“设备bond0不是br0的从属”.如果我修改我的interfaces文件以摆脱桥接,我有完全的连接 – 但我将需要桥.

我认为我的interfaces文件中的某些内容错误的,但我不知道如何正确使用它.有人知道吗?谢谢!

这就是我如何配置Ubuntu 10.04 LTS系统以在绑定接口之上进行桥接:
  1. iface eth0 inet manual
  2. iface eth5 inet manual
  3.  
  4. # eth0 & eth5 form bond0 for the x.y.z.0/25 subnet
  5. auto bond0
  6. iface bond0 inet static
  7. bond_miimon 100
  8. bond_mode active-backup
  9. bond_downdelay 200
  10. bond_updelay 200
  11. address x.y.z.35
  12. netmask 255.255.255.128
  13. network x.y.z.0
  14. post-up ifenslave bond0 eth0 eth5
  15. pre-down ifenslave -d bond0 eth0 eth5
  16.  
  17. auto br0
  18. iface br0 inet static
  19. bridge_ports bond0
  20. address x.y.z.35
  21. netmask 255.255.255.128
  22. network x.y.z.0
  23. gateway x.y.z.126

猜你在找的Ubuntu相关文章