¿ù°£ Àα⠰Խù°

°Ô½Ã¹° 715°Ç
   
MULTI IP API Âü°í
±Û¾´ÀÌ : ÃÖ°í°ü¸®ÀÚ ³¯Â¥ : 2015-12-17 (¸ñ) 03:52 Á¶È¸ : 4013
                                
Multi IP Address Ãß°¡ 

µð¹ÙÀ̽º 1°³¿¡ 2°³ÀÇ ¾ÆÀÌÇÇ Ãß°¡


Self-Service Network (Neutron GRE, VXLAN, VLAN)  
:: 1°³ÀÇ Æ÷Æ®¿¡ 2°³ÀÇ Fixed IP , Floating IP Ãß°¡

Floating IP  »ý¼º
CLI> neutron floatingip-create public 
# curl -g -i -X POST http://controller:9696/v2.0/floatingips.json -H "User-Agent: python-neutronclient" -H "Content-Type: application/json" -H "Accept: application/json" -H "X-Auth-Token: {SHA1}914c51b151c1781444207da45117c3e3423abfd1" -d '{"floatingip": {"floating_network_id": "e2f0d382-3a9d-4ddd-aa8c-bb5c660d57df"}}'

RESP BODY: {"floatingip": {"floating_network_id": "e2f0d382-3a9d-4ddd-aa8c-bb5c660d57df", "router_id": null, "fixed_ip_address": null, "floating_ip_address": "XXX.XXX.202.36", "tenant_id": "2a7aa38c4b35400195882bfbe6a0bb1a", "status": "DOWN", "port_id": null, "id": "b8243132-7ce4-407f-baa5-9ad0c9fe3f10"}}


Fixed IP Ãß°¡
CLI> nova add-fixed-ip restapi_test1 d390817d-1907-4ca5-b8e9-8114b858e84d
# curl -g -i -X POST http://controller:8774/v2/2a7aa38c4b35400195882bfbe6a0bb1a/servers/76e5b2fb-75ce-4192-882e-1cde19b6dd9e/action -H "User-Agent: python-novaclient" -H "Content-Type: application/json" -H "Accept: application/json" -H "X-Auth-Token: {SHA1}15c3a22cde2a01ee890a9f79455ea1486af4ad45" -d '{"addFixedIp": {"networkId": "d390817d-1907-4ca5-b8e9-8114b858e84d"}}'


Ãß°¡ÇÑ Floating IP ¿Í Fixed IP ¿¬°á
CLI> nova --debug add-floating-ip --fixed-address 172.16.1.8 restapi_test1 XXX.XXX.202.36
curl -g -i -X POST http://controller:8774/v2/2a7aa38c4b35400195882bfbe6a0bb1a/servers/76e5b2fb-75ce-4192-882e-1cde19b6dd9e/action -H "User-Agent: python-novaclient" -H "Content-Type: application/json" -H "Accept: application/json" -H "X-Auth-Token: {SHA1}063be894f5fd637ec392c9dc55283440af961bb3" -d '{"addFloatingIp": {"fixed_address": "172.16.1.8", "address": "XXX.XXX.202.36"}}'



Provider Network (Nova, Neutron Flat)
¡Ø Æ÷Æ®Ãß°¡Çؼ­ ¾ÆÀÌÇÇ ºÙ¿©ÁÖ´Â ¹æ½ÄÀº ƯÀÌ»çÇ× ¾øÀ½ 
    But....SIngle NIC¿¡ 2°³ ÀÌ»óÀÇ ¾ÆÀÌÇǸ¦ Ãß°¡ÇÏ´Â °æ¿ì Fixed-ip Ãß°¡ÇÏ´Â ´Ü°è¿¡¼­´Â admin ±ÇÇÑÀÌ ÇÊ¿ä

 
Fixed IP Ãß°¡ (ADMIN ±ÇÇÑ¿¡¼­ ½ÇÇà)
nova add-fixed-ip <Server> <Network_ID>
CLI> nova add-fixed-ip cc5859a4-b9a5-4652-8fff-e9531a960141 dd87e063-2461-4b44-89ff-aa6aed8db03f
# curl -g -i -X POST http://controller:8774/v2/5fb2665694174bb59b2aaa270e8f6c4f/servers/cc5859a4-b9a5-4652-8fff-e9531a960141/action -H "User-Agent: python-novaclient" -H "Content-Type: application/json" -H "Accept: application/json" -H "X-Auth-Token: {SHA1}b9400c5f90cbc94a52329c48b1a27949b7f8f7f8" -d '{"addFixedIp": {"networkId": "dd87e063-2461-4b44-89ff-aa6aed8db03f"}}'



Fixed IP »èÁ¦
CLI> nova remove-fixed-ip a1883609-b8f9-4c2d-88bd-f8b4a6a1c081 XXX.XXX.202.6
curl -g -i -X POST http://controller:8774/v2/5fb2665694174bb59b2aaa270e8f6c4f/servers/a1883609-b8f9-4c2d-88bd-f8b4a6a1c081/action -H "User-Agent: python-novaclient" -H "Content-Type: application/json" -H "Accept: application/json" -H "X-Auth-Token: {SHA1}f0e5b2474a70fa6e985c5cdacba8e817b12685f6" -d '{"removeFixedIp": {"address": "115.68.202.6"}}'



À̸§ Æнº¿öµå
ºñ¹Ð±Û (üũÇÏ¸é ±Û¾´À̸¸ ³»¿ëÀ» È®ÀÎÇÒ ¼ö ÀÖ½À´Ï´Ù.)
¿ÞÂÊÀÇ ±ÛÀÚ¸¦ ÀÔ·ÂÇϼ¼¿ä.
   

 



 
»çÀÌÆ®¸í : ¸ðÁö¸®³× | ´ëÇ¥ : ÀÌ°æÇö | °³ÀÎÄ¿¹Â´ÏƼ : ·©Å°´åÄÄ ¿î¿µÃ¼Á¦(OS) | °æ±âµµ ¼º³²½Ã ºÐ´ç±¸ | ÀüÀÚ¿ìÆí : mojily°ñ¹ðÀÌchonnom.com Copyright ¨Ï www.chonnom.com www.kyunghyun.net www.mojily.net. All rights reserved.