Show Table of Contents
9.8. コマンドラインツール nmcli での IPoIB の設定
まず、デフォルトの IPoIB デバイスの名前変更が必要かどうかを判断します。必要な場合は、「70-persistent-ipoib.rules の使用」に記載の指示に従って、udev の名前変更ルールを使用してデバイスの名前を変更します。以下のように
ib_ipoib カーネルモジュールを一旦削除してリロードすると、再起動せずに IPoIB インターフェースの名前変更ができます。
~]$rmmod ib_ipoib~]$modprobe ib_ipoib
デバイスに必要な名前が付けられたら、nmcli ツールを使用して IPoIB インターフェースを作成します。以下に 2 とおりの方法を示します。
例9.1 2 つの別々のコマンドによる IPoIB の作成および修正
~]$nmcli con add type infiniband con-name mlx4_ib0 ifname mlx4_ib0 transport-mode connected mtu 65520Connection 'mlx4_ib0' (8029a0d7-8b05-49ff-a826-2a6d722025cc) successfully added. ~]$nmcli con edit mlx4_ib0===| nmcli interactive connection editor |=== Editing existing 'infiniband' connection: 'mlx4_ib0' Type 'help' or '?' for available commands. Type 'describe [>setting<.>prop<]' for detailed property description. You may edit the following settings: connection, infiniband, ipv4, ipv6 nmcli> set infiniband.mac-address 80:00:02:00:fe:80:00:00:00:00:00:00:f4:52:14:03:00:7b:cb:a3 nmcli> save Connection 'mlx4_ib3' (8029a0d7-8b05-49ff-a826-2a6d722025cc) successfully updated. nmcli> quit
あるいは、以下のように
nmcli c add と nmcli c modify を 1 つのコマンドで実行することができます。
例9.2 1 つのコマンドによる IPoIB の作成および修正
nmcli con add type infiniband con-name mlx4_ib0 ifname mlx4_ib0 transport-mode connected mtu 65520 infiniband.mac-address 80:00:02:00:fe:80:00:00:00:00:00:00:f4:52:14:03:00:7b:cb:a3
これで
mlx4_ib0 という名前の IPoIB インターフェースが作成され、connected モードを使用するように設定されました。MTU は connected モードの最大値で、IPv4 および IPv6 に DHCP が使われます。IPoIB インターフェースをクラスタートラフィックに使用し、イーサネットインターフェースをクラスター以外の通信に使用する場合は、デフォルトルートと IPoIB インターフェース上のデフォルトネームサーバーの無効化が必要になる可能性があります。これは、以下のように実行することができます。
~]$ nmcli con edit mlx4_ib0
===| nmcli interactive connection editor |===
Editing existing 'infiniband' connection: 'mlx4_ib0'
Type 'help' or '?' for available commands.
Type 'describe [>setting<.>prop<]' for detailed property description.
You may edit the following settings: connection, infiniband, ipv4, ipv6
nmcli> set ipv4.ignore-auto-dns yes
nmcli> set ipv4.ignore-auto-routes yes
nmcli> set ipv4.never-default true
nmcli> set ipv6.ignore-auto-dns yes
nmcli> set ipv6.ignore-auto-routes yes
nmcli> set ipv6.never-default true
nmcli> save
Connection 'mlx4_ib0' (8029a0d7-8b05-49ff-a826-2a6d722025cc) successfully updated.
nmcli> quit
P_Key インターフェースが必要な場合は、以下のように nmcli を使って作成します。
~]$nmcli con add type infiniband con-name mlx4_ib0.8002 ifname mlx4_ib0.8002 parent mlx4_ib0 p-key 0x8002Connection 'mlx4_ib0.8002' (4a9f5509-7bd9-4e89-87e9-77751a1c54b4) successfully added. ~]$nmcli con modify mlx4_ib0.8002 infiniband.mtu 65520 infiniband.transport-mode connected ipv4.ignore-auto-dns yes ipv4.ignore-auto-routes yes ipv4.never-default true ipv6.ignore-auto-dns yes ipv6.ignore-auto-routes yes ipv6.never-default true

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.