How to find the IP address for a device on a network
Solution 1
You can do this 3 ways.
You have to know the subnet you want to scan (192.168.0.x or 10.0.0.x or what have you).
run ifconfig
to see your subnet. In my examples I will use 192.168.0.255
Method 1 nmap
IMO nmap is best, as long as you do not mind installing packages
sudo apt-get install nmap
Then search by ping (nmap can of course be more complicated and this assumes you are not firewalling ping)
nmap -sP 192.168.0.*
Method 2 : use arp
ping -b 192.168.0.255
arp -a
Method 3, and perhaps an even better option, log into your router. Most routers have a web interface that will show all connected devices.
Of course these methods will not tell you what is at which IP, although nmap will try to guess the OS if you wish.
https://nmap.org/book/man-os-detection.html
May give you a clue what is at what IP, or not.
Solution 2
First, unplug the camera.
Second, start wireshark
and tell it to monitor the Any
interface.
Third, connect the camera.
wireshark
should show you (and decode for you) the camera's traffic, including the IP address.
Related videos on Youtube
witenitenz
Updated on September 18, 2022Comments
-
witenitenz over 1 year
I am trying to get an IP camera connected to my Ubuntu Linux (16.04) machine. At work I am responsible for a camera network of more than 60 cameras, however there I use some window tools to determine IP addresses etc. for Axis cameras. At home now, trying to use my Ubuntu Linux machine to see 1 camera plugged into my ethernet port.
I have tried using DHCP with no luck (probably because the camera has a fixed IP address).
Tried using "Shared to other computers" (an option in the network setup in Ubuntu GUI) and this brings up an IP address of 10.42.0.1 for my host computer, but again, using tools like nmap reveals no other connections on this network.
Tried using manual network settings, with domain ranges like 10.42.0.x as well as more conventional IP ranges like 192.168.55.x. All withou success.
Tried to install AngryIP (a useful tool in Windows) however there seems to be something wrong with the .deb files or the install as Ubuntu refuses to install it (I suspect the repository no longer exists for ipscan).
I have also tried everything mentioned here: How can I install an IP scanner for Ubuntu 16.04 LTS? again, with no success.
I know the camera is connected as, when I plug it in, the Tx LED flashes briefly and then stays on, and Ubuntu reports "you are now connected to the Ethernet network" or something to that effect. Also, when I run nmap, the LED flashes on the camera for a second or two, so something is there and communicating, I just can't seem to get Ubuntu to tell me the IP address!
Again, the tools I use at work are able to tell me the IP address for a camera, even when the IP address falls completely outside of the domain that it is plugged into! To be honest, I'm not sure how that works, but yes, I can identify an address like 192.168.55.7 on a domain of say 172.16.12.x.
From a hardware perspective, my machine is an up to date I7, and the camera is of reputable brand and directly plugged into my Ethernet port. No other nodes on the network. Help, please!
IFCONFIG returns the following when a connection is established:
-
Byte Commander over 6 yearsIs the camera supposed to be able to directly connect to another device over Ethernet, or does it need to be connected to a router?
-
witenitenz over 6 yearshmm, you have a point. Trying to remember whether I've ever connected a camera directly to a PC. But then I am relatively sure I have used unmanaged routers to interface between server and camera, so I would think all protocol negotiation goes on directly between the computer and the camera. Then again, I might be revealing how little I know on the subject...
-
witenitenz over 6 yearsAlso, Ubuntu says "Connect established. You are now connected to the Ethernet network" when I plug in the camera, which seems to me that all is good.
-
chili555 over 6 yearsWhen it says "connection established," what does the command ifconfig report?
-
-
guiverc over 6 yearsalternative: i like
fping
; where as examplefping -ag 192.168.12.0/24 2>/dev/null
will report any 'alive' within the specified 12.0/24 range. i route (2) errors to null to remove errs which can be left off -
witenitenz over 6 yearsThanks, but I have absolutely no idea what subnet the camera is even on. It could be anywhere within the IP domain range. I have tried to take a shot in the dark at some of the more conventional subnets, all without success. The 10.42.0.xxx range is where I think the camera is, only because this is the IP address (10.42.0.1) that is assigned to my computer when I set the network settings to not use DHCP, but use "Shared to other computers" option. In other words I am trying in this instance to let the camera dictate the IP subnet, not the PC. Using DHCP doesn't work.
-
Panther over 6 yearsThe subnet is 10.42.0.xx so to ping all 10.42.0.255