CREATE NETWORK ADDRESS

Creates a network address that can be used as part of a connection load balancing policy. A network address creates a name in the Vertica catalog for an IP address and port number associated with a node. Nodes can have multiple network addresses, up to one for each IP address they have on the network.

Syntax

CREATE NETWORK ADDRESS name ON node WITH 'ip_address' [PORT port_number] [ENABLED | DISABLED]

Parameters

name A name to give to the network address. You can use this name when creating connection load balancing groups.
node The name of the node on which to create the network address. This should be name of the node as it appears in the node_name column of system table NODES.
ip_address

The IP address on the node to be associated with the network address. This can be an IPv4 or and IPv6 address.

Vertica does not verify that the IP address you supply in this parameter is actually associated with the node. Be sure that the IP address actually belongs to the node. If you do not, your load balancing policy could send a client connection to the wrong node, or even a non-Vertica host. Vertica does reject IP address that are invalid for a node. For example, it checks whether the IP address falls in the loopback address range of 127.0.0.0/8. If it finds that the IP address is invalid, CREATE NETWORK ADDRESS returns an error.

PORT port_number Sets the port number for the network address. You must supply a network address when altering the port number.
[ENABLE | DISABLE] Enables or disables the network address.

Privileges

Superuser

Examples

The following example creates three network addresses, one for each node in a three-node cluster:

=> SELECT node_name,export_address from v_catalog.nodes;
      node_name      | export_address 
---------------------+----------------
 v_vmart_br_node0001 | 10.20.100.62
 v_vmart_br_node0002 | 10.20.100.63
 v_vmart_br_node0003 | 10.20.100.64
(3 rows)

=> CREATE NETWORK ADDRESS node01 ON v_vmart_br_node0001 WITH '10.20.100.62';
CREATE NETWORK ADDRESS
=> CREATE NETWORK ADDRESS node02 ON v_vmart_br_node0002 WITH '10.20.100.63';
CREATE NETWORK ADDRESS
=> CREATE NETWORK ADDRESS node03 ON v_vmart_br_node0003 WITH '10.20.100.64';

See Also