ubuntu动态IP改成静态IP

来源:互联网 发布:it.sauronsoftware 编辑:程序博客网 时间:2024/05/16 11:34

进入/etc/network/interface

auto lo
iface lo inet loopback

在后面添加

auto eth0

iface eth0 inet static

address 10.78.3.4 //IP地址

netmask 255.255.0.0 //掩码

gateway 10.78.1.254 //网关

 

DNS 在/etc/resolv.config里,不用配置,已经有了

重启/etc/init.d/networking

 

原创粉丝点击