如何在VB.NET中创建DNS服务器 [英] How to make a DNS server in VB.NET

查看:135
本文介绍了如何在VB.NET中创建DNS服务器的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述





我的HTTP服务器运行正常,但是我必须通过URL栏中的IP地址访问它上面的文件,例如86。 xxx.xxx.xxx:8080/home.html,但我想使用名称而不是IP来方便访问,例如。 rixterzserver.com/home.html。我研究了这个并没有找到太多,除了网站使用DNS服务器更改输入到其IP地址的名称,因此用户可以使用该IP地址访问服务器。这必须是可能的,因为销售域名的网站必须从某个地方获取它们...我是否必须创建DNS服务器?

Hi,

I have a HTTP server running fine, but I have to access files on it via its IP Address in the URL bar, for example 86.xxx.xxx.xxx:8080/home.html, but I want to use a name instead of its IP for easier access, eg. rixterzserver.com/home.html. I researched this and didn't find much except that websites use DNS servers to change the name entered into its ip address, so the user can access the server with that ip address. This must be possible as sites that sell domains must get them from somewhere... would I have to create a DNS server?

推荐答案

只需阅读DNS和使用.NET BCL中为您提供的 System.Net 实现它。实质上,DNS与基于网络套接字的任何其他服务没有什么不同。 DNS只是TCP / IP协议栈上的一个应用层协议:

http://en.wikipedia.org/wiki/DNS [ ^ ],

http://en.wikipedia.org/wiki/Application_layer [ ^ ]。



需要一些代码示例,想法?这样做:

http://bit.ly/RMejru [ ^ ]。



例如:

http://reflector.webtropy.com/default.aspx/4@0/4@0/untmp/DEVDIV_TFS/Dev10/Releases/RTMRel/ndp/fx/src/ Net / System / Net / DNS @ cs / 1305376 / DNS @ cs [ ^ ],

DNS.NET解析器(C#) [ ^ ]。



-SA
Just read the standards on DNS and implement it using System.Net provided for you in .NET BCL. In essence, DNS is no different from any other services based on network sockets. DNS is just one more application-layer protocol on TCP/IP protocol stack:
http://en.wikipedia.org/wiki/DNS[^],
http://en.wikipedia.org/wiki/Application_layer[^].

Need some code samples, ideas? Do this:
http://bit.ly/RMejru[^].

For example:
http://reflector.webtropy.com/default.aspx/4@0/4@0/untmp/DEVDIV_TFS/Dev10/Releases/RTMRel/ndp/fx/src/Net/System/Net/DNS@cs/1305376/DNS@cs[^],
DNS.NET Resolver (C#)[^].

—SA


如果目标是学习如何wr第一个,使用谢尔盖的建议。



否则,如果您只对解决问题的解决方案感兴趣,我建议您只需在LAN上的服务器上安装现有的DNS服务器软件,指向您的PC将其用作DNS服务器。



搜索Linux存储库会显示其中的一些,或者在Windows上,您可以使用此: a href =http://maradns.samiam.org> http://maradns.samiam.org
If the goal is to learn how to write one, use Sergey's suggestion.

Otherwise, if you are only interested in a solution to solve your problem, I'd recommend simply installing existing DNS server software on a "server" on your LAN and point your PCs to use it as their DNS server.

A search of Linux repositories turns up a number of them, or, on Windows, you could use this: http://maradns.samiam.org


这篇关于如何在VB.NET中创建DNS服务器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