3

There are many questions on SE and elsewhere about turning off ipv6 on Linux. I want to do the reverse : how can I force the system to use ipv6 as often as possible ?

It's mostly for learning purposes and I must admit I don't know much about ipv6 or networking in general. Ideally, this should not break things and allow programs to switch to ipv4 if necessary.

  • If your system has IPv6 connectivity what you describe is the default behaviour. Did you test it and run into problems? – Sander Steffann Feb 16 '17 at 11:30
  • In my experience, all programs use ipv4 by default even though ipv6 is enabled. I wondered whether I could switch the default to ipv6. – Elzo Feb 16 '17 at 12:04
2

To enable the IPV6 run:

sysctl net.ipv6.conf.all.disable_ipv6=0

To disable it , run:

sysctl net.ipv6.conf.all.disable_ipv6=1

To check for IPv6 support in the current running kernel, run:

test -f /proc/net/if_inet6 && echo "Running kernel is IPv6 ready"

Edit

You can easly monitor IPV6 traffic through netdata tool , it can be installed as follows :

git clone https://github.com/firehol/netdata.git --depth=1
cd netdata
./netdata-installer.sh

Open your browser and type http://127.0.0.1:19999/ on the address bar .

  • Thanks, it seems to be already enabled. Is this all that's needed for programs to be able to use ipv6 ? If I'm on a connection that only allows ipv6, will the system use it ? – Elzo Feb 16 '17 at 12:03
  • 1
    Yes , you can visit deepspace6.net/docs/ipv6_status_page_apps.html to get some information about the IPv6 Support – GAD3R Feb 16 '17 at 12:27
  • 2
    Do you have a globally routable IPv6 address? If you run the command ip -6 addr, does it print an address with scope global? Linux prefers IPv6 over IPv4, if both can be used. – Johan Myréen Feb 16 '17 at 13:03
  • 1
    I do have a globally routable IPv6 address. Now I'm not sure what protocol is used. Is there a simple way to monitor IPv6 traffic ? – Elzo Feb 16 '17 at 13:42
  • 1
    @YdobEmos Your ISP must provide you with IPv6 service. Unfortunately, some backward ISPs still do not. – Michael Hampton Feb 16 '17 at 16:22

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.