●viでファイルを変更する場合(redhatのマニュアルの手順)
・vi ifcfg-enp0s10
・nmcli con reload
・nmcli dev disconnect enp0s10(ifdownと同じ)
・nmcli con up enp0s10(ifupと同じ)
●状態
[root@rhel74 network-scripts]# nmcli device status
デバイス タイプ 状態 接続
enp0s10 ethernet 接続済み enp0s10
enp0s3 ethernet 接続済み enp0s3
enp0s8 ethernet 接続済み enp0s8
enp0s9 ethernet 切断済み --
lo loopback 管理無し --
●普通のネットワーク設定
[root@rhel74 network-scripts]# nmcli c add type ethernet ifname enp0s9 con-name enp0s9 ip4 192.168.111.114/24
接続 'enp0s9' (653592d2-68d1-47a4-9dec-672e9558ec45) が正常に追加されました。
[root@rhel74 network-scripts]# nmcli c mod enp0s9 ipv6.method ignore
[root@rhel74 network-scripts]# nmcli c mod enp0s9 ipv4.may-fail no
[root@rhel74 network-scripts]# nmcli c mod enp0s9 connection.permissions user:root
[root@rhel74 network-scripts]# cat ifcfg-enp0s9
[root@rhel74 network-scripts]# nmcli con show enp0s9
connection.id: enp0s9
connection.uuid: 653592d2-68d1-47a4-9dec-672e9558ec45
connection.stable-id: --
connection.interface-name: enp0s9
connection.type: 802-3-ethernet
connection.自動接続: yes
connection.autoconnect-priority: 0
connection.autoconnect-retries: -1 (default)
connection.timestamp: 1552140626
connection.read-only: no
connection.permissions: user:root
connection.zone: --
connection.マスター: --
connection.slave-type: --
connection.autoconnect-slaves: -1 (default)
connection.secondaries: --
connection.gateway-ping-timeout: 0
connection.metered: 不明
connection.lldp: -1 (default)
802-3-ethernet.ポート: --
802-3-ethernet.speed: 0
802-3-ethernet.duplex: --
802-3-ethernet.auto-negotiate: no
802-3-ethernet.mac-address: --
802-3-ethernet.cloned-mac-address: --
802-3-ethernet.generate-mac-address-mask:--
802-3-ethernet.mac-address-blacklist: --
802-3-ethernet.mtu: 自動
802-3-ethernet.s390-subchannels: --
802-3-ethernet.s390-nettype: --
802-3-ethernet.s390-options: --
802-3-ethernet.wake-on-lan: 1 (default)
802-3-ethernet.wake-on-lan-password: --
ipv4.method: manual
ipv4.dns: --
ipv4.dns-search: --
ipv4.dns-options: (デフォルト)
ipv4.dns-priority: 0
ipv4.addresses: 192.168.111.114/24
ipv4.gateway: --
ipv4.routes: --
ipv4.route-metric: -1
ipv4.ignore-auto-routes: no
ipv4.ignore-auto-dns: no
ipv4.dhcp-client-id: --
ipv4.dhcp-timeout: 0
ipv4.dhcp-send-hostname: yes
ipv4.dhcp-hostname: --
ipv4.dhcp-fqdn: --
ipv4.never-default: no
ipv4.may-fail: no
ipv4.dad-timeout: -1 (default)
ipv6.method: ignore
ipv6.dns: --
ipv6.dns-search: --
ipv6.dns-options: (デフォルト)
ipv6.dns-priority: 0
ipv6.addresses: --
ipv6.gateway: --
ipv6.routes: --
ipv6.route-metric: -1
ipv6.ignore-auto-routes: no
ipv6.ignore-auto-dns: no
ipv6.never-default: no
ipv6.may-fail: yes
ipv6.ip6-privacy: -1 (不明)
ipv6.addr-gen-mode: stable-privacy
ipv6.dhcp-send-hostname: yes
ipv6.dhcp-hostname: --
ipv6.token: --
proxy.method: none
proxy.browser-only: no
proxy.pac-url: --
proxy.pac-script: --
GENERAL.名前: enp0s9
GENERAL.UUID: 653592d2-68d1-47a4-9dec-672e9558ec45
GENERAL.デバイス: enp0s9
GENERAL.状態: アクティベート済み
GENERAL.デフォルト: いいえ
GENERAL.デフォルト6: いいえ
GENERAL.VPN: いいえ
GENERAL.ゾーン: --
GENERAL.DBUS パス: /org/freedesktop/NetworkManager/ActiveConnection/16
GENERAL.CON パス: /org/freedesktop/NetworkManager/Settings/8
GENERAL.スペックオブジェクト: --
GENERAL.マスターパス: --
IP4.アドレス[1]: 192.168.111.114/24
IP4.ゲートウェイ: --
IP6.ゲートウェイ: --