LinuxQuestions.org
Visit the LQ Articles and Editorials section
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices

Reply
 
Search this Thread
Old 07-06-2012, 12:09 PM   #1
cheddarcheese
Member
 
Registered: Aug 2011
Location: Massachusetts, USA
Distribution: Fedora; Centos; Puppy
Posts: 80

Rep: Reputation: 5
IPv6 / IPv4


Hi,

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.

Last edited by cheddarcheese; 07-06-2012 at 12:11 PM.
 
Old 07-06-2012, 03:10 PM   #2
Kustom42
Senior Member
 
Registered: Mar 2012
Distribution: Red Hat
Posts: 1,565

Rep: Reputation: 410Reputation: 410Reputation: 410Reputation: 410Reputation: 410
How does your ifcfg-eth0 file read?

It should look something similar to this:

Code:
DEVICE=eth0
BOOTPROTO=dhcp
HWADDR=00:19:D1:2A:BA:A8
ONBOOT=yes
If it's set like that try running the following, you may also want to restart networking:

Code:
sudo dhclient -r
sudo dhclient eth0
 
Old 07-06-2012, 03:13 PM   #3
Kustom42
Senior Member
 
Registered: Mar 2012
Distribution: Red Hat
Posts: 1,565

Rep: Reputation: 410Reputation: 410Reputation: 410Reputation: 410Reputation: 410
The previous post assumes that ipv6 is disabled as you stated it has. Just wanted to throw that in there.
 
Old 07-06-2012, 03:18 PM   #4
cheddarcheese
Member
 
Registered: Aug 2011
Location: Massachusetts, USA
Distribution: Fedora; Centos; Puppy
Posts: 80

Original Poster
Rep: Reputation: 5
Thanks Kustom42 ... I'll check it out when I get home later, and post back here!
 
Old 07-07-2012, 01:50 PM   #5
cheddarcheese
Member
 
Registered: Aug 2011
Location: Massachusetts, USA
Distribution: Fedora; Centos; Puppy
Posts: 80

Original Poster
Rep: Reputation: 5
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:

HWADDR=....
TYPE=Ethernet
BOOTPROTO=dhcp
DEFROUTE=yes
PEERDNS=yes
PEERROUTES=yes
IPV4_FAILURE_FATAL=yes
IPV6INIT=no
NAME="Auto eth0"
UUID=....
ONBOOT=yes

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 127.0.0.1 then I get "From 127.0.0.1 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!
 
Old 07-08-2012, 06:47 PM   #6
chrism01
Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Centos 6.5, Centos 5.10
Posts: 16,247

Rep: Reputation: 2025Reputation: 2025Reputation: 2025Reputation: 2025Reputation: 2025Reputation: 2025Reputation: 2025Reputation: 2025Reputation: 2025Reputation: 2025Reputation: 2025
For a start, exactly which distro are you doing this on; your profile mentions 3?
 
Old 07-08-2012, 09:26 PM   #7
cheddarcheese
Member
 
Registered: Aug 2011
Location: Massachusetts, USA
Distribution: Fedora; Centos; Puppy
Posts: 80

Original Poster
Rep: Reputation: 5
Hmmm, yes, I should have mentioned that - sorry! I'm usually careful to do that. Anyway, it's Fedora 14.

Thanks.
 
Old 07-09-2012, 01:03 AM   #8
chrism01
Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Centos 6.5, Centos 5.10
Posts: 16,247

Rep: Reputation: 2025Reputation: 2025Reputation: 2025Reputation: 2025Reputation: 2025Reputation: 2025Reputation: 2025Reputation: 2025Reputation: 2025Reputation: 2025Reputation: 2025
OK, well in RHEL5, you edit /etc/modprobe.conf
Code:
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
Code:
NETWORKING_IPV6=no
in /etc/sysconfig/network, or even
Code:
IPV6INIT=no
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.
HTH
 
Old 07-09-2012, 08:39 AM   #9
cheddarcheese
Member
 
Registered: Aug 2011
Location: Massachusetts, USA
Distribution: Fedora; Centos; Puppy
Posts: 80

Original Poster
Rep: Reputation: 5
Thanks Chris ... Will give that a whirl when I get back home tonight and post back.
 
Old 07-12-2012, 04:40 PM   #10
cheddarcheese
Member
 
Registered: Aug 2011
Location: Massachusetts, USA
Distribution: Fedora; Centos; Puppy
Posts: 80

Original Poster
Rep: Reputation: 5
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.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
IPv4 to IPv6 Winanjaya Linux - Networking 1 06-14-2010 07:45 AM
IPv6 over IPv4 lo-kəy Linux - Networking 1 05-04-2009 01:45 AM
IPv6 vs IPv4 jiml8 Programming 2 12-22-2008 10:53 AM
ipv4 to ipv6 anant_wsu Linux - Networking 1 01-03-2006 04:28 PM
IPv6 to IPv4 thomjakub *BSD 1 03-06-2004 01:17 AM


All times are GMT -5. The time now is 08:10 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration