
Applied M. Camp's comments on patchset 4. Also, some additional formatting changes such as tidying line ends <= 79 characters, reformatting very wide ascii table as list table to control line widths, etc. Resolved conflict in _includes/data-networks-overview.rest Change-Id: I8a2a80f21d3630849900e85dc2495da1668648af Signed-off-by: Ron Stone <ronald.stone@windriver.com> Signed-off-by: Stone <ronald.stone@windriver.com>
2.6 KiB
Manage Data Interface Static IP Addresses Using the CLI
If you prefer, you can create and manage static addresses for data interfaces using the CLI.
For more information about using static addresses for data
interfaces, see Adding a Static IP Address to a Data Interface
<adding-a-static-ip-address-to-a-data-interface>
.
To make interface changes, you must lock the worker node first.
Lock the worker node.
Set the interface to support an IPv4 or IPv6 address, or both.
~(keystone_admin)]$ system host-if-modify <node> <ifname> --ipv4-mode=<ipv4mode> --ipv6-mode=<ipv6mode>
where
- node
-
is the name or UUID of the worker node
- ifname
-
is the name of the interface
- ipv4mode
-
is either disabled or static
- ipv6mode
-
is either disabled or static
Add an IPv4 or IPv6 address to the interface.
~(keystone_admin)]$ system host-addr-add <node> <ifname> <ip_address> <prefix>
where
- node
-
is the name or UUID of the worker node
- ifname
-
is the name of the interface
- ip_address
-
is an IPv4 or IPv6 address
- prefix
-
is the netmask length for the address
To delete an address, use the following commands:
~(keystone_admin)]$ system host-addr-list <hostname/ID>
This displays the UUIDs of existing addresses, as shown in this example below.
~(keystone_admin)]$ system host-addr-list worker-0 +-----------------------+--------+------------------------+--------+ | uuid | ifname | address | prefix | +-----------------------+--------+------------------------+--------+ | 290629f6-41e5-48d9... | ae0 | 2605:6400:2:fed5:22... | 112 | | 5de0e0bf-21fc-4532... | ae0 | 2605:6400:2:fed5:22... | 122 | | e78923d7-3ccf-4332... | ae0 | 192.168.61.70 | 27 | +-----------------------+--------+------------------------+--------+
~(keystone_admin)]$ system host-addr-delete <uuid>
where uuid is the UUID of the address.
Unlock the worker node and wait for it to become available.