0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

【Linux】RHEL8 nmcliコマンドでBonding手順

Last updated at Posted at 2024-11-02

■前置き
 ここではBondingを組むNICを

 enpsXXX

 enpsYYY

 とする

 組むBondingをbond0とし、モードはactive-backupとする
 nmcliコマンドを使用してbondingを組んでいく

■事前準備
 1.以下のコマンドを入力してNICのデバイス名を確認する

# nmcli 

 2.以下のコマンドを入力し、Bondingを組むNICが二つともリンクアップしていることを確認する

# ip link show 

  リンクアップしていない場合、リンクアップさせる

■手順

1.NICの有効化
# nmcli c m ensXXX connection.autoconnect yes

# nmcli c m ensYYY connection.autoconnect yes

  ⇒エラーとならないこと

 2.NICの有効化を確認する
 nmcli c s ensXXX | grep connection.autoconnect 

 nmcli c s ensYYY | grep connection.autoconnect

  ⇒connection.autoconnectがyesとなっていること
 

 3.再起動
# reboot

  ⇒再起動したこと

 4.bondインターフェースの作成
# nmcli connection ad type bond ifname  bond0 con-name con-bond0 bond.options "mode=active-backup"

  ⇒bond0が作成されたこと

 5.bondインターフェースの確認
# nmcli c s

  ⇒bondingインターフェースが作成されていること

 6.設定モードの確認
# cat /etc/sysconfig/network-scripts/ifcfg-con-bond0

  ⇒BONDING OPTS=mode=active-backupとなっていること

 7.インターフェース割り当て
# nmcli connection add type ethernet slave-type bond con-name bond0-p1 ifname ensXXX master con-bond0 

# nmcli connection add type ethernet slave-type bond con-name bond0-p2 ifname ensYYY master con-bond0

  ⇒エラーとならないこと

 8.IPv4設定(con-bond0)
# nmcli connection modify con-bond0 ipv4.method disabled

# nmcli connection modify con-bond0 ipv4.address 'xxx.xxx.x.xx/yy 'ipv4.method manual

  ⇒エラーとならないこと

 9.IPv6無効化(con-bond0)
# nmcli connection modify con-bond0 ipv6.method ignore

  ⇒エラーとならないこと

 10.接続をアクティベート(con-bond0)
# nmcli connection up con-bond0

  ⇒エラーとならないこと

 11.bonding設定の確認
# cat /proc/net/bonding/bond0

  ⇒設定値が反映されていること

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?