summaryrefslogtreecommitdiff
path: root/doc/source/command-objects/subnet.rst
blob: 56a28d737d2d6fa9c42691eac0676e887a570079 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
======
subnet
======

Network v2

subnet delete
-------------

Delete a subnet

.. program:: subnet delete
.. code:: bash

    os subnet delete
        <subnet>

.. _subnet_delete-subnet:
.. describe:: <subnet>

    Subnet to delete (name or ID)

subnet create
--------------

Create new subnet

.. program:: subnet create
.. code:: bash

    os subnet create
        [--project <project> [--project-domain <project-domain>]]
        [--subnet-pool <subnet-pool> | --use-default-subnet-pool [--prefix-length <prefix-length>]]
        [--subnet-range <subnet-range>]
        [--allocation-pool start=<ip-address>,end=<ip-address>]
        [--dhcp | --no-dhcp]
        [--dns-nameserver <dns-nameserver>]
        [--gateway <gateway>]
        [--host-route destination=<subnet>,gateway=<ip-address>]
        [--ip-version {4,6}]
        [--ipv6-ra-mode {dhcpv6-stateful,dhcpv6-stateless,slaac}]
        [--ipv6-address-mode {dhcpv6-stateful,dhcpv6-stateless,slaac}]
        --network <network>
        <name>

.. option:: --project <project>

    Owner's project (name or ID)

.. option:: --project-domain <project-domain>

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

.. option:: --subnet-pool <subnet-pool>

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

.. option:: --use-default-subnet-pool

    Use default subnet pool for --ip-version

.. option:: --prefix-length <prefix-length>

    Prefix length for subnet allocation from subnet pool

.. option:: --subnet-range <subnet-range>

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

.. option:: --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 (This option can be repeated)

.. option:: --dhcp

     Enable DHCP (default)

.. option:: --no-dhcp

     Disable DHCP

.. option:: --dns-nameserver <dns-nameserver>

     DNS name server for this subnet (This option can be repeated)

.. option:: --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')

.. option:: --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
         (This option can be repeated)

.. option:: --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.

.. option:: --ipv6-ra-mode {dhcpv6-stateful,dhcpv6-stateless,slaac}

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

.. option:: --ipv6-address-mode {dhcpv6-stateful,dhcpv6-stateless,slaac}

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

.. option:: --network <network>

     Network this subnet belongs to (name or ID)

.. _subnet_create-name:
.. describe:: <name>

     Name of subnet to create

subnet list
-----------

List subnets

.. program:: subnet list
.. code:: bash

    os subnet list
        [--long]

.. option:: --long

    List additional fields in output

subnet show
-----------

Show subnet details

.. program:: subnet show
.. code:: bash

    os subnet show
        <subnet>

.. _subnet_show-subnet:
.. describe:: <subnet>

    Subnet to show (name or ID)