Linux Tutorial – Hello everyone, today I am going to show you how to list all active IP addresses in the network via command line. I am using Ubuntu Linux on this tutorial, but it should be the same for other Linux distribution. In order to display all used IP address on the network, we can use an application called arp-scan. This program can be downloaded and installed on most Linux distribution.
First, we need to install arp-scan package. If you are on Ubuntu, you can use the following command to install arp-scan.
sudo apt install arp-scan
Then, we can start scanning our network with the following command
sudo arp-scan --interface=wlp3s0 --localnet
Change wlp3s0 with your network interface. If you don’t know the network interface you are using, execute this command
ifconfig
wlp3s0 Link encap:Ethernet HWaddr dc:53:60:b5:85:6f inet addr:10.34.0.232 Bcast:10.34.0.255 Mask:255.255.255.0 inet6 addr: fe80::4a93:7b7:f25a:afee/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:36453 errors:0 dropped:0 overruns:0 frame:0 TX packets:18395 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:29241254 (29.2 MB) TX bytes:2878177 (2.8 MB)
Now scan the network using arp-scan
dhani@dhani-ThinkPad-T450:~$ sudo arp-scan --interface=wlp3s0 --localnet Interface: wlp3s0, datalink type: EN10MB (Ethernet) Starting arp-scan 1.8.1 with 256 hosts (http://www.nta-monitor.com/tools/arp-scan/) 10.34.0.5 00:18:8b:3b:3c:47 Dell 10.34.0.100 5c:d9:98:4b:f6:fc D-Link Corporation 10.34.0.227 00:16:6c:8d:88:69 Samsung Electonics Digital Video System Division 34 packets received by filter, 0 packets dropped by kernel Ending arp-scan 1.8.1: 256 hosts scanned in 1.259 seconds (203.34 hosts/sec). 34 responded
Leave a Reply