ubuntu设置静态ip
2015-10-25 09:36
381 查看
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 /etc/init.d/networking restart
4. modify /etc/resolv.conf as follow if it not changed after network restarted
****************************************************************************************
nameserver 202.96.128.86
****************************************************************************************
notice:
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
****************************************************************************************
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 /etc/init.d/networking restart
4. modify /etc/resolv.conf as follow if it not changed after network restarted
****************************************************************************************
nameserver 202.96.128.86
****************************************************************************************
notice:
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
相关文章推荐
- Hive数据去重
- Collection探究之LinkedList
- 3.6 stringprep--互联网域名的字符标准库
- 3.6 stringprep--互联网域名的字符标准库
- Eclipse运行C++问题Launch failed,Binary not found
- BZOJ 2818 Gcd 线性欧拉筛(Eratosthenes银幕)
- Spring学习笔记之aop动态代理(3)
- Spring学习笔记之aop动态代理(3)
- Modular Inverse(模逆元,扩展欧几里德)
- NDK开发方式二: adt-bundle-windows-x86 +NDK9
- NDK开发方式二: adt-bundle-windows-x86 +NDK9
- NDK开发方式二: adt-bundle-windows-x86 +NDK9
- Windows环境下Android Studio v1.0安装教程
- archlinux+i3wm安装与配置
- 数据库范式
- MYSQL,innodb_buffer_pool_size内存分配
- bzoj4099: [Usaco2015 Open]Trapped in the Haybales
- Android Studio简单设置
- ios应用数据存储的常用方式与沙盒
- SIFT算法详解