<!--
{
  "availability" : [
    "macOS: 11.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "Virtualization",
  "identifier" : "/documentation/Virtualization/VZMACAddress",
  "metadataVersion" : "0.1.0",
  "role" : "Class",
  "symbol" : {
    "kind" : "Class",
    "modules" : [
      "Virtualization"
    ],
    "preciseIdentifier" : "c:objc(cs)VZMACAddress"
  },
  "title" : "VZMACAddress"
}
-->

# VZMACAddress

The media access control (MAC) address for a network interface in your virtual machine.

```
class VZMACAddress
```

## Overview

A [`VZMACAddress`](/documentation/Virtualization/VZMACAddress) object contains the hardware address of your network interface. Every network device has a unique 48-bit MAC address that the system uses to route network packets to that device.

Call the [`randomLocallyAdministered()`](/documentation/Virtualization/VZMACAddress/randomLocallyAdministered()) method to get a local MAC address suitable for use with your network interfaces. Alternatively, you can create a [`VZMACAddress`](/documentation/Virtualization/VZMACAddress) object yourself from a string or `ether_addr_t` structure.

## Topics

### Creating a MAC address

[`randomLocallyAdministered()`](/documentation/Virtualization/VZMACAddress/randomLocallyAdministered())

Returns a valid, random, locally administered, unicast MAC address.

[`init(string:)`](/documentation/Virtualization/VZMACAddress/init(string:))

Creates a MAC address object from a specially formatted string.

[`init(ethernetAddress:)`](/documentation/Virtualization/VZMACAddress/init(ethernetAddress:))

Creates a MAC address from the specified 48-bit Ethernet address.

### Getting the address

[`string`](/documentation/Virtualization/VZMACAddress/string)

The MAC address as a formatted string.

[`ethernetAddress`](/documentation/Virtualization/VZMACAddress/ethernetAddress)

The MAC address as an Ethernet data structure.

### Getting address attributes

[`isBroadcastAddress`](/documentation/Virtualization/VZMACAddress/isBroadcastAddress)

A Boolean value that indicates whether the address is a broadcast address.

[`isMulticastAddress`](/documentation/Virtualization/VZMACAddress/isMulticastAddress)

A Boolean value that indicates whether the address is a multicast address.

[`isUnicastAddress`](/documentation/Virtualization/VZMACAddress/isUnicastAddress)

A Boolean value that indicates whether the address is a unicast address.

[`isLocallyAdministeredAddress`](/documentation/Virtualization/VZMACAddress/isLocallyAdministeredAddress)

A Boolean value that indicates whether the address is a locally administered address (LAA).

[`isUniversallyAdministeredAddress`](/documentation/Virtualization/VZMACAddress/isUniversallyAdministeredAddress)

A Boolean value that indicates whether the address is a universally adminstered address (UAA).



---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)