.. _Managing Virtual Networks: Managing Virtual Networks ------------------------- .. _vinfra service compute network create: vinfra service compute network create ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Create a compute network: :: usage: vinfra service compute network create [--dhcp | --no-dhcp] [--dns-nameserver ] [--allocation-pool ] [--gateway | --no-gateway] [--ip-version ] [--physical-network ] [--cidr ] ``--dhcp`` Enable DHCP ``--no-dhcp`` Disable DHCP ``--dns-nameserver `` DNS server IP address. This option can be used multiple times. ``--allocation-pool `` Allocation pool to create inside the network in the format: ``ip_addr_start-ip_addr_end``. This option can be used multiple times. ``--gateway `` Gateway IP address ``--no-gateway`` Do not configure a gateway for this network ``--ip-version `` Network IP version ``--physical-network `` A physical network to link to a public network ``--cidr `` Subnet range in CIDR notation ```` Network name Example: :: # vinfra service compute network create myprivnet --type vxlan \ --cidr 192.128.128.0/24 --gateway 192.128.128.1 +------------------+--------------------------------------+ | Field | Value | +------------------+--------------------------------------+ | id | 3848fb5d-bc98-4320-acd0-cde2df7c5bdd | | name | myprivnet | | physical_network | | | project_id | 72a5db3a033c403a86756021e601ef34 | | subnet | allocation_pools: | | | - end: 192.128.128.254 | | | start: 192.128.128.2 | | | cidr: 192.128.128.0/24 | | | dns_nameservers: [] | | | enable_dhcp: true | | | gateway_ip: 192.128.128.1 | | | ip_version: 4 | | type | vxlan | +------------------+--------------------------------------+ This command creates a private network ``myprivnet`` with the specific CIDR and gateway. .. _vinfra service compute network list: vinfra service compute network list ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ List compute networks: :: usage: vinfra service compute network list Example: :: # vinfra service compute network list -c id -c name -c cidr -c type -c allocation_pools +----------------+-----------+-------+------------------+------------------------+ | id | name | type | cidr | allocation_pools | +----------------+-----------+-------+------------------+------------------------+ | 1bf2c9da-<...> | private | vxlan | 192.168.128.0/24 | - end: 192.168.128.254 | | | | | | start: 192.168.128.2 | | 3848fb5d-<...> | myprivnet | vxlan | 192.128.128.0/24 | - end: 192.128.128.254 | | | | | | start: 192.128.128.2 | | 417606ac-<...> | public | flat | 10.94.0.0/16 | - end: 10.94.129.79 | | | | | | start: 10.94.129.64 | +----------------+-----------+-------+------------------+------------------------+ This command lists networks used in the compute cluster. (The output is abridged to fit on page.) .. _vinfra service compute network show: vinfra service compute network show ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Display compute network details: :: usage: vinfra service compute network show ```` Network ID or name Example: :: # vinfra service compute network show 417606ac-1dbe-426a-844d-e047831ddce9 +------------------+--------------------------------------+ | Field | Value | +------------------+--------------------------------------+ | allocation_pools | | | cidr | | | dns_nameservers | | | enable_dhcp | | | gateway_ip | | | id | 417606ac-1dbe-426a-844d-e047831ddce9 | | ip_version | | | name | public | | physical_network | Public | | project_id | 72a5db3a033c403a86756021e601ef34 | | type | flat | +------------------+--------------------------------------+ This command shows the details of the network with the ID ``417606ac-1dbe-426a-844d-e047831ddce9``. .. _vinfra service compute network set: vinfra service compute network set ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Modify compute network parameters: :: usage: vinfra service compute network set [--dhcp | --no-dhcp] [--dns-nameserver ] [--allocation-pool ] [--gateway | --no-gateway] [--name ] ``--dhcp`` Enable DHCP ``--no-dhcp`` Disable DHCP ``--dns-nameserver `` DNS server IP address. This option can be used multiple times. ``--allocation-pool `` Allocation pool to create inside the network in the format: ``ip_addr_start-ip_addr_end``. This option can be used multiple times. ``--gateway `` Gateway IP address ``--no-gateway`` Do not configure a gateway for this network ``--name `` A new name for the network ```` Network ID or name Example: :: # vinfra service compute network set myprivnet --no-dhcp +------------------+--------------------------------------+ | Field | Value | +------------------+--------------------------------------+ | id | 3848fb5d-bc98-4320-acd0-cde2df7c5bdd | | name | myprivnet | | physical_network | | | project_id | 72a5db3a033c403a86756021e601ef34 | | subnet | allocation_pools: | | | - end: 192.128.128.254 | | | start: 192.128.128.2 | | | cidr: 192.128.128.0/24 | | | dns_nameservers: [] | | | enable_dhcp: false | | | gateway_ip: 192.128.128.1 | | | ip_version: 4 | | type | vxlan | +------------------+--------------------------------------+ This command disables DHCP for the private network ``myprivnet``. .. _vinfra service compute network delete: vinfra service compute network delete ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Delete a compute network: :: usage: vinfra service compute network delete ```` Network ID or name Example: :: # vinfra service compute network delete myprivnet Operation successful This command deletes the private network ``myprivnet``.