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.
Related videos on Youtube
Author by
Rodger Bruce
Updated on September 18, 2022Comments
-
Rodger Bruce almost 2 years
I installed a Centos 6.2 min install. I have edited
/etc/sysconfig/network-scripts
and I haveifcfg-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 over 12 yearsPlease 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 over 12 yearsI 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 over 12 yearsok 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 over 12 yearsI 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 over 12 yearsLoaded Centos 6.0 network adapters working fine ipv4.