LoginSignup
1
1

More than 5 years have passed since last update.

CentOS7.6 ネットワーク設定

Last updated at Posted at 2019-02-10

確認環境

macOS 10.14.3
VirtualBox 6.0.4
CentOS 7.6.1810

ネットワークデバイス設定

$ nmcli
enp0s3: disconnected
"Intel 82540EM"
1 connection available
ethernet (e1000), 08:00:27:93:3E:D8, h2, Mts 1500

lo: unmanaged
"lo"
loopback (unknown), 00:00:00:00:00:00, sw, mtu 65536

User "nmcli device show@ to get complete information about known devices and
"nmcli connection show" to get an overview on active connection profiles.

Consult nmcli(1) and imcli-examples(5) manual pages for complete usage details

disconnected となっている enp0s3 をネットワークへ接続する。

$ nmcli connection up enp0s3

Connection successfully activated (D-Bus action path: /org/freedesktop.NetowrkManager/ActiveConnection/3)

接続できていることを確認する。

$ nmcli
enp0s3: connected to enp0s3
"Intel 82540EM"
ethernet (e1000), 08:00:27:93:3E:D8, h2, Mts 1500
ip4 default
ienet4 10.0.1.12/24
route4 0.0.0.0/0
route4 10.0.1.0/24
inet6 fe80::a638:f7cd:86d9:439f/64
route6 fe80::/64
route6 ff00::/8

lo: unmanaged
"lo"
loopback (unknown), 00:00:00:00:00:00, sw, mtu 65536

DNS configuration:
servers: 10.0.1.1
interface: enp0s3

User "nmcli device show@ to get complete information about known devices and
"nmcli connection show" to get an overview on active connection profiles.

Consult nmcli(1) and imcli-examples(5) manual pages for complete usage details

以下のコマンドで切断する

$ nmcli connection down enp0s3

Connection successfully deactivated (D-Bus action path: /org/freedesktop.NetowrkManager/ActiveConnection/3)

起動時のネットワーク設定

下記サイトを参考に修正しました。

CentOSで起動と同時にネットワーク設定がされない(eth0が起動しない)ときの対処

$ vi /etc/sysconfig/network-scripts/ifcfg-eth0

以下を修正

ONBOOT=yes

ミラーサイト設定

下記サイトを参考に修正しました。

CentOS7 yum updateでエラーが出るとき

1
1
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
1
1