Help us understand the problem. What is going on with this article?

centos7 ネットワーク設定

More than 1 year has passed since last update.

centos7 ネットワーク設定

デバイスを確認
nmcli d

インターフェイスを有効化
nmcli c m eth0 connection.autoconnect yes

IPアドレス、サブネットマスクを変更
nmcli c modify eth0 ipv4.addresses 172.16.0.100/24
※デバイスを確認して「eth0」を変更する

デフォルトゲートウェイを設定
nmcli c modify eth0 ipv4.gateway 172.16.0.1

DNS設定
nmcli c modify eth0 ipv4.dns 172.16.0.1

IPを固定割り当てに設定 (DHCP は "auto"に変更)
nmcli c modify eth0 ipv4.method manual

インターフェースを再起動して設定を反映
nmcli c down eth0; nmcli c up eth0
※デバイスを確認して「eth0」を変更する

設定確認
nmcli d show eth0

接続確認
ip addr

ネットワーク再起動
systemctl restart network

ファイル確認
less /etc/sysconfig/network-scripts/ifcfg-eth0
※ifcfg-eth0はデバイスで確認する。

Why not register and get more from Qiita?
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away
Comments
No comments
Sign up for free and join this conversation.
If you already have a Qiita account
Why do not you register as a user and use Qiita more conveniently?
You need to log in to use this function. Qiita can be used more conveniently after logging in.
You seem to be reading articles frequently this month. Qiita can be used more conveniently after logging in.
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away
ユーザーは見つかりませんでした