1,设置动态IPv6
在/etc/network/interfaces文件最下面加入
iface ens18 inet6 dhcp
重启即可,ens18为网卡接口名称,根据实际修改
2,设置静态IPv4(例子)
auto eth1
iface eth1 inet static
address 192.168.8.87
netmask 255.255.255.0
gateway 192.168.8.1
3,设置静态IPv4和动态IPv6(例子)
allow-hotplug enp1s0
iface 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.6
iface enp1s0 inet6 auto
原文:
http://ganky.top/index.php/archives/15/