10.8.6. linux_bond
複数の interfaces を結合する Linux ボンディングを定義します。これにより、冗長性や帯域幅が向上します。bonding_options パラメーターには、カーネルベースのボンディングオプションを指定するようにしてください。
| オプション | デフォルト | 説明 |
|---|---|---|
| name | ボンディング名 | |
| use_dhcp | False | DHCP を使用して IP アドレスを取得します。 |
| use_dhcpv6 | False | DHCP を使用して v6 の IP アドレスを取得します。 |
| addresses | ボンディングに割り当てられる IP アドレスのリスト | |
| routes | ボンディングに割り当てられるルートのリスト。「routes」を参照してください。 | |
| mtu | 1500 | 接続の最大伝送単位 (MTU: Maximum Transmission Unit) |
| members | ボンディングで使用するインターフェイスオブジェクトのリスト | |
| bonding_options |
ボンディングを作成する際のオプションのセット。Linux ボンディングの | |
| defroute | True |
DHCP サービスにより提供されるデフォルトのルートを使用します。 |
| persist_mapping | False | システム名の代わりにデバイスのエイリアス設定を記述します。 |
| dhclient_args | None | DHCP クライアントに渡す引数 |
| dns_servers | None | ボンディングに使用する DNS サーバーのリスト |
- Linux ボンディングの
bonding_optionsパラメーター -
bonding_optionsパラメーターは、Linux ボンディング用の特定のボンディングオプションを設定します。下表の後に記載された Linux ボンディングの例を参照してください。
bonding_options | 説明 |
|---|---|
|
|
ボンディングモードを設定します。この例では、 |
|
| LACP パケットの送信間隔を 1 秒または 30 秒に定義します。 |
|
| インターフェイスをトラフィックに使用する前にそのインターフェイスがアクティブである必要のある最低限の時間を定義します。この最小設定は、ポートフラッピングによる停止を軽減するのに役立ちます。 |
|
| ドライバーの MIIMON 機能を使用してポートの状態を監視する間隔 (ミリ秒単位) |
- 例 - Linux ボンディング
... edpm_network_config_template: | --- {% set mtu_list = [ctlplane_mtu] %} {% for network in nodeset_networks %} {{ mtu_list.append(lookup(vars, networks_lower[network] ~ _mtu)) }} {%- endfor %} {% set min_viable_mtu = mtu_list | max %} network_config: - type: linux_bond name: bond1 mtu: {{ min_viable_mtu }} bonding_options: "mode=802.3ad lacp_rate=fast updelay=1000 miimon=100 xmit_hash_policy=layer3+4" members: type: interface name: ens1f0 mtu: {{ min_viable_mtu }} primary: true type: interface name: ens1f1 mtu: {{ min_viable_mtu }} ...- 例 - Linux ボンディング: 2 つのインターフェイスのボンディング
... edpm_network_config_template: | --- {% set mtu_list = [ctlplane_mtu] %} {% for network in nodeset_networks %} {{ mtu_list.append(lookup(vars, networks_lower[network] ~ _mtu)) }} {%- endfor %} {% set min_viable_mtu = mtu_list | max %} network_config: - type: linux_bond name: bond1 members: - type: interface name: nic2 - type: interface name: nic3 bonding_options: "mode=802.3ad lacp_rate=[fast|slow] updelay=1000 miimon=100" ...- 例 - 1 つの VLAN を持つ
active-backupモードに設定された Linux ボンディング .... edpm_network_config_template: | --- {% set mtu_list = [ctlplane_mtu] %} {% for network in nodeset_networks %} {{ mtu_list.append(lookup(vars, networks_lower[network] ~ _mtu)) }} {%- endfor %} {% set min_viable_mtu = mtu_list | max %} network_config: - type: linux_bond name: bond_api bonding_options: "mode=active-backup" use_dhcp: false dns_servers: get_param: DnsServers members: - type: interface name: nic3 primary: true - type: interface name: nic4 - type: vlan vlan_id: {{ lookup(vars, networks_lower[network] ~ _vlan_id) }} device: bond_api addresses: - ip_netmask: get_param: InternalApiIpSubnet- 例 - OVS ブリッジ上の Linux ボンディング
この例では、ボンディングは LACP モードと 1 つの VLAN を持つ
802.3adに設定されています。... edpm_network_config_template: | --- {% set mtu_list = [ctlplane_mtu] %} {% for network in nodeset_networks %} {{ mtu_list.append(lookup(vars, networks_lower[network] ~ _mtu)) }} {%- endfor %} {% set min_viable_mtu = mtu_list | max %} network_config: - type: ovs_bridge name: br-tenant use_dhcp: false mtu: 9000 members: - type: linux_bond name: bond_tenant bonding_options: "mode=802.3ad updelay=1000 miimon=100" use_dhcp: false dns_servers: get_param: DnsServers members: - type: interface name: p1p1 primary: true - type: interface name: p1p2 - type: vlan vlan_id: {get_param: TenantNetworkVlanID} addresses: - ip_netmask: {get_param: TenantIpSubnet} ...