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.

1056 questions
157
votes
17 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,165
  • 3
  • 20
  • 22
155
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
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
124
votes
8 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
  • 7,063
  • 7
  • 34
  • 46
106
votes
14 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,179
  • 2
  • 10
  • 13
91
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
  • 33,927
  • 76
  • 174
  • 262
47
votes
14 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,522
  • 1
  • 18
  • 33
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
  • 6
  • 12
39
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,264
  • 1
  • 10
  • 12
36
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,816
  • 5
  • 28
  • 45
36
votes
7 answers

Finding original MAC address from hardware itself

Is it possible to read the MAC address from the NIC directly? I have the code below but it just reads from the layer above but not the card itself. I'm trying to figure out how to find the original MAC address of an Ethernet NIC on my Linux box. I…
Jatin Bodarya
  • 1,425
  • 2
  • 20
  • 32
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
  • 6,651
  • 12
  • 48
  • 64
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
  • 781
  • 1
  • 10
  • 18
31
votes
6 answers

Shell command for getting mac address in OS X

I have been handicapped by the GUI and always seem to ask of help when it comes to the command line. On Mac OS X only I need a command line to get the mac address of the wifi currently in use. Help!
JVMX
  • 1,016
  • 2
  • 12
  • 23
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,363
  • 9
  • 64
  • 71
1
2 3
70 71