LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
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 12-19-2016, 07:55 AM   #1
Altoid
Member
 
Registered: Oct 2016
Location: Southern Hemisphere
Distribution: Devuan
Posts: 112

Rep: Reputation: Disabled
Disabling IPv6


Hello:

I run Mint 18.0 64bit.

Code:
uname -a
Linux 4.4.0-45-generic #66-Ubuntu SMP Wed Oct 19 14:12:37 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux
I have disabled IPv6 as although my system supports it, my ISP's infrastructure does not.

I disabled it by editing /etc/sysctl.conf and adding this at the end of the file:

Code:
# IPv6 disabled
net.ipv6.conf.all.disable_ipv6 = 1
net.ipv6.conf.default.disable_ipv6 = 1
net.ipv6.conf.lo.disable_ipv6 = 1
See:
https://www.blackmoreops.com/2015/08...ipv6-in-linux/

Having done this, I get this in dmesg:
Code:
$ dmesg | grep IPv6
[25.566547] IPv6: ADDRCONF(NETDEV_UP): wlx007002073edd: link is not ready
[25.798904] IPv6: ADDRCONF(NETDEV_UP): wlx007002073edd: link is not ready
[25.802104] IPv6: ADDRCONF(NETDEV_UP): enp0s25: link is not ready
[26.268187] IPv6: ADDRCONF(NETDEV_UP): enp0s25: link is not ready
[26.481451] IPv6: ADDRCONF(NETDEV_UP): wlx007002073edd: link is not ready
[28.126314] IPv6: ADDRCONF(NETDEV_CHANGE): wlx007002073edd: link becomes ready
$
It's not clear to me why I am getting this in dmesg.
Seems the OS is looking to see if a IPv6 link uis 'up' at boot time.

Is there anything else that has to be disabled?

Thanks in advance.

A.
 
Old 12-19-2016, 09:04 AM   #2
ugjka
Member
 
Registered: May 2015
Location: Latvia
Distribution: Arch, Centos
Posts: 368
Blog Entries: 5

Rep: Reputation: 264Reputation: 264Reputation: 264
use ipv6.disable=1 kernel parameter via bootloader
 
Old 12-19-2016, 04:19 PM   #3
Altoid
Member
 
Registered: Oct 2016
Location: Southern Hemisphere
Distribution: Devuan
Posts: 112

Original Poster
Rep: Reputation: Disabled
Hello:

Quote:
use ipv6.disable=1 kernel parameter via bootloader
No ...
Makes no difference at all.

Thanks for your input.

Cheers,

A.
 
Old 12-20-2016, 01:51 AM   #4
Jjanel
Member
 
Registered: Jun 2016
Distribution: any&all, in VBox; Ol'UnixCLI; NO GUI resources
Posts: 999
Blog Entries: 12

Rep: Reputation: 364Reputation: 364Reputation: 364Reputation: 364
Hi... Please don't get mad at my asking this (I'm trying to learn about this): if willing, would you post
cat /proc/cmdline
(after booting with that param [&still getting the IPv6 dmesg]) Thanks!
 
Old 12-20-2016, 05:15 AM   #5
Altoid
Member
 
Registered: Oct 2016
Location: Southern Hemisphere
Distribution: Devuan
Posts: 112

Original Poster
Rep: Reputation: Disabled
Good morning:
Quote:
Please don't get mad at my asking this ...
No, there's absolutely no way I could get mad at someone who (and at my request) is trying to help me. If for some reason my text has come across as my being annoyed or mad at someone, please accept my most sincere apologies.
It was unintended.

Quote:
would you post cat /proc/cmdline
Of course.
Code:
$ cat /proc/cmdline
BOOT_IMAGE=/boot/vmlinuz-4.4.0-45-generic root=UUID=d909bdb7-5f05-4057-987d-2facebab2e29 ro enable_mtrr_cleanup mtrr_spare_reg_nr=7 mtrr_gran_size=128M mtrr_chunk_size=256M numa=off agp=off acpi_osi=Linux acpi=noirq
$
You have evidently asked for the right data.

As you can see, the stance I added to the kernel parameters command line using Grub Customizer (what I use for meddling with Grub) is not in the output you asked me for.

But I can confirm it is in the Grub Customizer kernel parameters box.

Thinking that there could be a possibility of Grub Customizer having a limited character count (doubtful, but just in case) I modified the kernel parameters line so that the stance I added last was not last but in the middle.

And this was the result:

Code:
$ cat /proc/cmdline
BOOT_IMAGE=/boot/vmlinuz-4.4.0-45-generic root=UUID=d909bdb7-5f05-4057-987d-2facebab2e29 ro enable_mtrr_cleanup mtrr_spare_reg_nr=7 mtrr_gran_size=128M mtrr_chunk_size=256M numa=off agp=off acpi_osi=Linux acpi=noirq
$
As you can see, even though I changed the order of the command line stances in Grub Customizer, it has not changed in the output of 'cat /proc/cmdline'.

