From: www.itworld.com
May 9, 2008 —
In order to create a DHCP reservation, you need to know the MAC address of the computer. The MAC address is a unique link-layer address that identifies a network interface on a computer, and MAC addresses are generally hard-coded into network interfaces although they sometimes can be changed. Often when you purchase a computer the MAC address is displayed, either on a sticker on the system or in the computer's documentation. But not always.
If you're logged on locally to a computer running Microsoft Windows, you can determine the system's MAC address by typing ipconfig /all and looking for the entry labeled Physical Address. But what if you're system is somewhere else on your network? One way of determining the MAC address of a remote system is to type nbtstat -A remoteaddress at a command prompt where remoteaddress is the IP address of the remote system. For example, when I run this against a Windows Server Core box on my test network, I get the following result:
C:\Documents and Settings\Administrator>nbtstat -A 172.44.25.222 Local Area Connection: Node IpAddress: [172.44.25.102] Scope Id: [] NetBIOS Remote Machine Name Table Name Type Status --------------------------------------------- SEA-SC1 <00> UNIQUE Registered CONTOSO <00> GROUP Registered SEA-SC1 <20> UNIQUE Registered MAC Address = 00-11-D8-60-ED-D4 |
The remote system's MAC address is the last entry in the output from the command.
An alternative to the above is to use the psexec tool from Mark Russinovich's Windows Sysinternals suite of tools. Using psexec, you can run ipconfig /all remotely on the remote machine and return the result to your local computer. Here's an example of this at work (you could also substitute the remote computer's name instead of its IP address in the below command, and you need to specify credentials that work on the remote machine):
C:\test>psexec \\172.44.25.222 -u Administrator -p Pa$$w0rd ipconfig /all PsExec v1.94 - Execute processes remotely Copyright (C) 2001-2008 Mark Russinovich Sysinternals - www.sysinternals.com Windows IP Configuration Host Name . . . . . . . . . . . . : SEA-SC1 Primary Dns Suffix . . . . . . . : contoso.com Node Type . . . . . . . . . . . . : Hybrid IP Routing Enabled. . . . . . . . : No WINS Proxy Enabled. . . . . . . . : No DNS Suffix Search List. . . . . . : contoso.com Ethernet adapter Local Area Connection: Connection-specific DNS Suffix . : contoso.com Description . . . . . . . . . . . : SiS 900 PCI Fast Ethernet Adapter Physical Address. . . . . . . . . : 00-11-D8-60-ED-D4 DHCP Enabled. . . . . . . . . . . : Yes Autoconfiguration Enabled . . . . : Yes Link-local IPv6 Address . . . . . : fe80::89d:8a5:5d58:512e%2(Preferred) IPv4 Address. . . . . . . . . . . : 172.44.25.222(Preferred) Subnet Mask . . . . . . . . . . . : 255.255.0.0 ... |
ipconfig exited on 172.16.11.222 with error code 0.
Note that if Windows Firewall is enabled on the remote computer and the File And Printer Sharing exception is turned off, neither of the above methods will work and you'll have to try something else.
One final tip: a must-have book for Windows admins is Microsoft Windows Internals (4th Edition) written by Mark Russinovich and David A. Solomon. This book not only provides you with deep insight into how Microsoft Windows works-it also shows you how to use some of the Sysinternals tools to explore the Windows operating system on your own. I hope they update this book for Windows Vista and Windows Server 2008 someday, but meantime this is the best there is for anyone who wants to dig deeper into Windows.
ITworld.com