LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices

Reply
 
Search this Thread
Old 07-28-2009, 03:27 AM   #1
v_fone
Member
 
Registered: Feb 2009
Posts: 43

Rep: Reputation: 16
how can i disable the ipv6 address only?


Hello everyone.
I have a host and typing ifconfig I get:

eth0 Link encap:Ethernet HWaddr 00:0E:7F:4F:E4:09
inet addr:130.130.9.9 Bcast:130.130.255.255 Mask:255.255.0.0
inet6 addr: fe80::20e:7fff:fe4f:e409/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:3099783807 errors:1 dropped:0 overruns:0 frame:0
TX packets:3730735923 errors:12 dropped:0 overruns:0 carrier:12

and to do a test i want to disable or delete the ipv6 address, but mainteining the other configured parameters.

Looking on the ifcfg config file I have

DEVICE=eth0
BOOTPROTO=static
BROADCAST=130.130.255.255
IPADDR=130.130.9.9
NETMASK=255.255.0.0
NETWORK=130.130.0.0
ONBOOT=yes
TYPE=Ethernet

and nothing about IPv6...

Then, using ifdown-ipv6 could i remove only the ipv6 address?

Thanks

Last edited by v_fone; 07-28-2009 at 03:34 AM.
 
Old 07-28-2009, 05:19 AM   #2
zQUEz
Member
 
Registered: Jun 2007
Distribution: Fedora, RHEL, Centos
Posts: 294

Rep: Reputation: 53
I didn't see where you mentioned what distro you are using. If you are using a RHEL based system (RHEL/Centos/Fedora) you can add a line to /etc/sysconfig/network as follows:
Code:
NETWORKING_IPV6=no
then just restart and that should turn off any IPv6.
 
Old 07-28-2009, 05:36 AM   #3
GrapefruiTgirl
Guru
 
Registered: Dec 2006
Location: underground
Distribution: Slackware64
Posts: 7,594

Rep: Reputation: 543Reputation: 543Reputation: 543Reputation: 543Reputation: 543Reputation: 543
Another method, based on the same idea but for another selection of distros:

Create a file in /etc/modprobe.d called something like 'ipv6.conf' or whatever. Inside it, put the following:

alias ipv6 off
alias net-pf-10 off


and inside the networking config script ( on my Slackware-esque system, this is rc.inet1.conf ) place the following:

NETWORKING_IPV6="no"

As mentioned by the earlier poster, we don't know your distro; putting this in your profile so that it appears in the sidebar, will help folks answer you more accurately.

Sasha

PS - if you are interested, and you use Firefox, there is an about:config option which disables IPv6 within the browser, thereby (reputedly) making the browser a little quicker because it doesn't try to resolve/deal-with IPv6, and focuses fully on IPv4. I cannot recall the syntax of the option, but you can easily find this info via Google or similar means.

Last edited by GrapefruiTgirl; 07-28-2009 at 05:40 AM. Reason: added FF info.
 
Old 07-29-2009, 01:07 AM   #4
v_fone
Member
 
Registered: Feb 2009
Posts: 43

Original Poster
Rep: Reputation: 16
Thanks for your answer
Well, my distro is RHEL 4&5, sorry for dont tell it previously :$
Then, it's neccesary restart the machine?
Thanks a lot (again )
 
Old 07-29-2009, 02:16 AM   #5
linuxlover.chaitanya
Senior Member
 
Registered: Apr 2008
Location: Nagpur, India
Distribution: Cent OS 5/6, Ubuntu Server 10.04
Posts: 4,627

Rep: Reputation: Disabled
I dont think restarting machine is necessary, just restarting network services should be enough.
 
Old 07-30-2009, 01:31 AM   #6
v_fone
Member
 
Registered: Feb 2009
Posts: 43

Original Poster
Rep: Reputation: 16
Quote:
Originally Posted by linuxlover.chaitanya View Post
I dont think restarting machine is necessary, just restarting network services should be enough.
Well, today i'm going to do the test. When I do it, I'm going to put here the results
 
