Creating a Net

You can create a Net to isolate your resources in a virtual network dedicated to your account.

Creating a Net Using Cockpit v2

  1. In the Nets dashboard, click IconAddFull Create Net.
    The CREATE NET dialog box appears.

  2. 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.

  3. In the IP range field, type the range of IPs for your Net, in CIDR notation.

  4. (optional) Check the Dedicated box to place the virtual machines (VMs) launched in the Net on dedicated servers. For more information, see About Instances > Instance Tenancy and Dedicated Instances.

  5. Click Create Net.
    The Net is created.

  6. (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.

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.

Request sample
$ 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.

  • ResponseContext: Information about the context of the response.

Result sample
{
  "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

  1. 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 Instances > Instance Tenancy.

      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.

      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 Instances > Instance Tenancy.

      • 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.

  2. (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.