ubuntu16.04设置静态ip
2019-06-11 本文已影响0人
中庸逍遥
在/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