|
| 1 | +--- |
| 2 | +meta: |
| 3 | + title: How to use Private Networks with your Mac mini |
| 4 | + description: Learn how to get the most from the Private Networks 1Gbps feature for your Mac mini. Find out how to activate the feature, attach your Mac mini to Private Networks, and enable secure communication with your other Scaleway resources. |
| 5 | +content: |
| 6 | + h1: How to use Private Networks with your Mac mini |
| 7 | + paragraph: Learn how to get the most from the Private Networks 1Gbps feature for your Mac mini. Find out how to activate the feature, attach your Mac mini to Private Networks, and enable secure communication with your other Scaleway resources. |
| 8 | +tags: mac-mini mac-mini apple-silicon private-network vpc |
| 9 | +dates: |
| 10 | + validation: 2025-01-28 |
| 11 | + posted: 2021-05-26 |
| 12 | +categories: |
| 13 | + - bare-metal |
| 14 | +--- |
| 15 | + |
| 16 | +Private Networks allow your Mac mini to communicate in an isolated and secure network with other Scaleway resources. This is an optional-billed feature for Mac mini. |
| 17 | + |
| 18 | +When the feature is activated, each Mac mini can be connected to one or several Private Networks, letting you build your own network topologies. Private Networks’ built-in DHCP server manages the allocation of private IP addresses for Mac mini servers (and other resources) when they are attached to the network. |
| 19 | + |
| 20 | +For full information about Scaleway Private Networks and VPC, see our [dedicated documentation](/vpc/) and [best practice guide](/vpc/reference-content/getting-most-private-networks/). |
| 21 | + |
| 22 | +<Macro id="requirements" /> |
| 23 | + |
| 24 | +- A Scaleway account logged into the [console](https://console.scaleway.com) |
| 25 | +- [Owner](/iam/concepts/#owner) status or [IAM permissions](/iam/concepts/#permission) allowing you to perform actions in the intended Organization |
| 26 | +- A [Mac mini](/apple-silicon/how-to/create-mac-mini/) |
| 27 | + |
| 28 | +## How to enable the Private Networks feature |
| 29 | + |
| 30 | +Before you can attach your Mac mini to a Private Network, you must enable the feature. This can be done during [Mac mini creation](/apple-silicon/how-to/create-mac-mini/) or afterwards. These instructions show how to enable the feature after the creation of the Mac mini. |
| 31 | + |
| 32 | +1. Click **Apple silicon** in the **Bare Metal** section of the side menu. The Apple silicon splash page displays. |
| 33 | +2. Click the Mac mini you want to enable Private Networks on. The Mac mini's **Overview** page displays. |
| 34 | +3. In the **Private Networks feature** panel, use the <Icon name="toggle" /> toggle button to enable the feature. |
| 35 | + A pop-up displays, asking you to confirm that you want to enable Private Networks, and showing the estimated cost. |
| 36 | +4. Click **Enable Private Networks**. |
| 37 | + |
| 38 | +Private Networks are enabled, and you are returned to your Mac mini's **Overview** page. |
| 39 | + |
| 40 | +<Message type = "tip"> |
| 41 | +When the feature is activated, you can attach your Mac mini to up to 8 different Private Networks. You are charged the same overall price for the feature, you are not billed per Private Network. |
| 42 | +</Message> |
| 43 | + |
| 44 | +## How to disable the Private Networks feature |
| 45 | + |
| 46 | +You can disable the Private Networks feature at any time after activating it. |
| 47 | + |
| 48 | +1. Click **Apple silicon** in the **Bare Metal** section of the side menu. The Apple silicon splash page displays. |
| 49 | +2. Click the Mac mini you want to disable Private Networks on. The Mac mini's **Overview** page displays. |
| 50 | +3. In the **Private Networks feature** panel, use the <Icon name="toggle" /> toggle button to disable the feature. |
| 51 | + A pop-up displays, asking you to confirm that you want to disable Private Networks. |
| 52 | +4. Click **Disable Private Networks**. |
| 53 | + |
| 54 | +Private Networks are disabled, and you are returned to your Mac mini's **Overview** page. Any Private Networks previously attached to the Mac mini are now detached. |
| 55 | + |
| 56 | +## How to attach a Mac mini to a Private Network |
| 57 | + |
| 58 | +1. Click **Apple silicon** in the **Bare Metal** section of the side menu. The Apple silicon splash page displays. |
| 59 | +2. Click the Mac mini you want to attach to a Private Network. The Mac mini's **Overview** page displays. |
| 60 | +3. Click the **Private Networks** tab. |
| 61 | +4. Click **+ Attach to a Private Network**. A pop-up displays. |
| 62 | +5. Select the Private Network you want to attach the Mac mini to. It will be automatically assigned private IPv4 and IPv6 addresses on this network. The ability to use specific reserved IP addresses for the attachment is planned for the future. |
| 63 | +6. Click **Attach to Private Network**. |
| 64 | + |
| 65 | +The Mac mini is attached to the Private Network, and you are returned to the **Private Networks** tab. The IPv4 and the IPv6 addresses for the Mac mini on the Private Network are displayed, along with the ID of the VLAN interface that was created. |
| 66 | + |
| 67 | +Once you have attached the resource, some manual configuration of the network interface is required. See the next section for full details. |
| 68 | + |
| 69 | +## How to configure the VLAN interface on your Mac mini for Private Networks |
| 70 | + |
| 71 | +You must configure the virtual network interface on each Mac mini you have attached to a Private Network. Traffic from the public internet and traffic from a Private Network will pass through the same network interface of the Mac mini. We must therefore separate the traffic by adding a VLAN interface. |
| 72 | + |
| 73 | +To configure the interface, you must connect to your Mac mini, either via SSH or the remote desktop and carry out the instructions given. |
| 74 | + |
| 75 | +### Via SSH and networksetup |
| 76 | + |
| 77 | +1. Make a note of your Mac mini's **VLAN ID**. You can view this in the Scaleway console, in the **Private Networks** tab of the Mac mini in question. |
| 78 | +2. [Connect to your Mac mini via SSH](/apple-silicon/how-to/connect-to-mac-mini-ssh/). |
| 79 | +3. Use the following command to bring up the interface. Ensure you replace `<VLAN_ID>` with the VLAN_ID from step one. |
| 80 | + ``` |
| 81 | + sudo networksetup -createVLAN pn en0 <VLAN_ID> |
| 82 | + ``` |
| 83 | +4. Check that the interface has been brought up with the following command: |
| 84 | + ``` |
| 85 | + sudo networksetup -listVLANs |
| 86 | + ``` |
| 87 | + You should see a response similar to the following: |
| 88 | + ``` |
| 89 | + VLAN User Defined Name: pn |
| 90 | + Parent Device: en0 |
| 91 | + Device ("Hardware" Port): vlan0 |
| 92 | + Tag: 3548 |
| 93 | + ``` |
| 94 | + |
| 95 | +No configuration is required for your Mac mini's IP address on the Private Network, as this is automatically managed by Scaleway DHCP. You can view the IP address in the Scaleway console, in the Mac mini's **Private Networks** tab. |
| 96 | + |
| 97 | +<Message type="tip"> |
| 98 | + If you have any issues with bringing up the VLAN interface or the IP address, the following commands may be helpful. |
| 99 | + |
| 100 | + To delete the VLAN, so you can attempt re-creation; |
| 101 | + ``` |
| 102 | + sudo networksetup -deleteVLAN pn en0 <VLAN_ID> |
| 103 | + ``` |
| 104 | + To renew the DHCP lease: |
| 105 | + ``` |
| 106 | + sudo ipconfig set en0 BOOTP && sudo ipconfig set en0 DHCP |
| 107 | + ``` |
| 108 | +</Message> |
| 109 | + |
| 110 | +### Via remote desktop |
| 111 | + |
| 112 | +1. Make a note of your Mac mini's **VLAN ID**. You can view this in the Scaleway console, in the **Private Networks** tab of the Mac mini in question. |
| 113 | +2. [Access the Mac mini's remote desktop](/apple-silicon/how-to/access-remote-desktop-mac-mini/). |
| 114 | +3. Go to **System Settings** > **Network**, then click **...v** and select **Manage Virtual Interfaces** from the menu that displays. |
| 115 | + <Lightbox src="scaleway-m1-network.webp" /> |
| 116 | +4. Click **+** > **New VLAN** to add a new virtual interface. |
| 117 | + <Lightbox src="scaleway-m1-vlan.webp" /> |
| 118 | +5. Enter a **VLAN name** of your choice, the VLAN ID from step 1 in the **Tag** field, and **Ethernet** as the interface. Click **Done**. |
| 119 | + |
| 120 | +The VLAN interface is created. You can check its status in the **Network** tab, and see its full details by clicking on it. |
| 121 | + |
| 122 | + <Lightbox src="scaleway-m1-vlan-details.webp" /> |
| 123 | + |
| 124 | +No configuration is required for your Mac mini's IP address on the Private Network, as this is automatically managed by Scaleway DHCP. |
| 125 | + |
| 126 | +## How to detach a Mac mini from a Private Network |
| 127 | + |
| 128 | +1. Click **Apple silicon** in the **Bare Metal** section of the side menu. The Apple silicon splash page displays. |
| 129 | +2. Click the Mac mini you want to detach from a Private Network. The Mac mini's **Overview** page displays. |
| 130 | +3. Click the **Private Networks** tab. |
| 131 | +4. Click the unlink icon <Icon name="unlink" /> next to the Private Network you want to detach from the Mac mini. |
| 132 | + A pop-up displays, asking you to confirm that you want to detach the resource. |
| 133 | +5. Click **Detach resource**. |
| 134 | + |
| 135 | +The Mac mini is detached from the Private Network, and you are returned to the **Private Networks** tab. You can reattach it at any time. |
0 commit comments