Error: either "local" is duplicate, or "/24" is a garbage.
linux网络配置,执行ifup eth0后会提示如上错误,原因是/etc/network/interfaces 文件中的内容格式有问题,检查一下每一行里面有没有多余的空格,每个interface配置完后面有没有多加一个空行。
设置 静态IP
auto eth0
iface eth0 inet static
address 192.168.1.5
netmask 255.255.255.0
gateway 192.168.1.254
dns-nameserver 114.114.114.114
设置动态IP
auto eth0
iface eth0 inet dhcp