个人工具
登录
查看“UbuntuHelp:DnsAndDhcp”的源代码 - Ubuntu中文
UbuntuHelp
讨论
查看源代码
历史
搜索
导航
首页
最近更改
随机页面
页面分类
帮助
编辑
编辑指南
沙盒
新闻动态
字词处理
工具
链入页面
相关更改
特殊页面
页面信息
查看“UbuntuHelp:DnsAndDhcp”的源代码
来自Ubuntu中文
←
UbuntuHelp:DnsAndDhcp
跳转至:
导航
,
搜索
因为以下原因,你没有权限编辑本页:
您所请求的操作仅限于该用户组的用户使用:
用户
您可以查看与复制此页面的源代码。
{{From|https://help.ubuntu.com/community/DnsAndDhcp}} {{Languages|UbuntuHelp:DnsAndDhcp}} https://help.ubuntu.com/community/IconsPage?action=AttachFile&do=get&target=IconNIC.png DNS and DHCP are network related categories. If you are looking for advanced and in depth explanations of these topics, you are in the wrong place - visit the Wikipedia links at the bottom of this page instead. Here we will just explain briefly, in layman's terms, what DNS and DHCP are. DNS = ''Domain Name System'' DHCP = ''Dynamic Host Configuration Protocol'' ISP = ''Internet Service Provider'' - e.g. the company that provides your dialup, DSL, cable, or satellite internet service. == DNS == https://help.ubuntu.com/community/IconsPage?action=AttachFile&do=get&target=IconUsers.png Essentially, DNS is like an internet phone book. Computers on the internet are identified by IPs which are essentially a string of numbers, similar to how people can be identified by phone numbers or street addresses. Just as you store names in your cell phone because it is not feasible to memorize everybody's phone number, people don't memorize IPs, we memorize domain names. The perfect example of a domain name is google.com - this is what you type into your browser, but google.com has a corresponding IP address which happens to be 72.14.207.99 in the United States (on the West Coast at least). For large web sites and companies, it is possible to have multiple IPs for each domain name, but you usually only talk to one at a time, just like you don't talk to the same person on two phones at the same time. It is also possible that an IP can change, like if it is dynamically assigned via DHCP (see below), but with [[UbuntuHelp:DynamicDNS| Dynamic DNS]] it can keep the same domain name. That is like when your friend gets a new cell phone number, you don't care as long as you have the updated number stored in your cell phone under their name. === DNS Servers === https://help.ubuntu.com/community/IconsPage?action=AttachFile&do=get&target=PicDocs.png DNS Servers store information about domains/subdomains that fall beneath them and make the information available to other computers. It is possible to setup your own DNS server, you just have to configure your server computer with the right software. If you are interested in setting up your own DNS server, see [https://help.ubuntu.com/8.04/serverguide/C/dns.html this link for Hardy Heron] or [https://help.ubuntu.com/8.10/serverguide/C/dns.html this link for Intrepid Ibex]. === DNS Resolvers === https://help.ubuntu.com/community/IconsPage?action=AttachFile&do=get&target=Icongnomeicu3.png DNS Resolvers talk to other DNS nodes for information about domain names. This allows you to type google.com into your computer and then find out what the IP actually is for that domain, since your computer doesn't know that without inquiring somewhere. In Unix and linux, your DNS resolvers are stored in <code><nowiki>/etc/resolv.conf</nowiki></code> - the data in this file is usually collected automatically from your ISP. This config file stores the search domain for DNS servers and two DNS servers called nameservers - the second acts as a backup in case the first server is unavailable at any time. This is like knowing where to look for your phone book so you can find numbers you don't have memorized - you know, just in case you don't tie it to the telephone like in a phone booth. == DHCP == https://help.ubuntu.com/community/IconsPage?action=AttachFile&do=get&target=IconBookmarksClosed.png DHCP allows your computer to receive an IP address without having one statically assigned to you. This makes network administration on a large scale significantly easier. Most ISPs provide your public IP through DHCP, and if you have a router, your internal IPs are usually assigned with DHCP unless you specify a static IP address. Since IPs are dynamically assigned with DHCP, it is possible for them to change, sometimes at random times. This usually happens when your lease on an IP expires and you don't renew it, so it is assigned to somebody else. This can happen if your computer is turned off when the lease expires, is disconnected from the web, or you switch between ISPs. An example of the latter would be if you take your laptop between work and home - you will have different IPs at each location. To view your public IP, you can visit a website like http://whatismyip.com/. You can look at your computer's specific IP address, whether it is public or private, by using the <code><nowiki>ifconfig</nowiki></code> command in [[UbuntuHelp:UsingTheTerminal| terminal]]. Locate your active network interface and look at the value for "''inet addr''" - it may look something like "''192.168.1.100''". === DHCP Servers === Your ISP provides DHCP servers to assign you a public IP address, without which it would be impossible for your computer to interact with the rest of the world wide web. If you have a router, that router usually acts as a DHCP server for your internal network to assign internal IPs to the computers connected to that router (wired or wireless). == Configuration Files == https://help.ubuntu.com/community/IconsPage?action=AttachFile&do=get&target=IconControlCenter2.png In Debian and Ubuntu, the file <code><nowiki>/etc/dhcp3/dhclient.conf</nowiki></code> stores information that is sent to your DHCP server to identify your computer (through the program <code><nowiki>dhcp3-client</nowiki></code>). To view this file, run in terminal: <pre><nowiki> cat /etc/dhcp3/dhclient.conf </nowiki></pre> For more detail, see the man page: <pre><nowiki> man dhclient.conf</nowiki></pre> Again, your DNS search domain and nameservers are automatically stored in <code><nowiki>/etc/resolv.conf</nowiki></code> - to view this file, run in terminal: <pre><nowiki> cat /etc/resolv.conf </nowiki></pre> For more detail, see the man page: <pre><nowiki> man resolv.conf</nowiki></pre> == Other Resources == https://help.ubuntu.com/community/IconsPage?action=AttachFile&do=get&target=IconBook-small.png More reading is available at these pages: * http://www.howtoforge.com/installing-an-ubuntu8.04-dns-server-with-bind * or [[UbuntuHelp:BIND9ServerHowto|BIND9ServerHowto]] (outdated?) * [[UbuntuHelp:DynamicDNS|DynamicDNS]] * http://en.wikipedia.org/wiki/Domain_name_system * http://en.wikipedia.org/wiki/Dhcp * http://en.wikipedia.org/wiki/Internet_Protocol * [[UbuntuHelp:NetworkAdmin|NetworkAdmin]] ---- [[category:CategoryNetworking]] [[category:UbuntuHelp]]
该页面使用的模板:
模板:From
(
查看源代码
)
模板:Languages
(
查看源代码
)(受保护)
模板:Languages/Lang
(
查看源代码
)(受保护)
返回至
UbuntuHelp:DnsAndDhcp
。