Changing, Adding, and Removing IP Addresses

From PrgmrWiki
Revision as of 01:50, 17 October 2016 by Paul (talk | contribs)

Unfamiliar with IPv6? Try Hurricane Electric's free IPv6 certification.

Introduction

You may have received an email telling you of a change to your IP addresses. The email tells you how to replace your old IP addresses with the new ones. This wiki page expands on that procedure and adds a few more for adding and removing addresses. If you have not received an email about your IP addresses then this procedure does not apply to you.

If you have two addresses, then you have a choice: you can change your old IP address to the new address, or you can add the new address and run both at once. See below for some pros and cons of each.

If you have received an email from us about replacing or adding an IP address, then refer there for your old and new addresses. Your email comes with several attachments (two scripts and a number of configuration files) that may simplify the process.

Change Your IP Address or Add One? Pros and Cons

There are three options here: replacing your original addresses with the new ones, adding the new addresses and running them together with the originals, or adding the new addresses and then deleting the originals at a later date.

Replacing your IP addresses is the simplest option. However it means taking your network interface offline briefly, and it takes some time (up to 24 hours) to propagate the change to the DNS servers that map your IP addresses. During that time your service will be down.

Adding the new IP addresses is a little more complex, but does not take your service offline. Your original IP addresses still map to you while the new ones are propagating to the DNS servers. However you still will need to remove the original IP addresses when and if we move away from HE.net. If the original IP addresses are still the defaults then an outage on HE.net will take your service down even if you have another IP address with a different provider.

It is possible to add the new IP addresses and then remove the old ones. This is the most complex of the three options, but it avoids present downtime and future problems with the original IP addresses.

Using the Sample Files

The email with your new IP addresses came with several attachments. You will #Using the IP Scripts only for #Adding a New IP Address. They are intended as a convenience to allow you to bring down your interfaces at a convenient time. You may use the attached configuration files to cut and paste when editing your IP configuration files in the following procedures.

Replacing Your IP Address

To replace the IP address in Debian derivatives (we provide Debian and Ubuntu images) or Red Hat derivatives (CentOS and Fedora) you will edit a file. For other distros, check your user documentation.

Replacing your IP address in Debian/Ubuntu

Back up your interfaces file.

cp -f --backup /etc/network/interfaces /etc/network/interfaces

Open your interfaces file with your preferred text editor. This example uses nano.

nano /etc/network/interfaces

When your editor opens, you will see a file like this one:

  # The loopback network interface
  auto lo
  iface lo inet loopback

  # The primary network interface
  auto eth0
  iface eth0 inet static
          address OLDIPV4ADDRESS
          netmask 255.255.255.0
          gateway 64.62.188.1
          dns-nameservers 71.19.155.120 71.19.145.215 8.8.8.8

  iface eth0 inet6 static
          address OLDIPV6ADDRESS
          netmask 64
          gateway 2001:470:1:41::1

The addresses under iface eth0 inet static and iface eth0 inet6 static are your original IPv4 and IPv6 addresses, respectively. Edit the file to replace the IPv4 and IPv6 addresses with the new ones from your email, and make changes to the network, gateway, and DNS nameservers so the file looks like this:

  auto lo eth0
  iface lo inet loopback

  iface eth0 inet static
  	address NEWIPV4ADDRESS
  	network 71.19.155.0
  	netmask 255.255.255.0
  	gateway 71.19.155.1
  	dns-nameservers 71.19.155.120 71.19.145.215 8.8.8.8

  iface eth0 inet6 static
  	address NEWIPV6ADDRESS
  	netmask 64
  	gateway 2605:2700:0:17::1

Save the file, exit the editor, then flush the interfaces.

$ /sbin/ip addr flush dev eth0

Enable the changes you've made by bringing the interface down, then bringing it up again.

Important: If you are connected directly via SSH, you won't be able to send any more commands after bringing down the interface, so make sure you bring the interface back up in the same command:

ifdown eth0 && ifup eth0

Verify the changes to your IP addresses

