Since i began using ipv6, I have never set a routable static ipv6 address yet. I have a Linksys (w/ dd-wrt firmware) router serving as DHCP server, so i reckon there’s no use for that.
UPDATE: On second thought, there must be that ONE time. I must have configured statically when testing the tunnelbroker via wired connection. I’m not too sure.
Anyway, today – as we are testing our network for native ipv6 – i had to configure my machine and assign manual ip address. It’s only now that I discovered the problem (a bug?) in the GUI. Luckily, I am not alone, and a few searches yield helpful infos.
Using the GUI, the basic step is typically same as v4 (we all know this):
SystemPreferences -> Network->Advanced
Under Configure IPv6, select Manually and input your static ipv6 address.
However, it is likely that although settings are saved in the gui, the network config does not update at the same time.
So do some checks with any of the ff. commands:
ifconfig | grep inet6
ifconfig en0 | grep inet6
ifconfig | awk ‘/inet6 / {print $2}’
ifconfig en1 | grep inet6 | grep -m 1 -v ‘%’
If it wasn’t updated from gui, then do manual config via Terminal:
sudo ifconfig en0 inet6 2100:abcd:4321::2/48 (to add new ip – also called ‘alias’ to the interface)
sudo route add -inet6 -prefixlen 0 default 2100:abcd:4321::1 (to add route or gateway)
Some sort of checking, to confirm if it was added to the config:
ifconfig en0 | grep inet6
netstat -r -f inet6
If you have assigned wrong ip address and needs to change, here’s how to remove it.
sudo ifconfig en1 inet6 -alias 2100:abcd::2
Simple.