在不知道IP的情况下连接到本地网络上的网站 [英] Connect to website on local network without knowing IP

查看:117
本文介绍了在不知道IP的情况下连接到本地网络上的网站的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在创建一个嵌入式设备(基于RPi),该设备将连接到本地网络.我希望该设备能够通过网页(与许多路由器相同)来配置该设备.

I'm creating an embedded device (based on an RPi) which will connect to the local network. I would like this device to be able to configure the device via a web page (much the same as many routers).

我希望用户在Web浏览器中键入[http://my-device-config](或其他固定地址),然后发送到配置页面,而不必知道设备的IP地址.

I would like the user to type [http://my-device-config] (or some other fixed address) into the web browser and be sent to the config page without having to know the ip address of the device.

用户将采取的步骤如下:

The steps the user would take are as follows:

  1. 用户将设备插入网络/打开设备.
  2. 用户在浏览器中输入配置"地址,并进入配置页面. (无需网络配置/ip查找等)

根据研究,我相信Avahi(/Bonjour/Zeroconf)可以做到这一点,但是我不清楚以下几点:

From research I believe Avahi (/Bonjour/Zeroconf) can make this possible, however I am unclear on the following points:

  1. Avahi是最简单的方法吗?
  2. 如果我的设备是运行Avahi的本地网络上的唯一设备,它将起作用吗? (即无需在网络上的任何其他计算机上安装软件).
  3. 它可以跨平台(osx/* nix/windows)使用吗?
  4. 它可以在浏览器中使用吗?

感谢您的帮助/见解.

推荐答案

  1. 这是最简单,最可互操作的,但不足以满足您的情况.
  2. 简短的回答是否".更长的答案-通常是Apple附带的东西,Linux经常带有Avahin On的东西,除非您进行配置,否则Windows世界不会动弹.但是替代方案甚至更糟.
  3. 以某种方式,是的. Avahi是开源实现(阅读linux/bsd world),而Apple东西拥有自己的专有东西(他们开始了完整的zeroconf故事),而Windows world有自己的zeroconf实现.您还需要没有人在特定的本地网络中使用.local域-公司拥有的网络具有已经由Microsoft网络填充的.local的可能性为非零.
  4. 嗯,从理论上讲是-Avahi本质上是低级DNS,几乎没有其他低级内容.因此,如果您的系统具有DNS解析器,则可以具有将插件拉到Avahi客户端/服务器挂钩下的插件-那么浏览器应该可以正常工作.在过去的几年中,我在装有Firefox的Linux计算机和其他网络设备上没有任何副作用(例如,通过打印机上的avahi-pointed Web服务器配置打印机).他们的地址看起来像 http://my-device.local
  1. It is the simplest and the most interoperable, but not sufficient for your case.
  2. Short answer is NO. Longer answer - usually Apple stuff comes with them on, Linux often comes with Avahin On, Windows world won't move finger unless you configure it so. But alternatives are even worse.
  3. In way, yes it will. Avahi is open-source implementation (read linux/bsd world), while Apple stuff has own proprietary thing (they started whole zeroconf story), and Windows world has own zeroconf implementation. You will also need that nobody uses .local domain within particular local network - there is certain non-zero probability that company-owned networks will have .local already populated by microsoft networking.
  4. Uhm, theoretically yes - Avahi is essentially low-scale DNS with few other low-level things made up. So if your system has DNS resolver and it can have plugin which pulls underneath Avahi client/server hooks - then browser should work Ok. For last few years I didn't have side effects with it on Linux machines with Firefox and other equipment in net (e.g. configuring printer via avahi-pointed web server on printer). Address for them looks like http://my-device.local or http://thatprinterfromfloor5.local i.e. whatever.local.

这篇关于在不知道IP的情况下连接到本地网络上的网站的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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