Rate This Document
Findability
Accuracy
Completeness
Readability

Changing the Server IP address

  1. Use a remote terminal to log in to the original IP address to change the server IP address. The following describes how to change the server IP address on Ubuntu 20.04.3.
  2. Run the following command to view and modify the existing IP address configuration, and then save the file. See the following figure.
    vim /etc/netplan/00-installer-config.yaml
    • renderer:networkd specifies whether the backend uses systemd-networkd or Network Manager. If this parameter is left blank, systemd-networkd is used by default.
    • dhcp4:no and dhcp6:no: disable DHCP. To enable DHCP, change no to yes.
    • addresses: configured static IP address and mask
    • gateway4: gateway address
    • nameservers:addresses: DNS server addresses. Separate multiple DNS server addresses with commas (,).
  3. Run the following command to make the configured IP address take effect:
    netplan apply
  4. Run the following command to check whether the new IP address takes effect:
    ifconfig