Creating a VRF
-
In the management console
, select the folder where you want to create a VRF. -
Go to BareMetal.
-
In the left-hand panel, select
VRF. -
At the top right, click Create VRF.
-
In the Name field, specify your VRF name. The naming requirements are as follows:
- It must be from 2 to 63 characters long.
- It can only contain lowercase Latin letters, numbers, and hyphens.
- It must start with a letter and cannot end with a hyphen.
-
Optionally, you can add a VRF Description.
-
Optionally, you can add labels.
-
Click Create VRF.
If you do not have the Yandex Cloud CLI installed yet, install and initialize it.
By default, the CLI uses the folder specified when creating the profile. To change the default folder, use the yc config set folder-id <folder_ID> command. You can also set a different folder for any specific command using the --folder-name or --folder-id parameter.
-
View the description of the command to create a virtual network segment (VRF):
yc baremetal vrf create --help -
Create a VRF:
yc baremetal vrf create \ --name <VRF_name> \ --description "<VRF_description>" \ --labels <key>=<value>Where:
-
--name: VRF name. Follow these naming requirements:- It must be from 2 to 63 characters long.
- It can only contain lowercase Latin letters, numbers, and hyphens.
- It must start with a letter and cannot end with a hyphen.
-
--description: VRF description. This is an optional parameter. -
--labels: VRF labels. This is an optional parameter.
-
Example
Create a virtual routing and forwarding segment with a name, description, and label:
yc baremetal vrf create \
--name demo-vrf \
--description "My first VRF" \
--labels env=test
Result:
id: ly52l2lzaq5uw********
cloud_id: b1gia87mbaom********
folder_id: b1g0ijbfaqsn********
name: demo-vrf
description: My first VRF
created_at: "2025-07-01T21:37:08.740581Z"
labels:
env: test