How to get ip address of all the connected device on the network on linux using cli #nmap #network #connecteddevices #linuxcommands #kalilinux #linux #linuxserver
#nmap #network #connecteddevices #linuxcommands #kalilinux #linux #linuxserver
To get all the IP addresses available on a network in Linux (Kali), you can use the following methods:
**Method 1: Using `nmap`**
You can use `nmap` to scan the network and list all the IP addresses. Here's an example:
```bash
nmap -sP 192.168.1.0/24
```
Replace `192.168.1.0/24` with the IP address range of your network.
**Explanation:**
* `-sP` option tells `nmap` to perform a ping scan, which sends an ICMP echo request packet to each IP address in the specified range.
* `192.168.1.0/24` is the IP address range in CIDR notation, where `192.168.1.0` is the network address and `24` is the subnet mask.
**Method 2: Using `arp-scan`**
You can use `arp-scan` to scan the network and list all the IP addresses. Here's an example:
```bash
arp-scan -q 192.168.1.0/24
```
Replace `192.168.1.0/24` with the IP address range of your network.
**Explanation:**
* `-q` option tells `arp-scan` to suppress the header and only show the IP addresses.
* `192.168.1.0/24` is the IP address range in CIDR notation.
**Method 3: Using `ip neigh`**
You can use the `ip neigh` command to list all the IP addresses on the network. Here's an example:
```bash
ip neigh show
```
This command will show you a list of all the IP addresses on the network, along with their corresponding MAC addresses.
**Note:** These methods may not list all the IP addresses on the network, especially if some devices are not responding to ping or ARP requests.
Comments
Post a Comment