How do I determine if ipv6 is enabled?

bruce at nikkel.com bruce at nikkel.com
Tue Jul 5 07:25:13 GMT 2005


On Tue, Jul 05, 2005 at 01:17:41AM -0500, Billy Newsom wrote:
> Is there a sysctl variable, or a quick method to determine if ipv6 is 
> enabled in the kernel?  e.g. How do I test for the prescence of ipv6 in 
> a script or at the commandline?

You could use ifconfig together with the loopback interface (or any 
other network interface):

ifconfig lo0 inet6

This will return true or false, depending on the ipv6 protocol support.
Simple for shell scripting.

Bruce Nikkel



More information about the freebsd-stable mailing list