Old 07-30-2009, 02:03 AM   #7
v_fone
Member
 
Registered: Feb 2009
Posts: 43

Original Poster
Rep: Reputation: 16
Finally, It doesnt work when I restart the service network.
It's neccesary to restart the host...
 
Old 07-30-2009, 02:24 AM   #8
linuxlover.chaitanya
Senior Member
 
Registered: Apr 2008
Location: Nagpur, India
Distribution: Cent OS 5/6, Ubuntu Server 10.04
Posts: 4,627

Rep: Reputation: Disabled
What???? Linux needs a restart???
 
Old 07-30-2009, 07:42 AM   #9
GrapefruiTgirl
Guru
 
Registered: Dec 2006
Location: underground
Distribution: Slackware64
Posts: 7,594

Rep: Reputation: 543Reputation: 543Reputation: 543Reputation: 543Reputation: 543Reputation: 543
Quote:
Originally Posted by v_fone View Post
Finally, It doesnt work when I restart the service network.
It's neccesary to restart the host...
If restarting the system rubs you the wrong way, instead try switching to init 1 , then log in and re-switch it back to init 3/4/5 -- this should also accomplish the job.

NOTE: Of course, now that the configuration files are edited to disable the IPv6, this is redundant; every boot-up from now on will have the setting in effect anyhow

Sasha
 
Old 07-31-2009, 01:31 AM   #10
v_fone
Member
 
Registered: Feb 2009
Posts: 43

Original Poster
Rep: Reputation: 16
Quote:
Originally Posted by linuxlover.chaitanya View Post
What???? Linux needs a restart???
Well, I'm also very surprised... but reading other web page found the samething :S
http://www.vincentverhagen.nl/2007/0...v6-on-red-hat/
First I tried to restart the network service but didnt work, so I rebooted the machine.
And Sasha, I dont understand what you are talking about because I'm trying to disable IPv6 so obviously if I reboot the host, IPv6 must not appears using ifconfig command, could you explain your point?
Thanks
 
Old 07-31-2009, 07:30 AM   #11
GrapefruiTgirl
Guru
 
Registered: Dec 2006
Location: underground
Distribution: Slackware64
Posts: 7,594

Rep: Reputation: 543Reputation: 543Reputation: 543Reputation: 543Reputation: 543Reputation: 543
The link you found clearly shows the steps you need to take to accomplish what you are after.

My suggestion (while it may or may not work) of switching to init 1 and then back to a multi-user runlevel (3/4/5) makes no particular point; it was just an idea that one might try if for some reason they were dead set against rebooting the machine.

Many of the configuration scripts & other binaries, which set up the machine during a boot, are not executed when booting into init 1. Therefore, by switching to level 1 and back, the system would RE-execute almost all of the config scripts that it would normally execute at a bootup, thereby hopefully picking up the IPv6 changes and disabling IPv6.

Either way, it seems you have found your answer, and that's the important part-- if this is true, you can mark your thread as [solved] using the 'Thread Tools' dropdown menu above

Cheers,

Sasha
 
Old 08-01-2009, 04:54 AM   #12
v_fone
Member
 
Registered: Feb 2009
Posts: 43

Original Poster
Rep: Reputation: 16
Thanks Sasha for explain the process when switch between run levels
And thanks everybody for your answer and support
Best regards
 
  


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
How to Disable ipv6 in ubuntu 9.04 si.erkac Linux - Networking 7 03-18-2010 08:18 AM
How to disable ipv6 on NetBSD? Lord Estraven *BSD 3 11-22-2008 03:42 AM
How to set IPv6 address on IPv6 router tlemons Linux - Networking 3 09-17-2007 01:25 PM
Disable IPV6 bjb_nyj101 Linux - Software 2 06-07-2007 09:54 PM
Disable ipv6 in ubuntu? ksgill Linux - Newbie 7 03-25-2006 09:05 PM


All times are GMT -5. The time now is 03:35 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