Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- root@control03:~# quantum net-create public --router:external=True
- Created a new network:
- +---------------------------+--------------------------------------+
- | Field | Value |
- +---------------------------+--------------------------------------+
- | admin_state_up | True |
- | id | ef3f8ef2-c99b-44d4-b4a1-cc6298f40648 |
- | name | public |
- | provider:network_type | gre |
- | provider:physical_network | |
- | provider:segmentation_id | 1 |
- | router:external | True |
- | shared | False |
- | status | ACTIVE |
- | subnets | |
- | tenant_id | 2fbf0d3f6b914b5e8eb4605355cf2c9b |
- +---------------------------+--------------------------------------+
- root@control03:~# quantum subnet-create --name 221-subnet --allocation-pool start=192.168.221.10,end=192.168.221.250 public 192.168.221.0/24 --dns_nameservers list=true 192.168.26.186
- Created a new subnet:
- +------------------+-------------------------------------------------------+
- | Field | Value |
- +------------------+-------------------------------------------------------+
- | allocation_pools | {"start": "192.168.221.10", "end": "192.168.221.250"} |
- | cidr | 192.168.221.0/24 |
- | dns_nameservers | 192.168.26.186 |
- | enable_dhcp | True |
- | gateway_ip | 192.168.221.1 |
- | host_routes | |
- | id | 469b5180-846c-43b0-8269-c66ffa53383f |
- | ip_version | 4 |
- | name | 221-subnet |
- | network_id | ef3f8ef2-c99b-44d4-b4a1-cc6298f40648 |
- | tenant_id | 2fbf0d3f6b914b5e8eb4605355cf2c9b |
- +------------------+-------------------------------------------------------+
- root@control03:~# quantum net-create net1
- Created a new network:
- +---------------------------+--------------------------------------+
- | Field | Value |
- +---------------------------+--------------------------------------+
- | admin_state_up | True |
- | id | c17d0c46-fc75-4c5c-b5aa-35e87c335fd9 |
- | name | net1 |
- | provider:network_type | gre |
- | provider:physical_network | |
- | provider:segmentation_id | 2 |
- | router:external | False |
- | shared | False |
- | status | ACTIVE |
- | subnets | |
- | tenant_id | 2fbf0d3f6b914b5e8eb4605355cf2c9b |
- +---------------------------+--------------------------------------+
- root@control03:~# quantum subnet-create --name 10-subnet net1 10.10.10.0/24
- Created a new subnet:
- +------------------+------------------------------------------------+
- | Field | Value |
- +------------------+------------------------------------------------+
- | allocation_pools | {"start": "10.10.10.2", "end": "10.10.10.254"} |
- | cidr | 10.10.10.0/24 |
- | dns_nameservers | |
- | enable_dhcp | True |
- | gateway_ip | 10.10.10.1 |
- | host_routes | |
- | id | 412f82d2-489c-4cdc-a138-96fb5a62c7a3 |
- | ip_version | 4 |
- | name | 10-subnet |
- | network_id | c17d0c46-fc75-4c5c-b5aa-35e87c335fd9 |
- | tenant_id | 2fbf0d3f6b914b5e8eb4605355cf2c9b |
- +------------------+------------------------------------------------+
- root@control03:~# quantum net-create net2
- Created a new network:
- +---------------------------+--------------------------------------+
- | Field | Value |
- +---------------------------+--------------------------------------+
- | admin_state_up | True |
- | id | 90e4be5f-ac8e-4fae-9f18-d738e059de2b |
- | name | net2 |
- | provider:network_type | gre |
- | provider:physical_network | |
- | provider:segmentation_id | 3 |
- | router:external | False |
- | shared | False |
- | status | ACTIVE |
- | subnets | |
- | tenant_id | 2fbf0d3f6b914b5e8eb4605355cf2c9b |
- +---------------------------+--------------------------------------+
- root@control03:~# quantum subnet-create --name 11-subnet net2 10.10.11.0/24
- Created a new subnet:
- +------------------+------------------------------------------------+
- | Field | Value |
- +------------------+------------------------------------------------+
- | allocation_pools | {"start": "10.10.11.2", "end": "10.10.11.254"} |
- | cidr | 10.10.11.0/24 |
- | dns_nameservers | |
- | enable_dhcp | True |
- | gateway_ip | 10.10.11.1 |
- | host_routes | |
- | id | f1b699cd-825a-449a-a1a5-030af1729d0f |
- | ip_version | 4 |
- | name | 11-subnet |
- | network_id | 90e4be5f-ac8e-4fae-9f18-d738e059de2b |
- | tenant_id | 2fbf0d3f6b914b5e8eb4605355cf2c9b |
- +------------------+------------------------------------------------+
- root@control03:~# quantum net-create net3
- Created a new network:
- +---------------------------+--------------------------------------+
- | Field | Value |
- +---------------------------+--------------------------------------+
- | admin_state_up | True |
- | id | 354c9bed-7193-405d-a093-4f8a293b7f76 |
- | name | net3 |
- | provider:network_type | gre |
- | provider:physical_network | |
- | provider:segmentation_id | 4 |
- | router:external | False |
- | shared | False |
- | status | ACTIVE |
- | subnets | |
- | tenant_id | 2fbf0d3f6b914b5e8eb4605355cf2c9b |
- +---------------------------+--------------------------------------+
- root@control03:~# quantum subnet-create --name 12-subnet net3 10.10.12.0/24
- Created a new subnet:
- +------------------+------------------------------------------------+
- | Field | Value |
- +------------------+------------------------------------------------+
- | allocation_pools | {"start": "10.10.12.2", "end": "10.10.12.254"} |
- | cidr | 10.10.12.0/24 |
- | dns_nameservers | |
- | enable_dhcp | True |
- | gateway_ip | 10.10.12.1 |
- | host_routes | |
- | id | b1c73efa-2350-434e-bbcb-9d9e5fdbc6f1 |
- | ip_version | 4 |
- | name | 12-subnet |
- | network_id | 354c9bed-7193-405d-a093-4f8a293b7f76 |
- | tenant_id | 2fbf0d3f6b914b5e8eb4605355cf2c9b |
- +------------------+------------------------------------------------+
- root@control03:~# quantum net-list
- +--------------------------------------+--------+-------------------------------------------------------+
- | id | name | subnets |
- +--------------------------------------+--------+-------------------------------------------------------+
- | 354c9bed-7193-405d-a093-4f8a293b7f76 | net3 | b1c73efa-2350-434e-bbcb-9d9e5fdbc6f1 10.10.12.0/24 |
- | 90e4be5f-ac8e-4fae-9f18-d738e059de2b | net2 | f1b699cd-825a-449a-a1a5-030af1729d0f 10.10.11.0/24 |
- | c17d0c46-fc75-4c5c-b5aa-35e87c335fd9 | net1 | 412f82d2-489c-4cdc-a138-96fb5a62c7a3 10.10.10.0/24 |
- | ef3f8ef2-c99b-44d4-b4a1-cc6298f40648 | public | 469b5180-846c-43b0-8269-c66ffa53383f 192.168.221.0/24 |
- +--------------------------------------+--------+-------------------------------------------------------+
- root@control03:~# quantum subnet-list
- +--------------------------------------+------------+------------------+-------------------------------------------------------+
- | id | name | cidr | allocation_pools |
- +--------------------------------------+------------+------------------+-------------------------------------------------------+
- | 412f82d2-489c-4cdc-a138-96fb5a62c7a3 | 10-subnet | 10.10.10.0/24 | {"start": "10.10.10.2", "end": "10.10.10.254"} |
- | 469b5180-846c-43b0-8269-c66ffa53383f | 221-subnet | 192.168.221.0/24 | {"start": "192.168.221.10", "end": "192.168.221.250"} |
- | b1c73efa-2350-434e-bbcb-9d9e5fdbc6f1 | 12-subnet | 10.10.12.0/24 | {"start": "10.10.12.2", "end": "10.10.12.254"} |
- | f1b699cd-825a-449a-a1a5-030af1729d0f | 11-subnet | 10.10.11.0/24 | {"start": "10.10.11.2", "end": "10.10.11.254"} |
- +--------------------------------------+------------+------------------+-------------------------------------------------------+
- root@control03:~# quantum agent-update 0d979401-8113-4e6e-9970-8ba46a7343e5 --admin_state_up=falseUpdated agent: 0d979401-8113-4e6e-9970-8ba46a7343e5
- root@control03:~# quantum agent-list
- +--------------------------------------+--------------------+-----------+-------+----------------+
- | id | agent_type | host | alive | admin_state_up |
- +--------------------------------------+--------------------+-----------+-------+----------------+
- | 0d979401-8113-4e6e-9970-8ba46a7343e5 | L3 agent | compute01 | :-) | False |
- | 32d1be16-0ab5-4ae2-a026-a4b70009af08 | L3 agent | control02 | :-) | True |
- | 39e1739b-b8f9-44e0-a2f8-32f6d1747fcf | Open vSwitch agent | control03 | :-) | True |
- | 7cbcf299-7161-4a65-86d3-32bdb4b78551 | Open vSwitch agent | control02 | :-) | True |
- | 81486440-72df-42e8-9abd-177341393025 | DHCP agent | compute01 | :-) | True |
- | 99e0363c-29bb-4623-b969-f161fc56c3e3 | Open vSwitch agent | compute01 | :-) | True |
- | f1b37c63-b7ce-48b8-9ff0-70a4b69e3bf7 | DHCP agent | control03 | :-) | True |
- +--------------------------------------+--------------------+-----------+-------+----------------+
- root@control03:~# quantum router-create router1
- Created a new router:
- +-----------------------+--------------------------------------+
- | Field | Value |
- +-----------------------+--------------------------------------+
- | admin_state_up | True |
- | external_gateway_info | |
- | id | b6146778-1a07-4518-82a5-480f203bc3fe |
- | name | router1 |
- | status | ACTIVE |
- | tenant_id | 2fbf0d3f6b914b5e8eb4605355cf2c9b |
- +-----------------------+--------------------------------------+
- root@control03:~# quantum router-create router2
- Created a new router:
- +-----------------------+--------------------------------------+
- | Field | Value |
- +-----------------------+--------------------------------------+
- | admin_state_up | True |
- | external_gateway_info | |
- | id | 9367726c-b932-4d86-94e0-2b7595a28054 |
- | name | router2 |
- | status | ACTIVE |
- | tenant_id | 2fbf0d3f6b914b5e8eb4605355cf2c9b |
- +-----------------------+--------------------------------------+
- root@control03:~# quantum router-interface-add router1 10-subnet
- Added interface to router router1
- root@control03:~# quantum router-interface-add router2 11-subnet
- Added interface to router router2
- root@control03:~# quantum router-gateway-set router1 public
- Set gateway for router router1
- root@control03:~# quantum router-gateway-set router2 public
- Set gateway for router router2
- root@control03:~# quantum router-list
- +--------------------------------------+---------+--------------------------------------------------------+
- | id | name | external_gateway_info |
- +--------------------------------------+---------+--------------------------------------------------------+
- | 9367726c-b932-4d86-94e0-2b7595a28054 | router2 | {"network_id": "ef3f8ef2-c99b-44d4-b4a1-cc6298f40648"} |
- | b6146778-1a07-4518-82a5-480f203bc3fe | router1 | {"network_id": "ef3f8ef2-c99b-44d4-b4a1-cc6298f40648"} |
- +--------------------------------------+---------+--------------------------------------------------------+
- root@control03:~# quantum agent-update 0d979401-8113-4e6e-9970-8ba46a7343e5 --admin_state_up=true
- Updated agent: 0d979401-8113-4e6e-9970-8ba46a7343e5
- root@control03:~# quantum agent-list
- +--------------------------------------+--------------------+-----------+-------+----------------+
- | id | agent_type | host | alive | admin_state_up |
- +--------------------------------------+--------------------+-----------+-------+----------------+
- | 0d979401-8113-4e6e-9970-8ba46a7343e5 | L3 agent | compute01 | :-) | True |
- | 32d1be16-0ab5-4ae2-a026-a4b70009af08 | L3 agent | control02 | :-) | True |
- | 39e1739b-b8f9-44e0-a2f8-32f6d1747fcf | Open vSwitch agent | control03 | :-) | True |
- | 7cbcf299-7161-4a65-86d3-32bdb4b78551 | Open vSwitch agent | control02 | :-) | True |
- | 81486440-72df-42e8-9abd-177341393025 | DHCP agent | compute01 | :-) | True |
- | 99e0363c-29bb-4623-b969-f161fc56c3e3 | Open vSwitch agent | compute01 | :-) | True |
- | f1b37c63-b7ce-48b8-9ff0-70a4b69e3bf7 | DHCP agent | control03 | :-) | True |
- +--------------------------------------+--------------------+-----------+-------+----------------+
- root@control03:~# quantum router-port-list -c id -c fixed_ips router1
- +--------------------------------------+---------------------------------------------------------------------------------------+
- | id | fixed_ips |
- +--------------------------------------+---------------------------------------------------------------------------------------+
- | 1cd4dff0-aa22-4e4d-ab30-c8bbff3f9eda | {"subnet_id": "469b5180-846c-43b0-8269-c66ffa53383f", "ip_address": "192.168.221.10"} |
- | fbfd5d64-3ede-4f47-b009-570e4c602666 | {"subnet_id": "412f82d2-489c-4cdc-a138-96fb5a62c7a3", "ip_address": "10.10.10.1"} |
- +--------------------------------------+---------------------------------------------------------------------------------------+
- root@control03:~# quantum router-port-list -c id -c fixed_ips router2
- +--------------------------------------+---------------------------------------------------------------------------------------+
- | id | fixed_ips |
- +--------------------------------------+---------------------------------------------------------------------------------------+
- | 6fdff848-283c-4065-a697-959ad5903c65 | {"subnet_id": "f1b699cd-825a-449a-a1a5-030af1729d0f", "ip_address": "10.10.11.1"} |
- | 7fdb15e4-0990-4576-ad67-b9cc12a626a1 | {"subnet_id": "469b5180-846c-43b0-8269-c66ffa53383f", "ip_address": "192.168.221.11"} |
- +--------------------------------------+---------------------------------------------------------------------------------------+
- root@control03:~# quantum agent-list
- +--------------------------------------+--------------------+-----------+-------+----------------+
- | id | agent_type | host | alive | admin_state_up |
- +--------------------------------------+--------------------+-----------+-------+----------------+
- | 0d979401-8113-4e6e-9970-8ba46a7343e5 | L3 agent | compute01 | :-) | True |
- | 32d1be16-0ab5-4ae2-a026-a4b70009af08 | L3 agent | control02 | :-) | True |
- | 39e1739b-b8f9-44e0-a2f8-32f6d1747fcf | Open vSwitch agent | control03 | :-) | True |
- | 7cbcf299-7161-4a65-86d3-32bdb4b78551 | Open vSwitch agent | control02 | :-) | True |
- | 81486440-72df-42e8-9abd-177341393025 | DHCP agent | compute01 | :-) | True |
- | 99e0363c-29bb-4623-b969-f161fc56c3e3 | Open vSwitch agent | compute01 | :-) | True |
- | f1b37c63-b7ce-48b8-9ff0-70a4b69e3bf7 | DHCP agent | control03 | :-) | True |
- +--------------------------------------+--------------------+-----------+-------+----------------+
- root@control03:~# quantum --help | grep l3
- l3-agent-list-hosting-router List L3 agents hosting a router.
- l3-agent-router-add Add a router to a L3 agent.
- l3-agent-router-remove Remove a router from a L3 agent.
- router-list-on-l3-agent List the routers on a L3 agent.
- root@control03:~# quantum l3-agent-list-hosting-router router1
- +--------------------------------------+-----------+----------------+-------+
- | id | host | admin_state_up | alive |
- +--------------------------------------+-----------+----------------+-------+
- | 32d1be16-0ab5-4ae2-a026-a4b70009af08 | control02 | True | :-) |
- +--------------------------------------+-----------+----------------+-------+
- root@control03:~# quantum l3-agent-list-hosting-router router2
- +--------------------------------------+-----------+----------------+-------+
- | id | host | admin_state_up | alive |
- +--------------------------------------+-----------+----------------+-------+
- | 32d1be16-0ab5-4ae2-a026-a4b70009af08 | control02 | True | :-) |
- +--------------------------------------+-----------+----------------+-------+
- root@control03:~# quantum l3-agent-router-add 0d979401-8113-4e6e-9970-8ba46a7343e5 router1
- Failed scheduling router b6146778-1a07-4518-82a5-480f203bc3fe to the L3 Agent 0d979401-8113-4e6e-9970-8ba46a7343e5.
- root@control03:~# quantum router-port-list -c id -c fixed_ips router1
- +--------------------------------------+---------------------------------------------------------------------------------------+
- | id | fixed_ips |
- +--------------------------------------+---------------------------------------------------------------------------------------+
- | 1cd4dff0-aa22-4e4d-ab30-c8bbff3f9eda | {"subnet_id": "469b5180-846c-43b0-8269-c66ffa53383f", "ip_address": "192.168.221.10"} |
- | fbfd5d64-3ede-4f47-b009-570e4c602666 | {"subnet_id": "412f82d2-489c-4cdc-a138-96fb5a62c7a3", "ip_address": "10.10.10.1"} |
- +--------------------------------------+---------------------------------------------------------------------------------------+
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement