Fearthepenguin.net

Diary of a Lazy SysAdmin

Skip to: Content | Sidebar | Footer

Configure an IPv6 interface in Solaris 10 using a real globally routable IPv6 address

When I tried to do this awhile back, I had a lot of trouble finding good, well-documented information for setting this up using real IPv6 addresses. Almost all the information I could find was geared toward using some sort of 4to6 tunnel which I didn’t need. So I’m hoping this will be helpful to someone else attempting to do the same thing.

For this example, we’ll be using the interface “e1000g0” which is pretty common. We have routers [set up by our network team] already configured with IPv6 on the relevant switch-port/vlan. The routers by default will hand out a random IPv6 address [kind of like dhcp], but in our case, we want to specify which IP address [on our subnet] we want. For this we’ll assume our public IPv6 subnet is: 2000:100:abc::/48 [Note the use of “::” as a shortcut to express multiple parts which are “0000”. The full expression would be 2000:100:abc:0000:0000:0000/48 ]. We will assign the specific IP as 2000:100:abc::10/64]

To start with, we had a typical ipv4 setup:


root@host:~$ ifconfig -a
lo0: flags=2001000849 mtu 8232 index 1
inet 127.0.0.1 netmask ff000000
e1000g0: flags=1000843
mtu 1500 index 5
inet 100.100.100.100 netmask ffffff80 broadcast 100.100.100.1
ether 0:24:6f:49:dc:58

First we need to plumb the ipv6 version of the interface. While it’s the same NIC, it’s brought up almost as if it were a separate, new interface.
Then we tell the interface to come up with a “token” of “10”, which is the IP on that subnet that we want to request.

root@host:~$ ifconfig e1000g0 inet6 plumb
root@host:~$ ifconfig e1000g0 inet6 token ::10/64

Then we need to make sure ndp is running

root@host:~$ svcadm enable svc:/network/routing/ndp:default

You *might* need to HUP ndp before it will actually assign the address

root@host:~$ pkill -HUP in.ndpd

Now the interface should be up and running and look roughly like this:

root@host:~$ ifconfig -a
lo0: flags=2001000849 mtu 8232 index 1
inet 127.0.0.1 netmask ff000000
e1000g0: flags=1000843
mtu 1500 index 5
inet 100.100.100.100 netmask ffffff80 broadcast 100.100.100.1
ether 0:24:6f:49:dc:58
lo0: flags=2002000849
mtu 8252 index 1
inet6 ::1/128
e1000g0: flags=2000841
mtu 1500 index 4
inet6 fe80::214:4fff:fe7d:2061/10
ether 0:24:6f:49:dc:58
e1000g0:1: flags=2080841
mtu 1500 index 4
inet6 2000:100:abc::10/64

You’ll notice in the output above that there is one interface which has the “private” local-link address [fe80::214:4fff:fe7d:2061/10] and it sets up another interface alias [e1000g0:1] with the global IPv6 address.

Now to make these settings permanent it’s really easy.


vi /etc/hostname6.e1000g0

token ::10/64

Save and exit. On reboot, the system should pick up the same ::10 IP address, and automatically set up the default ipv6 route based on the information the router has.

I know this covers a narrow subset of IPv6 configuration but hopefully it will be helpful for someone with a similar environment.

Write a comment