how to see a list of mac address in my lan (command line, linux/windows/mac)

V4705

n00b
Joined
Jan 12, 2011
Messages
60
Hi, I knew a command under windows to convert internal IP to mac address, I think it was "net" something or "use" something.
Anyway, I'm using MacBook, Windows Desktop and Linux Server, I would like to know how can I see the mac addresses in my Lan, using only the command line (without download/setup additional files).

Thank You!
 
If your looking for a list of MAC addresses available on the LAN I am not sure that you can do that with the built in tools of your OS. You could use a variety of sniffers or stumblers (Angry IP scanner, wireshark, ettercap etc) to get a lost and all of those are platform independent.

As for changing your MAC address, are you sure you want to change your MAC or do you want to change your IP? On your own home network I really can't see any reason to change your MAC around, however if you want to set static IPs that is fairly simple.

In linux just vi /etc/network/interfaces and then set the values in the document to something similar
iface eth0 inet static
address 192.168.0.100
netmask 255.255.255.0
network 192.168.0.0
broadcast 192.168.0.255
gateway 192.168.0.1
then after saving issue the command sudo /etc/init.d/networking restart to have the machine make the changes.

In Windows you can go to the Control Panel, Network Settings, Adapter options, right click your NIC, Properties, Click TCP/IP v4 and click properties again, then Apply, Close, and your good.

In OS X go to system options, click the device you are using, if Ethernet change the drop down to Static and set your info, then apply. If using wireless click advanced, then TCP/IP, change IPV4 to static, set your info, hit apply, then apply, and your done. For wireless I would recommend not setting a manual IP.
 
if you are just talking about your own MAC, in command prompt its
Code:
ipconfig /all
should be listed under "physical address" for the network adapter.
 
I think the only way you'd be able to get a complete list (w/out additional downloads) is to get access to a managed network device(s) that is connected to those segments, then look at the MAC address table on that device. But the easier solution as others have said is to download 3rd party tools to get them. Anything that's routed over a different portion of the LAN is not really going to work because that data traverses over layer 3. You could get MAC addresses for specific devices on the same part of the segment with the "arp -a" command, but again, those would have to be on the same portion of the LAN (and you would have to establish connectivity prior to that).

So I guess the answer is - depends on how your network is set up.
 
Hi, I knew a command under windows to convert internal IP to mac address, I think it was "net" something or "use" something.
Anyway, I'm using MacBook, Windows Desktop and Linux Server, I would like to know how can I see the mac addresses in my Lan, using only the command line (without download/setup additional files).

Thank You!

Windows has teh "getmac" command that will display the MAC for all connected adaptors
 
You can use arp -a for machines on your segment. If you want to get MACs for devices outside of your subnet, you could do nbtstat -a [ip add].
 
You can use arp -a for machines on your segment. If you want to get MACs for devices outside of your subnet, you could do nbtstat -a [ip add].
Yes except nbtstat -a is for host names only. You have to use nbtstat -A to look up by IP... it's case sensitive. And that's only going to work for machines that use netbios
 
My approach to get every MAC address on a subnet would be to use Linux.

Code:
nmap -n -sP <subnet>
arp -a | grep -v incomplete
 
[RIP]Zeus;1036942123 said:
If you run a domain you can use PSTools to run IPconfig remotely, and grab all the NIC stats.

http://technet.microsoft.com/en-us/sysinternals/bb896649


Also if you are running a router with DHCP, you can view all the MAC's from there.

+1

Log into your router and look at the connected devices page. It should tell you the MAC, IP, connection up time, etc for all connected devices all from that one info page.
 
Back
Top