Announcement

Collapse
No announcement yet.

find out the mac-address of a device on the network

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • find out the mac-address of a device on the network

    Hello,

    A strange question, but how I can find out the mac address of a networked device?

    Ok, on a PC, it is simple, but what if the device is a set top box, or a TV, ... Can I issue a command from a PC in the same network to find out the MAC address of another device on this network?


    Jörg
    pixar
    Dream as if you'll live forever. Live as if you'll die tomorrow. (James Dean)

  • #2
    I don't know, but the Squeezebox has its address on a sticker on the bottom, and you can also see it in its settings menu (and I think in the server web interface as well, but I'm too lazy to check, except if you want to know. Damn, all that typing, I could have just looked in the time it took me to write this. But I'm not gonna do it now - without an explicit wish from you - because that would waste even more of my precious (MY PRECIOUSSSS!) energy).

    I believe many devices have the mac address on some sticker or maybe in the manual or on the CD sleeve etc.
    There's an Opera in my macbook.

    Comment


    • #3
      I'd use the web interface of my router or whatever is providing DHCP services on my little network - it'll usually provide a table of MAC adresses next to internal IPs.

      edit: I meant DHCP not DNS
      Last edited by GNEP; 28 February 2007, 04:40.
      DM says: Crunch with Matrox Users@ClimatePrediction.net

      Comment


      • #4
        Yes, I know it is listed on a sticker for most devices. But I was just wondering if there is another way of finding it out.
        For wifi connections, I think it is possible to query the status of the wifi-portion of a router. It is often also listed in the DHCP client list of a router, but I wonder if there is a simple tool on windows that lets you find the information.
        edit: GNEP beat me to it.

        But if one is using a wired, non-dhcp connection, I don't know of a way to figure it out.


        Jörg
        pixar
        Dream as if you'll live forever. Live as if you'll die tomorrow. (James Dean)

        Comment


        • #5
          arp?

          not barking
          /meow
          Intel Core 2 Quad Q6600
          Asus Striker ][
          8GB Corsair XMS2 DDR2 800 (4x2GB)
          Asus EN8800GT 512MB x2(SLI)

          I am C4tX0r, hear me mew!

          Comment


          • #6
            Buy a net sniffer, plug it one-to-one into the device?
            The Internet - where men are men, women are men, and teenage girls are FBI agents!

            I'm the least you could do
            If only life were as easy as you
            I'm the least you could do, oh yeah
            If only life were as easy as you
            I would still get screwed

            Comment


            • #7
              This is something I do on an almost daily basis - unfortunately.

              Searching for a Windows device is easy: ping the device by name, and get the IP address,

              Then run the following command:

              nbtstat -A "ipaddress" no quotes, this will give you the name.

              For a cleaner command try this script:
              Code:
              @ECHO OFF
              
              SET WRKSTN_NAME=%1
              
              FOR /F "tokens=3" %%a IN ('PING %WRKSTN_NAME% -n 1 ^| FIND /i "reply"') DO SET IP_RAW=%%a
              
              FOR /F "delims=: tokens=1" %%b IN ("%IP_RAW%") DO SET WRKSTN_IP=%%b
              
              FOR /F "tokens=4" %%c IN ('NBTSTAT -A %WRKSTN_IP% ^| FIND /i "mac address"') DO SET WRKSTN_MAC=%%c
              
              ECHO.
              ECHO Name Queried: %WRKSTN_NAME%
              ECHO IP of Name Queried: %WRKSTN_IP%
              ECHO NETBIOS MAC Address of Name Queried: %WRKSTN_MAC%
              ECHO.
              For non-Windows devices, you ping the device and look at the ARP table...

              Code:
              @ECHO OFF
              
              SET DEVICE_IP=%1
              
              FOR /F "tokens=2" %%a IN ('ARP -a ^| FIND /i "%DEVICE_IP%"') DO ECHO. & ECHO %%a& ECHO.
              Hope this helps.
              Hey, Donny! We got us a German who wants to die for his country... Oblige him. - Lt. Aldo Raine

              Comment


              • #8
                Fun.

                Me? I just use the GUI devices. I think Angry IP scanner does this.

                But it's good to know how to do it as MMM posted.

                Comment


                • #9
                  Most switches and routers have the ability to see the mac address table. You can either issue a command or look at some gui menu for the info. Here is an example from my WRT54G at home:
                  Attached Files
                  Ladies and gentlemen, take my advice, pull down your pants and slide on the ice.

                  Comment


                  • #10
                    As it turns out there's a built in command line program in windows called ... GetMac:

                    GETMAC [/S system [/U username [/P [password]]]] [/FO format] [/NH] [/V]

                    Description:
                    This command line tool enables an administrator to display the MAC
                    address for one or more network adapters on a system.

                    Parameter List:
                    /S system Specifies the remote system to connect to.

                    /U [domain\]user Specifies the user context under
                    which the command should execute.

                    /P [password] Specifies the password for the given
                    user context. Prompts for input if omitted.

                    /FO format Specifies the format in which the output
                    is to be displayed.
                    Valid values: "TABLE", "LIST", "CSV".

                    /V Specifies that the detailed information
                    should be displayed in the output.

                    /NH Specifies that the "Column Header" should
                    not be displayed in the output.
                    Valid only for TABLE and CSV formats.

                    /? Displays this help/usage.

                    Examples:
                    GETMAC /FO csv
                    GETMAC /S system /NH /V
                    GETMAC /S system /U user
                    GETMAC /S system /U domain\user /P password /FO list /V
                    GETMAC /S system /U domain\user /P password /FO table /NH



                    To save the results to a text file use the [command] /FO CSV > [filename].cvs. The CSV can then be opened in Excel to do stuff with. Or you can use TABLE or LIST and export (>) to a .TXT file.

                    Jammrock
                    Last edited by Jammrock; 28 February 2007, 20:55.
                    “Inside every sane person there’s a madman struggling to get out”
                    –The Light Fantastic, Terry Pratchett

                    Comment


                    • #11
                      I'd run Wireshark and then plug the item in question into the network with the PC and turn it on.

                      Comment


                      • #12
                        Thanks guys!
                        (helpful as ever )


                        Jörg
                        pixar
                        Dream as if you'll live forever. Live as if you'll die tomorrow. (James Dean)

                        Comment


                        • #13
                          A little bit more about GetMAC; it is designed to enumerate all MAC addresses on the system indiscriminately...it will not associate an IP address with a MAC address; it also requires credentials to run on a remote system, making it much less useful. However, for Multi-NIC systems running on multiple subnets, GetMAC is a godsend, especially when troubleshooting a misconfiguration.
                          Hey, Donny! We got us a German who wants to die for his country... Oblige him. - Lt. Aldo Raine

                          Comment

                          Working...
                          X