ubuntu设置静态ip
来源:互联网 发布:东南亚知乎 编辑:程序博客网 时间:2024/06/15 20:12
1. modify /etc/networks/interfaces as follow.
****************************************************************************************
auto lo
iface lo inet loopback
#net card eth0 configuration
auto eth0
iface eth0 inet static
#set static ip
address 192.168.1.108
netmask 255.255.255.0
gateway 192.168.1.1
#dns-nameservers 8.8.8.8
#network 192.168.1.0
#boardcast 192.168.1.255
****************************************************************************************
2. modify /etc/resolvconf/resolv.conf.d/head as follow.
****************************************************************************************
nameserver 202.96.128.86
****************************************************************************************
the below 3 lines was ok before:
search mydomain.com
nameserver 61.139.39.73
nameserver 61.139.2.69
3. sudo resolvconf -u
after this command, the contents of /etc/resolv.conf is the same as /etc/resolvconf/resolv.conf.d/head.
4. sudo /etc/init.d/networking restart
5. modify /etc/resolv.conf as follow if it not changed after network restarted
****************************************************************************************
nameserver 202.96.128.86
****************************************************************************************
notice:
1. if the ip showed in ifconfig result not corresponding to the one in /etc/network/interfaces after sudo /etc/init.d/networking restart, try the below solution:
$ sudo ifdown eth0;sudo ifup eth0
2. if Ubuntu can't connect to network, it may be nameserver is not proper, and try a new nameserver.
Ubuntu下设置static ip及DNS的博文链接:
http://www.jb51.net/os/Ubuntu/104873.html
http://m.blog.csdn.net/blog/u011255705/24573299
- ubuntu设置静态IP
- Ubuntu设置静态IP
- Ubuntu设置静态 IP
- ubuntu ip静态设置
- Ubuntu设置静态IP
- ubuntu 设置静态IP
- Ubuntu静态IP设置
- ubuntu 设置静态ip
- ubuntu设置静态ip
- ubuntu设置静态ip
- Ubuntu设置静态 IP
- ubuntu设置静态ip
- ubuntu设置静态IP
- ubuntu 设置静态ip
- Ubuntu设置静态IP
- ubuntu静态IP设置
- 设置ubuntu静态IP
- ubuntu 设置静态IP
- iOS开发--手把手教你制作音乐播放器
- Collection探究之LinkedList
- Hive数据去重
- 二叉树ADT_BinaryTree
- tomcat学习笔记(一)-导入tomcat源码项目
- ubuntu设置静态ip
- java eclipse初次使用前的配置技巧汇总
- VS2010+Oracle12g C++开发环境搭建笔记
- el表达式跟ognl表达式的区别
- C++中虚函数是如何实现,多重继承中虚函数的实现
- 使用opengl绘制五角星图形
- 33款可用来抓数据的开源爬虫软件工具
- 某考试题~低头一族 [好题](简要的数学推倒)[四星]
- DNF辅助飞机适合 搬砖 升级 异界 魂图 安图恩