root@controller:~# neutron agent-list
+--------------------------------------+--------------------+------------+-------+----------------+---------------------------+
| id | agent_type | host | alive | admin_state_up | binary |
+--------------------------------------+--------------------+------------+-------+----------------+---------------------------+
| 0871be25-b4ce-48aa-9cbe-9191840f3ca9 | Linux bridge agent | controller | :-) | True | neutron-linuxbridge-agent |
| 5ad6ef6a-6044-4e9d-a17a-6aedfd4ab2c2 | Loadbalancer agent | controller | :-) | True | neutron-lbaas-agent |
| 5ee3e9eb-bef9-4a2b-8a88-86c0f167ea9b | DHCP agent | controller | :-) | True | neutron-dhcp-agent |
| 8933e199-6034-43b8-866f-67a21c04176a | Linux bridge agent | compute1 | :-) | True | neutron-linuxbridge-agent |
| a6a2d297-43d7-4f27-80de-292185300086 | L3 agent | controller | :-) | True | neutron-l3-agent |
| f0379919-bfbd-41a7-9cd6-86270082deaf | Metadata agent | controller | :-) | True | neutron-metadata-agent |
+--------------------------------------+--------------------+------------+-------+----------------+---------------------------+
root@controller:~# neutron subnet-list
+--------------------------------------+---------+-----------------+------------------------------------------------------+
| id | name | cidr | allocation_pools |
+--------------------------------------+---------+-----------------+------------------------------------------------------+
| 5161eee9-14d3-4d8e-be08-466501541752 | public | 115.68.206.0/24 | {"start": "115.68.206.101", "end": "115.68.206.199"} |
| bf47d6f1-1741-4b38-baf9-2422e5e15d00 | private | 192.168.6.0/24 | {"start": "192.168.6.2", "end": "192.168.6.254"} |
+--------------------------------------+---------+-----------------+------------------------------------------------------+
¼ø¼
1. LB Pool »ý¼º
- À̸§, ºÐ¹è ¾Ë°í¸®Áò, ºÐ¹èÆ÷Æ®, ³×Æ®¿öÅ©¸¦ ÁöÁ¤
2. ºÐ¹è´ë»ó ÀνºÅϽº(VM) È®ÀÎ
3. LB Pool¿¡ ºÐ¹è´ë»ó ÀνºÅϽº ¸â¹ö Ãß°¡
4. ¸ð´ÏÅÍ ¼³Á¤
- Çコ¸¦ üũ¿¡ ´ëÇÑ Á¤ÀÇ
5. ¼³Á¤ÇÑ ¸ð´ÏÅ͸¦ LB Pool·Î ÁöÁ¤
6. LB VIP »ý¼º (¿ÜºÎ¿¡ °ø°³µÈ IP)
7. °øÀξÆÀÌÇǸ¦ LB VIP¿¡ ÁöÁ¤
root@controller:~# neutron lb-pool-create --name LB1 --lb-method ROUND_ROBIN --protocol HTTP --subnet-id bf47d6f1-1741-4b38-baf9-2422e5e15d00
Created a new pool:
+------------------------+--------------------------------------+
| Field | Value |
+------------------------+--------------------------------------+
| admin_state_up | True |
| description | |
| health_monitors | |
| health_monitors_status | |
| id | 9f6f1a71-1b6b-4e0e-9f1a-8016e3cb5838 |
| lb_method | ROUND_ROBIN |
| members | |
| name | LB1 |
| protocol | HTTP |
| provider | haproxy |
| status | PENDING_CREATE |
| status_description | |
| subnet_id | bf47d6f1-1741-4b38-baf9-2422e5e15d00 |
| tenant_id | 05b2b44dafd446059e0d5bc90c99800c |
| vip_id | |
+------------------------+--------------------------------------+
ºÐ¹è´ë»ó ÀνºÅϽº (¸â¹ö) Ãß°¡
VM1 : 192.168.6.5
VM2 : 192.168.6.6
root@controller:~# neutron lb-member-create --address 192.168.6.5 --protocol-port 80 LB1
Created a new member:
+--------------------+--------------------------------------+
| Field | Value |
+--------------------+--------------------------------------+
| address | 192.168.6.5 |
| admin_state_up | True |
| id | 0b4162e6-71c5-4763-91e4-c28d85a82f92 |
| pool_id | 9f6f1a71-1b6b-4e0e-9f1a-8016e3cb5838 |
| protocol_port | 80 |
| status | PENDING_CREATE |
| status_description | |
| tenant_id | 05b2b44dafd446059e0d5bc90c99800c |
| weight | 1 |
+--------------------+--------------------------------------+
root@controller:~# neutron lb-member-create --address 192.168.6.6 --protocol-port 80 LB1
Created a new member:
+--------------------+--------------------------------------+
| Field | Value |
+--------------------+--------------------------------------+
| address | 192.168.6.6 |
| admin_state_up | True |
| id | f16d1416-e0ce-4e95-93d6-ac253b3c0fb7 |
| pool_id | 9f6f1a71-1b6b-4e0e-9f1a-8016e3cb5838 |
| protocol_port | 80 |
| status | PENDING_CREATE |
| status_description | |
| tenant_id | 05b2b44dafd446059e0d5bc90c99800c |
| weight | 1 |
+--------------------+--------------------------------------+
root@controller:~# neutron lb-member-list
+--------------------------------------+-------------+---------------+--------+----------------+--------+
| id | address | protocol_port | weight | admin_state_up | status |
+--------------------------------------+-------------+---------------+--------+----------------+--------+
| 0b4162e6-71c5-4763-91e4-c28d85a82f92 | 192.168.6.5 | 80 | 1 | True | ACTIVE |
| f16d1416-e0ce-4e95-93d6-ac253b3c0fb7 | 192.168.6.6 | 80 | 1 | True | ACTIVE |
+--------------------------------------+-------------+---------------+--------+----------------+--------+
:: ¸ð´ÏÅÍ ¼³Á¤
root@controller:~# neutron lb-healthmonitor-create --delay 3 --type HTTP --max-retries 3 --timeout 2
Created a new health_monitor:
+----------------+--------------------------------------+
| Field | Value |
+----------------+--------------------------------------+
| admin_state_up | True |
| delay | 3 |
| expected_codes | 200 |
| http_method | GET |
| id | ec5c516d-d455-4c89-8727-a84c3bc8d991 |
| max_retries | 3 |
| pools | |
| tenant_id | 05b2b44dafd446059e0d5bc90c99800c |
| timeout | 2 |
| type | HTTP |
| url_path | / |
+----------------+--------------------------------------+
:: ¸ð´ÏÅÍ¿¡ LB1 POOL Ãß°¡
root@controller:~# neutron lb-healthmonitor-associate ec5c516d-d455-4c89-8727-a84c3bc8d991 LB1
Associated health monitor ec5c516d-d455-4c89-8727-a84c3bc8d991
root@controller:~# neutron lb-healthmonitor-list
+--------------------------------------+------+----------------+
| id | type | admin_state_up |
+--------------------------------------+------+----------------+
| ec5c516d-d455-4c89-8727-a84c3bc8d991 | HTTP | True |
+--------------------------------------+------+----------------+
oot@controller:~# neutron lb-vip-create --name LB1_VIP --protocol-port 80 --protocol HTTP --subnet-id bf47d6f1-1741-4b38-baf9-2422e5e15d00 LB1
Created a new vip:
+---------------------+--------------------------------------+
| Field | Value |
+---------------------+--------------------------------------+
| address | 192.168.6.7 |
| admin_state_up | True |
| connection_limit | -1 |
| description | |
| id | 37a95404-383a-4e2f-bb6f-cae17dab2e42 |
| name | LB1_VIP |
| pool_id | 9f6f1a71-1b6b-4e0e-9f1a-8016e3cb5838 |
| port_id | 635c0145-12a6-4fc8-81e9-b6a80c5f2978 |
| protocol | HTTP |
| protocol_port | 80 |
| session_persistence | |
| status | PENDING_CREATE |
| status_description | |
| subnet_id | bf47d6f1-1741-4b38-baf9-2422e5e15d00 |
| tenant_id | 05b2b44dafd446059e0d5bc90c99800c |
+---------------------+--------------------------------------+
root@controller:~# neutron lb-vip-list
+--------------------------------------+---------+-------------+----------+----------------+--------+
| id | name | address | protocol | admin_state_up | status |
+--------------------------------------+---------+-------------+----------+----------------+--------+
| 37a95404-383a-4e2f-bb6f-cae17dab2e42 | LB1_VIP | 192.168.6.7 | HTTP | True | ACTIVE |
+--------------------------------------+---------+-------------+----------+----------------+--------+
root@controller:~# neutron floatingip-create public
Created a new floatingip:
+---------------------+--------------------------------------+
| Field | Value |
+---------------------+--------------------------------------+
| fixed_ip_address | |
| floating_ip_address | 115.68.206.105 |
| floating_network_id | 4b10f8a3-f9c1-4cbd-9a26-93b37c3051d4 |
| id | 04634263-2e4f-4ecc-becc-7b56630696fb |
| port_id | |
| router_id | |
| status | DOWN |
| tenant_id | 05b2b44dafd446059e0d5bc90c99800c |
+---------------------+--------------------------------------+
:: ¾ÆÀÌÇÇ ÇÒ´ç <Floating_IP> <Port_ID>
root@controller:~# neutron floatingip-associate 04634263-2e4f-4ecc-becc-7b56630696fb 635c0145-12a6-4fc8-81e9-b6a80c5f2978
Associated floating IP 04634263-2e4f-4ecc-becc-7b56630696fb