ubuntu12.04配置静态IP及设置DNS
2017-03-29 10:57
507 查看
静态IP配置方法:
编辑/etc/network/interfaces,删掉内容,并输入以下几行(假设你的网卡是eth0)
sudo gedit /etc/network/interfaces
auto eth0
iface eth0 inet static //指定为static
address 192.168.1.103 //IP地址
gateway 192.168.1.1 //网关
netmask 255.255.255.0 //子网掩码
network 192.168.1.0 //这个是网络?
broadcast 192.168.1.255 //广播
然后重启网络设备
sudo /etc/init.d/networking restart
设置DNS:
Ubuntu设置DNS,只要将DNS地址写入/ect/resolv.conf文件即可,但在12.04 desktop版中,重启系统之后,静态IP设置生效,但无法链接外网,/etc/resole.conf文件的DNS地址也覆盖掉了。
解决办法,在/etc/resolvconf/resolv.conf.d/目录下创建tail文件,写入
nameserver 202.96.134.133
nameserver 202.96.128.68
然后重启,DNS生效。
参考链接:http://askubuntu.com/questions/130452/how-do-i-add-a-dns-server-via-resolv-conf
<script>window._bd_share_config={"common":{"bdSnsKey":{},"bdText":"","bdMini":"2","bdMiniList":false,"bdPic":"","bdStyle":"0","bdSize":"16"},"share":{}};with(document)0[(getElementsByTagName('head')[0]||body).appendChild(createElement('script')).src='http://bdimg.share.baidu.com/static/api/js/share.js?v=89860593.js?cdnversion='+~(-new Date()/36e5)];</script>
阅读(6305) | 评论(0) | 转发(1) |
0
上一篇:Ubuntu 12.04更新源
下一篇:linux内核链表
相关热门文章
linux 常见服务端口
xmanager 2.0 for linux配置
【ROOTFS搭建】busybox的httpd...
openwrt中luci学习笔记
什么是shell
linux dhcp peizhi roc
关于Unix文件的软链接
求教这个命令什么意思,我是新...
sed -e "/grep/d" 是什么意思...
谁能够帮我解决LINUX 2.6 10...
给主人留下些什么吧!~~
评论热议
编辑/etc/network/interfaces,删掉内容,并输入以下几行(假设你的网卡是eth0)
sudo gedit /etc/network/interfaces
auto eth0
iface eth0 inet static //指定为static
address 192.168.1.103 //IP地址
gateway 192.168.1.1 //网关
netmask 255.255.255.0 //子网掩码
network 192.168.1.0 //这个是网络?
broadcast 192.168.1.255 //广播
然后重启网络设备
sudo /etc/init.d/networking restart
设置DNS:
Ubuntu设置DNS,只要将DNS地址写入/ect/resolv.conf文件即可,但在12.04 desktop版中,重启系统之后,静态IP设置生效,但无法链接外网,/etc/resole.conf文件的DNS地址也覆盖掉了。
解决办法,在/etc/resolvconf/resolv.conf.d/目录下创建tail文件,写入
nameserver 202.96.134.133
nameserver 202.96.128.68
然后重启,DNS生效。
参考链接:http://askubuntu.com/questions/130452/how-do-i-add-a-dns-server-via-resolv-conf
<script>window._bd_share_config={"common":{"bdSnsKey":{},"bdText":"","bdMini":"2","bdMiniList":false,"bdPic":"","bdStyle":"0","bdSize":"16"},"share":{}};with(document)0[(getElementsByTagName('head')[0]||body).appendChild(createElement('script')).src='http://bdimg.share.baidu.com/static/api/js/share.js?v=89860593.js?cdnversion='+~(-new Date()/36e5)];</script>
阅读(6305) | 评论(0) | 转发(1) |
0
上一篇:Ubuntu 12.04更新源
下一篇:linux内核链表
相关热门文章
linux 常见服务端口
xmanager 2.0 for linux配置
【ROOTFS搭建】busybox的httpd...
openwrt中luci学习笔记
什么是shell
linux dhcp peizhi roc
关于Unix文件的软链接
求教这个命令什么意思,我是新...
sed -e "/grep/d" 是什么意思...
谁能够帮我解决LINUX 2.6 10...
给主人留下些什么吧!~~
评论热议
相关文章推荐
- ubuntu12.04配置静态IP及设置DNS
- ubuntu12.04配置静态IP及设置DNS
- ubuntu12.04配置静态IP及设置DNS的方法
- ubuntu12.04配置静态IP及设置DNS
- 详述Linux配置静态IP、设置DNS和主机名(一)
- Linux上设置静态网络配置,ip/gateway/DNS
- 详述Linux配置静态IP、设置DNS和主机名
- 详述Linux配置静态IP、设置DNS和主机名
- 详述Linux配置静态IP、设置DNS和主机名
- Linux下配置静态IP 设置DNS和主机名
- 详述Linux配置静态IP、设置DNS和主机名
- Linux (Ubuntu) 设置静态 IP 和 DNS
- ubuntu14.10配置静态IP中所遇到的DNS问题
- linux服务器网络配置_自动获取ip_手动设置静态ip
- ubuntu 16.04.1设置静态ip、dns
- ubuntu12.04设置静态IP
- Linux配置IP、设置DNS及相关命令简介(ifconfig、mii-tool、curl)
- ubuntu 15.10 设置静态ip 分配固定ip 设置dns 设置网关 命令行配置ip 固定ip不生效怎么办
- ubuntu server设置静态IP和DNS
- ubuntu设置静态IP及修复重启电脑后DNS须重新设置的问题