• 0

get remote mac address using c#


Question

9 answers to this question

Recommended Posts

  • 0
  jak0bk said:
Simple Answer: You can't.

Complex answer: You can, but you need to read the output from "arp -a" command. That might get difficult, depending on how many connections you currently have through your NIC (wireless or wired).

586598222[/snapback]

Simpler answer: yes, you can.

You can use WMI to query a remote computer for its MAC.

https://www.neowin.net/forum/index.php?showtopic=342321&st=0

  • 0

shouldn't you just be able to use the arp protocol itself to broadcast out an arp reply for getting a mac address from an ip address? i mean, that's what the protocol is there for. also there is r-arp. which gets you the ip address from the mac address.

and i'm nto talking about specific programs that come with an os. i mean the actual protocol that is part of the tcp/ip suite. you should read up on network level programming for this. i know of it, but dont know how to do it myself so i can't help you more then just to point you in the general direction....

  • 0
  nonsence said:
shouldn't you just be able to use the arp protocol itself to broadcast out an arp reply for getting a mac address from an ip address? i mean, that's what the protocol is there for. also there is r-arp. which gets you the ip address from the mac address.

and i'm nto talking about specific programs that come with an os. i mean the actual protocol that is part of the tcp/ip suite. you should read up on network level programming for this. i know of it, but dont know how to do it myself so i can't help you more then just to point you in the general direction....

586601876[/snapback]

Yes, you can do it that way, however, what if you want to store only the MAC someplace? If you shell out, you redirect the entire output to a file. With WMI, you can be more selective.

  • 0

WMI is supposed to be what Microsofts answer to SNMP is. and yes you do need certain priviledges to get information. and i think it will only work for Windows based systems that run the WMI services, which aren't installed by default.

i think if you wanna do this right, you should stick to the tcp/ip standards and figure out how to use to arp protocol to quiry remote systems. I know of packet sniffers that can do this, and programs that build a list of computers on the network, and list their info based on ip, dns/netbios and mac addess. but i dont know the programming behind how they do it.

  • 0
  nonsence said:
WMI is supposed to be what Microsofts answer to SNMP is. and yes you do need certain priviledges to get information. and i think it will only work for Windows based systems that run the WMI services, which aren't installed by default.

i think if you wanna do this right, you should stick to the tcp/ip standards and figure out how to use to arp protocol to quiry remote systems. I know of packet sniffers that can do this, and programs that build a list of computers on the network, and list their info based on ip, dns/netbios and mac addess. but i dont know the programming behind how they do it.

586603957[/snapback]

I'm pretty sure WMI is installed by default starting with 2000. It's a simple way. But, yeah, using TCP/IP would be better for a mixed environment.

Here: http://www.c-sharpcorner.com/Code/2003/Jun...cketSniffer.asp

  • 0
  weenur said:
I'm pretty sure WMI is installed by default starting with 2000. It's a simple way. But, yeah, using TCP/IP would be better for a mixed environment.

Here: http://www.c-sharpcorner.com/Code/2003/Jun...cketSniffer.asp

586605934[/snapback]

Thanks guys for all your help, but I'm looking for the c# code to get a remote mac address without using WMI.

Anyone any ideas?

