---
title: Attach
url: https://docs.vultr.com/reference/vultr-cli/bare-metal/vpc2/attach
description: Attaches a bare metal server to a VPC 2.0 network to enable private network connectivity between infrastructure resources.
publish_date: 2025-09-14T03:01:27.318330Z
last_updated: 2025-11-07T17:39:18.248065Z
---

The `vultr-cli bare-metal vpc2 attach` command attaches a bare metal server to a VPC 2.0 network, enabling private network connectivity between your infrastructure resources.

## Usage

```console
$ vultr-cli bare-metal vpc2 attach <Bare Metal ID> [flags]
```

## Examples

```console
# Full example
$ vultr-cli bare-metal vpc2 attach <bareMetalID> --vpc-id="2126b7d9-5e2a-491e-8840-838aa6b5f294"
```

## Flags
| Shorthand | Long Version | Description |
|-----------|--------------|-------------|
| -i | --ip-address | the IP address to use for this server on the attached VPC 2.0 network |
| -v | --vpc-id | the ID of the VPC 2.0 network you wish to attach |