<!--
{
  "availability" : [
    "macCatalyst: 13.0.0 -",
    "macOS: 26.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "vmnet",
  "identifier" : "/documentation/vmnet/vmnet_network_configuration_create(_:_:)",
  "metadataVersion" : "0.1.0",
  "role" : "Function",
  "symbol" : {
    "kind" : "Function",
    "modules" : [
      "vmnet"
    ],
    "preciseIdentifier" : "c:@F@vmnet_network_configuration_create"
  },
  "title" : "vmnet_network_configuration_create(_:_:)"
}
-->

# vmnet_network_configuration_create(_:_:)

Creates a network configuration object with the specified operating mode.

```
func vmnet_network_configuration_create(_ mode: vmnet_mode_t, _ status: UnsafeMutablePointer<vmnet_return_t>?) -> vmnet_network_configuration_ref?
```

## Parameters

`mode`

Shared mode or host-only mode.

`status`

Optional output parameter, returns status.

## Return Value

A vmnet network handle on success, otherwise `NULL`.

## Discussion

All other parameters are optional and have the following default value:

- External interface: default interface per the routing table
- NAT44: enabled
- NAT66: enabled
- DHCP: enabled
- DNS proxy: enabled
- Router advertisement: enabled
- IPv4 subnet: A /24 suffix, under 192.168/16 (the private address space defined by RFC-1918).
- IPv6 prefix: random Unique Local Addresses (ULA) prefix
- Port forwarding rule: none
- DHCP reservation: none
- MTU: 1500

Use <doc://com.apple.documentation/documentation/CoreFoundation/CFRelease> to release the network configuration object.

---

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)