Mapping New IP Addresses

There are times when existing, operational Vertica database cluster nodes need to run on different IP addresses. Cluster nodes may also need to run based on different IP protocols, for example, when changing the protocol from broadcast to point-to-point. To run Vertica in these situations, use the re_ip function to re-IP and map the old addresses to the new addresses:

$ admintools -t re_ip -f mapfile

The mapfile references the file that you must create. A map file contains the old and new IP addresses. For details see Re-IP Addresses with a Mapping File.

Use this function to re-IP in one of the following situations:

  • If your Vertica database cluster has the same data and control messaging address, do one of the following:
    • Re-IP all the database cluster node IP addresses.
    • Re-IP only one or some of the database cluster node IP addresses.
    $ admintools -t re_ip -f mapfile
  • Re-IP the Vertica database cluster from broadcast mode to point-to-point (unicast) mode:
    $ admintools -t re_ip -d dbname -T
  • Re-IP the Vertica database cluster from point-to-point (unicast) mode to broadcast mode :
    $ admintools -t re_ip -d dbname -U
  • For information on changing communications protocols, see the -U and -T options under Installing Vertica with the Installation Script

  • Re-IP the control address of the database cluster. In this case the mapping file must contain the control messaging IP address and associated broadcast address.
    $ admintools -t re_ip -f mapfile
  • Re-IP only one database address without changing the admintools configuration. See Mapping IP Addresses on the Database only.

The database only re-ip is useful for error recovery. The node names and IP addresses must be the same as the node information in admintools.conf. You can also run SELECT * from vs_nodes order by name to display the node information.

For more information on the options used in the above commands, see Re-IP Command-Line Options.

Re-IP and the Export IP address

By default, the node IP address and the export IP address are configured with the same IP address. The export address is the IP address of the node on the network with access to other DBMS systems. Use the export address for importing and exporting data from DBMS systems. You can manually change the export address using the instructions found here.

If you change the export address and run the re-ip command, the export address remains the same.

Example

Run the following command:

=> SELECT node_name, node_address, export_address FROM nodes;
    node_name      | node_address    | export_address
------------------------------------------------------
v_VMartDB_node0001 | 192.168.100.101 | 192.168.100.101
v_VMartDB_node0002 | 192.168.100.102 | 192.168.100.101
v_VMartDB_node0003 | 192.168.100.103 | 192.168.100.101
v_VMartDB_node0004 | 192.168.100.104 | 192.168.100.101
(4 rows)

In the above example the export_address is the default. In this case, when you run the re-ip command the export_address changes to the new node_address.

If you manually change the export address as described here, you may have something like the following:

=> SELECT node_name, node_address, export_address FROM nodes;
    node_name      | node_address    | export_address
------------------------------------------------------
v_VMartDB_node0001 | 192.168.100.101 | 10.10.10.1
v_VMartDB_node0002 | 192.168.100.102 | 10.10.10.2
v_VMartDB_node0003 | 192.168.100.103 | 10.10.10.3
v_VMartDB_node0004 | 192.168.100.104 | 10.10.10.4
(4 rows)

In this case, when you run the re-ip command the export_address does not change.

Finding IP Addresses

IP addresses for the hosts and nodes are stored in opt/vertica/config/admintools.conf:

[Cluster]
hosts = 203.0.113.111, 203.0.113.112, 203.0.113.113

[Nodes]
node0001 = 203.0.113.111/home/dbadmin,/home/dbadmin
node0002 = 203.0.113.112/home/dbadmin,/home/dbadmin
node0003 = 203.0.113.113/home/dbadmin,/home/dbadmin

You can also display a list of IP addresses with the following:

$ admintools -t list_allnodes
Node             | Host          | State | Version                 | DB
-----------------+---------------+-------+-------------------------+-----------
v_vmart_node0001 | 203.0.113.111 | UP    | vertica-10.0.0.20200501 | VMart
v_vmart_node0002 | 203.0.113.112 | UP    | vertica-10.0.0.20200501 | VMart
v_vmart_node0003 | 203.0.113.113 | UP    | vertica-10.0.0.20200501 | VMart

Run the list_allnodes tool to help identify any issues you might have to access Vertica. For example, if hosts are not communicating with each other, the Version column displays Unavailable.