LoginSignup
0
0

More than 5 years have passed since last update.

CentOS 7 ネットワーク設定覚え書き

Last updated at Posted at 2018-08-27

CentOS 7 ネットワーク設定

CentOS 7から変わったコマンド類を覚え切れていないので覚え書きとして

デバイスの確認
nmcli device

デバイスのアドレス情報
ip addr

デバイスごとに情報を見たい場合には
ip addr show dev <デバイス名>

ルート情報
ip route

接続情報を見るには
nmcli connection show

nmcli connection show <ID | UUID>

インターフェイスに自動接続を設定
nmcli connection modify <ID> connection.autoconnect yes

IPアドレス、サブネットマスクを変更
nmcli connection modify <ID> ipv4.addresses 172.16.0.100/24

デフォルトゲートウェイを設定
nmcli connection modify <ID> ipv4.gateway 172.16.0.1

DNS設定
nmcli connection modify <ID> ipv4.dns 172.16.0.1

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