Questions tagged [mac-address]

A Media Access Control address (MAC address) is a unique identifier assigned to network interfaces for communications on the physical network segment.

A MAC address is a 48 bit identifier assigned to every device connected to a network. They are normally written as 6 octets displayed as hexadecimal digits, for example 08:01:27:0E:25:B8. The first 3 octets identify the manufacturer, the last 3 are to ensure that each address for that manufacturer is unique.

MAC addresses are used for numerous network technologies and most IEEE 802 network technologies, including Ethernet. Logically, MAC addresses are used in the Media Access Control protocol sub-layer of the OSI reference model.

981 questions
146
votes
12 answers

How can I programmatically get the MAC address of an iphone

How to programmatically get an iPhone's MAC address and IP address?
abc
143
votes
16 answers

How can I get the MAC and the IP address of a connected client in PHP?

I need to know the MAC and the IP address of the connect clients, how can I do this in PHP?
Neveen
  • 2,005
  • 3
  • 20
  • 22
141
votes
17 answers

Reliable method to get machine's MAC address in C#

I need a way to get a machine's MAC address, regardless of the OS it is running, by using C#. The application will need to work on XP/Vista/Win7 32bit and 64bit, as well as on those OSs but with a foreign language default. Also, many of the C#…
Chase
107
votes
6 answers

MAC addresses in JavaScript

I know that we can get the MAC address of a user via IE (ActiveX objects). Is there a way to obtain a user's MAC address using JavaScript?
Adhip Gupta
  • 6,633
  • 6
  • 31
  • 46
98
votes
13 answers

Programmatically getting the MAC of an Android device

I need to obtain the MAC address of my android device using Java. I've searched online, but I haven't found anything useful.
TSW1985
  • 1,099
  • 1
  • 10
  • 13
78
votes
12 answers

How to get MAC address of your machine using a C program?

I am working on Ubuntu. How can I get MAC address of my machine or an interface say eth0 using C program.
Bruce
  • 29,361
  • 67
  • 167
  • 252
42
votes
11 answers

Getting MAC address in Android 6.0

I'm developing an app that gets the MAC address of the device, but since Android 6.0 my code doesn't work, giving me an incorrect value. Here's my code... public String ObtenMAC() { WifiManager manager = (WifiManager)…
Mazinger
  • 633
  • 1
  • 5
  • 12
37
votes
5 answers

Setting a VM's mac address in Vagrant

The documentation lists that the mac address of a VM can be set in the Vagrantfile, however everything I add seems to end up being a syntax error. Anyone successfully done this?
gmoney
  • 1,174
  • 1
  • 9
  • 12
35
votes
13 answers

Get MAC address using shell script

Currently all the solution mentioned for getting the MAC address always use eth0. But what if instead of eth0 my interfaces start with eth1. Also on OS X the interface names are different. Also the interface eth0 may be present but is unused. i.e.…
Pratham
  • 1,182
  • 1
  • 13
  • 25
34
votes
4 answers

How to get client MAC address by a access on a website?

I have my website, and it records the number of visitors, IP and time of access... I want to identify each visitor... I think that this was possible recording IP Address... but when the IP is dynamic, my system fails. So I think that I can solve it…
richardaum
  • 5,902
  • 11
  • 42
  • 57
33
votes
3 answers

How can I get a MAC address from an HTTP request?

Can someone give me some pointers on picking up the user's MAC address from an HTTP request? The users will be from outside my network.
Richard.Gale
  • 1,757
  • 4
  • 24
  • 43
32
votes
9 answers

Get Bluetooth local mac address in Marshmallow

Pre Marshmallow my app would obtain it's device MAC address via BluetoothAdapter.getDefaultAdapter().getAddress(). Now with Marshmallow Android is returning 02:00:00:00:00:00. I saw some link(sorry not sure where now) that said you need to add the…
Eric
  • 761
  • 1
  • 5
  • 17
32
votes
7 answers

Finding original MAC address from Hardware itself

Os:REDHAT LINUX Linux manage: 2.6.18.8-1 # Is this possible to read MAC address form NIC directly ? I have below code but it just read from above layer but not the card itself !!! I'm trying to figure out how to find the original MAC address of an…
Jatin Bodarya
  • 1,245
  • 2
  • 19
  • 27
29
votes
6 answers

Getting Device ID or Mac Address in iOS

I have an application that uses rest to communicate to a server, i would like to obtain the iphones either mac address or device ID for uniqueness validation, how can this be done?
Daniel
  • 22,179
  • 9
  • 59
  • 70
26
votes
9 answers

Get MAC address on local machine with Java

I can use ip = InetAddress.getLocalHost(); NetworkInterface.getByInetAddress(ip); to obtain the mac address, but if I use this code in an offline machine it doesn't work. So, How can I get the Mac address?
Jevivre xavie
  • 293
  • 1
  • 3
  • 11
1
2 3
65 66