Find the answer to your Linux question:
Results 1 to 3 of 3
Like Tree1Likes
  • 1 Post By atreyu
I have installed CentOS 6.3 on a server ,, but i am not able to get an IP.The ifcfg-eth0 file is not there in the directory "/etc/sysconfig/network-scripts/". When i tried ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Dec 2012
    Posts
    4

    missing ifcfg-eth0 file CentOS 6.3


    I have installed CentOS 6.3 on a server ,,
    but i am not able to get an IP.The ifcfg-eth0 file is not
    there in the directory "/etc/sysconfig/network-scripts/".
    When i tried :
    cat /etc/sysconfig/network-scripts/ifcfg-eth0
    I get the error msg :
    cat /etc/sysconfig/network-scripts/ifcfg-eth0 : no such file
    Then i created ifcfg-eth0 in the same directory which looked
    like following--
    Code:
    DEVICE=eth0
    BOOTPROTO=dhcp
    ONBOOT=yes
    still i am not able to get IP, ifconfig eth0 says
    -
    Code:
    eth0: error fetching interface information: Device not found
    Help me out.

  2. #2
    Trusted Penguin
    Join Date
    May 2011
    Posts
    4,353
    Are you sure the network device eth0 is present? Try these commands:
    Code:
    ls /sys/class/net
    Code:
    ifconfig
    Code:
    lspci|egrep -i 'eth|net'
    -----

    Assuming eth0 is there (and I don't think it is), what does this command do (run as root):

    Code:
    dhclient eth0
    Look in /var/log/messages on the DHCP server for connection attempts.
    firewallengineer likes this.

  3. #3
    Just Joined!
    Join Date
    Mar 2012
    Posts
    14
    Hi anvjb,

    I am not sure, you could try following it's not harmful.
    Remove the rules in the file /etc/udev/rules.d/70-persistent.net.rules

    The rules defined in this way
    # PCI device 0x8086:0x100e (e1000)
    SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="08:00:27:12:76:6d", ATTR{dev_id}=="0x0", ATTR{type}=="1", KERNEL=="eth*", NAME="eth0"

    So, delete all the lines below the comment "# PCI device 0x8086:0x100e (e1000)". And restart your system. This worked for me.

  4. $spacer_open
    $spacer_close

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •