DNS 101

魔百盒CM101h刷完当贝桌面后,这6个隐藏功能设置让你的电视盒子更好用 本文详细介绍了中国移动魔百盒CM101h刷入当贝桌面后的6个高阶玩法,包括开机自启动、应用隐藏、儿童锁、HDMI自动切换、DNS优化和存储空间清理。这些技巧能显著提升电视盒子的使用体验,特别适合追求个性化和高效操作的用户。 阅读详情

As stated earlier, DNS is a distributed data base. When you pay a fee to register a domain one of the questions you answer deals with your Name Servers. You have to list two and they have to be registered in the DNS system.

The domain name system database has three levels. The first group of servers we call "root" servers. The second we call Top Level Domains or (TLDs). When your resolver needs to find the address for a web site, it makes a query.

Let's say you want to find Google.com. Your resolver asks the Root servers to identify Google.com's IP. The Root server replies, I don't know but I do now where you can find the answer. Start with the TLD servers for COM.

So, Root sends your query to a COM server. It says, OK. I don't have that information but I know a Name Server that does. It has an address of64.233.167.99 and the name ns1.google.com. So, go to that address and it will tell you the web site address of google.com

Your resolver takes the information from ns1.google.com and returns with an IP address. If Google's name server gave your resolver the correct name, you'll get a web page.

The path traveled looks like Figure 1.



Figure 1 - From Root to your Domain. (这个图解释了域名是如何被解析的:root-->一级域名服务器-->域名对应的name server)

In the upper left of Figure 1, we have depicted a set of servers with the annotation of Root. In the jargon of DNS, these servers represent the beginning of the DNS path. You will see them represented by a period or dot ("."). In your configuration files, your IP address to name mapping will end with a period. When we look at some of those files in a few minutes this will become clearer.

The Root servers are the top of the distributed DNS database. They have information about the Top Level Domains(TLDs). TLDs include com, net, org, mil, gov, edu, etc. When you contract to use a domain name, you chose which TLD you want. In my case, I have a domain in the org name space called centralsoft.org.

(com, net, org, ... 这些都是一级域名;google, baidu, ... 这些是二级域名;以此类推)

When I registered my name servers, I gave the name of server1.centralsoft.org and ns0.centralsoft.org to my registration agent. In the TLD servers for org, you will find my name servers. The org servers know where you should find information on centralsoft.

When I registered, I told the agent that I would take responsibility for maintaining a database of IP addresses and friendly names and map them to one another. So, we made an agreement and the Domain Name System said, "OK, now you have authority for the data on centralsoft.org. When someone wants to find the services you offer on the Internet, we will point them to you."

So, now I have to run an application which can answer your queries and say, "sure if you want to see my web page or send mail to one of my users, you can find them here. If you ask me for a name, I'll give you an IP address because I know you have this protocol which uses TCP/IP and I realize you need the address, even when you specify a name".

(域名服务器的作用就是:查到用户想访问的域名的IP地址)

That's where BIND comes into play. The people who maintain the BIND code make sure it meets the specifications of the Internet Engineering Task Force and will run on your server. All you have to do is learn how it does what it does.

Named lives on a domain name server and answers queries from resolvers. The application reads its data from a configuration file called named.conf. named.conf gets its information from something we call zone files. Several zone files exist, but one zone file in particular keeps a database of records that supply named with most of its answers.

In Figure 2, named had received a query. It looks to its configuration file named.conf, which looks to the primary zone file and hands off the information requested to the resolver from the outside.



Figure 2 - Answering a query

Some people refer to configuration files as rule files. BIND's configuration files seem like rule files to me. The rules of Domain Name Services require tight compliance. Making and resolving queries follow strict protocols on the Internet as does the interprocess communication within BIND.

Let's refer to Figure 2 again and look at the process. You should have BIND installed and running on your server. If not, we will address installation and configuration in one of the next sections.

The named process listens on port 53 of a Linux system. When it receives a query for an address, it looks to the first configuration file about which it knows: named.conf.



Figure 3 - named.conf (是bind的配置文件,里面含有域名的zone文件)

