Rocky Linux 8.4にネットワークデバイス(NIC)を設定する
OSバージョンの確認
# cat /etc/redhat-release Rocky Linux release 8.4 (Green Obsidian)
1.ネットワークデバイス名の確認
# nmcli dev s DEVICE TYPE STATE CONNECTION ens33 ethernet disconnected -- lo loopback unmanaged --
アダプター(NAT)を設定
# nmcli con mod ens33 connection.autoconnect yes
再度ネットワークデバイスを確認
# nmcli dev s DEVICE TYPE STATE CONNECTION ens33 ethernet connected -- lo loopback unmanaged --
IPアドレスの確認
# ip addr 1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000 link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00 inet 127.0.0.1/8 scope host lo valid_lft forever preferred_lft forever inet6 ::1/128 scope host valid_lft forever preferred_lft forever 2: ens33: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP group default qlen 1000 link/ether 00:0c:29:8f:04:2f brd ff:ff:ff:ff:ff:ff inet 192.168.71.137/24 brd 192.168.71.255 scope global dynamic noprefixroute ens33 valid_lft 1315sec preferred_lft 1315sec inet6 fe80::20c:29ff:fe8f:42f/64 scope link noprefixroute valid_lft forever preferred_lft forever