We use static IP addresses on our name servers, and I wanted IPv6 support on our public (and publicized) DNS too.
Doing this on Linux is straightforward and very similar to IPv4, as it should be, and you shouldn't have any trouble finding that information.
But IPv6 on Solaris, let alone Solaris 9, let alone static instead of SLAAC? Not as easy to find or do. Argh! I wasted a whole day on this, although I suppose it wasn't a wasted day since it accelerated my plan to eradicate SPARC and Solaris. (Uniformity is easier to manage.) So here's how you do it.
First, check for any existing IPv6.
sudo ifconfig -a6
While we're here, see what we've got (baseline).
sudo ifconfig -a
Since we'll need to add an IPv6 gateway, baseline the routing table too.
sudo netstat -nr
OK, baseline data collection done!
Start with an easy win, adding reboot-safe ::1 IPv6 localhost.
sudo touch /etc/hostname6.lo0
Bring up ::1. Don't forget, Solaris has that concept of plumbing the interface before it will come up.
sudo ifconfig lo0 inet6 plumb up
Depending on your interface name(s), replace bge0 with the correct interface for your system. First, tell the interface to support IPv6.
sudo ifconfig bge0 inet6 plumb up
Now you have to create a virtual interface for the IPv6 address (and yes, the address types co-exist on RHEL and Mac OS X) and bring it up. Since this is a static IPv6 address for a server, drop it in here.
sudo ifconfig bge0:1 inet6 plumb up your:ipv6:address:here
Now make it reboot-safe by putting the IPv6 address in the file /etc/hostaname6.interface.
sudo vi /etc/hostname6.bge0 # add the IPv6 addr
Not quite done! If this is a routed address, the Solaris box will need an IPv6 gateway too.
sudo route add -inet6 default your:ipv6:gateway:address
Make that reboot-safe too, by adding just the IPv6 router interface to /etc/defaultrouter6 too.
Make sure the updates look correct.
sudo ifconfig -a6
sudo ifconfig -a
netstat -nr
If you can ping6 your IPv6 gateway and IPv6 hosts outside your VLAN, it works! And it's not hard once you know what to do.
Just for reference, here's SLAAC IPv6 for Solaris 9 too; update with the right interface name from ifconfig -a as needed. Do the same baseline checks first! Then ...
sudo cp /etc/hostname.eri0 /etc/hostname6.eri0
sudo ifconfig eri0 inet6 plumb up
The RA should take care of IPv6 address prefix and routing for you.
No comments:
Post a Comment