So it would seem that I am not booting with this set of command line parameters.
I'll have to check what's up when I get back from work and try to get back to this thread by tomorrow.

I have a distant memory of this having happened before but cannot recall the details.

Thanks for your input.

A.
 
Old 12-21-2016, 02:57 AM   #6
Jjanel
Member
 
Registered: Jun 2016
Distribution: any&all, in VBox; Ol'UnixCLI; NO GUI resources
Posts: 999
Blog Entries: 12

Rep: Reputation: 364Reputation: 364Reputation: 364Reputation: 364
Can you 'catch' grub before it loads linux, and manually try adding it, with the 'e' (then F10)
like "Edit Boot Options" here
 
Old 12-21-2016, 03:59 AM   #7
Altoid
Member
 
Registered: Oct 2016
Location: Southern Hemisphere
Distribution: Devuan
Posts: 112

Original Poster
Rep: Reputation: Disabled
Good morning:
Quote:
Can you 'catch' grub before it loads linux ...
Yes.
There's a thing with a 'custom script' in Grub Customizer that I have to fix, but I'll ge to that eventually.

Once I added the stance, I get this:

Code:
$ cat /proc/cmdline
BOOT_IMAGE=/boot/vmlinuz-4.4.0-45-generic root=UUID=d909bdb7-5f05-4057-987d-2facebab2e29 ro quiet enable_mtrr_cleanup mtrr_spare_reg_nr=7 mtrr_gran_size=128M mtrr_chunk_size=256M numa=off acpi_osi=Linux acpi=noirq ipv6.disable=1 agp=off
and then this:

Code:
$ dmesg | grep IPv6
[0.843911] IPv6: Loaded, but administratively disabled, reboot required to enable
$
So ...
IPv6 is still being loaded but at least the OS is not trying to start it at boot.
I have not timed it but it seems the rig is booting a wee bit faster.

In any case, the questions would be:

1. why is it still being loaded after disabling it with ipv6.disable=1 at the kernel cmd line?
2. why doesn't editing sysctl.conf disble it completely, needing to do ipv6.disable=1 at the kernel cmd line?
3. could it be that these two solutions are partial and that there's another one 'higher up' so to speak?

I'll try commenting the entries I added to sysctl.conf and see if I get these same results.

Thanks for your input.

A.
 
Old 12-25-2016, 05:45 AM   #8
Altoid
Member
 
Registered: Oct 2016
Location: Southern Hemisphere
Distribution: Devuan
Posts: 112

Original Poster
Rep: Reputation: Disabled
Good morning and Merry Xmas:

Quote:
... why is it still being loaded after disabling it with ipv6.disable=1 at the kernel cmd line?
A.
Apparently the reason is this:
Quote:
In Linux, the kernel support for IPv6 might be contained in a kernel module called ipv6.ko (the .ko extension meaning “kernel object”). Support for IPv6 is often made available as a loadable module; although in the case of Ubuntu 9.10 and later, it is built into the kernel, which complicates matters somewhat if you need to disable it.
See this post.

So, it would seem that support for IPv6 (at least in Mint, being Ubuntu based) is built into the kernel.
Thus it cannot be unloaded, only disabled, which is why you get a line saying so in dmesg, as mentioned above.

A.
 
Old 12-25-2016, 06:34 AM   #9
Shadow_7
Senior Member
 
Registered: Feb 2003
Distribution: debian
Posts: 4,137
Blog Entries: 1

Rep: Reputation: 874Reputation: 874Reputation: 874Reputation: 874Reputation: 874Reputation: 874Reputation: 874
DHCP clients tend to try ipv6 first and fail to ipv4 unless told not to.

# dhclient -4 -v wlan0

Where the -4 is to use ipv4. It's also -4 for dhcpcd. Although I mostly pass it to make it faster by skipping ipv6 efforts. By defaults most things try ipv6 first, so there's other places to tell it otherwise. Although I'm not sure how to configure those at boot or without explicit options.

# iw dev wlan0 set 4addr on

I tend to set my network to manual and set things up after booting. Which keeps a bit of that ipv6 cruft out of the logs.
 
  


Reply



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
Opensuse 12.3 and disabling IPv6 pancakefiend Linux - Newbie 2 04-19-2013 11:04 AM
Disabling ipv6 on SuSE 10.0 VIR3NT SUSE / openSUSE 3 05-14-2009 06:08 AM
Disabling IPv6 thomaspsimon Linux - Networking 2 06-25-2007 04:36 AM
confused on disabling IPv6 arnuld Debian 5 06-13-2007 06:11 PM
disabling ipv6 felosi Debian 7 06-05-2006 10:46 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 10:52 PM.

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration