-   Linux - Newbie (
-   -   IPv6 / IPv4 (

cheddarcheese 07-06-2012 12:09 PM

IPv6 / IPv4

I have two machines; one is a Windows PC, and the other is a Linux netbook. I use them both at home, and they're each wired to a hub which is connected to a cable-modem. Handily, my provider gives me a separate external IP address for each device, and each had a distinct IPv4 address.

I recently had my cable-modem replaced for a newer one, since the old one was getting a bit dodgy.

However, after the modem had been replaced, I realized that while my PC was continuing to get an IPv4 address (the same one as before), the Linux netbook was being assigned an IPv6 address.

This is a pain for a couple of reasons, but suffice to say that I'd really like it have an IPv4 address.

I thought that disabling IPv6 on the Linux box would sort it out, and that it would automatically find itself an IPv4 address after rebooting, but no matter how I disable IPv6 (I've done it a couple of different ways, following various tutorials), I can't seem to get the machine to pick up an IPv4 address, even though it previously did. (although disabling IPv6 does, indeed, prevent it from being assigned an IPv6 address, so that bit works).

Has anyone any ideas on how I can go about resolving this?

Many thanks in advance.

Kustom42 07-06-2012 03:10 PM

How does your ifcfg-eth0 file read?

It should look something similar to this:



If it's set like that try running the following, you may also want to restart networking:


sudo dhclient -r
sudo dhclient eth0

Kustom42 07-06-2012 03:13 PM

The previous post assumes that ipv6 is disabled as you stated it has. Just wanted to throw that in there.

cheddarcheese 07-06-2012 03:18 PM

Thanks Kustom42 ... I'll check it out when I get home later, and post back here!

cheddarcheese 07-07-2012 01:50 PM

Okay. Actually, there is no ifcfg-eth0 file on my system, per se, but it's ifcfg-Auto_eth0.

Still, on checking it out, then it looks something like this:

NAME="Auto eth0"

I tried the other bits you (Kustom42) said, but it made no difference. I wondered if I was somehow misreading the ifconfig output, but it definitely gives me an "inet6 addr" line, with an IPv6 address, and when I booted without the network cable then there was no inet6 addr line.

So, I think it definitely is assigning an IPv6 address, but - oddly - even though it does assign an address, I still can't get any network activity at all anyway. I tried a few pings to various addresses and all I get back is "Connect: Network is unreachable"

If I ping then I get "From icmp_seq=x Destination Host Prohibited" messages.

As I mentioned earlier, everything was working perfectly until my cable-modem got switched to a new one, and nothing else has changed.

Any suggestions, comments, etc, much appreciated. Thanks!

chrism01 07-08-2012 06:47 PM

For a start, exactly which distro are you doing this on; your profile mentions 3?

cheddarcheese 07-08-2012 09:26 PM

Hmmm, yes, I should have mentioned that - sorry! I'm usually careful to do that. Anyway, it's Fedora 14.


chrism01 07-09-2012 01:03 AM

OK, well in RHEL5, you edit /etc/modprobe.conf

alias net-pf-10 off
alias ipv6 off

& reboot.
I believe in RHEL6 do similarly but go into a dir /etc/modprobe.d; I'm guessing Fedora would be similar.

In my experience, if you don't turn it off there, it will assign ipv6 to eg eth0 etc, even if you're not using them or even if you put

in /etc/sysconfig/network, or even

in /etc/sysconfig/network-scripts/ifcfg-eth0, at least on RHEL5 ...

Anyway, that should give you a hint on what to google if it doesn't work.

cheddarcheese 07-09-2012 08:39 AM

Thanks Chris ... Will give that a whirl when I get back home tonight and post back.

cheddarcheese 07-12-2012 04:40 PM

Well, the suggestion worked in as much as it disabled IPv6, as it also did previously, but IPv4 doesn't seem to get the idea, and I end up without any IP address at all, IPv6 or IPv4.

This problem seems so odd. Everything was working fine until my cable-modem was switched out for a new one. It's the only thing that has changed.

More ideas and suggestions greatly appreciated. It must be something really silly I'm sure.

All times are GMT -5. The time now is 03:55 PM.