NetBIOS 与 FQDN

发布于 2024-07-06 10:15:32 字数 131 浏览 8 评论 0原文

我在访问网站时遇到问题,我可以使用 NetBIOS 名称访问它,但在使用 FQDN 访问时出现错误。

关于如何解决这个问题有什么想法吗?

(还没有配置DNS,我们修改了Hosts文件,输入相关的名称和IP。)

I've got an issue when accessing a web site, I can access it by using the NetBIOS name, but when accessing with the FQDN i get an error.

Any ideas on how to troubleshoot this?

(There is no DNS configured yet, we have modified the Hosts file to enter the related names and IP.)

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

得不到的就毁灭 2024-07-13 10:15:32

首先,检查明显的问题:文件中是否有任何拼写错误?

接下来,测试名称解析。 像通过 FQDN ping Web 服务器这样简单的事情就可以了。 查看是否提到了正确的 IP。

  • 如果您收到“未知主机”,则说明您的客户端的主机文件中没有您输入的 FQDN 条目(检查主机名中的拼写错误),或者由于某种原因,您的计算机无法读取您的主机文件。
  • 如果您得到错误的 IP 地址,那么您的主机文件中的 IP 是错误的(检查 IP 地址中的拼写错误),您计算机的 DNS 缓存已被污染(在 Windows 上尝试:ipconfig /flushdns机),或者其他东西覆盖了查找(主机文件中的重复条目?)。

接下来,尝试与您的网络服务器通信。 使用 Telnet,与其进行 HTTP 对话,并查看它如何响应:

telnet 192.168.0.1 80

用您的 Web 服务器的 IP 地址代替 192.168.0.1。 提供以下行:

GET / HTTP/1.1
Host: fqdn.mywebserver.com

尝试服务器的 IP、服务器的 netbios 名称,最后用服务器的 FQDN 代替 fqdn.mywebserver.com。 输入主机标头后,请务必按回车键两次

如果 netbios 名称和 FQDN 的响应不同,则这是 Web 服务器配置问题; 您需要调整虚拟主机设置(在 Apache 中,应使用 ServerAlias 指令添加附加名称。在 IIS 中,其位于“网站”(选项卡)->“高级”(按钮))。

在那之后……我真的没有主意了。

First, check the obvious: are there any typos in the file?

Next, test out the name resolution. Something simple like pinging the web server by it's FQDN will do. See if the right IP is mentioned.

  • If you get "unknown host", your client's hosts file does not have an entry for the FQDN you entered (check for typos in the host name), or, for some reason, your computer isn't reading your hosts file.
  • If you get the wrong IP address, then you have the wrong IP in your hosts file (check for typos in the IP address), your computer's DNS cache is polluted (try: ipconfig /flushdns on a Windows machine), or something else is overriding the lookup (duplicate entries in the hosts file?).

Next up, try communicating with your web server. Using Telnet, speak HTTP to it, and see how it responds:

telnet 192.168.0.1 80

Substitute your web server's IP address instead of 192.168.0.1. Provide the following lines:

GET / HTTP/1.1
Host: fqdn.mywebserver.com

Try the server's IP, server's netbios name, and finally the server's FQDN in place of fqdn.mywebserver.com. Be sure to press return twice after entering the host header.

If the response is different between the netbios name and the FQDN, then it's a web server configuration issue; you need to adjust you virtual host settings (in Apache, the ServerAlias directive should be used to add additonal names. In IIS its in Web Site (tab) -> Advanced (button)).

After that... I'm really out of ideas.

蓝梦月影 2024-07-13 10:15:32

只是为了确保,您有类似这样的内容,

192.168.100.5 othermachine othermachine.mydomain.local

其中包含 netbios 和 FQDN,而不仅仅是 IP 和 netbios 名称?

Just to make sure, you have something like this

192.168.100.5 othermachine othermachine.mydomain.local

with both the netbios and the FQDN in it and not just the IP and netbios name?

痴者 2024-07-13 10:15:32

假设,正如上面 Dragonmantank 提到的,FQDN 位于您的主机文件中,我会查看 Web 服务器软件本身是否配置为接受主机字段中包含 FQDN 的请求。

Assuming, as dragonmantank mentioned above, that the FQDN is in your hosts file, I'd look at whether the web server software itself is configured to accept requests with the FQDN in the Host field.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文