This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Posts

    • Is NAD a legitimate court? Nope, it's part of the BBB. So they can allege whatever they want. Guilt is the result of being convicted by an actual recognized legitimate court. Just sayin.
    • If it's right for someone's use case, why not? For the eye watering amount of $$$ involved in acquiring 32GB of SSDs I would want more real RAID.
    • Last chance: SQL Essentials For Dummies eBook (worth $10) free download by Steven Parker FOR DUMMIES is a trademark of John Wiley & Sons, Inc. A right-to-the-point guide on all the key topics of SQL programming SQL Essentials For Dummies is your quick reference to all the core concepts of SQL—a valuable common standard language used in relational databases. This useful guide is straightforward—with no excess review, wordy explanations, or fluff—so you get what you need, fast. Great for a brush-up on the basics or as an everyday desk reference, this book is one you can rely on. Strengthen your understanding of the basics of SQL Review what you've already learned or pick up key skills Use SQL to create, manipulate, and control relational databases Jog your memory on the essentials as you work and get clear answers to your questions Perfect for supplementing classroom learning, reviewing for a certification, and staying knowledgeable on the job, SQL Essentials For Dummies is the convenient, direct, and digestible reference you've been looking for. Claim your complimentary eBook worth $10 for free, before the offer ends today, June 17. How to get it Please ensure you read the terms and conditions to claim this offer. Complete and verifiable information is required in order to receive this free offer. If you have previously made use of these free offers, you will not need to re-register. While supplies last! Download the SQL Essentials For Dummies eBook (worth $10) for free The below offers are also available for free for a limited time: Unruly: Fighting Back when Politics, AI, and Law Upend [...] ($18 Value) FREE - Expires today 6/17 SQL Essentials For Dummies ($10 Value) FREE – Expires today 6/17 Continuous Testing, Quality, Security, and Feedback ($27.99 Value) FREE – Expires 6/18 VideoProc Converter AI v7.5 for FREE (worth $78.90) – Expires 6/18 Macxvideo AI ($39.95 Value) Free for a Limited Time – Expires 6/22 Microsoft 365 Copilot At Work ($60 Value) FREE – Expires 6/25 Natural Language Processing with Python ($39.99 Value) FREE – Expires 6/25 Excel Quick and Easy ($12 Value) FREE – Expires 6/24 The Inclusion Equation: Leveraging Data & AI ($21 Value) FREE – Expires 6/24 The Ultimate Linux Newbie Guide – Featured Free content Python Notes for Professionals – Featured Free content Learn Linux in 5 Days – Featured Free content Quick Reference Guide for Cybersecurity – Featured Free content We post these because we earn commission on each lead so as not to rely solely on advertising, which many of our readers block. It all helps toward paying staff reporters, servers and hosting costs. Other ways to support Neowin The above deal not doing it for you, but still want to help? Check out the links below. Whitelist Neowin by not blocking our ads Create a free member account to see fewer ads Make a donation to support our day to day running costs Subscribe to Neowin - for $14 a year, or $28 a year for an ad-free experience Disclosure: An account at Neowin Deals is required to participate in any deals powered by our affiliate, StackCommerce. For a full description of StackCommerce's privacy guidelines, go here. Neowin benefits from shared revenue of each sale made through the branded deals site.
    • Movavi Video Editor 25.9.0 by Razvan Serea With Movavi Video Editor, you can either enhance your video files with two or three simple steps, or turn them into something completely new. Create your own movies using multiple filters, transitions, and special effects: show multiple videos on one screen with the Picture in picture effect or change the background with the Chroma Key effect, imitate the camera zoom or make your video look like an old-style movie. Adjust video parameters such as brightness, contrast and colors. Stabilize shaky footage, improve video quality and remove defects. Create video presentations, tutorials or educational videos: add titles and record your own narration to create a video with voiceover. Import video from any source: TV-tuner, webcam, camcorder, or VHS. Drop multiple media files onto a timeline and let your imagination do the rest! Features at a glance: Video and audio editing on a timeline Edit, enhance videos Add background music Apply titles and effects Image quality improvement Hollywood-worthy effects High-grade titles and fades Digitize VHS tapes, record video from TV tuners Stabilize any shaky sections Support for a wide range of formats Prepare your videos for uploading to YouTube, Facebook, Vimeo, or any other website New in Movavi Video Editor 2025: Revamped timeline for easier editing The new timeline is now clearer and more streamlined. Get your projects done faster and have more fun with anything – from short vids for socials to longer family movies. Frame-precise cuts in a click Give your videos a sharper look with the new Blade tool. Easily make precise cuts and create eye-catching montages like your favorite bloggers. Pro-quality color correction Get next-level color correction with the same simplicity. Boost colors in a snap and make more viewers fall in love with your videos. AI motion tracking Enhance reality in your videos with additional moving graphics. Just click, and AI will quickly attach any photos, videos, emojis, or memes to objects in your footage. Perfect-match overlay effects Now each overlay effect has 13 blending modes to choose from. Try each of them with the press of a button and pick the one that fits your video perfectly. Best video effects – at your fingertips Create awesome videos in any style with our huge collection of professionally designed effects. Now you can try them all right away, right in the app. Movavi Video Editor 25.9.0 changelog: New Copy effects from one clip to another in a snap. Just right-click the clip → Clip effects → Copy effects. Then right-click again to paste. Try it once, and it might just become your new favorite feature. Improvements Enjoy speedier, smoother previews – now up to 20% faster! Hover over any clip to see the difference. Especially handy when you’ve got a load of clips on the timeline. Speed up editing with new keyboard shortcuts. Ctrl + Z to undo, Ctrl + scroll to zoom the timeline. You’ll find the full list in the Help menu. Fixed issues Some under-the-hood improvements that’ll be useful for faster content creation. Download: Movavi Video Editor Plus 25.9.0 | 5.1 MB (Shareware) View: Movavi Video Editor Plus Website | Screenshot Get alerted to all of our Software updates on Twitter at @NeowinSoftware
  • Recent Achievements

    • Week One Done
      Rhydderch earned a badge
      Week One Done
    • Experienced
      dismuter went up a rank
      Experienced
    • One Month Later
      mevinyavin earned a badge
      One Month Later
    • Week One Done
      rozermack875 earned a badge
      Week One Done
    • Week One Done
      oneworldtechnologies earned a badge
      Week One Done
  • Popular Contributors

    1. 1
      +primortal
      699
    2. 2
      ATLien_0
      272
    3. 3
      Michael Scrip
      214
    4. 4
      +FloatingFatMan
      186
    5. 5
      Steven P.
      144
  • Tell a friend

    Love Neowin? Tell a friend!