Help Needed: How can I access a remoted Kiwi somewhere in 169.254/16 ? [fixed in v1.254]
I don't know what I'm doing with networking, perhaps I should stick to RF. But I have a problem that may be solvable. Here's the situation:
I have a Kiwi located at a remote site having only solar power, an hour's drive away on a very snowy/icy poor quality mountain road 800m higher and 22 km from my home QTH. It's very quiet there. I access it via a Ubiquiti IP 5 GHz radio bridge and it normally sits on my private home subnet, served by a home gateway/router which supplies DHCP. This configuration has all been running fine until the remote site lost power last night. After several days of clouds and no charging the battery voltage dropped below threshold, the solar controller shed the loads and both the Kiwi and the link went down. When power returned (with the sun) the microwave link came back up but the Kiwi did not appear.
I believe what may have happened is that the Kiwi is actually powered up and running now but in the process of coming up, it came up before the microwave link. Since the Kiwi was set for DHCP ( I think this may have been a BIG mistake on my part! ) it looked for its normal network and DHCP server but found neither. At that point it gave up and issued itself a random address somewhere in 169.254/16.
I've been able to remotely access and modify the routing table in the microwave link host to point 169.254/16 packets to the local eth0 interface/LAN where the Kiwi resides. But that's all I can do, I don't know the Kiwi address since I can't see the LEDs on the BB in order to SSH into the Kiwi and restart the server now that DHCP is accessible. Thus far I'm unable to flood ping or install nmap to snoop the 169.x.x.x network. Even if I did restart it, I'm not sure what would happen with DHCP under that situation (a mac address already associated with a 169.x.x.x IP, perhaps I'd want to restart the Beagle?)
Pinging the broadcast address 169.254.254.254 gives me a reply that appears to be the Ubiquiti itself.
I've run tcpdump looking for any likely 169.254 activity but haven't had any success, likely I don't know how to configure it.
I suppose this problem would not have occurred if I had realized that DHCP might not be available upon restart and used a static address, but I didn't. I'm left with a number of questions:
Glenn n6gn
I have a Kiwi located at a remote site having only solar power, an hour's drive away on a very snowy/icy poor quality mountain road 800m higher and 22 km from my home QTH. It's very quiet there. I access it via a Ubiquiti IP 5 GHz radio bridge and it normally sits on my private home subnet, served by a home gateway/router which supplies DHCP. This configuration has all been running fine until the remote site lost power last night. After several days of clouds and no charging the battery voltage dropped below threshold, the solar controller shed the loads and both the Kiwi and the link went down. When power returned (with the sun) the microwave link came back up but the Kiwi did not appear.
I believe what may have happened is that the Kiwi is actually powered up and running now but in the process of coming up, it came up before the microwave link. Since the Kiwi was set for DHCP ( I think this may have been a BIG mistake on my part! ) it looked for its normal network and DHCP server but found neither. At that point it gave up and issued itself a random address somewhere in 169.254/16.
I've been able to remotely access and modify the routing table in the microwave link host to point 169.254/16 packets to the local eth0 interface/LAN where the Kiwi resides. But that's all I can do, I don't know the Kiwi address since I can't see the LEDs on the BB in order to SSH into the Kiwi and restart the server now that DHCP is accessible. Thus far I'm unable to flood ping or install nmap to snoop the 169.x.x.x network. Even if I did restart it, I'm not sure what would happen with DHCP under that situation (a mac address already associated with a 169.x.x.x IP, perhaps I'd want to restart the Beagle?)
Pinging the broadcast address 169.254.254.254 gives me a reply that appears to be the Ubiquiti itself.
I've run tcpdump looking for any likely 169.254 activity but haven't had any success, likely I don't know how to configure it.
I suppose this problem would not have occurred if I had realized that DHCP might not be available upon restart and used a static address, but I didn't. I'm left with a number of questions:
- Would a static address have been the correct fix for the problem?
- Once the Kiwi has failed to find a DHCP server does it ever try again or does it just wait for a non-networked host e.g. laptop, to find it?
- If the answer to the above is 'no', would there be any positive value in having the Kiwi look periodically for those situations where it boots before its network does, perhaps even some home gateway/routers might not come up very soon after a power fail.
- Am I missing an obvious configuration or solution that someone here can point me toward?
- Should I just give up, drive to the mountain when the weather permits, restart it all and set the IP to static?
Glenn n6gn
Comments
not knowing the exact private IP subnet the Kiwi will set itself to when it does not receive a DHCP response is something i dont know - if the above suggestion doesnt work, i'll take my Kiwi, connect it to my PC directly (with Kiwi in DHCP mode) and see what private IP address it will range itself to after not receiving a DHCP response, you can then use that information to set your PC to the same subnet in order to find your Kiwi.
yes, definitely set your Kiwi to a static IP address of the same subnet as your home network.
the ID MAC for the Kiwi is 40BD32
edit - you might get results trying the MAC ID tool on your network before connecting the Ubiquiti directly to the PC.
I think a trip to the hilltop is in my future...
Glenn
If you can restart the remote end of your link, do it. It might take the NIC down, and when it comes back up the kiwi should do a DHCP discover and hopefully get a real IP.
If that doesn't work:
If your link system is layer 2 (not-IP aware, only MACs) then assign a computer on your network a 169.254.x.x IP with a MASK of 255.255.0.0 (/16). Then use an IP scanner to look for active hosts on that entire range (169.254.0.0 - 169.254.254.254). You may have to make some changes to your firewall and router(s) in order to pass/direct the 169.254 traffic over your link. You might try MAC scanning as mentioned previously also.
If your link system is layer 3, then first assign it (or add a virtual) IP in 169.254.0.0/16 and do the same as above.
Good luck!
Nick W1NJC
Glen, you no doubt have this accounted for, but I'll throw it into the mix. When the power comes back up, do you have a switch to prevent a low power start on the KiwiSDR? If the KiwiSDR startup voltage sags, it boots but doesn't complete the load and doesn't initiate the network. It just sits there until the power is recycled to it. So a mountain top needs a power reset switch to the KiwiSDR and probably a charged capacitor to account for initial current draw if the power supply isn't at full power.
Please disregard if this is accounted for.
Ron
KA7U
The Ubiquiti kit normally has some pretty useful info so I'd look for the "stations" listed at the remote end, also try rebooting the remote end if you can, that should kick the DHCP into gear if it not in a locked condition (I had forgotten about any DHCP bugs - that may not poke DHCP but worth a try).
Also as stated in other threads having the supply voltage a bit over 5V won't hurt (E.G. 5.4V) as that gives it a more solid 5V at the Beagle when running and less chance of a brown out on boot. The little DC-DC I'm trying now is set to 5.3V but I don't think it will cleanly boot so needs a cap (reluctant to keep rebooting to test).
So in summary
Remote power switch won't hurt.
Slighty higher supply voltage
Static IP address.
Get to know the admin interface of the Ubiquiti (if you have access) they have some nice hidden gooodies (like the SDR waterfall site survey).
We don't know for certain but it looks from this end like the problem is one of a bridge/adaptor not coming up before the Kiwi needed it. This problem could also plague other Kiwi users, particularly anyone who might be using a WiFi adaptor as a means of eliminating all antenna feedline (and associated common mode noise currents!) by placing all the radio hardware right at the antenna. Separately I've created a very light active dipole/Kiwi/Wifi module that is light enough to be lifted by helium balloon. Such a device becomes a sort of portable e-field probe for measuring both signal and noise as a function of height and distance from residential/commercial noise sources. Perhaps more on this in another post.
I was able to scan the 169.254/16 address space using nmap (it takes a while even with only ICMP/ping probing!) but discovered only the Ubiquiti answering. A visit to the hilltop will answer the question of whether the Kiwi is actually powered and without DHCP-provided address or whether it is a power supply issue after all. This is a first test in very cold weather so anything is possible. It certainly would have been nice to have a remote power/restart control on the Kiwi. We presently have APRS delivering panel/battery/load status, separate from the microwave link, but no way to actually restart the Kiwi remotely.
Again, thanks all, I'll try to report anything else I discover that might be useful to others.
Glenn n6gn
Fort Collins, CO
To further test it, a simulated power fail/load shed was performed. The 12V fuse serving both microwave link as well as Kiwi was pulled and replaced after 10 seconds. The microwave link came back up. The kiwi did NOT. It sat with "double heart beat" and not much else. Perhaps we didn't wait long enough for it to grant itself a 169.254/24 address? There appeared to be network activity, judging by the lights at the RJ45, but no response. Maybe had we waited longer a local.network address would have been self-assigned and "nmap -sn" could have been used to discover it.
This isn't what I expected. I thought that because the static address had been assigned that it would immediately select that upon power cycle/reboot.
It took another power cycle, like the very first, of just the Kiwi in order to get the expected address to respond. From the admin page, it still claimed to be static and that address so I don't know why it didn't work.
If we lose power again, I expect that it will fail again and, unless I can remotely find a way to talk to it, require another trip to cycle power.
Perhaps the addition of a periodic re-probe for DHCP, even after an IP address has been self-assigned would still be the best answer. Barring that, I think we'll need to put an IOT sort of device on the network up there and give it the ability to cycle DC power to just the Kiwi.
Glenn n6gn
Another option is delay the boot to say thirty seconds after link power on.
Many of us have seen this supply rail drop issue and just because on paper the supply should do it doesn't mean there isn't some 10ms 6A load on the supply.
Also what voltage is the DC-DC set to?
If you are sure the rail is solid and you still get it - Just had a daft idea, the Ubiquiti's normally have a way to alter the link LED's so that you can fine tune the orientation for link strength, replace the highest value LED with the input of an optocoupler that switches the Kiwi supply.
Unless they flicker on boot up (I don't remember them doing that) the Kiwi would only get power once the link is established. If you need to power down the Kiwi alter the LED's so that last goes out.
I know it is impractical as you won't want to go digging into the Ubiquiti but thought I'd throw that out there in case it inspires another solution.
I agree that I wouldn't expect it to ever go to a 169.254/16 address, perhaps it no longer does. The symptom was that there was LAN activity but no connection noted and in the time we waited no advertisement of an IP address. Perhaps I should have monitored traffic down at this end to see if I could see evidence of what it was and where it was going, but a very short look with tcpdump from the microwave host didn't reveal anything. I may have missed it though.
Glenn n6gn
did it do this (heartbeat) immediately following the power being applied to the Kiwi ?
i ask because if that is the case, its normal as the software is being compiled, the Kiwi does this anytime it is power cycled and it takes about 2-3 minutes for the software to finish compiling before access to the web interface is active.
It came up normally, lights did the normal thing until about the time the server should have arrived. Heartbeat didn't happen until things were up. Then the normal sending of the IP address did not happen - not until the second power cycle.
Glenn n6gn
The lazy boy way, change out the KiwiSDR and see what happens with a different unit in the position. Same failure, then issues with power at the site. Works fine, then issue with the old BBG network port or whatever.
Ron
KA7U
The behavior you describe of the Kiwi needing two power cycles to be reachable can be explained by it still being on DHCP, and the Kiwi booting up faster than the router / DHCP server.
Also, is the static address you're trying to set outside the range of DHCP-assigned addresses?
----
Okay, I just looked and it's totally screwed up. Somehow you've managed to set static mode in the Kiwi admin interface (network tab). But /etc/network/interfaces still shows DHCP configured for eth0. Also, the gateway field is blank. It should not be possible to do either of those things. There is a ton of error checking code in that interface that attempts to prevent bad configurations from being made. I guess it's still not good enough.
If after selecting static and filling-in the address fields you fail to push the confirmation button that pops-up at the top that says "Are you sure? Click to update interface DHCP/static IP configuration" then the Linux configuration change will not be recorded even though the Kiwi configuration is. If you just refresh the admin page or restart the server the button never reappears and the inconsistency is not undone.
This only harm this causes is making you think you've got a static assignment set when you actually don't. I fixed it by pushing DHCP, then back to static, then fixing the gateway field and then pushing the confirmation button. But then I did not go ahead and reboot the Beagle as the dialog then requires. I didn't want to risk bricking it again in case there is some other problem. So it is actually currently still in DHCP mode. But it should properly use a static ip at the next reboot / power-fail.
Thanks, I think I followed that
Your description does indeed fit my experience and clearly what you saw: said static, I thought 'static' but actually was DHCP. I did the same thing on a local Kiwi here but I'm not sure whether I hit the "are you sure" or not. I think I did. Today when I performed the move to static on the remote kiwi, I did it really quickly and could easily have skipped answering that step - thus creating inconsistent states as you describe.
I think I'll leave it as it is with any test of whether it's now fixed (no pun intended) only being performed when either we lose power again or else next time someone is present to rescue it in case it doesn't come up.
Glenn n6gn