Programmatically find IP of devices directly connected over ethernet - macos

I'm using a Macbook to interface with an ARM development board (Beagleboard xM) over SSH and I use a direct Ethernet connection from the board to my mac. I know I can connect to the board just fine if I know the IP. Usually it will take the next address in line from the last time I connected (e.g. 192.168.2.x -> 192.168.2.x+1), however, sometimes it does not. To find the device on my network I've tried using nmap -sP and -PN, both will return with only the IP of, what I think is, the virtual router on my mac. I have also tried the usual ping 192.168.2.255, this will either return no devices connected or, as mentioned previously, the virtual router.
Does anyone know why it does this or if there is a way for a mac to list all the IPs it is directly connected to over Ethernet (no router, computer to computer)? If I need to I also run Ubuntu 13.04 on my Macbook, so that is an option.
Any suggestions would be greatly appreciated, randomly guessing in the dark at the IP is driving me crazy and scripts I've attempted to make have had no avail.
Thanks!

If you install the avahi daemon on the Beagleboard you should be able to see it between the other Zeroconf devices, thus allowing you to connect to with the name hostname.local, where hostname is the host name of the board.

I had a similar issue, I used the app WaterRoof to figure out what IPs were connected and look for something like what I thought it should be. You may see lots of stuff from places you did not know were connecting to your computer, but I was able to at least narrow it way down and try the few IPs that looked possible, and I got it going. You may try disconnecting/reconnecting the ethernet so it has to renegotiate a connection, and from that you should see it in WaterRoof.
Or maybe this give it to you:
How to determine the IP of the computer that connects to me?

Related

QEMU for Win7 hosting Debian : no more able to connect to the network

I'm fighting strongly against a problem that is making me crazy.
I’m extensively using QEMU over a Win7 64bits machine for running different Linux VMs (Debian, Raspbian).
In the past I configured the network following the QEMU instructions using the OpenVPN TAP device and network bridge in Win7 : it ran perfectly and the Linux machine was able to connect the “real world” networks, internet and so on.
In the last few days, on the contrary, this nice behavior stops working. The Windows situation is unmodified (the OpenVPN TAP driver settings are the same, the bridge is still there, when the bridge is active Windows still see the network, the TAP driver becomes “busy” when the QEMU VM starts as usual, the QEMU startup scripts are still the same…), but the emulated Linux system (whatever image I use) is unable to connect the network.
The “eth0” interface is active but unable to get the IP address from the DHCP and also using fixed IP address doesn’t solve the problem, since the IP address is not seen by the “real” network.
I have tried to uninstall and reinstall again the OpenVPN TAP driver, to downgrade Win QEMU to the previous version, but no way !
The only change that I made in the HOST configuration has been to install GNS3 (with its own TAP driver), but without including the QEMU VM in any GNS3 network.
Does anybody have suggestions regarding what kind of checks I have to do on QEMU in order to solve the problem ?
Any help will be appreciated
Regards
Ugo Poddine
I was finally able to get out.
I was forced to restore a previous system image : all attempts to uninstall and reinstall the OpenVPN TAP driver were useless.
The problem is probably due to the update of the OpenVPN TAP driver : with the v.9.0.0.9 no problem, but updating to the 9.21.1 seems to have generated the problem.
I'm now able to use again QEMU and GNS3 in network.
But what a strange case !

How to connect remotely from Windows to Mac from LAN

Basically what I want to do is write iOS code on Xcode from my Windows PC which is connected to my Macbookpro. I tried a lot of applications for this and most of them connect through the internet and have screen action delays. Some of the other applications have a problem with sending mac commands from my windows keyboard.
So:
- Fast LAN connection
- Ability to pass mac shortcuts
- Responsive
- Hopefully free
- Hopefully copy paste data between computers
to state the obvious,so we are on the same page. the LAN is your Local Area Network, and the parameters of your LAN are defined by the Coverage area of your Modem's Wifi Range and the amount of Ethernet Hard Wire Connections, if you are trying to connect to a Mac on your LAN From a Windows Machine on the same LAN, That is not referred to as REMOTE CONNECTION, That is referred to as LOCAL NETWORKING, Connecting Remotely, or Remote Connection is when you connect From a Remote LAN or one that is not Your Personal LAN, and you use that LAN to Connect to a Computer on your LAN, that's remote connection, Hence, your connecting remotely, so.. Are you using Your LAN to achieve this and your having lag issues, or a you trying to do it remotely, if your trying to Remote Connect and your having trouble with Software, because i know it can be a pain, You should have mentioned what you have already tried, But.. Windows Remote Desktop Connection is buggy, i wouldn't recommend it, the way to go use to be TeamViewer as a free solution, then they Stopped the Free thing and started charging, Other Options were CrossLoop, it's good, but sometimes slow, Try if you haven't already, Most of the Good option are Paid, i rate Bomgar to be the highest, because your accessing Remotely via way of a Remote Box that is not technically inside the parameters of your LAN, hence more secure. LogMeIn is a good one
but as far as free is concerned, and to get the results you want, there is not much out there, obviously the idea is that they want you to buy the full versions, i'll do some research for you, but.. is it possible for you to provide a list of what you have already experimented with thus far, so i don't double handle. thanks

