4

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.

2
  • If your system has IPv6 connectivity what you describe is the default behaviour. Did you test it and run into problems? Commented Feb 16, 2017 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. Commented Feb 16, 2017 at 12:04

1 Answer 1

3

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 .

6
  • 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 ? Commented Feb 16, 2017 at 12:03
  • 1
    Yes , you can visit deepspace6.net/docs/ipv6_status_page_apps.html to get some information about the IPv6 Support Commented Feb 16, 2017 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. Commented Feb 16, 2017 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 ? Commented Feb 16, 2017 at 13:42
  • 1
    @YdobEmos Your ISP must provide you with IPv6 service. Unfortunately, some backward ISPs still do not. Commented Feb 16, 2017 at 16:22

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.