Ubuntu配置静态ip
2016-01-03 21:31
375 查看
longhtml@ubuntu:~sudonano/etc/network/interfacesautoloifaceloinetloopbackautoeth0ifaceeth0inetstaticaddress192.168.1.251netmask255.255.255.0gateway192.168.1.254接下来添加DNSlonghtml@ubuntu: cat /etc/resolv.conf
longhtml@ubuntu:~sudonano/etc/resolv.confnameserver202.96.128.188//深圳电信nameserver202.96.134.133nameserver192.168.1.254(dns重启后会失效,需要改其它文件保证永久改变)longhtml@ubuntu: sudo /etc/init.d/networking restart
或者
longhtml@ubuntu:~sudoservicenetworkingrestart如果配置失败,可以使用手工配置方法:longhtml@ubuntu: sudo ifconfig eth0 192.168.1.251 netmask 255.255.255.0 up
longhtml@ubuntu:~$ sudo route add default gw 192.168.1.254 eth0
我的Ubuntu15.10通过修改interfaces配置静态ip不起作用(原因未知)。只能通过手工配置方法生效。
longhtml@ubuntu:~sudonano/etc/resolv.confnameserver202.96.128.188//深圳电信nameserver202.96.134.133nameserver192.168.1.254(dns重启后会失效,需要改其它文件保证永久改变)longhtml@ubuntu: sudo /etc/init.d/networking restart
或者
longhtml@ubuntu:~sudoservicenetworkingrestart如果配置失败,可以使用手工配置方法:longhtml@ubuntu: sudo ifconfig eth0 192.168.1.251 netmask 255.255.255.0 up
longhtml@ubuntu:~$ sudo route add default gw 192.168.1.254 eth0
我的Ubuntu15.10通过修改interfaces配置静态ip不起作用(原因未知)。只能通过手工配置方法生效。
相关文章推荐
- caffe的Leveldb格式数据四(实例)
- 日本恐怖片《二重身》核心内容赏析
- 以前的博客
- 使用AlertDialog创建对话框
- js'中的apply和call和bind的用法
- STM32的位带操作
- Hadoop完全分布式安装实战
- 数据库第二章
- 001Two Sum (C)
- <Java>函数的参数是数组
- 2015年终总结
- 深入了解View的绘制流程
- 遗传算法解决旅行商问题(TSP)
- js'中的apply和call和bind的用法
- KVC和KVO
- 详解CSS float属性
- 反序输出正整数和求数组交集的问题
- Introduction to the SQL Server Analysis Services Logistic Regression Data Mining Algorithm
- Python 递归 list不正确
- jdk的 安装