이 콘텐츠는 선택한 언어로 제공되지 않습니다.

2.394. openstack subnet create


usage: openstack subnet create [-h] [-f {json,shell,table,value,yaml}]
                               [-c COLUMN] [--max-width <integer>]
                               [--noindent] [--prefix PREFIX]
                               [--project <project>]
                               [--project-domain <project-domain>]
                               [--subnet-pool <subnet-pool> | --use-default-subnet-pool]
                               [--prefix-length <prefix-length>]
                               [--subnet-range <subnet-range>]
                               [--dhcp | --no-dhcp] [--gateway <gateway>]
                               [--ip-version {4,6}]
                               [--ipv6-ra-mode {dhcpv6-stateful,dhcpv6-stateless,slaac}]
                               [--ipv6-address-mode {dhcpv6-stateful,dhcpv6-stateless,slaac}]
                               --network <network>
                               [--allocation-pool start=<ip-address>,end=<ip-address>]
                               [--dns-nameserver <dns-nameserver>]
                               [--host-route destination=<subnet>,gateway=<ip-address>]
                               name
Create a subnet

Positional arguments

name


        New subnet name

Optional arguments

-h, --help


        show this help message and exit

--project <project>


        Owner's project (name or ID)

--project-domain <project-domain>


      Domain the project belongs to (name or ID). This can
      be used in case collisions between project names
      exist.

--subnet-pool <subnet-pool>


      Subnet pool from which this subnet will obtain a CIDR
      (Name or ID)

--use-default-subnet-pool


      Use default subnet pool for --ip-version

--prefix-length <prefix-length>


      Prefix length for subnet allocation from subnet pool

--subnet-range <subnet-range>


      Subnet range in CIDR notation (required if --subnet-
      pool is not specified, optional otherwise)

--dhcp


        Enable DHCP (default)

--no-dhcp


        Disable DHCP

--gateway <gateway>


        Specify a gateway for the subnet. The three options
      are: <ip-address>: Specific IP address to use as the
      gateway, 'auto': Gateway address should automatically
      be chosen from within the subnet itself, 'none': This
      subnet will not use a gateway, e.g.: --gateway
      192.168.9.1, --gateway auto, --gateway none (default
      is 'auto').

--ip-version {4,6} IP


        version (default is 4). Note that when subnet pool
      is specified, IP version is determined from the subnet
      pool and this option is ignored.

--ipv6-ra-mode {dhcpv6-stateful,dhcpv6-stateless,slaac}


      IPv6 RA (Router Advertisement) mode, valid modes:
      [dhcpv6-stateful, dhcpv6-stateless, slaac]

--ipv6-address-mode {dhcpv6-stateful,dhcpv6-stateless,slaac}


      IPv6 address mode, valid modes: [dhcpv6-stateful,
      dhcpv6-stateless, slaac]

--network <network>


        Network this subnet belongs to (name or ID)

--allocation-pool


        start=<ip-address>,end=<ip-address>
      Allocation pool IP addresses for this subnet e.g.:
      start=192.168.199.2,end=192.168.199.254 (repeat option
      to add multiple IP addresses)

--dns-nameserver <dns-nameserver>


      DNS server for this subnet (repeat option to set
      multiple DNS servers)

--host-route


        destination=<subnet>,gateway=<ip-address>
      Additional route for this subnet e.g.:
      destination=10.10.0.0/16,gateway=192.168.71.254
      destination: destination subnet (in CIDR notation)
      gateway: nexthop IP address (repeat option to add
      multiple routes)

Red Hat logoGithubRedditYoutubeTwitter

자세한 정보

평가판, 구매 및 판매

커뮤니티

Red Hat 소개

Red Hat은 기업이 핵심 데이터 센터에서 네트워크 에지에 이르기까지 플랫폼과 환경 전반에서 더 쉽게 작업할 수 있도록 강화된 솔루션을 제공합니다.

보다 포괄적 수용을 위한 오픈 소스 용어 교체

Red Hat은 코드, 문서, 웹 속성에서 문제가 있는 언어를 교체하기 위해 최선을 다하고 있습니다. 자세한 내용은 다음을 참조하세요.Red Hat 블로그.

Red Hat 문서 정보

Legal Notice

Theme

© 2026 Red Hat
맨 위로 이동