| (Jump to Solaris, FreeBSD, or OpenBSD setup instructions.)
As detailed in the addressing scheme document, address autoconfiguration will not be available on most subnets.
Preface: Unix Commands
Once IPv6 is enabled, certain commands will start displaying more information.
netstat will show IPv4 as well as IPv6 information; to limit to one or the other, use -f inet or -f inet6.
As with netstat, ifconfig will display IPv4 as well as IPv6 interface information. To view only IPv6 information, add the inet6 address family option, as in
# ifconfig -a inet6
This will show all interfaces with IPv6 addresses. Note that specifying an address family often prevents information specific to any other family from being displayed, including ethernet addresses from the ether family.
Under Solaris, ping and traceroute are able to determine whether it is appropriate to use IPv4 or IPv6 to reach an address when a hostname with IPv4 and IPv6 addresses is specified, including checking the DNS for whether an IPv6 address exists for the name and checking the route table for inet6 routes. To override the automatically-chosen address family, use the "-A" option.
Under BSD and Linux, there are separate ping6 and traceroute6 utilities for use with IPv6. The standard ping and traceroute utilities cannot be used with IPv6 addresses, and the IPv6 utilities cannot be used with IPv4 addresses.
Most other IPv6-enabled programs will automatically determine whether it is appropriate to use IPv6 over IPv4, though behaviour varies. Some will fall back to IPv4 if a TCP6 connection is refused, such as most utilities bundled with most operating systems (telnet, ftp, mconnect, etc.); others will fall back only if no route to the destination is present in the host's inet6 routing table, such as early versions of the Mozilla web browser.
Solaris 8/9 Setup First, determine which interfaces will have IPv6 enabled. An inet6 instance will automatically be enabled at boot time for the loopback interface, lo0, if any physical interfaces have an inet6 instance.
For each interface, create/edit the file
/etc/hostname6.<interface>. The file should contain the
following two lines:
up
addif <IPv6_address>/<masklen> up
You may repeat the second line as necessary for additional virtual interfaces to be configured at boot time. Upon system reboot, every interface for which a hostname6 file exists will be configured with an inet6 instance, as will lo0.
To effect the IPv6 configuration without rebooting, execute the following commands as root:
# ifconfig <interface> inet6 plumb up
# ifconfig <interface> inet6 addif <IPv6_address>/<masklen> up
# ifconfig lo0 inet6 plumb up
# /usr/lib/inet/in.ndpd
Repeat the first two commands as necessary for each interface that will have an IPv6 instance. Repeat just the second command as necessary for multiple IPv6 addresses on an interface.
The result of this configuration will be that the interface's primary, public address will be on the "virtual interface" <interface>:1.
Note: I currently know of no good way to
prevent a Solaris host with IPv6 instances of multiple interfaces (physical or
VLAN-based) from learning a default route on each interface, which is likely to
cause routing headeaches. There may be a way to obtain the correct behaviour
with directives in /etc/inet/ndpd.conf, but I am not aware of any
at this point. My only suggestion currently is to modify
/etc/init.d/inetinit to prevent in.ndpd from starting
up and then devise a mechanism for adding a default inet6 route at startup.
FreeBSD Setup
Under FreeBSD, a link-local address is configured as a driver attaches to an
ethernet interface, and the loopback interface is additionally configured with
the address ::1/128.
Edit the file /etc/rc.conf. Add the following lines to
an appropriate point in the file, or find the same variables and update their values:
ipv6_enable=YES
ipv6_ifconfig_<interface>="<IPv6_address> prefixlen <masklen>"
ipv6_default_interface=<interface>
Next, if the host will have only one IPv6-enabled interface (regardless of
the number of addresses on that interface), edit /etc/sysctl.conf
and add the following line or uncomment/update any existing line with this
variable:
net.inet6.ip6.accept_rtadv=1
This will allow the host to learn the default gateway via the advertisements
from the router. If the host is to be multihomed, instead set the
ipv6_defaultrouter variable in /etc/rc.conf to the
global unicast address of the preferred subnet's router.
There are a number of multicast, link-local, and interface routes to be added
at this point; rather than attempting to document them here and potentially
missing one or missing a change to FreeBSD, I recommend that the host be
rebooted to effect the IPv6 configuration.
OpenBSD Setup
As with FreeBSD, a link-local address is configured as a driver attaches to
an ethernet interface, and the loopback interface is additionally configured
with the address ::1/128.
Edit the file /etc/hostname.<interface>. The first line(s)
in the file will generally be the IPv4 configuration for the interface. IPv6
configuration may follow the IPv4 configuration in the following format:
inet6 alias <address> <masklen>
Repeat for each IPv6 address you wish to assign to the interface.
Next, if the host will have only one IPv6-enabled interface (regardless of
the number of addresses on that interface), edit /etc/sysctl.conf
and add the following line or uncomment/update any existing line with this
variable:
net.inet6.ip6.accept_rtadv=1
If the host is to be multihomed, instead add a default IPv6 gateway in
/etc/rc.conf. This may be the same ipv6_defaultrouter
variable as in FreeBSD.
I have not used OpenBSD in some time, so I do not know whether it is
possible or advisable to effect the IPv6 configuration without rebooting.
Mac OS X, Linux, Others
Linux netstat takes nonstandard arguments, so the netstat information in the preface may not apply.
No other information at this time. If you have implemented IPv6 (without the
use of DHCPv6) on a Unix platform other than Solaris 8/9, FreeBSD, or OpenBSD,
please contact Jeff Blank to have your setup
instructions included here.
|