ubuntu 绑定固定ip

cd /etc/network

sudo vi interfaces

在文件中输入如下内容:

auto eth0

iface eth0 inet static

address 192.168.1.1

netmask 255.255.255.0

gateway 192.168.1.254

 

auto eth0:0

iface eth0:0 inet static

address 192.168.1.2

netmask 255.255.255.0

gateway 192.168.1.254

posted @ 2017-06-06 15:02  小剑灬  阅读(222)  评论(0编辑  收藏  举报