[SOLVED] ifcfg-eth0 missing

Issues related to configuring your network
Post Reply
den.duez
Posts: 16
Joined: 2014/02/24 10:44:13

[SOLVED] ifcfg-eth0 missing

Post by den.duez » 2014/02/26 10:48:06

Hello,
I tried to find it myself here on this forum but i failed to find the answer.

I want to change the ip-address to a static address but when i try
there is no file in /etc/sysconfig/network-scripts/ifcfg-eth0

there is only a /ifcfg-lo in there

the output of ifconfig shows eth0 and eth1 and they both have an ip-address (but a wrong one)

How can i permanently change the ip-address?
(so not with

Code: Select all

ifconfig eth0 192.168.1.12/24
)

Please i need some help!

thank you
Last edited by den.duez on 2014/03/10 15:43:29, edited 3 times in total.

dejanst
Posts: 124
Joined: 2011/09/20 14:13:13

Re: ifcfg-eth0 missing

Post by dejanst » 2014/02/26 11:26:07

If your run "ifconfig -a" and see eth0 and eth1, just create the ifcfg-ethX files manually in /etc/sysconfig/network-scripts/

Code: Select all

DEVICE=eth0
BOOTPROTO=static
IPADDR=your_IP
NETMASK=your_network_mask
HWADDR=NIC_MAC_address
NM_CONTROLLED=no
ONBOOT=yes
TYPE=Ethernet
IPV6INIT=no

DEVICE=eth1
BOOTPROTO=static
IPADDR=your_IP
NETMASK=your_network_mask
HWADDR=NIC_MAC_address
NM_CONTROLLED=no
ONBOOT=yes
TYPE=Ethernet
IPV6INIT=no

den.duez
Posts: 16
Joined: 2014/02/24 10:44:13

Re: ifcfg-eth0 missing

Post by den.duez » 2014/02/26 12:53:15

dejanst wrote:If your run "ifconfig -a" and see eth0 and eth1, just create the ifcfg-ethX files manually in /etc/sysconfig/network-scripts/

Code: Select all

DEVICE=eth0
BOOTPROTO=static
IPADDR=your_IP
NETMASK=your_network_mask
HWADDR=NIC_MAC_address
NM_CONTROLLED=no
ONBOOT=yes
TYPE=Ethernet
IPV6INIT=no

DEVICE=eth1
BOOTPROTO=static
IPADDR=your_IP
NETMASK=your_network_mask
HWADDR=NIC_MAC_address
NM_CONTROLLED=no
ONBOOT=yes
TYPE=Ethernet
IPV6INIT=no
does not start again when server restarts

User avatar
TrevorH
Site Admin
Posts: 33202
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: ifcfg-eth0 missing

Post by TrevorH » 2014/02/26 13:33:47

You did change all the things in dejanst's skeleton to be real values? Like your_network_mask, NIC_MAC_address and your_IP
The future appears to be RHEL or Debian. I think I'm going Debian.
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are deadest, do not use them.
Use the FAQ Luke

den.duez
Posts: 16
Joined: 2014/02/24 10:44:13

Re: ifcfg-eth0 missing

Post by den.duez » 2014/02/26 13:40:16

TrevorH wrote:You did change all the things in dejanst's skeleton to be real values? Like your_network_mask, NIC_MAC_address and your_IP
this is what i put into /etc/sysconfig/network-scripts/ifcfg-eth0

Code: Select all

DEVICE=eth0
BOOTPROTO=static
IPADDR=146.175.139.13
NETMASK=255.255.255.0
GATEWAY=146.175.139.255
HWADDR=00:25:90:81:5e:64
NM_COnTROLLED=no		
ONBOOT=yes
TYPE=Ethernet
IPV6INIT=no

User avatar
TrevorH
Site Admin
Posts: 33202
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: ifcfg-eth0 missing

Post by TrevorH » 2014/02/26 13:48:10

Post the output of `chkconfig --list | grep -i netw`
The future appears to be RHEL or Debian. I think I'm going Debian.
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are deadest, do not use them.
Use the FAQ Luke

den.duez
Posts: 16
Joined: 2014/02/24 10:44:13

Re: ifcfg-eth0 missing

Post by den.duez » 2014/02/27 08:16:35

TrevorH wrote:Post the output of `chkconfig --list | grep -i netw`
this is it:

Code: Select all

NetworkManager 0:off 1:off 2:on 3:on 4:on 5:on 6:off
network 0:off 1:off 2:off 3:off 4:off 5:off 6:off
what does this do?

den.duez
Posts: 16
Joined: 2014/02/24 10:44:13

Re: ifcfg-eth0 missing

Post by den.duez » 2014/02/27 08:23:17

This is what helped:
To Disable Network Manager Service in Linux

Login with root access or SSH to server

To Stop Network Manager Service

# service NetworkManager stop

Configure chkconfig so that the Network Manager Service cannot start at Startup

# chkconfig NetworkManager off

Now Add default Net Manager

# chkconfig network on

Start default Manager

# service network start

Done.

kostyanius
Posts: 13
Joined: 2014/09/09 00:46:17

Re: [SOLVED] ifcfg-eth0 missing

Post by kostyanius » 2017/07/18 16:57:13

Followed your guide but still see the eth0 instead of eno device (even after server reboot).
eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 192.168.88.241 netmask 255.255.255.0 broadcast 192.168.88.255
inet6 fe80::215:5dff:fe58:fa09 prefixlen 64 scopeid 0x20<link>
ether 00:15:5d:58:fa:09 txqueuelen 1000 (Ethernet)
RX packets 42397 bytes 56831163 (54.1 MiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 25122 bytes 2468211 (2.3 MiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0

lo: flags=73<UP,LOOPBACK,RUNNING> mtu 65536
inet 127.0.0.1 netmask 255.0.0.0
inet6 ::1 prefixlen 128 scopeid 0x10<host>
loop txqueuelen 1 (Local Loopback)
RX packets 4 bytes 340 (340.0 B)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 4 bytes 340 (340.0 B)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0

virbr0: flags=4099<UP,BROADCAST,MULTICAST> mtu 1500
inet 192.168.122.1 netmask 255.255.255.0 broadcast 192.168.122.255
ether 52:54:00:3c:0b:2d txqueuelen 1000 (Ethernet)
RX packets 0 bytes 0 (0.0 B)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 0 bytes 0 (0.0 B)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
What the hack?

Post Reply