Sometimes you need the ip address of a device, you don't access very often via its ip address. So if you are e.g. looking for the browser based control surface of a printer or a nas, this tricks can speed up things if you need an ip address and/or mac address.
1. Just need the IP address and don't have admin rights?
Open up a terminal window, paste the command underneath inside it and hit enter. Note: In this example the command would scan all IP addresses in a network that start with 192.168.1.___ (the ip range). Change this according to your network settings. You might find this information in your router.
for ip in $(seq 1 254); do ping -c 1 192.168.1.$ip>/dev/null; [ $? -eq 0 ] && echo "192.168.1.$ip UP" || : ; done
2. Don't know your network's ip range or also need the mac addresses and have admin rights?
If you have admin rights and are ok with installing a small piece of software from the repository, you can make this task even easier and above it even find out more about the active network devices on your network, like the mac adress and the manufacturer of the network card. The latter is a good hint to which ip a device belongs to.
- Open up a terminal window and install arp-scan by typing
sudo apt-get install arp-scan
- Scan your local network with just one command
sudo arp-scan -l
- In case you get an error (ioctl: No such device) you might have to choose your network device manually, get a list of all devices installed with this command
- after this info you maybe have to specify eth2, do this by altering the above command with the option --interface like this
sudo arp-scan --interface eth2 -l
- You can also limit the scan to a rango of ips e.g. starting from 192.168.1.1 to 192.168.1.100 with this command
sudo arp-scan 192.168.1.1-192.168.1.100
3. Still can't connect to the device even though the ip is right?
Sometimes the remote management surface must be accessed using a special port and most of the time this is the alternative port for webservers 8080. So if you try to access a device with the ip 192.168.1.55 try connecting to it by typing 192.168.1.55:8080 in the address bar of your browser.