> For the complete documentation index, see [llms.txt](https://huataihuang.gitbook.io/cloud-atlas-draft/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://huataihuang.gitbook.io/cloud-atlas-draft/os/linux/network/bonding/bonding_on_suse12.md).

# suse操作系统多网卡bonding

SLES 12提供了通过YaST配置channel bonding的方法：YaST的Network Settings设置提供了设置`Bond Slaves`设置，并且提供了`Bond Driver Options`：

![Yast设置bonding](/files/-M1TA0qISSOXvCnjdBu6)

在bonding选项可参考 [Channel bonding options and recommendations](https://www.ibm.com/support/knowledgecenter/linuxonibm/com.ibm.linux.z.l0wlcb00/l0wlcb00_channelbondingoptionsandrecommendations.html#l0wlcb00_channelbondingoptionsandrecommendations)

## 配置文件

* `/etc/sysconfig/network/ifcfg-bond0`

```
BONDING_MASTER='yes'
BONDING_MODULE_OPTS='mode=active-backup miimon=1000 fail_over_mac=1'
BONDING_SLAVE0='eth1'
BONDING_SLAVE1='eth2'
IPADDR='192.0.2.0/24'
BOOTPROTO='static'
STARTMODE='auto'
```

> * `BONDING_MASTER='yes'` 激活bonding master
> * `BONDING_MODULE_OPTS='mode=active-backup miimon=1000 fail_over_mac=1'` 设置bondig选项，这里是主备模式
> * `BONDING_SLAVE0='eth1'` 和 `BONDING_SLAVE1='eth2'` 定义两块物理网卡作为slave
> * `IPADDR='192.0.2.0/24'` 设置IP地址

以下为两块物理网卡配置，只需要设置MAC地址

* `/etc/sysconfig/network/ifcfg-eth1`

```
NAME='OSA Express Network card (0.0.b230)'
BOOTPROTO='none'
STARTMODE='auto'
LLADDR='02:00:00:0a:6c:4b'
```

* `/etc/sysconfig/network/ifcfg-eth2`

```
NAME='OSA Express Network card (0.0.b2a0)'
BOOTPROTO='none'
STARTMODE='auto'
LLADDR='02:0b:0c:0d:0e:02'
```

* 启动

```bash
# wicked ifdown bond0
# wicked ifup bond0
```

## 参考

* [Setting up channel bonding on SLES12](https://www.ibm.com/support/knowledgecenter/en/linuxonibm/com.ibm.linux.z.l0wlcb00/l0wlcb00_settingupchannelbondingonsles12.html)
* [SuSE 11.3 - man page for ifcfg-bonding (suse section 5)](https://www.unix.com/man-page/suse/5/ifcfg-bonding/)


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://huataihuang.gitbook.io/cloud-atlas-draft/os/linux/network/bonding/bonding_on_suse12.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
