IP、域名、DNS和VPS之间的关系

部分网友对IP、域名和VPS之间的关系不是很清楚,本小白文简单介绍这几个概念的联系和区别。

IP、域名、DNS和VPS之间的关系

IP:相当于住房地址。公网IP在全世界都是唯一的,内网IP在内部也是唯一,不同内网可以有相同的内网IP。这概念应该很好理解:你家的住址(对应公网IP)在全世界范围内都是唯一可以直接定位的,但是小区的编号可以是相同的(对应内网IP),比如3号楼1单元203。

域名:IP太难记了,于是有了域名,可以理解为人名。XX省XX市XX县XX小区XX单元XX号这样的地址,记起来很费劲,用“狗蛋的家”来表示,就容易记住了。一个地址可以住多个人,一个人也可以住在多个地址。因此一个IP可以绑定多个域名,多个域名也可以指向同一个IP。

域名有顶级域名,一级域名和二级域名之分。.com、.cn是顶级域名,baidu.com、google.com是二级域名,www.baidu.com、www.google.com是二级域名,三级域名以此类推。

二级域名中的www、ftp这种也叫做主机名,对应www主机,ftp主机。

DNS:狗蛋的家,这个称呼好记,但是对应哪个地址呢?将域名解析到具体的IP,便是DNS的工作,DNS相当于村长,告诉每个人的具体地址。当然狗蛋可以设置由谁来解析地址,这便是设置DNS服务器。一个域名可以由不同的DNS商家解析,比如阿里云、DNSpod、Cloudflare等。

VPS:相当于房子。正常情况下,一个具体地址只能对应一个房子,但一个房子可以有多个地址(可以想象成哈尔的移动城堡,每个门对应不同的地址,门相当于VPS的网卡)。因此一个IP基本上只能绑定一个VPS,但是一个VPS可以有多块网卡,因此可以绑定多个IP地址。

一般来说,一个IP只能指向一个VPS。但有一种叫AnyCast IP(任播IP),一个IP可以指向全球多台服务器。例如CloudFlare的DNS服务器IP  1.0.0.1和1.1.1.1 就是任播IP,对香港用户来说,这个IP地址指向香港的服务器,对于美国用户则是指向美国的服务器

总结

IP、域名、DNS和VPS是几个不同独立的概念,具体来说便是:一个IP可以对应多个域名,一个域名可以有无限多个二级域名,每个域名又可以指向多个IP。DNS把域名解析成IP,每个域名可以设置由谁来负责解析。一个VPS可以绑定多个IP,但一个IP一般情况下只能对应一台VPS。

留言评论

发表评论

您的电子邮箱地址不会被公开。 必填项已用*标注

Captcha Code

