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(RHEL) IPアドレス設定

Last updated at Posted at 2025-09-22

RHELでIPアドレスを設定する方法を置いておきます。

固定IPアドレスを設定

GUI上で設定する場合

nmtui

下記の通り操作
1.Edit a connection
 → 「接続作成」or「編集」
2.IPv4 CONFIGURATIONを「Manual」に設定
3.IP、Gateway、DNSを入力し「OK」を選択
4.「Activate a connection」で有効化

ネットワークインターフェースが「切断済み」の場合

# ネットワークインターフェースを確認
nmcli device status # STATE=disconnected(切断済み)→接続プロファイルが未作成or非アクティブ
# 接続プロファイルを確認
nmcli connection show

# 接続プロファイルを作成
nmcli connection add type ethernet con-name <接続プロファイル名> ifname <ネットワークインターフェース名> ipv4.method manual ipv4.addresses <IP/サブネット長> ipv4.gateway <デフォルトゲートウェイ> ipv4.dns "<DNSサーバ(半角スペース区切りで複数指定可>"

# 接続を有効化
nmcli connection up <接続プロファイル名>

# 確認
nmcli device status # STATE=「connected」
ip addr show <接続プロファイル名>
nmcli connection show
ping -c 3 <DNSサーバ> # 外部接続の確認
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?