1，设置动态IPv6在/etc/network/interfaces文件最下面加入iface ens18 inet6 dhcp重启即可，ens18为网卡接口名称，根据实际修改2，设置静态IPv4（例子）auto eth1iface eth1 inet staticaddress 192.168.8.87netmask 255.255.255.0gateway 192.168.8.13，设置静态IPv4和动态IPv6（例子）allow-hotplug enp1s0iface enp1s0 inet static address 192.168.2.10 netmask 255.255.255.0 gateway 192.168.2.1 dns-nameservers 192.168.2.1 223.5.5.5 223.6.6.6iface enp1s0 inet6 auto