在/etc/network/interfaces.d/目录下创建eth0,eth1文件
内容分别为
auto eth0
iface eth0 inet static
address 192.168.18.36
netmask 255.255.255.0
gateway 192.168.18.1
auto eth1
iface eth1 inet static
address 192.168.18.37
netmask 255.255.255.0
gateway 192.168.18.1
重启服务
sudo service networking stop
sudo service networking start