$ ip addr show
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host
       valid_lft forever preferred_lft forever
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP group default qlen 1000
    link/ether aa:00:00:13:9b:7a brd ff:ff:ff:ff:ff:ff
    inet NEWIPV4ADDRESS/24 brd 71.19.155.255 scope global eth0
       valid_lft forever preferred_lft forever
    inet6 NEWIPV6ADDRESS/64 scope global
       valid_lft forever preferred_lft forever
    inet6 fe80::a800:ff:fe13:9b7a/64 scope link
       valid_lft forever preferred_lft forever

Go to #Testing your connection.

Replacing your IP address in CentOS/Fedora

Back up your IP configuration file.

cp -f --backup /etc/sysconfig/network-scripts/ifcfg-eth0 /etc/sysconfig/network-scripts/ifcfg-eth0

Open your IP configuration file with your preferred text editor. This example uses nano.

nano /etc/sysconfig/network-scripts/ifcfg-eth0

When your editor opens, you will see a file like this one:

DEVICE=eth0
IPADDR=OLDIPV4ADDRESS
NETMASK=255.255.255.0
GATEWAY=64.62.188.1
NM_CONTROLLED=no
ONBOOT=yes
DNS1=71.19.155.120
DNS2=71.19.145.215
SEARCH=xen.prgmr.com
TYPE=Ethernet
BOOTPROTO=none
USERCTL=no
PEERDNS=no

IPV6INIT=yes
IPV6ADDR=OLDIPV6ADDRESS/64
IPV6_DEFAULTGW=2001:470:1:41::1

The addresses under IPADDR and IPV6ADDR are your original IPv4 and IPv6 addresses, respectively. Edit the file to look like this:

  DEVICE=eth0
  BOOTPROTO=none
  ONBOOT=yes
  TYPE=Ethernet
  IPADDR=NEWIPV4ADDRESS
  NETMASK=255.255.255.0
  GATEWAY=71.19.155.1
  IPV6INIT=yes
  IPV6ADDR="NEWIPV6ADDRESS/64"
  IPV6AUTOCONF=no
  IPV6_DEFAULTGW=2605:2700:0:17::1

Activate your changes:

$ service network restart
Shutting down interface eth0:  [  OK  ]
Shutting down loopback interface:  [  OK  ]
Bringing up loopback interface:  lo: Disabled Privacy Extensions
[  OK  ]
Bringing up interface eth0:  Determining if ip address 17.91.151.121 is already in use for device eth0...
[  OK  ]

Verify the new IP addresses:

$ ip addr show
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
    inet6 ::1/128 scope host
       valid_lft forever preferred_lft forever
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP qlen 1000
    link/ether aa:00:00:13:9b:7a brd ff:ff:ff:ff:ff:ff
    inet NEWIPV4ADDRESS/24 brd 17.91.151.255 scope global eth0
    inet6 NEWIPV6ADDRESS/64 scope global
       valid_lft forever preferred_lft forever
    inet6 fe80::a800:ff:fe13:9b7a/64 scope link
       valid_lft forever preferred_lft forever

Go to #Testing your connection.

Adding a New IP Address

To add an IP address in Debian derivatives (we provide Debian and Ubuntu images) you will edit a file. For Red Hat derivatives (CentOS and Fedora) you will add a new file. For other distros, check your user documentation.

Using the IP Scripts

If you received an email notifying you of your new IP addresses, then you also received two scripts. You can use these scripts to make a temporary change to your IP addresses without bringing your interface down.

Important: The scripts you received make a temporary change to the state of your system - implementing the new IP addresses with no need to bring the interface down and then up again. However these changes are not reflected in your IP configuration files. You must still update your configuration files with the new IP addresses before your reboot your system (either deliberately or otherwise). If you do not then the system will revert to its original state after reboot.

Transferring the Scripts

If you have transferred files before between your local system and your VPS then use your favorite method. If not then run the following command on your local system, inserting the file names as needed. This command will copy the scripts to the /home directory of your VPS.

scp -i ~/.ssh/SSH_KEY [LOCAL_FILE_PATH] [USERNAME]@[USERNAME].xen.prgmr.com:

