个人工具
119.28.94.63
该IP地址的讨论
登录
查看“UbuntuHelp:StaticDnsWithDhcp”的源代码 - Ubuntu中文
UbuntuHelp
讨论
查看源代码
历史
搜索
导航
首页
最近更改
随机页面
页面分类
帮助
编辑
编辑指南
沙盒
新闻动态
字词处理
工具
链入页面
相关更改
特殊页面
页面信息
查看“UbuntuHelp:StaticDnsWithDhcp”的源代码
来自Ubuntu中文
←
UbuntuHelp:StaticDnsWithDhcp
跳转至:
导航
,
搜索
因为以下原因,你没有权限编辑本页:
您所请求的操作仅限于该用户组的用户使用:
用户
您可以查看与复制此页面的源代码。
{{From|https://help.ubuntu.com/community/StaticDnsWithDhcp}} {{Languages|UbuntuHelp:StaticDnsWithDhcp}} Parent: [[UbuntuHelp:InternetAndNetworking| Internet and Networking]] The default setup of Ubuntu does not make it easy to use static DNS servers while using DHCP. If you use the standard ubuntu way of networking (ifupdown), you can edit <code><nowiki>/etc/network/interfaces</nowiki></code> In that file you find the entry for your interface. If your interface is eth0, then look for the following lines: <pre><nowiki> auto eth0 iface eth0 inet dhcp</nowiki></pre> Add one line, so it looks like: <pre><nowiki> auto eth0 iface eth0 inet dhcp dns-nameservers ip.address.of.nameserver</nowiki></pre> Run <pre><nowiki> sudo invoke-rc.d networking restart</nowiki></pre> To make the changes effective If you do not use ifupdown, you need to edit <code><nowiki>/etc/dhcp3/dhclient.conf</nowiki></code> Find the lines <pre><nowiki> #prepend domain-name-servers 127.0.0.1; request subnet-mask, broadcast-address, time-offset, routers, domain-name, domain-name-servers, host-name, netbios-name-servers, netbios-scope; </nowiki></pre> And change them to <pre><nowiki> prepend domain-name-servers 1.2.3.4, 1.2.3.5; request subnet-mask, broadcast-address, time-offset, routers, domain-name, host-name, netbios-name-servers, netbios-scope; </nowiki></pre> Replace 1.2.3.4 and 1.2.3.5 with the addresses of your DNS servers. Run <pre><nowiki> sudo invoke-rc.d networking restart</nowiki></pre> To make the changes effective: [[category:UbuntuHelp]]
该页面使用的模板:
模板:From
(
查看源代码
)
模板:Languages
(
查看源代码
)(受保护)
模板:Languages/Lang
(
查看源代码
)(受保护)
返回至
UbuntuHelp:StaticDnsWithDhcp
。