Centos 6.2 static IP: only getting IPV6 address and need IPV4

6,157

Something along the lines of this in your ifcfg-eth0 file should work:

DEVICE=eth0
ONBOOT=yes
NETMASK=255.255.255.0
IPADDR=192.168.0.10
TYPE=Ethernet

If you're having trouble, posting your network scripts would be helpful.

Share:
6,157

Related videos on Youtube

Rodger Bruce
Author by

Rodger Bruce

Updated on September 18, 2022

Comments

  • Rodger Bruce
    Rodger Bruce almost 2 years

    I installed a Centos 6.2 min install. I have edited /etc/sysconfig/network-scripts and I have ifcfg-eth0,eth1

    I have tried to setup static IPs but I only get IPV6 address back on both adapters and can't ping anything since the rest of the network is IPV4.

    I have copied my working settings from another Centos 6 server I have setup and working. Not sure what to do next?

    I already added a line to say NETWORKING_IPV6=no

    • FloppyDisk
      FloppyDisk over 12 years
      Please post the ifcfg scripts so we can take a look! Is your network manager set to IPV6 (if it's installed)? If network manager is running, it'll override your static settings unless you explicitly say to not manage the interface.
  • Rodger Bruce
    Rodger Bruce over 12 years
    I will try that when I get home and let you know thanks. I have edited in and out so many times. Was starting to think problem with 6.2??? Used same settings as my other working server 6.0, and didnt work.
  • Rodger Bruce
    Rodger Bruce over 12 years
    ok mine is just like your except i have hardware= for network adapter that was already there. I also have a gateway and 2 dns addresses defined. still not working.
  • Rodger Bruce
    Rodger Bruce over 12 years
    I have tried editing also probmode.conf files as some suggested along with network file. Im at the point of reinstalling with Centos 6.0 instead of 6.2. I have a 6.0 version running fine with static ipv4 no problems.
  • Rodger Bruce
    Rodger Bruce over 12 years
    Loaded Centos 6.0 network adapters working fine ipv4.