If your local OS is not Linux, or if this command fails for any reason, then you can open the scripts in a local text editor and paste them into nano on your VPS. Save the nano files to your preferred directory for running scripts.

Running the Scripts

First, you will add your new IP addresses.

./add-new-ips

Verify the changes.

  ip addr show
  1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default
      link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
      inet 127.0.0.1/8 scope host lo
         valid_lft forever preferred_lft forever
      inet6 ::1/128 scope host
         valid_lft forever preferred_lft forever
  2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP group default qlen 1000
      link/ether aa:00:00:13:9b:7a brd ff:ff:ff:ff:ff:ff
      inet OLDIPV4ADDRESS/24 brd 64.62.188.255 scope global eth0
         valid_lft forever preferred_lft forever
      inet NEWIPV4ADDRESS/24 scope global eth0
         valid_lft forever preferred_lft forever
      inet6 NEWIPV6ADDRESS/64 scope global
         valid_lft forever preferred_lft forever
      inet6 OLDIPV6ADDRESS/64 scope global
         valid_lft forever preferred_lft forever
      inet6 fe80::a800:ff:fe13:9b7a/64 scope link
         valid_lft forever preferred_lft forever

Go to #Testing your connection.

Whenever you are ready to transfer completely to the new IP addresses, run your remove script.

./rm-old-ips

And again, verify the changes.

  ip addr show
  1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default
      link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
      inet 127.0.0.1/8 scope host lo
         valid_lft forever preferred_lft forever
      inet6 ::1/128 scope host
         valid_lft forever preferred_lft forever
  2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP group default qlen 1000
      link/ether aa:00:00:13:9b:7a brd ff:ff:ff:ff:ff:ff
      inet NEWIPV4ADDRESS/24 brd 71.19.155.255 scope global eth0
         valid_lft forever preferred_lft forever
      inet6 NEWIPV6ADDRESS/64 scope global
         valid_lft forever preferred_lft forever
      inet6 fe80::a800:ff:fe13:9b7a/64 scope link
         valid_lft forever preferred_lft forever

Remember that you must update your configuration files as outlined below before rebooting your system.

Adding a new IP address in Debian/Ubuntu

The procedure is very similar to replacing the IP address, as outlined above. The main difference is that you will add new address entries to /etc/network/interfaces rather than editing the existing entries. This requires some other changes to details of the procedure, so be sure to review this procedure carefully.

Back up your interfaces file.

cp -f --backup /etc/network/interfaces /etc/network/interfaces

Open your interfaces file with your preferred text editor. This example uses nano.

nano /etc/network/interfaces

When your editor opens, you will see a file like this one:

  # The loopback network interface
  auto lo
  iface lo inet loopback

  # The primary network interface
  auto eth0
  iface eth0 inet static
          address OLDIPV4ADDRESS
          netmask 255.255.255.0
          gateway 64.62.188.1
          dns-nameservers 71.19.155.120 71.19.145.215 8.8.8.8

  iface eth0 inet6 static
          address OLDIPV6ADDRESS
          netmask 64
          gateway 2001:470:1:41::1

The addresses under iface eth0 inet static and iface eth0 inet6 static are your original IPv4 and IPv6 addresses, respectively. Edit the file to add entries for the new IPv4 and IPv6 addresses from your email, and make changes to the network, gateway, and DNS nameservers so the file looks like this:

  auto lo eth0

  iface lo inet loopback

  iface eth0 inet static
  	address NEWIP4ADDRESS
  	network 71.19.155.0
  	netmask 255.255.255.0
  	gateway 71.19.155.1
  	dns-nameservers 71.19.155.120 71.19.145.215 8.8.8.8

  iface eth0 inet6 static
  	address NEWIPV6ADDRESS
  	netmask 64
  	gateway 2605:2700:0:17::1

  auto eth0:0
  iface eth0:0 inet static
  	address OLDIPV4ADDRESS
  	netmask 255.255.255.0

  iface eth0:0 inet6 static
  	address OLDIPV6ADDRESS
  	netmask 64

Save the file and exit the editor.

Flush all interfaces to clear existing IP addresses.

ip addr flush dev eth0
ip addr flush dev eth0:0