WordPress数据库错误: [Table 'ssrvps.vps_autoblog_queue' doesn't exist]
select * from vps_autoblog_queue where is_running >0

WordPress数据库错误: [Table 'ssrvps.vps_autoblog_queue' doesn't exist]
select count(*) from vps_autoblog_queue where task_id=6 and is_running>0

WordPress数据库错误: [Table 'ssrvps.vps_autoblog_queue' doesn't exist]
select id,fetched,is_running,last_date_time from vps_autoblog_queue where task_id=6 and source_url_key='85f8e27ce55bd78fd33f47d2b1409198'

WordPress数据库错误: [Table 'ssrvps.vps_autoblog_queue' doesn't exist]
insert into vps_autoblog_queue(task_id,source_url,source_url_key,create_date_time,not_check_stoped,post_interval) values(6,'https://www.hijk.pw/post-sitemap.xml','85f8e27ce55bd78fd33f47d2b1409198',1750370187,0,0)

WordPress数据库错误: [Table 'ssrvps.vps_autoblog_queue' doesn't exist]
select count(*) from vps_autoblog_queue where task_id=4 and is_running>0

WordPress数据库错误: [Table 'ssrvps.vps_autoblog_queue' doesn't exist]
select id,fetched,is_running,last_date_time from vps_autoblog_queue where task_id=4 and source_url_key='54b1dccf98c13c81f546faf82132bc77'

WordPress数据库错误: [Table 'ssrvps.vps_autoblog_queue' doesn't exist]
insert into vps_autoblog_queue(task_id,source_url,source_url_key,create_date_time,not_check_stoped,post_interval) values(4,'https://ssr.tools/sitemap-posttype-post.2020.xml','54b1dccf98c13c81f546faf82132bc77',1750370187,0,0)

WordPress数据库错误: [Table 'ssrvps.vps_autoblog_queue' doesn't exist]
select count(*) from vps_autoblog_queue where task_id=2 and is_running>0

WordPress数据库错误: [Table 'ssrvps.vps_autoblog_queue' doesn't exist]
select id,fetched,is_running,last_date_time from vps_autoblog_queue where task_id=2 and source_url_key='91372ddcd9e4809b115feaa5b6f00815'

WordPress数据库错误: [Table 'ssrvps.vps_autoblog_queue' doesn't exist]
insert into vps_autoblog_queue(task_id,source_url,source_url_key,create_date_time,not_check_stoped,post_interval) values(2,'https://tlanyan.me/post-sitemap.xml','91372ddcd9e4809b115feaa5b6f00815',1750370187,0,0)

WordPress数据库错误: [Table 'ssrvps.vps_autoblog_queue' doesn't exist]
select count(*) from vps_autoblog_queue where task_id=7 and is_running>0

WordPress数据库错误: [Table 'ssrvps.vps_autoblog_queue' doesn't exist]
select id,fetched,is_running,last_date_time from vps_autoblog_queue where task_id=7 and source_url_key='569e17863f7693f1afa9e9256af9dcff'

WordPress数据库错误: [Table 'ssrvps.vps_autoblog_queue' doesn't exist]
insert into vps_autoblog_queue(task_id,source_url,source_url_key,create_date_time,not_check_stoped,post_interval) values(7,'https://aisoa.cn/sitemap.xml','569e17863f7693f1afa9e9256af9dcff',1750370187,0,0)

WordPress数据库错误: [Table 'ssrvps.vps_autoblog_queue' doesn't exist]
select count(*) from vps_autoblog_queue where task_id=9 and is_running>0

WordPress数据库错误: [Table 'ssrvps.vps_autoblog_queue' doesn't exist]
select id,fetched,is_running,last_date_time from vps_autoblog_queue where task_id=9 and source_url_key='cc9416f8df40d8c3a48e66856b1cd6fd'

WordPress数据库错误: [Table 'ssrvps.vps_autoblog_queue' doesn't exist]
insert into vps_autoblog_queue(task_id,source_url,source_url_key,create_date_time,not_check_stoped,post_interval) values(9,'https://www.v2rayssr.com/sitemap.xml','cc9416f8df40d8c3a48e66856b1cd6fd',1750370187,0,0)

WordPress数据库错误: [Table 'ssrvps.vps_autoblog_queue' doesn't exist]
select count(*) from vps_autoblog_queue where task_id=10 and is_running>0

WordPress数据库错误: [Table 'ssrvps.vps_autoblog_queue' doesn't exist]
select id,fetched,is_running,last_date_time from vps_autoblog_queue where task_id=10 and source_url_key='74714f67855820f0c701ce905b231f27'

WordPress数据库错误: [Table 'ssrvps.vps_autoblog_queue' doesn't exist]
insert into vps_autoblog_queue(task_id,source_url,source_url_key,create_date_time,not_check_stoped,post_interval) values(10,'https://doubibackup.com/sitemap.xml','74714f67855820f0c701ce905b231f27',1750370187,0,0)

WordPress数据库错误: [Table 'ssrvps.vps_autoblog_queue' doesn't exist]
select id,is_running,last_post_time,post_interval,not_check_stoped from vps_autoblog_queue WHERE is_running>0 and fetched=0 order BY id ASC

WordPress数据库错误: [Table 'ssrvps.vps_autoblog_queue' doesn't exist]
select id,sn_id from vps_autoblog_queue WHERE is_running=0 and fetched=0 order BY id ASC LIMIT 1