How can I disable IPv6 in custom built embedded setup
I agree with Ulrich, that this doesn't sound like an IPv6 problem. However, here's how to disable IPv6.
In /etc/sysctl.conf
set the following options:
net.ipv6.conf.all.autoconf = 0
net.ipv6.conf.all.accept_ra = 0
net.ipv6.conf.all.disable_ipv6 = 1
If you don't have /etc/sysctl.conf
just create it and add those lines, then reboot.
Alternatively, each of these has an interface in /proc
that you can flip (and/or create a script to do this at boot time).
echo 0 > /proc/sys/net/ipv6/conf/all/autoconf
echo 0 > /proc/sys/net/ipv6/conf/all/accept_ra
echo 1 > /proc/sys/net/ipv6/conf/all/disable_ipv6
Related videos on Youtube
Lewis Wilcock
Updated on September 18, 2022Comments
-
Lewis Wilcock over 1 year
I have an embedded system built using buildroot. I have had a number of network issues, one of which is that my machine cannot see its gateway despite it being on the same subnet. I have tried using wireshark to analyse what is going on without success so as a last resort, I am considering trying to turn off support for IPv6 as I do not need it (my device doesn't need DNS or anything similar, simply needs to be able to communicate with other local machines on its subnet). I have read that I can turn off IPv6 by editing
/etc/modprobe.conf
but this file does not exist on my setup. Is there anything else I can do to disable IPv6 or is the only option to build the kernel from scratch without IPv6 support? -
Lewis Wilcock about 11 yearsThanks for your answer. Unfortunately I do not have a
sysctl.conf
file on my embedded system. I think I will try to recompile the kernel. -
bahamat about 11 yearsDo you have a
sysctl
command? -
Lewis Wilcock about 11 yearsYes I have a
sysctl
command as part of the busybox binary. I can see an option to read from a specified file of which/etc/sysctl.conf
is the default. Perhaps I just need to create this file and input the lines you suggest, then runsysctl
? You were right about it not being IPv6 problem though - I simply had incorrect information from the network administrator.