1、root@debian030:/etc/network# cat /etc/network/interfaces
# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).
source /etc/network/interfaces.d/*
# The loopback network interface
auto lo
iface lo inet loopback
# The primary network interface
allow-hotplug ens32
iface ens32 inet static
address 172.31.0.30/16
gateway 172.31.0.254
# dns-* options are implemented by the resolvconf package, if installed
dns-nameservers 202.102.152.3
2、sudo systemctl restart networking.service
3、ip add show