Bring your interfaces down and bring them back up to implement your new IP addresses.

Important: If you are connected directly via SSH, you won't be able to send any more commands after bringing down the interface, so make sure you bring the interface back up in the same command:

ifdown eth0 && ifup eth0 && ifup eth0:0

Verify the changes to your IP addresses:

ip addr show
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host
       valid_lft forever preferred_lft forever
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
    link/ether aa:00:00:13:9b:7a brd ff:ff:ff:ff:ff:ff
    inet OLDIPV4ADDRESS/24 brd 12.34.567.255 scope global eth0
       valid_lft forever preferred_lft forever
    inet NEWIPV4ADDRESS/24 brd 17.91.151.255 scope global eth0:0
       valid_lft forever preferred_lft forever
    inet6 NEWIPV6ADDRESS/64 scope global deprecated
       valid_lft forever preferred_lft 0sec
    inet6 OLDIPV6ADDRESS/64 scope global
       valid_lft forever preferred_lft forever
    inet6 ab60::b600:aa:fe07:7a9b/64 scope link
       valid_lft forever preferred_lft forever

Go to #Testing your connection.

Adding a new IP address in CentOS/Fedora

To add a new IP in CentOS or Fedora, you will need to add a second configuration file and make a few changes to your original file.

Back up your IP configuration file.

cp -f --backup /etc/sysconfig/network-scripts/ifcfg-eth0 /etc/sysconfig/network-scripts/ifcfg-eth0

To save yourself some work, make your new configuration file by copying the original.

cp /etc/sysconfig/network-scripts/ifcfg-eth0 /etc/sysconfig/network-scripts/ifcfg-eth0:0

Add your new IPv4 and IPv6 addresses. Open your original IP configuration file with your preferred text editor. This example uses nano.

nano /etc/sysconfig/network-scripts/ifcfg-eth0

When your editor opens, you will see a file like this one:

DEVICE=eth0
IPADDR=OLDIPV4ADDRESS
NETMASK=255.255.255.0
GATEWAY=64.62.188.1
NM_CONTROLLED=no
ONBOOT=yes
DNS1=71.19.155.120
DNS2=71.19.145.215
SEARCH=xen.prgmr.com
TYPE=Ethernet
BOOTPROTO=none
USERCTL=no
PEERDNS=no

IPV6INIT=yes
IPV6ADDR=OLDIPV6ADDRESS/64
IPV6_DEFAULTGW=2001:470:1:41::1

The addresses under IPADDR and IPV6ADDR are your original IPv4 and IPv6 addresses, respectively. Edit the file to add the new IPv6 address from your email, remove the GATEWAY entry, and add the new IPv6 gateway to the IPV6_DEFAULTGW field. Add a third DNS address. When you've finished, the file will look like this:

  DEVICE=eth0
  BOOTPROTO=none
  ONBOOT=yes
  TYPE=Ethernet
  IPADDR=NEWIPV4ADDRESS
  NETMASK=255.255.255.0
  GATEWAY=71.19.155.1
  IPV6INIT=yes
  IPV6ADDR="NEWIPV6ADDRESS"
  IPV6AUTOCONF=no
  IPV6_DEFAULTGW=2605:2700:0:17::1
  IPV6ADDR_SECONDARIES="OLDIPV6ADDRESS/64"

Save your changes and close the editor.

Now, move your old IPv4 address to eth0:0. Using your preferred text editor, open the new IP configuration file that you created above. This example uses nano.

nano /etc/sysconfig/network-scripts/ifcfg-eth0:0

When your editor opens, you will see a file like this one:

  DEVICE=eth0
  IPADDR=OLDIPV4ADDRESS
  NETMASK=255.255.255.0
  GATEWAY=64.62.188.1
  NM_CONTROLLED=no
  ONBOOT=yes
  DNS1=71.19.155.120
  DNS2=71.19.145.215
  SEARCH=xen.prgmr.com
  TYPE=Ethernet
  BOOTPROTO=none
  USERCTL=no
  PEERDNS=no

  IPV6INIT=yes
  IPV6ADDR=OLDIPV6ADDRESS/64
  IPV6_DEFAULTGW=2001:470:1:41::1

