gnt-network.rst 5.75 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
gnt-network(8) Ganeti | Version @GANETI_VERSION@
================================================

Name
----

gnt-network - Ganeti network administration

Synopsis
--------

**gnt-network** {command} [arguments...]

DESCRIPTION
-----------

Guido Trotter's avatar
Guido Trotter committed
17
The **gnt-network** command is used for network definition and
Guido Trotter's avatar
Guido Trotter committed
18 19
administration in the Ganeti system. Each instance NIC can be connected
to a network via the ``network`` NIC parameter. See **gnt-instance**\(8)
Guido Trotter's avatar
Guido Trotter committed
20
for more details.
21

22 23 24 25 26 27 28 29
BUGS
----

The ``hail`` iallocator hasn't been updated to take networks into
account in Ganeti 2.7. The only way to guarantee that it works correctly
is having your networks connected to all nodegroups. This will be fixed
in a future version.

30 31 32 33 34 35 36
COMMANDS
--------

ADD
~~~

| **add**
37
| --network=*NETWORK*
Iustin Pop's avatar
Iustin Pop committed
38 39 40 41 42
| [\--gateway=*GATEWAY*]
| [\--add-reserved-ips=*RESERVEDIPS*]
| [\--network6=*NETWORK6*]
| [\--gateway6=*GATEWAY6*]
| [\--mac-prefix=*MACPREFIX*]
43
| [\--submit] [\--print-job-id]
44
| [\--no-conflicts-check]
45 46 47 48 49 50
| {*network*}

Creates a new network with the given name. The network will be unused
initially. To connect it to a node group, use ``gnt-network connect``.
``--network`` option is mandatory. All other are optional.

51 52
The ``--network`` option allows you to specify the network in a CIDR
notation.
53

54 55
The ``--gateway`` option allows you to specify the default gateway for
this network.
56 57

IPv6 semantics can be assigned to the network via the ``--network6`` and
58 59
``--gateway6`` options. IP pool is meaningless for IPV6 so those two
values can be used for EUI64 generation from a NIC's MAC address.
60

61 62 63
The ``--no-conflicts-check`` option can be used to skip the check for
conflicting IP addresses.

Guido Trotter's avatar
Guido Trotter committed
64
Note that a when connecting a network to a node group (see below) you
Guido Trotter's avatar
Guido Trotter committed
65
can specify also the NIC mode and link that will be used by instances on
Guido Trotter's avatar
Guido Trotter committed
66 67 68 69
that group to physically connect to this network. This allows the system
to work even if the parameters (eg. the VLAN number) change between
groups.

70
See **ganeti**\(7) for a description of ``--submit`` and other common
71
options.
72 73 74 75 76

MODIFY
~~~~~~

| **modify**
Iustin Pop's avatar
Iustin Pop committed
77 78 79 80 81 82
| [\--gateway=*GATEWAY*]
| [\--add-reserved-ips=*RESERVEDIPS*]
| [\--remove-reserved-ips=*RESERVEDIPS*]
| [\--network6=*NETWORK6*]
| [\--gateway6=*GATEWAY6*]
| [\--mac-prefix=*MACPREFIX*]
83
| [\--submit] [\--print-job-id]
84 85 86 87
| {*network*}

Modifies parameters from the network.

88 89 90
Unable to modify network (IP address range). Create a new network if you
want to do so. All other options are documented in the **add** command
above.
91

92
See **ganeti**\(7) for a description of ``--submit`` and other common
93
options.
94 95 96 97

REMOVE
~~~~~~

98
| **remove** [\--submit] [\--print-job-id] {*network*}
99 100 101

Deletes the indicated network, which must be not connected to any node group.

102
See **ganeti**\(7) for a description of ``--submit`` and other common options.
103

104 105 106
LIST
~~~~

Iustin Pop's avatar
Iustin Pop committed
107
| **list** [\--no-headers] [\--separator=*SEPARATOR*] [-v]
108 109
| [-o *[+]FIELD,...*] [network...]

110 111 112
Lists all existing networks in the cluster. If no group names are given,
then all groups are included. Otherwise, only the named groups will be
listed.
113 114

The ``--no-headers`` option will skip the initial header line. The
115 116
``--separator`` option takes an argument which denotes what will be used
between the output fields. Both these options are to help scripting.
117 118

The ``-v`` option activates verbose mode, which changes the display of
119
special field states (see **ganeti**\(7)).
120

121 122 123 124 125
The ``-o`` option takes a comma-separated list of output fields. If the
value of the option starts with the character ``+``, the new fields will
be added to the default list. This allows to quickly see the default
list plus a few other fields, instead of retyping the entire list of
fields.
126 127 128

The available fields and their meaning are:

129
@QUERY_FIELDS_NETWORK@
130 131 132 133 134 135 136 137

LIST-FIELDS
~~~~~~~~~~~

**list-fields** [field...]

List available fields for networks.

138 139 140 141 142 143 144 145 146 147
INFO
~~~~

| **info** [network...]

Displays information about a given network.

CONNECT
~~~~~~~

148 149
| **connect**
| [\--no-conflicts-check]
150 151
| [{-N|\--nic-parameters} *nic-param*=*value*[,*nic-param*=*value*...]]
| {*network*} [*groups*...]
152 153

Connect a network to given node groups (all if not specified) with the
154 155
network parameters defined via the ``--nic-parameters`` option. Every
network interface will inherit those parameters if assigned to a network.
156

157 158 159
The ``--no-conflicts-check`` option can be used to skip the check for
conflicting IP addresses.

160 161 162
Passing *mode* and *link* as possitional arguments along with
*network* and *groups* is deprecated and not supported any more.

163 164 165 166 167 168 169 170 171
DISCONNECT
~~~~~~~~~~

| **disconnect** {*network*} [*groups*...]

Disconnect a network from given node groups (all if not specified). This
is possible only if no instance is using the network.


172 173
Tags
~~~~
174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200

ADD-TAGS
^^^^^^^^

**add-tags** [\--from *file*] {*networkname*} {*tag*...}

Add tags to the given network. If any of the tags contains invalid
characters, the entire operation will abort.

If the ``--from`` option is given, the list of tags will be extended
with the contents of that file (each line becomes a tag). In this case,
there is not need to pass tags on the command line (if you do, both
sources will be used). A file name of ``-`` will be interpreted as
stdin.

LIST-TAGS
^^^^^^^^^

**list-tags** {*networkname*}

List the tags of the given network.

REMOVE-TAGS
^^^^^^^^^^^

**remove-tags** [\--from *file*] {*networkname*} {*tag*...}

201 202
Remove tags from the given network. If any of the tags are not existing
on the network, the entire operation will abort.
203 204 205 206 207 208 209

If the ``--from`` option is given, the list of tags to be removed will
be extended with the contents of that file (each line becomes a tag). In
this case, there is not need to pass tags on the command line (if you
do, tags from both sources will be removed). A file name of ``-`` will
be interpreted as stdin.

210 211 212 213 214
.. vim: set textwidth=72 :
.. Local Variables:
.. mode: rst
.. fill-column: 72
.. End: