# The loopback interface auto lo iface lo inet loopback # Configuration for eth0 and aliases # This line ensures that the interface will be brought up during boot. auto eth0 eth0:0 eth0:1 # eth0 - This is the main IP address that will be used for most outbound connections. # The address, netmask and gateway are all necessary. iface eth0 inet static address 126.96.36.199 netmask 255.255.255.0 gateway 188.8.131.52 # eth0:0 # This is a second public IP address. iface eth0:0 inet static address 184.108.40.206 netmask 255.255.255.0 # eth0:1 - Private IPs have no gateway (they are not publicly routable) so all you need to # specify is the address and netmask. iface eth0:1 inet static address 192.168.133.234 netmask 255.255.128.0
重复这个命令可能会碰到错误，resolvconf: Error: /etc/resolv.conf isn’t a symlink, not doing anything.
mv /etc/resolv.conf /run/resolvconf/resolv.conf
ln -s /run/resolvconf/resolv.conf /etc/resolv.conf
Once you have confirmed that your networking settings have been correctly configured, issue the following command to uninstall the DHCP client, as it is no longer required.
apt-get remove isc-dhcp-client dhcp3-client dhcpcd
同时不要忘记添加 vi /etc/resolv.conf 但是好像重启后该文件又被重写了？暂时没找到办法
DNS Resolver Settings
nameserver 220.127.116.11 nameserver 18.104.22.168 options rotate