Creating a Net
You can create a Net to isolate your resources in a virtual network dedicated to your account.
Using Cockpit v2, you can create a Net resource only (basic version), or you can create a Net with its associated resources (Subnets, internet service, NAT service) and configure it within a same creation request.
Creating a Net Using Cockpit v2
Basic Version:
-
In the Nets dashboard, click Create Net.
The CREATE NET dialog box appears. -
Click or access the basic version at the bottom of the dialog box.
-
In the Name field, type a name for the Net.
This action adds a Name tag of 255 characters maximum. You can use any character, including accented letters.
-
In the IP range field, type the range of IPs for your Net, in CIDR notation.
-
(optional) From the VM tenancy list, select Dedicated to place the virtual machines (VMs) created in the Net on dedicated servers. For more information, see About VMs > VM Tenancy and Dedicated VMs.
-
Click Create.
The Net is created. -
(optional) To disable the network enhancement allowing VMs of a same Subnet to communicate with one another without security group rules required, add a tag to your Net with
osc.fcu.enable_lan_security_groups
as key. For more information about how to add a tag, see Adding or Removing Tags. For more information about this network enhancement, see About VPCs > Subnet Routing and Security.-
This tag must be added to your Net before creating Subnets into it.
-
The value of this tag is not taken into account, you can therefore specify any value for this tag.
-
Open the Create Net Window
In the Nets & Subnets dashboard, click Create Net.
The CREATE NET dialog box appears.
Check Available Resources
-
Check the list to see whether you have enough resources available before you start.
-
Click Start.
The Net & Subnets selection screen appears.
Configure Your Net
Type the Net IP Range, Select the Number of Subnets, and Modify their Attributes
-
Type the range of IPs for your Net and select its Subnet mask from the list.
-
Select the number of Subnets you want to create using the plus and minus buttons.
-
(optional) Modify the Subnet allocation, type a name for each Subnet, and select its Subregion.
-
The Subnet CIDR block must be part of the Net CIDR block.
-
If you create several Subnets in a Net, their CIDR blocks must not overlap.
-
-
Click Next.
The Internet Service selection screen appears.
Configure your Internet Service
Choose a Name and Direct the Internet Traffic
-
In the Internet service name field, type a name for the internet service.
This action adds a Name tag of 255 characters maximum. You can use any character, including accented letters.
-
From the list, select the Subnet where the route table will direct the network traffic.
-
Click Next.
The NAT Service selection screen appears.
Configure your NAT Service
Choose a Name and Select a Public IP
-
In the NAT service name field, type a name for the NAT service.
This action adds a Name tag of 255 characters maximum. You can use any character, including accented letters.
-
Select:
-
Select a public IP to select the public IP you want to associate with the NAT service.
-
Create a new public IP to create a new public IP and associate it with the NAT service.
-
-
Click Next.
The Subnets Connection selection screen appears.
Configure the Subnets Connection
-
Select the Subnets you want to connect to your NAT service.
Subnets will be connected indirectly to the internet through a single public IP. A route to the internet service will be created in each route table to the NAT service.
To do so, you must have created at least two Subnets in the Net & Subnets selection screen.
-
Click Next.
The Summary screen appears.
Confirm the Creation
Choose the Net Name and Review Your Settings
-
Type a name for the Net.
This action adds a Name tag of 255 characters maximum. You can use any character, including accented letters.
-
Review the settings you have specified for the Net and its associated resources.
-
Click Create.
Your Net and its associated resources are created.
Creating a Net Using OSC CLI
The CreateNet command creates a Net with a specified IP range.
The IP range (network range) of your Net must be between a /28 netmask (16 IPs) and a /16 netmask (65536 IPs).
For more information, see About Nets.
$ osc-cli api CreateNet --profile "default" \
--IpRange "10.0.0.0/16"
This command contains the following attributes that you need to specify:
-
DryRun
: (optional) If true, checks whether you have the required permissions to perform the action. -
IpRange
: The IP range for the Net, in CIDR notation (for example,10.0.0.0/16
). -
Tenancy
: (optional) The tenancy options for the VMs:-
default
if a VM created in a Net can be launched with any tenancy. -
dedicated
if it can be launched with dedicated tenancy VMs running on single-tenant hardware. -
dedicated group ID
: if it can be launched in a dedicated group on single-tenant hardware.
-
The CreateNet command returns the following elements:
-
Net
: Information about the Net.-
DhcpOptionsSetId
: The ID of the DHCP options set (ordefault
if you want to associate the default one). -
IpRange
: The IP range for the Net, in CIDR notation (for example,10.0.0.0/16
). -
NetId
: The ID of the Net. -
State
: The state of the Net (pending
|available
|deleting
). -
Tags
: One or more tags associated with the Net.-
Key
: The key of the tag, with a minimum of 1 character. -
Value
: The value of the tag, between 0 and 255 characters.
-
-
Tenancy
: The VM tenancy in a Net.
-
-
ResponseContext
: Information about the context of the response.-
RequestId
: The ID of the request.
-
{
"ResponseContext": {
"RequestId": "0475ca1e-d0c5-441d-712a-da55a4175157"
},
"Net": {
"Tags": [],
"DhcpOptionsSetId": "dopt-12345678",
"IpRange": "10.0.0.0/16",
"Tenancy": "default",
"NetId": "vpc-12345678",
"State": "available"
}
}
Creating a Net Using oapi-cli
The CreateNet command creates a Net with a specified IP range.
The IP range (network range) of your Net must be between a /28 netmask (16 IPs) and a /16 netmask (65536 IPs).
For more information, see About Nets.
$ oapi-cli --profile "default" CreateNet \
--IpRange "10.0.0.0/16"
This command contains the following attributes that you need to specify:
-
DryRun
: (optional) If true, checks whether you have the required permissions to perform the action. -
IpRange
: The IP range for the Net, in CIDR notation (for example,10.0.0.0/16
). -
Tenancy
: (optional) The tenancy options for the VMs:-
default
if a VM created in a Net can be launched with any tenancy. -
dedicated
if it can be launched with dedicated tenancy VMs running on single-tenant hardware. -
dedicated group ID
: if it can be launched in a dedicated group on single-tenant hardware.
-
The CreateNet command returns the following elements:
-
Net
: Information about the Net.-
DhcpOptionsSetId
: The ID of the DHCP options set (ordefault
if you want to associate the default one). -
IpRange
: The IP range for the Net, in CIDR notation (for example,10.0.0.0/16
). -
NetId
: The ID of the Net. -
State
: The state of the Net (pending
|available
|deleting
). -
Tags
: One or more tags associated with the Net.-
Key
: The key of the tag, with a minimum of 1 character. -
Value
: The value of the tag, between 0 and 255 characters.
-
-
Tenancy
: The VM tenancy in a Net.
-
-
ResponseContext
: Information about the context of the response.-
RequestId
: The ID of the request.
-
{
"ResponseContext": {
"RequestId": "0475ca1e-d0c5-441d-712a-da55a4175157"
},
"Net": {
"Tags": [],
"DhcpOptionsSetId": "dopt-12345678",
"IpRange": "10.0.0.0/16",
"Tenancy": "default",
"NetId": "vpc-12345678",
"State": "available"
}
}
Creating a VPC Using AWS CLI
Before you begin: Install and configure AWS CLI. For more information, see Installing and Configuring AWS CLI. |
-
To create a VPC, use the create-vpc command following this syntax:
Request sample$ aws ec2 create-vpc \ --profile YOUR_PROFILE \ --cidr-block 10.0.0.0/16 \ --instance-tenancy default \ --endpoint https://fcu.eu-west-2.outscale.com
This command contains the following attributes that you need to specify:
-
(optional)
profile
: The named profile you want to use, created when configuring AWS CLI. For more information, see Installing and Configuring AWS CLI. -
cidr-block
: The range of IPs for the VPC, in CIDR notation. -
(optional)
instance-tenancy
: The tenancy option for the instances launched into the VPC (default
|dedicated
). For more information, see About VMs > VM Tenancy and Dedicated VMs.If you do not specify any option, the tenancy option is set to
default
. -
endpoint
: The endpoint corresponding to the Region you want to send the request to. For more information, see Installing and Configuring AWS CLI.The create-vpc command returns the following elements:
-
Vpc
: Information about the newly created VPC. This element contains the following information:-
InstanceTenancy
: The tenancy option for the instances launched into the VPC. For more information, see About VMs > VM Tenancy and Dedicated VMs. -
State
: The state of the VPC. For more information, see About Nets. -
VpcId
: The ID of the VPC. -
CidrBlock
: The range of IPs for the VPC, in CIDR notation.Result sample{ "Vpc": { "InstanceTenancy": "default", "State": "available", "VpcId": "vpc-12345678", "CidrBlock": "10.0.0.0/16", } }
The VPC is created.
-
-
-
(optional) To disable the network enhancement allowing instances of a same subnet to communicate with one another without security group rules required, add a tag to your VPC with
osc.fcu.enable_lan_security_groups
as key. For more information about how to add a tag, see Adding or Removing Tags. For more information about this network enhancement, see About VPCs > Subnet Routing and Security.-
This tag must be added to your VPC before creating subnets into it.
-
The value of this tag is not taken into account, you can therefore specify any value for this tag.
-
Related Page
Corresponding API Methods
AWS™ and Amazon Web Services™ are trademarks of Amazon Technologies, Inc or its affiliates in the United States and/or other countries.