The following table depicts a simple named.conf file. If you have seen a file like this and didn't understand it, then let's break it down into its components. Once we do that, we can take the mystery out of it.

options {
pid-file "/var/run/bind/run/named.pid";
directory "/etc/bind";(指定zone文件的位置)
// query-source address * port 53; };

//
// a master nameserver config
//
zone "." {
type hint;
file "db.root";
};

zone "0.0.127.in-addr.arpa" {
type master;
file "db.local";
};

zone "158.253.70.in-addr.arpa" {
type master;
file "pri.158.253.70.in-addr.arpa";
};

zone "centralsoft.org" {
type master;
file "pri.centralsoft.org";
};

This file refers to the four other configuration files. The third line down lists the directory containing them all, /etc/bind where they exist.

The options statement defines the default directory for named and the location of the process ID (pid) file. named.pid represents the daemon itself. If you followed any of the Perfect Setup Tutorials, we put it in a chrooted environment.

The zone statement identifies the location of the hints, localhost, zone and reverse zone files.

  • Hints file(root name server的位置:1. 一级NS的地址;2. 权威NS的地址)
    This file contains the names and addresses of the root servers on the Internet. These know where the authoritative servers for your domain exist - the first one being the Top Level Domain (com, net, org, etc.) and next being the authoritative server for your domain. 

  • Local host file (本地NS)
    Name servers are the masters of their own loopback domain (127.0.0.1). The point of creating local zone files for each aspect of your of localhost is to reduce traffic and allow the same software to work on your system as it does on the network. 

  • Zone file (zone文件,一个域名对应一个zone文件)
    This file, also called the domain database, defines most of the information needed to resolve queries about the domain you administer. It maps names to IP addresses and provides information about the services offered by your Internet computer including your web and ftp server, email, telnet, name servers, etc. 

    The zone file uses several record types including the SOA or start of authority; NS or name server; A or host name to address map; PTR or pointer which maps addresses to names; MX or mail exchanger which identifies the mail servers in the domain; and CNAME or canonical name which defines an alias for a host name.

    Don't try to memorize or understand what these record types mean at this point. Just realize that they exist and you will have ample opportunity to use them.


  • Reverse zone file (反向域名zone文件,域名反向解析)
    Another way to talk about zone files is to define them something that links all the IP addresses in your domain to their corresponding server. The reverse zone file maps IP addresses to host files. It's a mirror image of the database file above. You can recognize a reverse zone file because it has the extension of in-addr.arpa.




Figure 4 - Zone files


@ IN SOA server1.centralsoft.org. root.localhost. (
2006012103; serial
28800; refresh, seconds
7200; retry, seconds
604800; expire, seconds
86400 ); minimum, seconds

;
NS server1.centralsoft.org.;(主域名服务器)
NS ns0.centralsoft.org. ;(备用域名服务器)

;
MX 10 server1.centralsoft.org.;

;
;(以下是A记录,用于查询域名对应的IP地址)
centralsoft.org. A 70.253.158.42
www A 70.253.158.42
server1 A 70.253.158.42(主域名服务器地址)
ns0 A 70.253.158.45(备用域名服务器地址)

SOA refers to "Start of Authority" (起始授权机构). When you look at Figure 1, remember that DNS distributes its database. By the time you enter the picture, the system has handed off authority for part of the entire database to you. So, your zone file has to indicate where your authority starts. Your authority starts in your zone file. Your Top Level Domain servers are waiting for you to do your part of the job.

(一级域名服务器把解析请求发到这儿,需要进一步做解析)

The data field of the SOA record contains several components or fields. You need to provide data or answers in the record which will allow another server on the Internet to satisfy its query. Think of the data field as a computer RECORD which has several fields. They include:

  • Name

    The root name of the zone. The "@" sign is a shorthand reference to the current origin (zone) in the /etc/named.conf file for that particular database file. The host name of the master server for this zone is server1.centralsoft.org. Don't worry if this jargon doesn't make sense. If just means that back in the named.conf configuration file an entry points to this file and this file points back to the entry in the configuration file.

  • Class

    A number of different DNS classes exist. For our purposes we will use the IN or Internet class used when defining IP address mapping information for BIND. The other classes exist for non Internet protocols and functions.

  • Type

    The type of DNS resource record. In the example, this is an SOA resource record.

  • Name-server

    Fully qualified name of your primary name server. Must be followed by a period.

  • Email-address

    This is the email address of the person responsible for the domain. Notice that instead of an @ sign, the address uses a period and is followed by a period. In this case, the email address is the root user or root.loalhost. In other applications the email address would be root@localhost.

  • Serial-no (更新了以后,备用slave域名服务器也会更新zone文件配置)

    A serial number for the current configuration is usually in a date format YYYYMMDD with an incremented double digit number tagged to the end. This allows you to do multiple edits each day with a serial number that both increments and reflects the date on which the change was made. It's a numeric value that the slave server can use to check whether the zone file has been updated. The slave periodically checks the serial number to see if it has changed. If it has, the slave will perform a zone transfer. 2006012103 is the serial number in the zone file above.

  • Refresh

    This field tells a slave DNS server how often it should check the master. This field represents a length in seconds. Every refresh cycle, the slave server checks to see whether it needs to perform a zone transfer. In this file we use 28800 as the value.

  • Retry

    This field tells the slave how often it should try to connect to the master in the event of a connection failure. The interval in our example is 7200.

  • Expiry

    Total amount of time a slave should retry to contact the master before expiring the data it contains. Future references will be directed towards the root servers. This is the expiration time, the length of time that the slave server should continue to respond to queries even if it cannot update the zone file. An expiration period exists under the theory that out of date data is worse than no data at all. In our example we use 604800.

  • Minimum-TTL
This is the default time to live (TTL) for this domain in seconds. Times will occur when remote clients will make queries for sub-domains that don't exist in your records. If so configured, your DNS server will respond with a no domain or NXDOMAIN response that the client's remote server caches. The TTL value defines the caching duration your DNS response. The value is included in your server's response. Any resource record that does not have a specified TTL uses this default. Because 86400 seconds is one day, the querying cache's record should die in one day.


最后,dig是一个很好的工具,

$dig www.baidu.com

; <<>> DiG 9.3.6-P1-RedHat-9.3.6-16.P1.el5 <<>> www.baidu.com
;; global options:  printcmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 19051
;; flags: qr rd ra; QUERY: 1, ANSWER: 3, AUTHORITY: 4, ADDITIONAL: 1

;; QUESTION SECTION:(请求)
;www.baidu.com.                 IN      A

;; ANSWER SECTION:(回答)
www.baidu.com.          99      IN      CNAME   www.a.shifen.com. (CNAME也就是化名,重新请求解析www.a.shifen.com)
www.a.shifen.com.       458     IN      A       119.75.217.56 (A记录,域名对应的IP地址)
www.a.shifen.com.       458     IN      A       119.75.218.45 (A记录,域名对应的IP地址)

;; AUTHORITY SECTION:(权威服务器域名)
a.shifen.com.           5927    IN      NS      ns4.a.shifen.com.
a.shifen.com.           5927    IN      NS      ns5.a.shifen.com.
a.shifen.com.           5927    IN      NS      ns6.a.shifen.com.
a.shifen.com.           5927    IN      NS      ns2.a.shifen.com.

;; ADDITIONAL SECTION:
ns6.a.shifen.com.       76      IN      A       220.181.4.178 (A记录,权威域名服务器IP地址)

;; Query time: 79 msec
;; SERVER: 222.73.13.68#53(222.73.13.68)
;; WHEN: Tue Nov  8 15:58:23 2011
;; MSG SIZE  rcvd: 178


Linkerd 101:如何使用Linkerd监控外部DNS请求 摘要:本文介绍了如何在Kubernetes环境中使用Linkerd服务网格监控外部DNS请求。通过创建ExternalName服务和ServiceProfile配置,可以跟踪外部请求的指标数据。文章详细说明了配置步骤和验证方法,并指出当前版本Linkerd对外部服务路由指标支持尚不完善,建议结合其他监控工具使用。随着服务网格技术发展,Linkerd有望在未来版本中完善这一功能,实现更全面的微服务通信监控。 阅读详情

相关推荐

华为IAD101S/101H/102H/104H配置与MGCP注册、PSTN切换

在NGN综合接入场景中,语音网关承担模拟电话与IP语音网之间的媒体转换和信令交互。其核心原理是通过IP层可达、MGCP/SIP信令注册、业务层拨测三层协同,把POTS语音流封装为IP包,并由SoftX3000等软交换控制。技术价值在于降低传统PSTN接入改造成本,实现VoIP与PSTN逃生、一机双号及远程运维。典型应用覆盖企业分支、机房综合接入和无人值守点位语音上收。华为IAD101S/101H/102H/104H正是此类媒体接入网关,配置时需通过Telnet进入命令行,完成静态/DHCP/PPPoE地址、

weixin_29252171的博客 223

Internet101- 2 - IP Address & DNS (IP地址 & DNS)

内容来源:KhanAcademy-Internet101- IP Address and DNS (原视频和字幕、评论为英文,下面中文内容为个人理解后,查阅网络资料所作翻译,仅供参考;部分中文定义源自百度百科) 1. 相关名词   ISP - Internet Service Provider 互联网服务提供商   当你用笔记本或者手机连上WiFi,WiFi会连接到ISP...

weixin_30448685的博客 283

从仿真到部署:基于ROS2与Gazebo的UR5e机械臂全流程控制实践

本文详细介绍了基于ROS2与Gazebo的UR5e机械臂全流程控制实践,从环境准备、模型构建到控制器开发和仿真优化,最终实现真实机器人部署。通过实战案例和避坑指南,帮助开发者掌握机器人仿真与控制的关键技术,提升UR5e机械臂在物料分拣等任务中的性能与稳定性。

weixin_29184371的博客 288

域服务器的dns:::1_网络101:什么是DNS查询?

域服务器的dns:::1DNS is a topic which is often considered difficult to understand, but the basic thesis of it is actually not hard to grasp if explained correctly — which is the very aim of this article. T...

weixin_26753891的博客 540

spark3.x 写入hudi报错

【代码】spark3.x 写入hudi报错。

W2484980893的博客 1579

基于Dify构建银行智能客服:从意图识别到多RAG架构的实战解析

本文深入解析了如何利用Dify平台构建银行智能客服系统。从传统客服痛点出发,详细阐述了基于意图识别精准分类用户需求,并通过多RAG架构解决知识混淆问题,实现高效、准确的业务响应。文章重点介绍了结合工具调用实现业务流程自动化,并强调了数据本地化部署、内容安全过滤等银行级安全合规实践,为金融行业AI应用提供了实战指南。

yog99的博客 926

魔百和 MG100/M101/MG101 刷机包

特点: 1、适用于对应型号的电视盒子刷机; 2、开放原厂固件屏蔽的市场安装和u盘安装apk; 3、修改dns,三网通用; 4、大量精简内置的没用的软件,运行速度提升,多出大量的存储空间; 5、去除应用安装限制; 6、支持开机自启动、开机密码锁、儿童应用锁、应用隐藏、开机自动进入HDMI等各种花式功能 。

点我主页,可查看所有固件文章! 4万+

Linux中Hadoop 集群搭建

零、下载Hadoop: http://archive.cloudera.com/cdh5/cdh/5/?tdsourcetag=s_pctim_aiomsg 一、集群规划: 搭建的 hadoop 集群由 3 台服务器组成,分别叫做 master,salve1 和 slave2。其中 master 作为主节点,slave1 和 slave2 作为从节点。 二、网络配置: 1.查看 3 个节点的主机名...

白墨的小白博客 3994

显示计算机101代码,steam错误代码101怎么办_steam错误代码101的解决方法

最近有朋友问小编steam错误代码101怎么办,对于这个问题,相信还有很多朋友不明白,steam平台是很多朋友都使用过的,有的朋友发现steam出现错误代码101,服务器连接失败,的问题,为什么steam会出现错误代码101的情况呢?遇到这种情况应该如何处理呢?别着急,小编这就为大家带来steam错误代码101的解决方法。steam错误代码101的解决方法:1、当我们出现101错误的时候,并非是软...

weixin_36382534的博客 2994

【Altium Designer】Off grid pin解决方法

​今天我画完原理图编译时,出现了太多的黄色(出现warning警告提示)Off grid pin警告,这个警告并不是原理图电气连接出问题了,而是元器件或器件PIN脚没有和栅格对齐造成的原因。再编译还是出现这个警告。 最后经过不断翻阅网上经验和实践,才最终解决,本经验详细记录了解决该警告的有效方法。 解决方案:以下是问题解决步骤... ​

夜半少年的博客 7551

基于Python的IMF经济数据爬取与分析:从入门到实战

本文详细介绍了如何使用Python爬取国际货币基金组织(IMF)的经济数据,包括最新的爬虫技术、反反爬策略、数据解析与存储方法。文章从IMF数据源分析开始,逐步讲解如何构建一个完整的爬虫系统,并提供了详细的代码实现和优化建议。通过本文,读者将掌握爬取复杂国际组织数据的关键技术,并能将这些技术应用于其他类似的数据获取场景。关键词:Python爬虫、IMF数据、经济数据获取、数据清洗、反爬策略IMF Data (data.imf.org) - 主要数据门户。

2201_76125261的博客 1439

显示计算机101代码,steam错误代码-101 解决steam错误代码-101的方法

很多小伙伴都在steam这个平台上玩游戏,有所以难免会遇见steam错误代码-101的情况,这是什么情况呢?当我们出现-101错误的时候,并非是软件服务器的问题,而是因为我们的网络缓存出现了问题,所以导致网页访问的时候会出现101,今天小编教你们如何解决这个问题。解决steam错误代码-101的方法1、当我们出现101错误的时候,并非是软件服务器的问题,而是因为我们的网络缓存出现了问题,所以导致网...

weixin_34438539的博客 5696

【MODIS处理工具】MRT(MODIS Reprojection Tool) 下载及安装

【MODIS处理工具】MRT(MODIS Reprojection Tool) 下载及安装

WW、forever的博客 2409

网络数据分析溯源(DNS服务器地址)

用wireshark打开包,用dns协议过滤 DNS服务器进行域名(domain name)和与之相对应的IP地址 (IP address)转换。DNS中保存了一张域名(domain name)和与之相对应的IP地址 (IP address)的表,以解析消息的域名。 所以只需要观察哪个ip接收到大量的域名解析的请求就可以判断了 输入172.16.200.101,得到key ...

qq_36933272的博客 1128

大模型性能压测全指南:从指标到实战

本文系统阐述大模型(LLM/多模态)私有化部署性能压测方案,涵盖核心指标(TTFT、TPOT、吞吐、并发、资源占用、错误率)、四类典型压测场景及工具选型(Locust、vLLM benchmark等)。强调环境隔离、参数固定与长尾延迟分析,提出瓶颈定位思路与标准化报告模板,结合伪代码示例实现流式接口精准打点,确保测试结果真实可信,助力优化模型服务稳定性与性能。

SmallBull的博客 60

RU DOS版、EFI版32bit/64bit BIOS常用工具

DOS版、EFI版的RU工具,可用来查看IO、MEM、PCI、SMBIOS等资源。亲测在EFI SHELL下可用。

墨者 - 网络数据分析溯源(DNS服务器地址)

输入dns命令直接过滤掉剩下dns包 最后发现172.16.200.101这个ip访问较多,因此断定为dns服务器

吃肉唐僧的博客 1078

VB摄像头监控

该VB模块可对摄像头捕获的画面进行录像等,可在创建的窗口进行控制

饥荒dns服务器未响应,DNS服务器未响应怎么办

满意答案ccss123122016.08.13采纳率:47%等级:6已帮助:105人楼主您好!请手动在本地连接中设置IP地址、子网掩码、网关和DNS服务器,您的问题可能是从网关处自动获取的DNS服务器有问题,建议询问宽带供应商(电信或联通),咨询DNS服务器的IP地址。举例:局网中路由器为192.168.0.1,电脑A的IP设置为自动获取,DNS设置也是自动获取。在本地连接中改成手动设置的...

weixin_36372146的博客 1460

Probability and Statistics - 4th edition

Probability and Statistics - 4th edition

TMS_WebGMaps_1.9.8.0_Full_Source

TMS_WebGMaps_1.9.8.0_Full_Source 全源码 delphi cbuilder

MAS 激活脚本怎么用:一条命令完成 Windows 与 Office 免费激活

新装的系统没有激活密钥,Windows 右下角一直挂着未激活提示,Office 也弹着功能受限提醒——这种局面,不少人都遇到过。MAS 激活脚本(Microsoft Activation Scripts)就是为这个场景准备的开源工具:不需要安装任何附加软件,Windows 激活和 Office 免费激活都可以靠一条命令跑完。下面按"先选路、再动手、最后核对"的顺序,把整套流程讲清楚。 ## 🧭

gitblog_06874的博客 154

Centos7.9主从DNS部署

Centos7.9主从DNS部署

cetrp的博客 566

system-design-101 详解:8 种常用 DNS 记录类型(A、CNAME、AAAA、MX、NS、SRV、PTR、TXT)

DNS(Domain Name System,域名系统)是互联网的"地址簿",负责把人类可读的域名(如 `google.com`)翻译成机器可读的 IP 地址(如 `142.251.46.238`)。而承载这些映射关系的核心载体,就是**DNS 记录(DNS Record)**。本文以 system-design-101 仓库中的 [dns-record-types-you-should-know

gitblog_00090的博客 327

MG100-M101-UNT400B-MG101等_Hi3798MV100_当贝纯净桌面-卡刷固件包

1、把下载好的刷机包,update.zip放入U盘中,注意升级包为压缩包不要对升级包进行解压和操作,解压后固件就废了;6、支持开机自启动、开机密码锁、儿童应用锁、应用隐藏、开机自动进入HDMI等各种花式功能;3、盒子检测到升级包后自动复制升级包后,重新启动,进行升级,切记升级过程中不要断电。4、大量精简内置的没用的软件,运行速度提升,多出大量的存储空间;

点我主页,可查看所有固件文章! 4402

DNS与DHCP实验

DNS服务器:主 192.168.137.101 从 192.168.137.102 DHCP服务器 192.168.137.101 提供192.168.137.0/24 网段的ip地址 子网掩码 默认网关 DNS服务器地址 DNS默认域名配置1.关闭防火墙,安装软件服务 2. 设置DNS配置 设置正向解析 设置反向解析启动服务 先测试主是否设置正确 同理进入/etc/named.rfc1912.zones进行配置 打开windows客户端进行测试自动获取DNS 打开另一台linux

2302_76410765的博客 532

湖北移动CM101s-Hi3798MV100-EMMC-m8214-当贝桌面卡刷强刷包

2、将bootargs.bin、fastboot.bin、recovery.img、update.zip等4个文件复制放入U盘里,然后插上拆开了的机顶盒上,用镊子短接主控芯片1-2两个管脚;6、支持开机自启动、开机密码锁、儿童应用锁、应用隐藏、开机自动进入HDMI等各种花式功能;4、大量精简内置的没用的软件,运行速度提升,多出大量的存储空间;

点我主页,可查看所有固件文章! 5026

设置ODBC的自定义类CSetODBC

何志丹一,功能描述用于配置数据源用户名及密码.1,可以得到连接串,此串可用于CMyRecordset(派生于CRecordset)的GetDefaultConnect(),也可以用干CDataBase类OpenEx.2,如果用户配置正确,只需要配置一次,相关信息记录在文件.3,可以指定存储信息的文件名.因为有可能几个程序共用一个数据源.4,用户可以重新配置数据5,可以得到当前数据的类型.6

闻缺陷则喜何志丹 3157
上一篇: MYSQL参数 DELAY_KEY_WRITE说明
下一篇: c++中vector的遍历及元素删除
dds_dev_group
博客等级 码龄15年 4粉丝 12原创
评论 1
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

个

红包个数最小为10个

元

红包金额最低5元

当前余额3.43元 前往充值 >
需支付:10.00元
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付元
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值