Show Table of Contents
付録E ネットワークインターフェースのテンプレート例
本付録では、ネットワークインターフェース設定を示す Heat テンプレート例をいくつか紹介します。
E.1. インターフェースの設定
インターフェースは個別に変更を加える必要がある場合があります。以下の例では、DHCP アドレスでインフラストラクチャーネットワークへ接続するための 2 つ目の NIC、ボンディング用の 3 つ目/4 つ目の NIC を使用するのに必要となる変更を紹介します。
network_config:
# Add a DHCP infrastructure network to nic2
-
type: interface
name: nic2
use_dhcp: true
-
type: ovs_bridge
name: br-bond
members:
-
type: ovs_bond
name: bond1
ovs_options: {get_param: BondInterfaceOvsOptions}
members:
# Modify bond NICs to use nic3 and nic4
-
type: interface
name: nic3
primary: true
-
type: interface
name: nic4
ネットワークインターフェースのテンプレートは、実際のインターフェース名 ("eth0"、"eth1"、"enp0s25") または番号付きのインターフェース ("nic1"、"nic2"、"nic3") のいずれかを使用します。名前付きのインターフェース (
eth0、eno2 など) ではなく、番号付きのインターフェース (nic1、nic2 など) を使用した場合には、ロール内のホストのネットワークインターフェースは、まったく同じである必要はありません。たとえば、あるホストに em1 と em2 のインターフェースが指定されており、別のホストには eno1 と eno2 が指定されていても、両ホストの NIC は、 nic1 および nic2 として参照することができます。
番号付きのインターフェースの順番は、名前付きのネットワークインターフェースのタイプの順番と同じです。
eth0、eth1などのethX。これらは、通常オンボードのインターフェースです。eno0、eno1などのenoX。これらは、通常オンボードのインターフェースです。enp3s0、enp3s1、ens3などの英数字順のenXインターフェース。これらは通常アドオンのインターフェースです。
番号付きの NIC スキームは、ライブのインターフェース (例: スイッチに接続されているケーブル) のみ考慮します。4 つのインターフェースを持つホストと、6 つのインターフェースを持つホストがある場合に、各ホストで
nic1 から nic4 を使用してケーブル 4 本のみを結線します。

Where did the comment section go?
Red Hat's documentation publication system recently went through an upgrade to enable speedier, more mobile-friendly content. We decided to re-evaluate our commenting platform to ensure that it meets your expectations and serves as an optimal feedback mechanism. During this redesign, we invite your input on providing feedback on Red Hat documentation via the discussion platform.