---
title: VZNATNetworkDeviceAttachment
framework: virtualization
role: symbol
role_heading: Class
path: virtualization/vznatnetworkdeviceattachment
---

# VZNATNetworkDeviceAttachment

A device that routes network requests through the host computer and performs network address translation on the resulting packets.

## Declaration

```swift
class VZNATNetworkDeviceAttachment
```

## Overview

Overview A VZNATNetworkDeviceAttachment works with the host computer to perform network address translation (NAT) on the guest system’s network packets, and then route those packets to outside networks. Use this attachment to give the guest system indirect access to external networks, instead of direct access through a shared physical network interface. To configure a network device with a NAT attachment: Create the VZNATNetworkDeviceAttachment object. Assign the attachment object to the attachment property of a VZVirtioNetworkDeviceConfiguration object. Add the VZVirtioNetworkDeviceConfiguration object to the networkDevices property of your VZVirtualMachineConfiguration. This attachment doesn’t require your app to have the com.apple.vm.networking entitlement.

## Topics

### Creating the Attachment Point

- [init()](virtualization/vznatnetworkdeviceattachment/init().md)

## Relationships

### Inherits From

- [VZNetworkDeviceAttachment](virtualization/vznetworkdeviceattachment.md)

### Conforms To

- [CVarArg](swift/cvararg.md)
- [CustomDebugStringConvertible](swift/customdebugstringconvertible.md)
- [CustomStringConvertible](swift/customstringconvertible.md)
- [Equatable](swift/equatable.md)
- [Hashable](swift/hashable.md)
- [NSObjectProtocol](objectivec/nsobjectprotocol.md)

## See Also

### Attachment points

- [VZBridgedNetworkDeviceAttachment](virtualization/vzbridgednetworkdeviceattachment.md)
- [VZFileHandleNetworkDeviceAttachment](virtualization/vzfilehandlenetworkdeviceattachment.md)
- [VZVmnetNetworkDeviceAttachment](virtualization/vzvmnetnetworkdeviceattachment.md)
- [VZNetworkDeviceAttachment](virtualization/vznetworkdeviceattachment.md)
