LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   How could I collect the MAC from a different network machine? (https://www.linuxquestions.org/questions/linux-networking-3/how-could-i-collect-the-mac-from-a-different-network-machine-4175691558/)

cesarsj 03-04-2021 10:59 AM

How could I collect the MAC from a different network machine?
 
For example, from a machine on the 172.85.6.0/24 network I want to collect the MAC from a machine on the 192.168.6.0/24 network.

Emerson 03-04-2021 11:07 AM

Read here, MAC addresses are visible on OSI layer 2.

jefro 03-04-2021 02:48 PM

If they are on same lan then you simply modify your subnet to a supernet.

Gad 03-13-2021 12:21 PM

Quote:

Originally Posted by cesarsj (Post 6227252)
For example, from a machine on the 172.85.6.0/24 network I want to collect the MAC from a machine on the 192.168.6.0/24 network.

If the networks are able to route packets between each network ping the device using the IP then inspect your ARP table

teckk 03-13-2021 02:04 PM

You need to be root
Code:

nmap -sP -n 192.168.0.0/24
You'll have to be able to reach other subnets from the machine you are on.

shruggy 03-13-2021 02:51 PM

From the nmap manual page:
Quote:

In previous releases of Nmap, -sn was known as -sP.


All times are GMT -5. The time now is 04:20 AM.