Linux的IP设置参考

位置:etc/network/interfaces

内容:

第一段是网口1自动从DHCP处获得IP

第二段是网口2静态分配IP

如果是IPv6,请把 iface eth0 inet dhcp(static) 修改成 iface eth0 inet6 dhcp(static),例如

iface eth1 inet6 static
  address 2001:db8::1224
  netmask 64
  gateway 2001:db8::1
原文地址:https://www.cnblogs.com/Liangw/p/3180516.html