¿ù°£ Àα⠰Խù°

°Ô½Ã¹° 708°Ç
   
Attaching Multiple Network Interfaces and Floating IPs ¨è
±Û¾´ÀÌ : ÃÖ°í°ü¸®ÀÚ ³¯Â¥ : 2015-08-11 (È­) 14:09 Á¶È¸ : 4146
                                
Attaching Multiple Network Interfaces and Floating IPs
:: 1°³ÀÇ µð¹ÙÀ̽º¿¡ 2°³ÀÇ Fixed IP, 2°³ÀÇ Floating IP

root@controller:~# neutron net-list
+--------------------------------------+----------+------------------------------------------------------+
| id                                   | name     | subnets                                              |
+--------------------------------------+----------+------------------------------------------------------+
| c360ab81-8504-4138-a183-e6a744b096b1 | ext-net1 | 0630d032-9e64-4e64-8fd9-e695e123da4a 115.XXX.XXX.0/24 |
| 83e166bf-74e1-490e-a349-163ef44def6d | net1     | c6835e12-2b58-480a-8d03-0b5242b6e032 192.168.2.0/24  |
| 05fe2655-c9cc-4dec-9b00-aec8d55682f0 | demo-net | 4e87ea4f-9c41-4f50-9671-762b99f4ce45 192.168.0.0/24  |
+--------------------------------------+----------+------------------------------------------------------+

:: Floating IP 2°³ »ý¼º 
root@controller:~# neutron floatingip-create c360ab81-8504-4138-a183-e6a744b096b1
Created a new floatingip:
+---------------------+--------------------------------------+
| Field               | Value                                |
+---------------------+--------------------------------------+
| fixed_ip_address    |                                      |
| floating_ip_address | 115.XX.XX.177                       |
| floating_network_id | c360ab81-8504-4138-a183-e6a744b096b1 |
| id                  | d3af842c-0852-4990-91ec-d69e29ff6623 |
| port_id             |                                      |
| router_id           |                                      |
| status              | DOWN                                 |
| tenant_id           | 3fdf67182adc4458a36b6dcdc77bce93     |
+---------------------+--------------------------------------+
root@controller:~# neutron floatingip-create c360ab81-8504-4138-a183-e6a744b096b1
Created a new floatingip:
+---------------------+--------------------------------------+
| Field               | Value                                |
+---------------------+--------------------------------------+
| fixed_ip_address    |                                      |
| floating_ip_address | 115.XXX.XXX.178                       |
| floating_network_id | c360ab81-8504-4138-a183-e6a744b096b1 |
| id                  | 62556703-ba71-4003-a3dd-c00d52d7df32 |
| port_id             |                                      |
| router_id           |                                      |
| status              | DOWN                                 |
| tenant_id           | 3fdf67182adc4458a36b6dcdc77bce93     |
+---------------------+--------------------------------------+

root@controller:~# nova list |grep VM2
| 41a3b9ac-a8b6-47d4-947e-8f87ae80c247 | VM2          | ACTIVE    | -          | Running     | demo-net=192.168.0.130                               |

:: Floating ºÎ¿© 
root@controller:~# nova add-floating-ip VM2 115.XXX.XXX.177


root@controller:~# nova add-floating-ip VM2 115.XXX.XXX.178
ERROR (BadRequest): Unable to associate floating ip 115.XXX.XXX.178 to fixed ip 192.168.0.130 for instance 41a3b9ac-a8b6-47d4-947e-8f87ae80c247. Error: Cannot associate floating IP 115.XXX.XXX.178 (62556703-ba71-4003-a3dd-c00d52d7df32) with port 6e0c1ba1-020e-48cc-b68f-c47c4e23c7c5 using fixed IP 192.168.0.130, as that fixed IP already has a floating IP on external network c360ab81-8504-4138-a183-e6a744b096b1. (HTTP 400) (Request-ID: req-c89ceff7-08f1-4fe5-8f20-832a3dc66367)

:: µ¿ÀÏÇÑ Fixed IP¿¡´Â 2°³ÀÇ Floating IP¸¦ ºÎ¿©ÇÒ¼ö°¡ ¾ø±â¿¡ Fixed IP Ãß°¡
¡Ø nova add-fixed-ip ${INSTANCE_ID} ${NET_ID}
root@controller:~# nova add-fixed-ip VM2 05fe2655-c9cc-4dec-9b00-aec8d55682f0

root@controller:~# nova show VM2 |grep network
| demo-net network                     | 192.168.0.130, 192.168.0.131, 115.XXX.XXX.177                  |

root@controller:~# nova add-floating-ip  --fixed-address 192.168.0.131 VM2 115.XXX.XXX.178
root@controller:~# neutron floatingip-list


1°³ÀÇ µð¹ÙÀ̽º¿¡ 2°³ÀÇ Fixed ¾ÆÀÌÇǸ¦ ³Ö¾îÁÖ¾úÁö¸¸ DHCP¼­¹ö¿¡¼­´Â 1°³ÀÇ ¾ÆÀÌÇǸ¸ üũÇÑ´Ù.
µû¶ó¼­ ÀνºÅϽº³»¿¡ Á¤ÀûÀÎ ¼³Á¤ ÇÊ¿ä
[root@vm2 ~]# cp /etc/sysconfig/network-scripts/ifcfg-eth0 /etc/sysconfig/network-scripts/ifcfg-eth0:0
[root@vm2 ~]# vim /etc/sysconfig/network-scripts/ifcfg-eth0:0
DEVICE=eth0:0
TYPE=Ethernet
onBOOT=yes
BOOTPROTO=static
IPADDR=192.168.0.130
NETMASK=255.255.255.0
[root@vm2 ~]# /etc/init.d/network restart
[root@vm2 ~]# ifconfig
eth0      Link encap:Ethernet  HWaddr FA:16:3E:58:F3:69  
          inet addr:192.168.0.131  Bcast:192.168.0.255  Mask:255.255.255.0
          inet6 addr: fe80::f816:3eff:fe58:f369/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1454  Metric:1
          RX packets:2297 errors:0 dropped:0 overruns:0 frame:0
          TX packets:1380 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:174233 (170.1 KiB)  TX bytes:133492 (130.3 KiB)

eth0:0    Link encap:Ethernet  HWaddr FA:16:3E:58:F3:69  
          inet addr:192.168.0.130  Bcast:192.168.0.255  Mask:255.255.255.0
          UP BROADCAST RUNNING MULTICAST  MTU:1454  Metric:1

lo        Link encap:Local Loopback  
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:65536  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:0 (0.0 b)  TX bytes:0 (0.0 b)

¡Ø ÁÖÀÇ : ¸¶Áö¸·¿¡ ÇÒ´çµÈ Fixed ¾ÆÀÌÇÇ°¡ dhcp ¼­¹ö¿¡¼­ ¹Þ¾Æ¿È


»èÁ¦ 
:: »èÁ¦ÇÏ¸é ³×Æ®¿öÅ© floating ip Áï½ÃÁߴܵÊ
# nova remove-floating-ip <SERVER> <ADDRESS>
# nova remove-fixed-ip <SERVER> <ADDRESS>

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

 



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