Remove the IPv6 entries and edit the file to look like this:

  DEVICE=eth0:0
  BOOTPROTO=none
  ONBOOT=yes
  TYPE=Ethernet
  IPADDR=OLDIPV4ADDRESS
  NETMASK=255.255.255.0

Save your changes and close the editor.

Activate your changes:

$ service network restart
Shutting down interface eth0:  [  OK  ]
Shutting down loopback interface:  [  OK  ]
Bringing up loopback interface:  lo: Disabled Privacy Extensions
[  OK  ]
Bringing up interface eth0:  Determining if ip address 12.34.567.89 is already in use for device eth0...
Determining if ip address 17.91.151.121 is already in use for device eth0...
[  OK  ]

Verify the new IP addresses:

ip addr show
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host
       valid_lft forever preferred_lft forever
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
    link/ether aa:00:00:13:9b:7a brd ff:ff:ff:ff:ff:ff
    inet OLDIPV4ADDRESS/24 brd 12.34.567.255 scope global eth0
       valid_lft forever preferred_lft forever
    inet NEWIPV4ADDRESS/24 brd 17.91.151.255 scope global eth0:0
       valid_lft forever preferred_lft forever
    inet6 NEWIPV6ADDRESS/64 scope global deprecated
       valid_lft forever preferred_lft 0sec
    inet6 OLDIPV6ADDRESS/64 scope global
       valid_lft forever preferred_lft forever
    inet6 ab60::b600:aa:fe07:7a9b/64 scope link
       valid_lft forever preferred_lft forever

Go to #Testing your connection.

Removing an Old IP Address

If you add a new address rather than replacing the old one, you will probably still want to remove the old address at some point. Follow these procedures to do that.

Removing an old IP address in Debian/Ubuntu

This is simply a process of editing the interfaces file to remove the old addresses.

Back up your interfaces file.

cp -f --backup /etc/network/interfaces /etc/network/interfaces

Open your interfaces file with your preferred text editor. This example uses nano.

nano /etc/network/interfaces

When your editor opens, you will see a file like this one:

  auto lo eth0

  iface lo inet loopback

  iface eth0 inet static
    address NEWIP4ADDRESS
    network 71.19.155.0
    netmask 255.255.255.0
    gateway 71.19.155.1
    dns-nameservers 71.19.155.120 71.19.145.215 8.8.8.8

  iface eth0 inet6 static
    address NEWIPV6ADDRESS
    netmask 64
    gateway 2605:2700:0:17::1

  auto eth0:0
  iface eth0:0 inet static
    address OLDIPV4ADDRESS
    netmask 255.255.255.0

  iface eth0:0 inet6 static
    address OLDIPV6ADDRESS
    netmask 64

Delete all the information for eth0:0, including the old IPv4 and IPv6 addresses and change eth0:0 to eth0. When you are finished the file should look like this:

  auto lo eth0

  iface lo inet loopback

  iface eth0 inet static
    address NEWIP4ADDRESS
    network 71.19.155.0
    netmask 255.255.255.0
    gateway 71.19.155.1
    dns-nameservers 71.19.155.120 71.19.145.215 8.8.8.8

  iface eth0 inet6 static
    address NEWIPV6ADDRESS
    netmask 64
    gateway 2605:2700:0:17::1

Save the file and exit the editor.

Flush all interfaces to clear existing IP addresses.

ip addr flush dev eth0
ip addr flush dev eth0:0

Bring your interfaces down and bring them back up to implement your new IP addresses.

Important: If you are connected directly via SSH, you won't be able to send any more commands after bringing down the interface, so make sure you bring the interface back up in the same command:

ifdown eth0 && ifup eth0

Verify the changes to your IP addresses:

$ ip addr show
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host
       valid_lft forever preferred_lft forever
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP group default qlen 1000
    link/ether aa:00:00:13:9b:7a brd ff:ff:ff:ff:ff:ff
    inet 17.91.151.121/24 brd 17.91.151.255 scope global eth0
       valid_lft forever preferred_lft forever
    inet6 2605:2070:0:71:b600:aa:fe07:7a9b/64 scope global
       valid_lft forever preferred_lft forever
    inet6 ab60::b600:aa:fe07:7a9b/64 scope link
       valid_lft forever preferred_lft forever

