You are viewing the documentation for a prerelease version.

View Latest

ip-family

Edits cluster IP family settings

SYNOPSIS

couchbase-cli ip-family [--cluster <url>] [-username <username>]
    [--password <password>] [--get] [--set] [--ipv4] [--ipv6]

DESCRIPTION

This command changes the IP family used for inter-cluster communication. To do this it will execute a number of instructions in each node in the cluster. The clusters names must be FQDN and not IP addresses. It also provides an option to retrieve the current IP family being used.

OPTIONS

-c
--cluster

Specifies the hostname of a node in the cluster. See the HOST FORMATS section for more information on specifying a hostname.

-u
--user <username>

Specifies the username of the user executing the command. If you do not have a user account with permission to execute the command then it will fail with an unauthorized error.

-p
--password <password>

Specifies the password of the user executing the command. If you do not have a user account with permission to execute the command then it will fail with an unauthorized error. If this argument is specified, but no password is given then the command will prompt the user for a password through non-echoed stdin. You may also specify your password by using the environment variable CB_REST_PASSWORD.

--get

Show current IP family.

--set

Change the cluster IP family, specify the IP family to be used using the --ipv4 or --ipv6 flags.

--ipv4

When specified together with --set it will change the cluster to use IP for communication between the nodes.

--ipv6

When specified together with --set it will change the cluster to use IP for communication between the nodes.

HOST FORMATS

When specifying a host for the couchbase-cli command the following formats are expected:

  • couchbase://<addr>

  • <addr>:<port>

  • http://<addr>:<port>

It is recommended to use the couchbase://<addr> format for standard installations. The other two formats allow an option to take a port number which is needed for non-default installations where the admin port has been set up on a port other that 8091.

EXAMPLES

For a cluster with nodes [cb1.com, cb2.com, cb3.com] communicating via IPv4 we can change the IP family being used to IPv6 by using the following command.

$ couchbase-cli ip-family -c http://cb1.com:8091 -u Administrator \
  -p password --set --ipv6

This command will configure each node in the cluster to use IPv6. To check what family is being used use the command below:

$ couchbase-cli ip-family -c http://cb1.com:8091 -u Administrator \
  -p password --get

ENVIRONMENT AND CONFIGURATION VARIABLES

CB_REST_USERNAME

Specifies the username to use when executing the command. This environment variable allows you to specify a default argument for the -u/--username argument on the command line.

CB_REST_PASSWORD

Specifies the password of the user executing the command. This environment variable allows you to specify a default argument for the -p/--password argument on the command line. It also allows the user to ensure that their password are not cached in their command line history.

COUCHBASE-CLI

Part of the couchbase-cli suite