Kickstart 无法设置多个绑定接口

Kickstart 无法设置多个绑定接口

我在 kickstart 脚本中设置绑定接口时遇到了一些问题CentOS 6.5。我有 8 个物理网络接口,希望将它们成对配置为 4 个绑定网络接口。

我的网络设置如下:

network --device=bond0 --noipv6 --bootproto=static --onboot=yes --ip=172.123.1.22 --netmask=255.255.255.0 --bondslaves=eth0,eth1 --bondopts=mode=active-backup,primary=eth0,miimon=80,updelay=60000

network --device=bond1 --noipv6 --bootproto=static --onboot=yes --ip=172.123.2.22 --netmask=255.255.255.0 --bondslaves=eth2,eth3 --bondopts=mode=active-backup,primary=eth2,miimon=80,updelay=60000

network --device=bond2 --noipv6 --bootproto=static --onboot=yes --ip=172.123.3.22 --netmask=255.255.255.0 --bondslaves=eth4,eth5 --bondopts=mode=active-backup,primary=eth4,miimon=80,updelay=60000

network --device=bond3 --noipv6 --bootproto=static --onboot=yes --ip=172.123.4.22 --netmask=255.255.255.0 --bondslaves=eth6,eth7 --bondopts=mode=active-backup,primary=eth6,miimon=80,updelay=60000

network --device=eth0 --noipv6 --nodns --bootproto=static --onboot=yes

network --device=eth1 --noipv6 --nodns --bootproto=static --onboot=yes

network --device=eth2 --noipv6 --nodns --bootproto=static --onboot=yes

network --device=eth3 --noipv6 --nodns --bootproto=static --onboot=yes

network --device=eth4 --noipv6 --nodns --bootproto=static --onboot=yes

network --device=eth5 --noipv6 --nodns --bootproto=static --onboot=yes

network --device=eth6 --noipv6 --nodns --bootproto=static --onboot=yes

network --device=eth7 --noipv6 --nodns --bootproto=static --onboot=yes

我的问题是这样的:bond0设置正确,但是bond1bond2没有bond3设置。

我看过很多关于类似主题的留言板帖子,解决办法似乎总是放入自定义 bash 脚本来设置绑定接口。但是,我认为这并不是唯一的方法。如果 kickstart 文件中没有设置绑定接口的机制,那为什么还要提供呢?

答案1

您可能必须--activate为每个eth{1..7}接口都包含,因为默认情况下只激活第一个接口。(我想知道您的绑定接口是否实际上只使用eth0,如果这是唯一的活动接口。)

答案2

在 kickstart 中配置绑定接口的功能是 RHEL 系列发行版中最近添加的功能;6.4 可能是第一个支持此功能的版本。您尝试过 6.6 吗?

来自 RHEL 6.4 发行说明

配置 Bonding Bond 启动选项以及 --bondslaves 和 --bondopts kickstart 选项现在可用于在安装过程中配置 Bonding。有关如何配置 Bonding 的更多信息,请参阅《Red Hat Enterprise Linux 6 安装指南》的以下部分:Kickstart 选项部分和启动选项章节。

话虽如此,6.5 和 6.6 的技术说明并没有提供太多信息。(尽管有一些关于针对慢速网络设备的“nicedelay”选项的信息)

我最好的建议是捕捉 anaconda 的输出。

我怀疑第一个正在工作,因为它包含 eth0,大概已经启动,或者驱动程序已经加载。

其他的在配置时可能不存在吗?也许你应该将结果报告ifconfig -a到 %pre 或类似文件中,如CentOS Kickstart wiki 页面的技巧和窍门部分

相关内容