Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

In Ubuntu I use SSH to log in to my webserver. The IPv4 side of things is configured and already works, I can log in from other machines.

But I'd like to configure the IPv6 side of things while I'm logged in using IPv4 (if that's possible with a single NIC).

Is it possible to specify that you only want to restart the IPv6 stack / interface and not the IPv4 one?

share|improve this question
OP are you still looking for an answer? If so, you may need to repost your question as this is flagged for closure. Regards, – Ringtail Mar 10 '12 at 14:11
up vote 1 down vote accepted

You can issue the commands to manually configure the IPv6 stack manually. ip -6 is your friend here, both for setting things up and checking things out.

The same config scripts that configure IPv4 configure IPv6. They will configure whatever is set, so you can't use them to configure IPv6 without restarting IPv4. Depending on what is configured you will start with any combination of IPv4 and IPv6.

You will likely find that IPv6 is already configured in link local mode. The following is an example /etc/network/interfaces stanza. This is for a host getting the gateway from a radv notification. The MTU is to handle a 4to6 or 4in6 tunnel to the Internet. However, if you are using a radvd daemon most of your servers should configure themselves. You only need the stanza if you want to add the hosts to DNS. Your radvd will need one or two stanzas to setup it's interfaces.

iface eth0 inet6 static
    address 2001:DB8:1234:16::10
    netmask 64
    mtu 1480

I documented my IPv6 setup for OpenWRT, and the radvd setup works for Ubuntu. Most of what I documented in IPv6 Part2 runs on Ubuntu.

share|improve this answer
You can use ip -6 to reconfigure IPv6 without affecting any other protocol running on the interface. ip -6 addr flush dev eth0 will flush all IPv6 addresses on eth0, for example. – Ken Sharp Dec 18 '15 at 15:43

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.