Restarting the IPv6 network stack without restarting the IPv4 network stack?

9,173

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:
9,173

Related videos on Youtube

leeand00
Author by

leeand00

Updated on September 18, 2022

Comments

  • leeand00
    leeand00 over 1 year

    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?

    • Ringtail
      Ringtail about 12 years
      OP are you still looking for an answer? If so, you may need to repost your question as this is flagged for closure. Regards,
  • Ken Sharp
    Ken Sharp over 8 years
    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.