# MAC Address (MACAddressGenerator)

The [MAC Address](https://docs.tonic.ai/app/generation/generators/generator-reference/mac-address) generator generates a string that is formatted as a MAC address.

## Link object structure <a href="#generator-api-mac-address-link-object" id="generator-api-mac-address-link-object"></a>

The MAC Address generator does not support linking. It can be self-consistent, but not consistent with another column. You cannot configure differential privacy.

The `metadata` object is populated from the [`MacAddressMetadata`](https://app.tonic.ai/apidocs/index.html#/models/MacAddressMetadata) object. `bytesPreserved` specifies the number of bytes to preserve in the generated address.

```json
{
  "schema": "string",
  "table": "string",
  "column": "string",
  "path": "string",  //JSON fields only
  "dataType": "string",  //MongoDB, Amazon DynamoDB, and JSON fields only
  "metadata": {
    "presetId": "string",
    "generatorId": "MACAddressGenerator",
    "bytesPreserved": integer,
    "isConsistent": boolean,
    "encryptionProcessor": "x-on", //To use configured Structural data encryption
    "customValueProcessor": "string"  //If custom value processor applied
  }
}
```

## Example replacement <a href="#generator-api-mac-address-replacement" id="generator-api-mac-address-replacement"></a>

In the following example replacement for the MAC Address generator, the generated values preserve 4 bytes.

Consistency is disabled.

```json
{
  "name": "mac-address",
  "schema": "public"
  "table": "servers",
  "links": [
    {
      "schema": "public",
      "table": "servers",
      "column": "mac-address",
      "metadata": {
        "presetId": "MACAddressGenerator",
        "generatorId": "MACAddressGenerator",
        "bytesPreserved": 4,
        "isConsistent": false
      }
    }
  ]
}
```
