I am running CyanogenMod 12 (Android L) on a OnePlus One, and would like to set a specific wireless network to use a static IPv6 address. I see a menu option for doing this for the IPv4 address (as well as hostmask/gateway) but not for v6.

Currently the connection is getting an address using SLAAC, on the prefix I am using. It gets its routing advertisement from a machine running a tunnel client and radvd.

Is there a method for doing this that preferably does not require root, and needs to only be run once and applies for that specific connection?

  • I don't believe Android itself offers this, so it's not surprising that CM doesn't. May 4, 2015 at 1:03
  • @MichaelHampton, would you know if there is a terminal-based process, or one that involves a third-party app?
    – nanofarad
    May 4, 2015 at 9:55

1 Answer 1


Open a terminal in your android or connect to your smartphone from pc with "adb shell" command. Then type "ip a" command, just to know how your needed interface is called. For me it is "wlan0 ". Now, type the following command

 # ip -6 addr add 2001::your:want:ed_s:tati:c_ad:dres/CIDR dev interface

For example,

# ip -6 addr add 2222::1234/64 dev wlan0

Now execute "ip a" again or go to settings advanced and ensure, that your wanted address was assigned. As I can see, this method do not survive rebooting. For permanent configuration you need use another way.

  • I don't want a static dns server for v6, I would like to set the device's address to something static instead of using SLAAC.
    – nanofarad
    May 14, 2015 at 1:02
  • That doesn't really help this question though--the answer should be applicable to the question being asked. Do you have an answer for how to set the device IPv6 address?
    – nanofarad
    May 14, 2015 at 1:17
  • @glockstar You can add your last comment into your answer. That will be helpful both to OP as well as a future reader here.
    – Firelord
    May 14, 2015 at 6:34
  • Does that method you mention persist across reboots and wifi connection changes?
    – nanofarad
    May 14, 2015 at 9:46
  • @hexafraction Being based on the interface MAC address, in most cases the SLAAC address is static enough. Do you have a use case where this won't work? May 15, 2015 at 0:54

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .