1,修改为固定ip
vim /etc/netplan/01-netcfg.yaml
network:
version: 2
renderer: networkd
ethernets:
ens33:
addresses: [172.20.7.133/24]
gateway4: 172.20.7.1
nameservers:
addresses: [114.114.114.114]
执行生效
netplan apply