Three or more years ago, I made an Arduino project for a NodeMCU (ESP8266) that connected to my MQTT server. I needed to make some changes to the code (unrelated), rebuilt, and was unable to connect to my MQTT server!
After doing some research/debugging, I found that the issue is that the latest board library (2.7.4) is apparently only doing mDNS lookups and not falling back to [or just using] DNS like it used to! It's not failing either - its returning other, random IP addresses (usually a random computer on the same subnet) so I can't trap for the issue. As a result, when I try to connect to my host "mqtt.local", it is unable to get the correct IP address and fails to connect.
I've been able to work around the issue by adding another DNS entry for just "mqtt" (dropped ".local") and connect that way but it is less then ideal. Is there any way to disable mDNS or manually do a DNS lookup for a .local address? (tried setting LWIP_DNS_SUPPORT_MDNS_QUERIES to 0 but that didn't help)
For what its worth, I do have a mDNS proxy running (since Apple has the same issue with .local hostnames). I can get the correct IP on my Mac using the mDNS proxy so even with mDNS, I should be able to resolve the address!
Related
Comcast installed a Juniper Universal Access Router ACX1100, I plugged our switch to the port that the technician told us that is in/out port. But nothing happened, after reading and asking I was told that I need a managed switch to be configured with the gateway IP and that IP is a /29. That's where I got lost. According to him there are 6 usable IP's.
example:
Gateway: 192.168.120.161/29
Usable Range: 192.168.120.162 - 192.168.120.167
One of my multiple questions is what hardware do I need to be able to connect my PC's?, I configured a managed switch, but when I connect my laptop to it I get Unidentified Network and No Internet Connection.
I have been reading and I think I need a VPN with DHCP server integrated.
If some one can help me I'll appreciate it.
/29 is the subnet mask, it can also be expressed as 255.255.255.248. Basically it defines which part of the IP is the network ID and which part of IP is the host ID.
I think in order to accurate assess your situation, we need to know exactly what kind of configuration you set on the managed switch you purchased, also which managed switch did you purchase?
Also currently on your laptop's NIC, what IP is assigned on there?
Either on your old unmanaged switch or on the managed switch, you can try assigning one of the addresses from the /29 block that the technician told you about statically. And the default-gateway with the addresses you posted in your question.
I created a web server on my Raspberry pi using Apache2 and Wordpress. At the beggining I used a local network (IP is 192.168.1.103) and then used a Huawei dongle to connect to the internet. When the dongle is connected, web browser unable to load localhost. When dongle is used it shows that:
"The website at https://192.168.1.103/ seems to be unavailable"
How do I correct this error?
The IP address you're using to connect to the site is a local network address.
When the device is using a mobile data dongle it's no longer connected to your local network so the local IP no longer works.
You could find out your IP address when the dongle is connected however that's impractical. There's a good chance each time you reconnect the IP address will change. Your server needs to have a static IP address.
You cannot directly access a device on a Local network/LAN from the outside/WAN. Notice you are trying to connect to your localhost so you need to be directly connected to the device in question or through a medium which intenrally connects the devices together, such as a router/wifi hub.
When we break your steps down; you are trying to connect to a localhost/device on your LAN but you are connecting via dongle which is actually connecting via outside/WAN connection. This means your GET request for the localhost URL is going to the ISP/dongle providers server first then trying to get back into your LAN - this is not possible, hence the error.
Fix: Connect to device directly or via a medium such as a router (through ethernet or wi-fi).
Additionally: if you wish to type in a url instead of an IP then this will need to be resolved. This is done by manually typing in an entry in your hosts file (in the Raspberry Pi) and inputting the resoloution info i.e www.yourwebsitename.co.uk and local IP i.e. 127.0.0.1.
Your webserver (i.e. Apache) may need to be restarted for changes to take effect. If site is not loading correctly then it could be that your web browser is displaying a cached image in which case simply clear cache in your web broswer and reopen.
Over the last few days I have noticed a mysterious (unknown to me) server hostname that shows up on both Ubuntu's Nautilus Network section as well as Windows File Manager network group. The hostname does not show in the list of clients on my router. If I double click the hostname icon to try to connect to it I get a connection refused error. The hostname's appearance is random.
I have non-factory admin and wireless passwords set on my router as well as MAC filtering. Router firewall is on and no unneeded service ports are opened (NFS, etc.).
How can I determine the source of this unknown hostname and how can I close down my network in case this is really someone that has managed to break into my network? Also, if I have explicitly listed the MAC addresses of all my devices how could a non-listed device be able to connect?
Thank you for any comments you can provide.
Resolved; see previous comment on NetBios over TCP/IP.
I have an embedded webserver running on a device. Now I want a smartphone app to connect to the webserver. They are on the same wifi network but they don't know each others IP addresses.
I understand that this problem is often solved by implementing the mDNS protocol on the server. But are there any alternatives? Can the server maybe ask for specific IP address or similar?
If it has to be entirely automated, such that the embedded webserver is discoverable, perhaps scan the entire netblock looking for the correct response "http://[IP_address]/yes-im-the-one" from your embedded webserver?
Although beware, some network monitors may then consider the IP of your smartphone/device that does that scan "dangerous" and cut it off from the network - this is probably only a "big enterprise" problem.
...after you "find" your server, perhaps the application should cache/remember this, so it doesn't have to scan next time.
Other things you could do: give your embedded webserver a static IP on the LAN, either by setting this on the device itself, or via a DHCP reservation from whatever is the local DHCP server on the LAN.
What allot of emended devices do is come delivered with a static LAN IP already set on it, then it's up to the sysadmin to change their computer's IP temporarily to be in the same range, then they can visit the webserver or telnet into the default IP, and change it to what they want (to match their network's IP range)
I have an old netgear router and I don't remember the gateway for it, whenever I connect to it over ethernet no gateway is specified. Is there any way to find the ip so that I can connect to it?
(I don't know what router type it is, its serial is 1JX167B007721)
Update
So it was just the ethernet port on my laptop that was messed up. When I plugged the router to my old desktop it worked and gave me the default gateway (192.168.0.1)
The proper way to do this would be to iterate through all possible (common) ip addresses and ping them. The easiest way to do this would be to use batch and just run through the ping command.
Most of the time it'll be 192.168.1.1 . To start fresh make sure you do a complete reset on it. Hopefully there is a reset button on it, holding that for a few seconds should perform the clean reset.