After reboot in Rocky9 eth0 address is not detecting

Hi,

I gave the eth0 configuration at location : /etc/sysconfig/network-scripts

But after reboot, the eth0 address is not detected.

cat ifcfg-eth0

NAME=eth0
DEVICE=eth0
ONBOOT=yes
NETBOOT=yes
IPV6INIT=no
BOOTPROTO=none
TYPE=Ethernet
PROXY_METHOD=none
BROWSER_ONLY=no
IPADDR=10.120.80.120
PREFIX=24
GATEWAY=10.120.80.1
DNS1=10.120.2.5
DEFROUTE=yes
IPV4_FAILURE_FATAL=no
IPV6_DEFROUTE=yes
IPV6_FAILURE_FATAL=no
UUID=5fb06bd0-0bb0-7ffb-45f1

How can I solve this issue. ?
PS: There is no change in the MAC address.
PS: Randomly after reboot, the IPv4 address detected.
PS: This is the mechanism I used in CentOS 7.

From CentOS 7 to Rocky 9, is there any change in the configuration.?
Thanks In Advance,

Because those scripts are deprecated. Network configuration should be done with Network Manager, using either nmcli or nmtui from the console. Or if there is a graphical environment it can also be configured using the Network Manager graphical tools.

The “initscripts” syntax is legacy that was however used for most connections until el8.
In el9 NeworkManager uses primarily its new syntax (and config is stored elsewhere).

You can look at output of these:

nmcli
nmcli d s
nmcli d sh
nmcli c s
nmcli c s eth0

The “d s” is short for “device status”, the “d sh” for “device show”, the “c s” for “connection show”,
and one could use either name or UUID of connection.


Furthermore, the way kernel enumerates/generates device names is different between el7 and el9.

Yes, I had that ‘bug’ on install, DHCP did not get an IP. Rocky9.5 minimal on DVD
After “dnf upgrade” DHCP worked.
Hardware: Blackview M80, Intel N97 CPU & GPU.
I now use YUMI on a 32Gb USB stick to load any OS.