How do I set up visual studio Remote Debugger to go over Ethernet?

I want to debug an app remotely on Windows RT (though this applies to any remote debugging, I guess), I don't want to open up my WiFi connection wide or handle complex software configuration every time I connect (firewall etc.).
I thought that maybe by using an Ethernet connection between my Surface and my dev machine, I could make the remote debugging work on top of that. Installing an Ethernet USB dongle on top of Surface seems to be easy, but I can't figure out how to make my dev machine actually find the Surface computer on it.
My set up is simple, dev machine connected to ethernet cable, connected to USB dongle, connected to Surface (Windows RT). Even when disabling WiFi, the remote debugger cannot find the debugee.
Do I need to manually set up the IP address or something?
Do I need to manually set up the IP address or something?
That's what I was thinking. What happens when you try to ping one machine from the the other? Does either machine run a DHCP server? If not you could run a DHCP server (probably on your dev machine) or setup a static IP address. Setting up DHCP may be harder at first but more convenient if you need to connect your tablet to other networks.
For testing it might be helpful to wire both devices to a router so you can configure and test Remote Debugging separately.

How to access cisco connection on Win7 from Mac OS X on local network

I've really benefitted from all the answers out here and now it's my turn to ask for help.
My company uses CISCO VPN. They won't give me the Shared Secret for the group so I am forced to use the windows VM to connect to my work network.
I've tried using the MAC CISCO ISPEC but there it is. Anyway, I'd like to use the connection in my windows vm from my MAC side. I tried setting up a openVPN server on the windows and connecting to that from MAC and connect the CISCO vpn. All a no go.
So any suggestions will be very welcome.
Thanks all.
Well it might sound strange but you're going to have to setup 2 virtual NICs on the virtual machine. The first NIC is going to be bridged with the real physical NIC on the OSX box and that's going to be your outside interface. The next virtual NIC is going to be a host-only and this is going to be your inside interface. This is the one you'll use for OSX to connect through your windows machine. Then you'll need to remove all IP and DHCP configuration from your physical NIC on OSX to let the virtual machine use that NIC.
Every time you want to use the VM and the VPN you're going to have to remove the config on your physical NIC in OSX and then re-add it when you're done.
The windows machine will need to use internet connection sharing to allow OSX to use its VPN connection.

Unique, persistent, network device information

I've been trying write an application which will be able to connect to a network device via rndis or over wifi and perform some simple operations.
The kicker is that I want to be able to find a device I've connected to before, through either connection method. I initially figured I'd just check for a previously seen mac address, but I discovered that the rndis mac address and the wifi mac address don't match. I'm on windows so the next thing I tried was to use nbtstat -A and ping -a, but those didn't turn up anything unique either (I figured I might get a device name, but it doesn't seem to have one).
So my question is, is there any tool (ideally available for windows), which will allow me to retrieve some sort of unique information about a network device that will allow me to find it again? I don't have a huge amount of experience in this field so I'm not sure exactly what that would be, but I hoped that there may be a way to get the mac addresses for both network adapters while only connected to one, or perhaps use a different tool to find a device name that I'd missed.
Thank you for any advice you might give, I really appreciate it. Sorry if I'm overly wordy.
EDIT: In case I've been ambiguous. I am connecting repeatedly to an external device via RNDIS or WIFI from my desktop PC. My goal is to be able to consistently recognize the network device regardless of the connection method used.
EDIT: By networked device, I mean that I have small independant devices (such as cell phones or tablets) running a unix os, which I access from my Windows desktop via wifi or rndis, and that I would like to be able to consistently identify. So for example I might want to use this tool to connect to one of two cell phones and be able to recognize which one it is so I can recall previous operations performed with that device. So what I'm looking for is a unique (or semi unique) attribute of the cellphone available to me that is consistent when accessed via rndis or wifi.
You can get MAC address (and bunch of other network interface info) with built-in ipconfig command and parse its output later:
ipconfig /all
Alternatively, if MAC address is all you need, try getmac.

Resources