gnt-network.rst 5.31 KB
Newer Older
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
gnt-network(8) Ganeti | Version @GANETI_VERSION@
================================================

Name
----

gnt-network - Ganeti network administration

Synopsis
--------

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

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

The **gnt-network** command is used for network definition administration
in the Ganeti system.

COMMANDS
--------

ADD
~~~

| **add**
| [--network=*NETWORK*]
| [--gateway=*GATEWAY*]
| [--add-reserved-ips=*RESERVEDIPS*]
| [--network6=*NETWORK6*]
| [--gateway6=*GATEWAY6*]
| [--mac-prefix=*MACPREFIX*]
| [--network-type=*NETWORKTYPE*]
| {*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.

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

The ``--gateway`` option allows you to specify the default gateway for this
network.

The ``--network-type`` can be none, private or public.

IPv6 semantics can be assigned to the network via the ``--network6`` and
``--gateway6`` options. IP pool is meaningless for ipv6 so those two values
can be used for EUI64 generation from a NIC's mac value.

MODIFY
~~~~~~

| **modify**
| [--gateway=*GATEWAY*]
| [--add-reserved-ips=*RESERVEDIPS*]
| [--remove-reserved-ips=*RESERVEDIPS*]
| [--network6=*NETWORK6*]
| [--gateway6=*GATEWAY6*]
| [--mac-prefix=*MACPREFIX*]
| [--network-type=*NETWORKTYPE*]
| {*network*}

Modifies parameters from the network.

Unable to modify network (ip range). Create a new network if you want to do
so. All other options are documented in the **add** command above.

REMOVE
~~~~~~

| **remove** {*network*}

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

LIST
~~~~

| **list** [--no-headers] [--separator=*SEPARATOR*] [-v]
| [-o *[+]FIELD,...*] [network...]

Lists all existing networks in the cluster.

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

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

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.

The available fields and their meaning are:

name
    the group name

group_count
    the number of nodegroups connected to the network

group_list
    the list of nodegroups connected to the network

inst_cnt
    the number of instances use the network

inst_list
    the list of instances that at least one of their NICs is assigned
    to the network

external_reservations
    the IPs that cannot be assigned to an instance

free_count
    how many IPs have left in the pool

gateway
    the networks gateway

map
    a nice text depiction of the available/reserved IPs in the network

reserved_count
    how many IPs have been reserved so far in the network

network6
    the ipv6 prefix of the network

gateway6
    the ipv6 gateway of the network

mac_prefix
    the mac_prefix of the network (if a NIC is assigned to the network it
    it gets the mac_prefix of the network)

network_type
    the type of the network (public, private)

If no group names are given, then all groups are included. Otherwise,
only the named groups will be listed.

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

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

List available fields for networks.

RENAME
~~~~~~

| **rename** {*oldname*} {*newname*}

Renames a given network from *oldname* to *newname*. NOT implemeted yet

161 162 163 164 165 166 167 168 169 170 171 172 173 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
TAGS
~~~

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*...}

Remove tags from the given network. If any of the tags are not
existing on the network, the entire operation will abort.

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.


200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220
INFO
~~~~

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

Displays information about a given network.

CONNECT
~~~~~~~
| **connect** {*network*} {*group*} {*mode*} {*link*}

Connect a network to a given nodegroup with the netparams (*mode*, *link*).
Every nic will inherit those netparams if assigned in a network.
*group* can be ``all`` if you want to connect to all existing nodegroups

DISCONNECT
~~~~~~~~~~
| **disconnect** {*network*} {*group*}

Disconnect a network to a nodegroup. This is possible only if no instance
is using the network.