Go to #Testing your connection.

Removing an old IP address in CentOS/Fedora

Important: Make certain that you have at least two configuration files before you delete one.

Back up your old configuration files, just in case.

cp -f --backup /etc/sysconfig/network-scripts/ifcfg-eth0 /etc/sysconfig/network-scripts/ifcfg-eth0
cp -f --backup /etc/sysconfig/network-scripts/ifcfg-eth0:0 /etc/sysconfig/network-scripts/ifcfg-eth0:0

Delete your eth0:0 file containing your old IPv4 address.

$ rm /etc/sysconfig/network-scripts/ifcfg-eth0:0

Open your eth0 IP configuration file with your preferred text editor. This example uses nano.

nano /etc/sysconfig/network-scripts/ifcfg-eth0

When your editor opens, you will see a file like this one:

  DEVICE=eth0
  BOOTPROTO=none
  ONBOOT=yes
  TYPE=Ethernet
  IPADDR=NEWIPV4ADDRESS
  NETMASK=255.255.255.0
  GATEWAY=71.19.155.1
  IPV6INIT=yes
  IPV6ADDR="NEWIPV6ADDRESS"
  IPV6AUTOCONF=no
  IPV6_DEFAULTGW=2605:2700:0:17::1
  IPV6ADDR_SECONDARIES="OLDIPV6ADDRESS/64"

Edit the file to look like this:

  DEVICE=eth0
  BOOTPROTO=none
  ONBOOT=yes
  TYPE=Ethernet
  IPADDR=NEWIPV4ADDRESS
  NETMASK=255.255.255.0
  GATEWAY=71.19.155.1
  IPV6INIT=yes
  IPV6ADDR="NEWIPV6ADDRESS/64"
  IPV6AUTOCONF=no
  IPV6_DEFAULTGW=2605:2700:0:17::1

Close the editor and save your changes.

Activate your changes:

$ service network restart
Shutting down interface eth0:  [  OK  ]
Shutting down loopback interface:  [  OK  ]
Bringing up loopback interface:  lo: Disabled Privacy Extensions
[  OK  ]
Bringing up interface eth0:  Determining if ip address 17.91.151.121 is already in use for device eth0...
[  OK  ]

Verify the new IP configuration:

$ ip addr show
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host
       valid_lft forever preferred_lft forever
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP group default qlen 1000
    link/ether aa:00:00:13:9b:7a brd ff:ff:ff:ff:ff:ff
    inet NEWIPV4ADDRESS/24 brd 17.91.151.255 scope global eth0
    inet6 NEWIPV6ADDRESS/64 scope global
       valid_lft forever preferred_lft forever
    inet6 fe80::a800:ff:fe13:9b7a/64 scope link
       valid_lft forever preferred_lft forever

Go to #Testing your connection.

Testing your connection

After you change, add, or remove an IP address, it is a good idea to test the connection with ping.

Test IPv4:

$ ping -c1 google.com
PING google.com (173.194.203.102) 56(84) bytes of data.
64 bytes from pg-in-f102.1e100.net (173.194.203.102): icmp_seq=1 ttl=47 time=22.7 ms

--- google.com ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 46ms
rtt min/avg/max/mdev = 22.750/22.750/22.750/0.000 ms

Test IPv6:

$ ping6 -c1 ipv6.google.com
PING ipv6.google.com(nuq05s02-in-x0e.1e100.net) 56 data bytes
64 bytes from nuq05s02-in-x0e.1e100.net: icmp_seq=1 ttl=58 time=1.71 ms

--- ipv6.google.com ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 1ms
rtt min/avg/max/mdev = 1.711/1.711/1.711/0.000 ms

Congratulations, your new addresses are now up and running.

You may also want to test your connection from the outside. You can use the tools at http://www.berkom.blazing.de/ or browse your website with ipv6 using http://www.sixxs.net/tools/gateway/