Announcement

Collapse
No announcement yet.

How can I find a MAC of hardware attached via ethernet cable?

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

  • How can I find a MAC of hardware attached via ethernet cable?

    Hi guys

    I have been working nicely with an industrial scanner that is controlled by a Linux PC via an ethernet cable, but the hard drive has died I need to get it working again.

    The problem is that the main PCB has a Realtek RTL8019AS ethernet controller chip, which I believe is used in the most basic way possible, applied straight off-the-shelf and unconfigured.

    To utilise the controller ARP commands are used to assign an IP address to the chip's MAC address e.g. something like:
    arp -s 192.168.2.5 00-05-a4-00-a8-f8

    Unfortunately the actual MAC address was lost along with the HD

    Any ideas how I might find the MAC address again?

    The only thing I could have a reasonable guess at is that the chip will have a default subnet of 255.255.0.0 or 255.255.255.0

    Fingers crossed and many thanks in advance.

    Tony

  • #2
    Re: How can I find a MAC of hardware attached via ethernet cable?

    Hello,
    You can try to directly connect your scanner to PC using the proper cross-over or patch cable.
    Install a packet sniffer program (like Wireshark).
    Restarting the scanner it will send some packets over the cable.
    Br,
    Csaba
    Regards,
    Csaba Papp
    MCSA+messaging, MCSE, CCNA
    ...............................
    Remember to give credit where credit is due and leave reputation points where appropriate
    .................................

    Comment


    • #3
      Re: How can I find a MAC of hardware attached via ethernet cable?

      Sincerest thanks Netxt!

      I will have a go this very evening.

      Very best regards

      Tony

      Comment


      • #4
        Re: How can I find a MAC of hardware attached via ethernet cable?

        Hmmm... Ran Wireshark on my ethernet card attached to the scanner.

        The second the scanner was turned on the log started and slowly entries petered out.

        Unfortunately I can't seem to see what I'm after, and certainly on expanding each entry nothing seemed to resemble the MAC address I'm after as the one thing I can recall is that it finished with "f9"

        Am I missing something?

        I used my standard ethernet cable for the test - do you think a crossover cable might prove more revealing?


        No. Time Source Destination Protocol Info
        1 0 Wistron_e3:51:5b Broadcast ARP Gratuitous ARP for 192.168.1.20 (Request)
        2 0.00943 Wistron_e3:51:5b Broadcast ARP Gratuitous ARP for 192.168.1.20 (Request)
        3 1.009385 Wistron_e3:51:5b Broadcast ARP Gratuitous ARP for 192.168.1.20 (Request)
        4 2.038829 192.168.1.20 239.255.255.250 SSDP M-SEARCH * HTTP/1.1
        5 2.046509 192.168.1.20 224.0.0.22 IGMP V3 Membership Report / Join group 239.255.255.250 for any sources
        6 2.051206 192.168.1.20 239.255.255.250 SSDP M-SEARCH * HTTP/1.1
        7 2.087828 192.168.1.20 192.168.255.255 NBNS Registration NB PCTABLET<00>
        8 2.837602 192.168.1.20 192.168.255.255 NBNS Registration NB PCTABLET<00>
        9 3.009361 192.168.1.20 224.0.0.22 IGMP V3 Membership Report / Join group 239.255.255.250 for any sources
        10 3.587604 192.168.1.20 192.168.255.255 NBNS Registration NB PCTABLET<00>
        11 4.013109 192.168.1.20 224.0.0.22 IGMP V3 Membership Report / Join group 224.0.0.251 for any sources
        12 4.275279 192.168.1.20 224.0.0.251 MDNS Standard query ANY PCTablet.local, QU" question"
        13 4.337465 192.168.1.20 192.168.255.255 NBNS Registration NB PCTABLET<00>
        14 4.525568 192.168.1.20 224.0.0.251 MDNS Standard query ANY PCTablet.local, QM" question"
        15 4.775078 192.168.1.20 224.0.0.251 MDNS Standard query ANY PCTablet.local, QM" question"
        16 5.00934 192.168.1.20 224.0.0.22 IGMP V3 Membership Report / Join group 224.0.0.251 for any sources
        17 5.034003 192.168.1.20 224.0.0.251 MDNS Standard query response A, cache flush 192.168.1.20 PTR, cache flush PCTablet.local
        18 5.040749 192.168.1.20 239.255.255.250 SSDP M-SEARCH * HTTP/1.1
        19 5.109695 192.168.1.20 192.168.255.255 NBNS Registration NB HOME_NETWORK<00>
        20 5.853152 192.168.1.20 192.168.255.255 NBNS Registration NB HOME_NETWORK<00>
        21 6.025051 192.168.1.20 224.0.0.251 MDNS Standard query response A, cache flush 192.168.1.20 PTR, cache flush PCTablet.local
        22 6.603146 192.168.1.20 192.168.255.255 NBNS Registration NB HOME_NETWORK<00>
        23 7.353104 192.168.1.20 192.168.255.255 NBNS Registration NB HOME_NETWORK<00>
        24 8.025058 192.168.1.20 224.0.0.251 MDNS Standard query response A, cache flush 192.168.1.20 PTR, cache flush PCTablet.local
        25 8.040625 192.168.1.20 239.255.255.250 SSDP M-SEARCH * HTTP/1.1
        26 8.103447 192.168.1.20 192.168.255.255 NBNS Registration NB PCTABLET<20>
        27 8.103739 192.168.1.20 192.168.255.255 NBNS Registration NB HOME_NETWORK<1e>
        28 8.853125 192.168.1.20 192.168.255.255 NBNS Registration NB PCTABLET<20>
        29 8.853162 192.168.1.20 192.168.255.255 NBNS Registration NB HOME_NETWORK<1e>
        30 9.603083 192.168.1.20 192.168.255.255 NBNS Registration NB PCTABLET<20>
        31 9.603116 192.168.1.20 192.168.255.255 NBNS Registration NB HOME_NETWORK<1e>
        32 10.353065 192.168.1.20 192.168.255.255 NBNS Registration NB PCTABLET<20>
        33 10.353096 192.168.1.20 192.168.255.255 NBNS Registration NB HOME_NETWORK<1e>
        34 11.104221 192.168.1.20 192.168.255.255 BROWSER Request Announcement PCTABLET
        35 11.104421 192.168.1.20 192.168.255.255 BROWSER Host Announcement PCTABLET, Workstation, Server, NT Workstation, Potential Browser
        36 12.025372 192.168.1.20 224.0.0.251 MDNS Standard query response A, cache flush 192.168.1.20 PTR, cache flush PCTablet.local
        37 12.602998 192.168.1.20 192.168.255.255 BROWSER Request Announcement PCTABLET
        38 14.102954 192.168.1.20 192.168.255.255 BROWSER Request Announcement PCTABLET
        39 15.602918 192.168.1.20 192.168.255.255 BROWSER Request Announcement PCTABLET
        40 17.102884 192.168.1.20 192.168.255.255 BROWSER Browser Election Request
        41 18.102842 192.168.1.20 192.168.255.255 BROWSER Browser Election Request
        42 19.102809 192.168.1.20 192.168.255.255 BROWSER Browser Election Request
        43 20.024666 192.168.1.20 224.0.0.251 MDNS Standard query response A, cache flush 192.168.1.20 PTR, cache flush PCTablet.local
        44 20.102721 192.168.1.20 192.168.255.255 BROWSER Browser Election Request
        45 21.102881 192.168.1.20 192.168.255.255 NBNS Registration NB HOME_NETWORK<1d>
        46 21.85269 192.168.1.20 192.168.255.255 NBNS Registration NB HOME_NETWORK<1d>
        47 22.602675 192.168.1.20 192.168.255.255 NBNS Registration NB HOME_NETWORK<1d>
        48 23.352677 192.168.1.20 192.168.255.255 NBNS Registration NB HOME_NETWORK<1d>
        49 24.102734 192.168.1.20 192.168.255.255 NBNS Registration NB <01><02>__MSBROWSE__<02><01>
        50 24.852616 192.168.1.20 192.168.255.255 NBNS Registration NB <01><02>__MSBROWSE__<02><01>
        51 25.60259 192.168.1.20 192.168.255.255 NBNS Registration NB <01><02>__MSBROWSE__<02><01>
        52 26.35257 192.168.1.20 192.168.255.255 NBNS Registration NB <01><02>__MSBROWSE__<02><01>
        53 27.102622 192.168.1.20 192.168.255.255 BROWSER Request Announcement PCTABLET
        54 27.102716 192.168.1.20 192.168.255.255 BROWSER Request Announcement PCTABLET
        55 27.103219 192.168.1.20 192.168.255.255 BROWSER Domain/Workgroup Announcement HOME_NETWORK, NT Workstation, Domain Enum
        56 31.774351 192.168.1.20 192.168.255.255 BROWSER Local Master Announcement PCTABLET, Workstation, Server, NT Workstation, Potential Browser, Master Browser
        57 36.024268 192.168.1.20 224.0.0.251 MDNS Standard query response A, cache flush 192.168.1.20 PTR, cache flush PCTablet.local

        Comment


        • #5
          Re: How can I find a MAC of hardware attached via ethernet cable?

          What type of switch is it connected to? You can probably see which MAC is on which port.
          ** Remember to give credit where credit is due and leave reputation points where appropriate **

          Comment


          • #6
            Re: How can I find a MAC of hardware attached via ethernet cable?

            If you connect it to a network with a DHCP Server then the IP and the MAC will show up under Address Leases.
            1 1 was a racehorse.
            2 2 was 1 2.
            1 1 1 1 race 1 day,
            2 2 1 1 2

            Comment


            • #7
              Re: How can I find a MAC of hardware attached via ethernet cable?

              Originally posted by Wired View Post
              What type of switch is it connected to? You can probably see which MAC is on which port.
              No switch involved - it is connected by a single ethernet cable PC -> Scanner.

              Do you think connecting to a switch is the way to go to resolve this?

              Comment


              • #8
                Re: How can I find a MAC of hardware attached via ethernet cable?

                I don't understand...
                does it still have an IP address? If so, why not just ping it and see with arp -a what mac address it uses?
                Marcel
                Technical Consultant
                Netherlands
                http://www.phetios.com
                http://blog.nessus.nl

                MCITP(EA, SA), MCSA/E 2003:Security, CCNA, SNAF, DCUCI, CCSA/E/E+ (R60), VCP4/5, NCDA, NCIE - SAN, NCIE - BR, EMCPE
                "No matter how secure, there is always the human factor."

                "Enjoy life today, tomorrow may never come."
                "If you're going through hell, keep going. ~Winston Churchill"

                Comment


                • #9
                  Re: How can I find a MAC of hardware attached via ethernet cable?

                  Originally posted by biggles77 View Post
                  If you connect it to a network with a DHCP Server then the IP and the MAC will show up under Address Leases.
                  Sounds like a plan! I will have a go this evening and see what I can find.

                  Many thanks.

                  Originally posted by Dumber View Post
                  I don't understand...
                  does it still have an IP address? If so, why not just ping it and see with arp -a what mac address it uses?
                  Again - as no router was involved I had no idea what the IP address was - it is a very odd setup...
                  Last edited by TonyG; 20th April 2011, 09:06.

                  Comment


                  • #10
                    Re: How can I find a MAC of hardware attached via ethernet cable?

                    -Regarding to the captured data, all packets seems to be from your server 192.168.1.20, no packets from the scanner. the captures should look like in my attachment, we can see very clear the source and destination MAC addresses;

                    -Regarding to the type of cable, just make sure that your Ethernet link leds indicate the connection. i don't know exactly witch kind of cable (cross-over or patch) is good.

                    Br,
                    Csaba
                    Attached Files
                    Regards,
                    Csaba Papp
                    MCSA+messaging, MCSE, CCNA
                    ...............................
                    Remember to give credit where credit is due and leave reputation points where appropriate
                    .................................

                    Comment


                    • #11
                      Re: How can I find a MAC of hardware attached via ethernet cable?

                      Originally posted by netxt View Post
                      -Regarding to the captured data, all packets seems to be from your server 192.168.1.20, no packets from the scanner. the captures should look like in my attachment, we can see very clear the source and destination MAC addresses;

                      -Regarding to the type of cable, just make sure that your Ethernet link leds indicate the connection. i don't know exactly witch kind of cable (cross-over or patch) is good.

                      Br,
                      Csaba
                      Unfortunately much about the way the scanner has been setup is non-standard, so I may need to try a few things:

                      I will try both the DHCP/router approach followed by a play with a crossover cable.

                      Fingers crossed something will provide a positive result.

                      Again sincerest thanks

                      Tony.

                      Comment


                      • #12
                        Re: How can I find a MAC of hardware attached via ethernet cable?

                        What is the make & model of the scanner. If we can find the manual it may provide some help if the above options do not work. There may also be a tool that can be installed to allow it to be configured.
                        1 1 was a racehorse.
                        2 2 was 1 2.
                        1 1 1 1 race 1 day,
                        2 2 1 1 2

                        Comment


                        • #13
                          Re: How can I find a MAC of hardware attached via ethernet cable?

                          Originally posted by biggles77 View Post
                          What is the make & model of the scanner. If we can find the manual it may provide some help if the above options do not work. There may also be a tool that can be installed to allow it to be configured.
                          It was built to order by a bunch of cowboys, so have long since gone the way of the dodo, so no documentation I'm afraid

                          Also - plugged the proprietry PCB into a DHCP router, but again, no sign of it.

                          I get the feeling that the 'ethernet' enabled PCB was setup without attention to any TCP/IP protocols - hence the need to use ARP the MAC address to give it any kind of IP presence.

                          Also tried WireShark when connected with a crossover cable, but again - knack all.

                          The fun continues.

                          Comment


                          • #14
                            Re: How can I find a MAC of hardware attached via ethernet cable?

                            I was under the (possibly false) impression that all network capable devices HAD to have the MAC address marked on them, so is a detailed physical inspection worthwhile?

                            (Mind you, I was also under the impression that MAC addresses were globally unique... until I bought a batch of cheap ethernet cards where 3 of them had the same MAC )
                            Tom Jones
                            MCT, MCSE (2000:Security & 2003), MCSA:Security & Messaging, MCDBA, MCDST, MCITP(EA, EMA, SA, EDA, ES, CS), MCTS, MCP, Sec+
                            PhD, MSc, FIAP, MIITT
                            IT Trainer / Consultant
                            Ossian Ltd
                            Scotland

                            ** Remember to give credit where credit is due and leave reputation points where appropriate **

                            Comment


                            • #15
                              Re: How can I find a MAC of hardware attached via ethernet cable?

                              Originally posted by Dr Tom
                              I was under the (possibly false) impression that all network capable devices HAD to have the MAC address marked on them
                              I have a couple of NAS devices with a gigabit NIC and nowhere on the device is the MAC address. Fortunately it came with a tool so you could provide it with an IP. This then allowed me to use ARP to find the MAC.
                              1 1 was a racehorse.
                              2 2 was 1 2.
                              1 1 1 1 race 1 day,
                              2 2 1 1 2

                              Comment

                              Working...
                              X