Change the management network gateway on a host
Applicable scenario
- Product: ZCF
- Component: ZStack Cloud
- Trigger condition: planned change of the management network gateway
Problem statement
This article describes how to change the management network gateway on a ZStack host when the customer needs to migrate to a new gateway (e.g. from 10.20.21.255 to 10.20.21.254). The procedure works on the management bridge br_bond0 and requires strict sequencing to avoid losing access to the host.
Solution steps
Preparation
- Confirm that all VMs on the cluster are in the
Stoppedstate. Live migration is not possible because the change affects the host's management network. - Back up the ZStack database:
zstack-ctl dump_mysql
- Change the management network gateway of the hosts in the cluster. Use out-of-band management or the storage network to change the management network gateway on the other nodes, preventing a network outage if the change is incorrect.
Solution steps
Step 1. Edit the bridge configuration
On the target host, edit the bridge configuration file:
vim /etc/sysconfig/network-scripts/ifcfg-br_bond0
Update the following fields. Example values:
DEVICE=br_bond0
NAME=br_bond0
TYPE=Bridge
ONBOOT=yes
BOOTPROTO=static
IPV6INIT=no
IPV6_AUTOCONF=no
DELAY=5
STP=no
IPADDR=10.20.21.1
NETMASK=255.255.255.0
GATEWAY=10.20.21.254 # new gateway
Note:
Replace GATEWAY with the customer's target value. Leave all other fields unchanged.
Step 2. Restart the network service
systemctl restart network
Step 3. Verify
Reconnect to the host using the management network with the new gateway. Confirm:
- The host is reachable on its management IP.
- The host can reach the management node and the default gateway.
- In the ZStack UI, the host status is
Connectedand the management network is shown with the new gateway.
