Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9043053
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T10:39:22+00:00 2026-06-16T10:39:22+00:00

Possible Duplicate: Query ARP cache to get MAC ID I need to get the

  • 0

Possible Duplicate:
Query ARP cache to get MAC ID

I need to get the mac addresses of all the remote machines connected to my home network. i can read the mac address of my own machine using this code below but i don’t know how to get the mac addresses of other machines on my network. or is it possible or not.

import java.net.InetAddress;
import java.net.NetworkInterface;
class Test {
public static void main(String[] args) throws Exception {
InetAddress address = InetAddress.getLocalHost();

NetworkInterface ni = NetworkInterface.getByInetAddress(address);
byte[] mac = ni.getHardwareAddress();

for (int i = 0; i < mac.length; i++) {
  System.out.format("%02X%s", mac[i], (i < mac.length - 1) ? "-" : "");
}
}
}  

output (MyComputer’s 6byte mac address)
30-60-77-12-cd-99

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-16T10:39:23+00:00Added an answer on June 16, 2026 at 10:39 am

    How to get remote machines mac addresses

    You cannot do that – not in the general case. MAC addresses are only available for machines in the same physical network segment. Those machines communicate directly with each other using the ARP protocol to “translate” IP addresses to physical (MAC) addresses.

    As soon as an IP router or any other Layer-3 device is crossed, any MAC information is generally lost.

    Bottom line: you cannot get the MAC address of a remote node over the Internet – you cannot even do that in any moderately sized private network, as implemented in e.g. most medium to large companies.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Possible Duplicate: Mysql single query join 3 table and get all the results Hi
Possible Duplicate: Get query string values in JavaScript I need a function to read
Possible Duplicate: Need a sequence number for every row in MySQL query So I
Possible Duplicate: Mysql query: retrieve current date query I need a MySQL query that
Possible Duplicate: Query to get records based on Radius in SQLite? I am using
Possible Duplicate: Get query string values in JavaScript I had this pattern but it
Possible Duplicate: Get query string values in JavaScript I have a URL like below
Possible Duplicate: How can I get query string values? Lets say, we have a
Possible Duplicate: Need help in dynamic query with IN Clause I am using SQL
Possible Duplicate: Get individual query parameters from Uri I have got a URL like

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.