Créer un réseau en ligne de commande : Différence entre versions
De Hopla.cloud OpenStack Documentation Wiki
(→Description des paramètres de la commande) |
(→Description des paramètres de la commande) |
||
Ligne 40 : | Ligne 40 : | ||
</syntaxhighlight> | </syntaxhighlight> | ||
− | ; --project <project> | + | ; --project <project> |
: Owner’s project (name or ID) Network version 2 only | : Owner’s project (name or ID) Network version 2 only | ||
− | ; --project-domain <project-domain> | + | ; --project-domain <project-domain> |
: Domain the project belongs to (name or ID). This can be used in case collisions between project names exist. Network version 2 only | : Domain the project belongs to (name or ID). This can be used in case collisions between project names exist. Network version 2 only | ||
− | ; --enable<code class="descclassname"> <project></code> | + | ; --enable<code class="descclassname"> <project></code> |
: Enable network (default) Network version 2 only | : Enable network (default) Network version 2 only | ||
− | ; --disable<code class="descclassname"> <project></code> | + | ; --disable<code class="descclassname"> <project></code> |
: Disable network Network version 2 only | : Disable network Network version 2 only | ||
− | ; --share<code class="descclassname"> <project></code> | + | ; --share<code class="descclassname"> <project></code> |
: Share the network between projects | : Share the network between projects | ||
− | ; --no-share<code class="descclassname"> <project></code> | + | ; --no-share<code class="descclassname"> <project></code> |
: Do not share the network between projects | : Do not share the network between projects | ||
− | ; --description <description> | + | ; --description <description> |
: Set network description Network version 2 only | : Set network description Network version 2 only | ||
− | ; --mtu <mtu> | + | ; --mtu <mtu> |
: Set network mtu Network version 2 only | : Set network mtu Network version 2 only | ||
− | ; --availability-zone-hint <availability-zone> | + | ; --availability-zone-hint <availability-zone> |
: Availability Zone in which to create this network (Network Availability Zone extension required, repeat option to set multiple availability zones) Network version 2 only | : Availability Zone in which to create this network (Network Availability Zone extension required, repeat option to set multiple availability zones) Network version 2 only | ||
− | ; --enable-port-security<code class="descclassname"> <project></code> | + | ; --enable-port-security<code class="descclassname"> <project></code> |
: Enable port security by default for ports created on this network (default) Network version 2 only | : Enable port security by default for ports created on this network (default) Network version 2 only | ||
− | ; --disable-port-security<code class="descclassname"> <project></code> | + | ; --disable-port-security<code class="descclassname"> <project></code> |
: Disable port security by default for ports created on this network Network version 2 only | : Disable port security by default for ports created on this network Network version 2 only | ||
; --subnet <subnet>¶ | ; --subnet <subnet>¶ | ||
: IPv4 subnet for fixed IPs (in CIDR notation) Compute version 2 only | : IPv4 subnet for fixed IPs (in CIDR notation) Compute version 2 only | ||
− | ; --external<code class="descclassname"> <project></code> | + | ; --external<code class="descclassname"> <project></code> |
: Set this network as an external network (external-net extension required) Network version 2 only | : Set this network as an external network (external-net extension required) Network version 2 only | ||
− | ; --internal<code class="descclassname"> <project></code> | + | ; --internal<code class="descclassname"> <project></code> |
: Set this network as an internal network (default) Network version 2 only | : Set this network as an internal network (default) Network version 2 only | ||
− | ; --default<code class="descclassname"> <project></code> | + | ; --default<code class="descclassname"> <project></code> |
: Specify if this network should be used as the default external network Network version 2 only | : Specify if this network should be used as the default external network Network version 2 only | ||
− | ; --no-default<code class="descclassname"> <project></code> | + | ; --no-default<code class="descclassname"> <project></code> |
: Do not use the network as the default external network (default) Network version 2 only | : Do not use the network as the default external network (default) Network version 2 only | ||
− | ; --provider-network-type <provider-network-type> | + | ; --provider-network-type <provider-network-type> |
: The physical mechanism by which the virtual network is implemented. The supported options are: flat, geneve, gre, local, vlan, vxlan. Network version 2 only | : The physical mechanism by which the virtual network is implemented. The supported options are: flat, geneve, gre, local, vlan, vxlan. Network version 2 only | ||
− | ; --provider-physical-network <provider-physical-network> | + | ; --provider-physical-network <provider-physical-network> |
: Name of the physical network over which the virtual network is implemented Network version 2 only | : Name of the physical network over which the virtual network is implemented Network version 2 only | ||
− | ; --provider-segment <provider-segment> | + | ; --provider-segment <provider-segment> |
: VLAN ID for VLAN networks or Tunnel ID for GENEVE/GRE/VXLAN networks Network version 2 only | : VLAN ID for VLAN networks or Tunnel ID for GENEVE/GRE/VXLAN networks Network version 2 only | ||
− | ; --qos-policy <qos-policy> | + | ; --qos-policy <qos-policy> |
: QoS policy to attach to this network (name or ID) Network version 2 only | : QoS policy to attach to this network (name or ID) Network version 2 only | ||
− | ; --transparent-vlan<code class="descclassname"> <project></code> | + | ; --transparent-vlan<code class="descclassname"> <project></code> |
: Make the network VLAN transparent Network version 2 only | : Make the network VLAN transparent Network version 2 only | ||
− | ; --no-transparent-vlan<code class="descclassname"> <project></code> | + | ; --no-transparent-vlan<code class="descclassname"> <project></code> |
: Do not make the network VLAN transparent Network version 2 only | : Do not make the network VLAN transparent Network version 2 only | ||
− | ; --tag <tag> | + | ; --tag <tag> |
: Tag to be added to the network (repeat option to set multiple tags) Network version 2 only | : Tag to be added to the network (repeat option to set multiple tags) Network version 2 only | ||
− | ; --no-tag<code class="descclassname"> <project></code> | + | ; --no-tag<code class="descclassname"> <project></code> |
: No tags associated with the network Network version 2 only | : No tags associated with the network Network version 2 only | ||
; <name> | ; <name> |
Version du 14 août 2019 à 13:17
Sommaire
Prérequis
Créer un réseau
Les commandes suivantes sont exécutées à partir du client Openstack et l'extension octavia en ligne de commande
Pour créer un réseau, utiliser la commande suivante :
openstack network create Reseau-1
Pour ajouter un sous-réseau au Reseau-1 utiliser la commande suivante :
Par défaut, le DHCP sera activé et le pool d'allocation sera de x.2 à x.254. L'adresse x.1 est réservée pour la passerelle.
openstack subnet create --network Reseau-1 --subnet-range 192.168.0.0/24 S-Reseau-1
openstack subnet set --dns-nameserver 8.8.8.8 S-Reseau-1
Description des paramètres de la commande
openstack network create
[--project <project> [--project-domain <project-domain>]]
[--enable | --disable]
[--share | --no-share]
[--description <description>]
[--mtu <mtu>]
[--availability-zone-hint <availability-zone>]
[--enable-port-security | --disable-port-security]
[--external [--default | --no-default] | --internal]
[--provider-network-type <provider-network-type>]
[--provider-physical-network <provider-physical-network>]
[--provider-segment <provider-segment>]
[--qos-policy <qos-policy>]
[--transparent-vlan | --no-transparent-vlan]
[--tag <tag> | --no-tag]
<name>
- --project <project>
- Owner’s project (name or ID) Network version 2 only
- --project-domain <project-domain>
- Domain the project belongs to (name or ID). This can be used in case collisions between project names exist. Network version 2 only
- --enable
<project>
- Enable network (default) Network version 2 only
- --disable
<project>
- Disable network Network version 2 only
- --share
<project>
- Share the network between projects
- --no-share
<project>
- Do not share the network between projects
- --description <description>
- Set network description Network version 2 only
- --mtu <mtu>
- Set network mtu Network version 2 only
- --availability-zone-hint <availability-zone>
- Availability Zone in which to create this network (Network Availability Zone extension required, repeat option to set multiple availability zones) Network version 2 only
- --enable-port-security
<project>
- Enable port security by default for ports created on this network (default) Network version 2 only
- --disable-port-security
<project>
- Disable port security by default for ports created on this network Network version 2 only
- --subnet <subnet>¶
- IPv4 subnet for fixed IPs (in CIDR notation) Compute version 2 only
- --external
<project>
- Set this network as an external network (external-net extension required) Network version 2 only
- --internal
<project>
- Set this network as an internal network (default) Network version 2 only
- --default
<project>
- Specify if this network should be used as the default external network Network version 2 only
- --no-default
<project>
- Do not use the network as the default external network (default) Network version 2 only
- --provider-network-type <provider-network-type>
- The physical mechanism by which the virtual network is implemented. The supported options are: flat, geneve, gre, local, vlan, vxlan. Network version 2 only
- --provider-physical-network <provider-physical-network>
- Name of the physical network over which the virtual network is implemented Network version 2 only
- --provider-segment <provider-segment>
- VLAN ID for VLAN networks or Tunnel ID for GENEVE/GRE/VXLAN networks Network version 2 only
- --qos-policy <qos-policy>
- QoS policy to attach to this network (name or ID) Network version 2 only
- --transparent-vlan
<project>
- Make the network VLAN transparent Network version 2 only
- --no-transparent-vlan
<project>
- Do not make the network VLAN transparent Network version 2 only
- --tag <tag>
- Tag to be added to the network (repeat option to set multiple tags) Network version 2 only
- --no-tag
<project>
- No tags associated with the network Network version 2 only
- <name>
- New network name