Re: [openstack-dev] [Network] Allocate MAC and IP address for a VM instance

2014-02-22 Thread Jay Lau
Sorry to bring this up again, just want to ask more, currently, I can only
use neutron to bind IP and MAC but cannot reach this goal via nova-network,
right?

Thanks,

Jay



2014-02-19 21:05 GMT+08:00 Jay Lau :

> Thanks Liu Dong. Clear now! ;-)
>
>
> 2014-02-19 20:17 GMT+08:00 Dong Liu :
>
> Sorry for replying so late.
>>
>> Yes, that is what I mean, btw, if you only need floatingip to bind vm
>> mac, you do not need to specified --fix_ip, just specify the --mac-address
>> is ok.
>>
>> What I mean floatingip-mac is that, actually, when you creating a
>> floatingip, neutron will automatic create a port use that public ip,
>> this port has a mac-address, I mean this one.
>>
>>
>> 在 2014年2月19日,18:22,Jay Lau  写道:
>>
>> Hi Liu Dong,
>>
>> Just found a solution for this as following, the method is using fixed ip
>> as a bridge for MAC and floating ip.
>>
>> Can you please help check if it is the way that you want me to do? If
>> not, can you please give some suggestion for your idea?
>>
>> Thanks,
>>
>> Jay
>>
>> ==My steps==
>> Suppose I want to bind MAC fa:16:3e:9d:e9:11 to floating ip 9.21.52.22, I
>> was doing as following:
>>
>> *1) Create a port for fixed ip with the MAC address fa:16:3e:9d:e9:11*
>> [root@db01b05 ~(keystone_admin)]#  neutron port-create IntAdmin
>> --mac-address fa:16:3e:9d:e9:11 --fixed-ip ip_address=10.0.1.2
>> Created a new port:
>>
>> +---+-+
>> | Field |
>> Value
>> |
>>
>> +---+-+
>> | admin_state_up|
>> True
>> |
>> | allowed_address_pairs
>> |
>> |
>> | binding:capabilities  | {"port_filter":
>> true}   |
>> | binding:host_id
>> |
>> |
>> | binding:vif_type  |
>> ovs
>> |
>> | device_id
>> |
>> |
>> | device_owner
>> |
>> |
>> | fixed_ips | {"subnet_id":
>> "0fff20f4-142a-4e89-add1-5c5a79c6d54d", "ip_address": "10.0.1.2"} |
>> | id|
>> b259770d-7f9c-485a-8f84-bf7b1bbc5706
>> |
>> | mac_address   |
>> fa:16:3e:9d:e9:11
>> |
>> | name
>> |
>> |
>> | network_id|
>> fb1a75f9-e468-408b-a172-5d2b3802d862
>> |
>> | security_groups   |
>> aa3f3025-ba71-476d-a126-25a9e3b34c9a
>> |
>> | status|
>> DOWN
>> |
>> | tenant_id |
>> f181a9c2b1b4443dbd91b1b7de716185
>> |
>>
>> +---+-+
>> [root@db01b05 ~(keystone_admin)]# neutron port-list | grep 10.0.1.2
>> | b259770d-7f9c-485a-8f84-bf7b1bbc5706 |  | fa:16:3e:9d:e9:11 |
>> {"subnet_id": "0fff20f4-142a-4e89-add1-5c5a79c6d54d", "ip_address":
>> "10.0.1.2"}   |
>>
>> *2) Create a floating ip with the port id created in step 1)*
>> [root@db01b05 ~(keystone_admin)]# neutron floatingip-create --port-id
>> b259770d-7f9c-485a-8f84-bf7b1bbc5706 Ex
>> Created a new floatingip:
>> +-+--+
>> | Field   | Value|
>> +-+--+
>> | fixed_ip_address| 10.0.1.2 |
>> | floating_ip_address | 9.21.52.22   |
>> | floating_network_id | 9b758062-2be8-4244-a5a9-3f878f74e006 |
>> | id  | 7c0db4ff-8378-4b91-9a6e-87ec06016b0f |
>> | port_id | b259770d-7f9c-485a-8f84-bf7b1bbc5706 |
>> | router_id   | 43ceb267-2a4b-418a-bc9a-08d39623d3c0 |
>> | tenant_id   | f181a9c2b1b4443dbd91b1b7de716185 |
>> +-+--+
>>
>> *3) Boot the VM with the port id in step 1)*
>> [root@db01b05 ~(keystone_admin)]#  nova boot --image
>> centos64-x86_64-cfntools --flavor 2 --key-name adminkey --nic
>> port-id=b259770d-7f9c-485a-8f84-bf7b1bbc5706 vm0001
>>
>> +--+--+
>> | Property |
>> Value|
>>
>> +--+--+
>> | OS-EXT-STS:task_state|
>> scheduling   |
>> | image|
>> centos64-x86_64-cfntools |
>> | OS-EXT-STS:vm_state  |
>> building |
>> | OS-EXT-SRV-ATTR:instance_name|
>> instance-0026|
>> | OS-SRV-USG:launched_at   |
>> None |
>> | flavor   |
>> m1.small |
>> | id   |
>> c0cebd6b-94ae-4305-8619-c013d45f0727 |
>> | security_groups  | [{u'name':
>> u'default'}]  |
>> | user_id  

Re: [openstack-dev] [Network] Allocate MAC and IP address for a VM instance

2014-02-19 Thread Jay Lau
Thanks Liu Dong. Clear now! ;-)


2014-02-19 20:17 GMT+08:00 Dong Liu :

> Sorry for replying so late.
>
> Yes, that is what I mean, btw, if you only need floatingip to bind vm mac,
> you do not need to specified --fix_ip, just specify the --mac-address is ok.
>
> What I mean floatingip-mac is that, actually, when you creating a
> floatingip, neutron will automatic create a port use that public ip, this
> port has a mac-address, I mean this one.
>
>
> 在 2014年2月19日,18:22,Jay Lau  写道:
>
> Hi Liu Dong,
>
> Just found a solution for this as following, the method is using fixed ip
> as a bridge for MAC and floating ip.
>
> Can you please help check if it is the way that you want me to do? If not,
> can you please give some suggestion for your idea?
>
> Thanks,
>
> Jay
>
> ==My steps==
> Suppose I want to bind MAC fa:16:3e:9d:e9:11 to floating ip 9.21.52.22, I
> was doing as following:
>
> *1) Create a port for fixed ip with the MAC address fa:16:3e:9d:e9:11*
> [root@db01b05 ~(keystone_admin)]#  neutron port-create IntAdmin
> --mac-address fa:16:3e:9d:e9:11 --fixed-ip ip_address=10.0.1.2
> Created a new port:
>
> +---+-+
> | Field |
> Value
> |
>
> +---+-+
> | admin_state_up|
> True
> |
> | allowed_address_pairs
> |
> |
> | binding:capabilities  | {"port_filter":
> true}   |
> | binding:host_id
> |
> |
> | binding:vif_type  |
> ovs
> |
> | device_id
> |
> |
> | device_owner
> |
> |
> | fixed_ips | {"subnet_id":
> "0fff20f4-142a-4e89-add1-5c5a79c6d54d", "ip_address": "10.0.1.2"} |
> | id|
> b259770d-7f9c-485a-8f84-bf7b1bbc5706
> |
> | mac_address   |
> fa:16:3e:9d:e9:11
> |
> | name
> |
> |
> | network_id|
> fb1a75f9-e468-408b-a172-5d2b3802d862
> |
> | security_groups   |
> aa3f3025-ba71-476d-a126-25a9e3b34c9a
> |
> | status|
> DOWN
> |
> | tenant_id |
> f181a9c2b1b4443dbd91b1b7de716185
> |
>
> +---+-+
> [root@db01b05 ~(keystone_admin)]# neutron port-list | grep 10.0.1.2
> | b259770d-7f9c-485a-8f84-bf7b1bbc5706 |  | fa:16:3e:9d:e9:11 |
> {"subnet_id": "0fff20f4-142a-4e89-add1-5c5a79c6d54d", "ip_address":
> "10.0.1.2"}   |
>
> *2) Create a floating ip with the port id created in step 1)*
> [root@db01b05 ~(keystone_admin)]# neutron floatingip-create --port-id
> b259770d-7f9c-485a-8f84-bf7b1bbc5706 Ex
> Created a new floatingip:
> +-+--+
> | Field   | Value|
> +-+--+
> | fixed_ip_address| 10.0.1.2 |
> | floating_ip_address | 9.21.52.22   |
> | floating_network_id | 9b758062-2be8-4244-a5a9-3f878f74e006 |
> | id  | 7c0db4ff-8378-4b91-9a6e-87ec06016b0f |
> | port_id | b259770d-7f9c-485a-8f84-bf7b1bbc5706 |
> | router_id   | 43ceb267-2a4b-418a-bc9a-08d39623d3c0 |
> | tenant_id   | f181a9c2b1b4443dbd91b1b7de716185 |
> +-+--+
>
> *3) Boot the VM with the port id in step 1)*
> [root@db01b05 ~(keystone_admin)]#  nova boot --image
> centos64-x86_64-cfntools --flavor 2 --key-name adminkey --nic
> port-id=b259770d-7f9c-485a-8f84-bf7b1bbc5706 vm0001
>
> +--+--+
> | Property |
> Value|
>
> +--+--+
> | OS-EXT-STS:task_state|
> scheduling   |
> | image|
> centos64-x86_64-cfntools |
> | OS-EXT-STS:vm_state  |
> building |
> | OS-EXT-SRV-ATTR:instance_name|
> instance-0026|
> | OS-SRV-USG:launched_at   |
> None |
> | flavor   |
> m1.small |
> | id   |
> c0cebd6b-94ae-4305-8619-c013d45f0727 |
> | security_groups  | [{u'name':
> u'default'}]  |
> | user_id  |
> 345dd87da2364fa78ffe97ed349bb71b |
> | OS-DCF:diskConfig|
> MANUAL   |
> | accessIPv4
> |  |
> | accessIPv6
> |  |
> | progress |
> 0|
> | OS-EXT-STS:

Re: [openstack-dev] [Network] Allocate MAC and IP address for a VM instance

2014-02-19 Thread Dong Liu
Sorry for replying so late.

Yes, that is what I mean, btw, if you only need floatingip to bind vm mac, you 
do not need to specified --fix_ip, just specify the --mac-address is ok.

What I mean floatingip-mac is that, actually, when you creating a floatingip, 
neutron will automatic create a port use that public ip, this port has a 
mac-address, I mean this one.


在 2014年2月19日,18:22,Jay Lau  写道:

> Hi Liu Dong,
> 
> Just found a solution for this as following, the method is using fixed ip as 
> a bridge for MAC and floating ip.
> 
> Can you please help check if it is the way that you want me to do? If not, 
> can you please give some suggestion for your idea?
> 
> Thanks,
> 
> Jay
> 
> ==My steps==
> Suppose I want to bind MAC fa:16:3e:9d:e9:11 to floating ip 9.21.52.22, I was 
> doing as following:
> 
> 1) Create a port for fixed ip with the MAC address fa:16:3e:9d:e9:11
> [root@db01b05 ~(keystone_admin)]#  neutron port-create IntAdmin  
> --mac-address fa:16:3e:9d:e9:11 --fixed-ip ip_address=10.0.1.2 
> Created a new port:
> +---+-+
> | Field | Value   
> |
> +---+-+
> | admin_state_up| True
> |
> | allowed_address_pairs | 
> |
> | binding:capabilities  | {"port_filter": true}   
> |
> | binding:host_id   | 
> |
> | binding:vif_type  | ovs 
> |
> | device_id | 
> |
> | device_owner  | 
> |
> | fixed_ips | {"subnet_id": 
> "0fff20f4-142a-4e89-add1-5c5a79c6d54d", "ip_address": "10.0.1.2"} |
> | id| b259770d-7f9c-485a-8f84-bf7b1bbc5706
> |
> | mac_address   | fa:16:3e:9d:e9:11   
> |
> | name  | 
> |
> | network_id| fb1a75f9-e468-408b-a172-5d2b3802d862
> |
> | security_groups   | aa3f3025-ba71-476d-a126-25a9e3b34c9a
> |
> | status| DOWN
> |
> | tenant_id | f181a9c2b1b4443dbd91b1b7de716185
> |
> +---+-+
> [root@db01b05 ~(keystone_admin)]# neutron port-list | grep 10.0.1.2
> | b259770d-7f9c-485a-8f84-bf7b1bbc5706 |  | fa:16:3e:9d:e9:11 | 
> {"subnet_id": "0fff20f4-142a-4e89-add1-5c5a79c6d54d", "ip_address": 
> "10.0.1.2"}   |
> 
> 2) Create a floating ip with the port id created in step 1)
> [root@db01b05 ~(keystone_admin)]# neutron floatingip-create --port-id 
> b259770d-7f9c-485a-8f84-bf7b1bbc5706 Ex
> Created a new floatingip:
> +-+--+
> | Field   | Value|
> +-+--+
> | fixed_ip_address| 10.0.1.2 |
> | floating_ip_address | 9.21.52.22   |
> | floating_network_id | 9b758062-2be8-4244-a5a9-3f878f74e006 |
> | id  | 7c0db4ff-8378-4b91-9a6e-87ec06016b0f |
> | port_id | b259770d-7f9c-485a-8f84-bf7b1bbc5706 |
> | router_id   | 43ceb267-2a4b-418a-bc9a-08d39623d3c0 |
> | tenant_id   | f181a9c2b1b4443dbd91b1b7de716185 |
> +-+--+
> 
> 3) Boot the VM with the port id in step 1)
> [root@db01b05 ~(keystone_admin)]#  nova boot --image centos64-x86_64-cfntools 
> --flavor 2 --key-name adminkey --nic 
> port-id=b259770d-7f9c-485a-8f84-bf7b1bbc5706 vm0001
> +--+--+
> | Property | Value
> |
> +--+--+
> | OS-EXT-STS:task_state| scheduling   
> |
> | image| centos64-x86_64-cfntools 
> |

Re: [openstack-dev] [Network] Allocate MAC and IP address for a VM instance

2014-02-19 Thread Jay Lau
Hi Liu Dong,

Just found a solution for this as following, the method is using fixed ip
as a bridge for MAC and floating ip.

Can you please help check if it is the way that you want me to do? If not,
can you please give some suggestion for your idea?

Thanks,

Jay

==My steps==
Suppose I want to bind MAC fa:16:3e:9d:e9:11 to floating ip 9.21.52.22, I
was doing as following:

*1) Create a port for fixed ip with the MAC address fa:16:3e:9d:e9:11*
[root@db01b05 ~(keystone_admin)]#  neutron port-create IntAdmin
--mac-address fa:16:3e:9d:e9:11 --fixed-ip ip_address=10.0.1.2
Created a new port:
+---+-+
| Field |
Value
|
+---+-+
| admin_state_up|
True
|
| allowed_address_pairs
|
|
| binding:capabilities  | {"port_filter":
true}   |
| binding:host_id
|
|
| binding:vif_type  |
ovs
|
| device_id
|
|
| device_owner
|
|
| fixed_ips | {"subnet_id":
"0fff20f4-142a-4e89-add1-5c5a79c6d54d", "ip_address": "10.0.1.2"} |
| id|
b259770d-7f9c-485a-8f84-bf7b1bbc5706
|
| mac_address   |
fa:16:3e:9d:e9:11
|
| name
|
|
| network_id|
fb1a75f9-e468-408b-a172-5d2b3802d862
|
| security_groups   |
aa3f3025-ba71-476d-a126-25a9e3b34c9a
|
| status|
DOWN
|
| tenant_id |
f181a9c2b1b4443dbd91b1b7de716185
|
+---+-+
[root@db01b05 ~(keystone_admin)]# neutron port-list | grep 10.0.1.2
| b259770d-7f9c-485a-8f84-bf7b1bbc5706 |  | fa:16:3e:9d:e9:11 |
{"subnet_id": "0fff20f4-142a-4e89-add1-5c5a79c6d54d", "ip_address":
"10.0.1.2"}   |

*2) Create a floating ip with the port id created in step 1)*
[root@db01b05 ~(keystone_admin)]# neutron floatingip-create --port-id
b259770d-7f9c-485a-8f84-bf7b1bbc5706 Ex
Created a new floatingip:
+-+--+
| Field   | Value|
+-+--+
| fixed_ip_address| 10.0.1.2 |
| floating_ip_address | 9.21.52.22   |
| floating_network_id | 9b758062-2be8-4244-a5a9-3f878f74e006 |
| id  | 7c0db4ff-8378-4b91-9a6e-87ec06016b0f |
| port_id | b259770d-7f9c-485a-8f84-bf7b1bbc5706 |
| router_id   | 43ceb267-2a4b-418a-bc9a-08d39623d3c0 |
| tenant_id   | f181a9c2b1b4443dbd91b1b7de716185 |
+-+--+

*3) Boot the VM with the port id in step 1)*
[root@db01b05 ~(keystone_admin)]#  nova boot --image
centos64-x86_64-cfntools --flavor 2 --key-name adminkey --nic
port-id=b259770d-7f9c-485a-8f84-bf7b1bbc5706 vm0001
+--+--+
| Property |
Value|
+--+--+
| OS-EXT-STS:task_state|
scheduling   |
| image|
centos64-x86_64-cfntools |
| OS-EXT-STS:vm_state  |
building |
| OS-EXT-SRV-ATTR:instance_name|
instance-0026|
| OS-SRV-USG:launched_at   |
None |
| flavor   |
m1.small |
| id   |
c0cebd6b-94ae-4305-8619-c013d45f0727 |
| security_groups  | [{u'name':
u'default'}]  |
| user_id  |
345dd87da2364fa78ffe97ed349bb71b |
| OS-DCF:diskConfig|
MANUAL   |
| accessIPv4
|  |
| accessIPv6
|  |
| progress |
0|
| OS-EXT-STS:power_state   |
0|
| OS-EXT-AZ:availability_zone  |
nova |
| config_drive
|  |
| status   |
BUILD|
| updated  |
2014-02-19T10:12:36Z |
| hostId
|  |
| OS-EXT-SRV-ATTR:host |
None |
| OS-SRV-USG:terminated_at |
None |
| key_name |
adminkey |
| OS-EXT-SRV-ATTR:hypervisor_hostname  |
None |
| name   

Re: [openstack-dev] [Network] Allocate MAC and IP address for a VM instance

2014-02-19 Thread Jay Lau
Thanks Liu Dong.

It is a VM mac address, so do you have any idea for how can I make sure the
VM mac address can bind to a floating ip address?

Also what do you mean by floatingip mac?

Really thanks very much for your kind help, it is really helped me a lot!

Thanks,

Jay



2014-02-19 16:21 GMT+08:00 Dong Liu :

> Jay, what the mac belong to? Is it a vm mac, or a mac of floatingip.
> If it is a vm mac, you can associate any floatingip to vm port.
> If it is a floatingip mac, I have no idea.
>
> 2014-02-19 11:44, Jay Lau :
>
>> Thanks Liu Dong.
>>
>> In case that you may not get my previous question, so here just post it
>> again to see if you can give a help.
>>
>> Is it possible to bind MAC to a FLOATING IP?
>>
>> Thanks,
>>
>> Jay
>>
>>
>>
>> 2014-02-19 10:38 GMT+08:00 Dong Liu > >:
>>
>>
>> yes, it does not worked via dashboard
>>
>> Dong Liu
>>
>> 于 2014-02-19 8:11, Jay Lau 写道:
>>
>> Thanks Dong for the great help, it does worked with command line!
>>
>> This seems not available via dashboard, right?
>>
>> Thanks,
>>
>> Jay
>>
>>
>>
>> 2014-02-19 1:11 GMT+08:00 Dong Liu > 
>> >>__:
>>
>>
>>
>>  Hi Jay,
>>
>>  In neutron API, you could create port with specified
>> mac_address and
>>  fix_ip, and then create vm with this port.
>>  But the mapping of them need to manage by yourself.
>>
>>
>>  在 2014年2月18日,22:41,Jay Lau > 
>>  > >__> 写道:
>>
>>
>>
>>   > Greetings,
>>   >
>>   > Not sure if it is suitable to ask this question in
>> openstack-dev
>>  list. Here come a question related to network and want to
>> get some
>>  input or comments from you experts.
>>   >
>>   > My case is as this: For some security issue, I want to
>> put both
>>  MAC and internal IP address to a pool and when create VM, I
>> can get
>>  MAC and its mapped IP address and assign the MAC and IP
>> address to
>>  the VM.
>>   >
>>   > For example, suppose I have following MAC and IP pool:
>>   > 1) 78:2b:cb:af:78:b0, 192.168.0.10
>>   > 2) 78:2b:cb:af:78:b1, 192.168.0.11
>>   > 3) 78:2b:cb:af:78:b2, 192.168.0.12
>>   > 4) 78:2b:cb:af:78:b3, 192.168.0.13
>>   >
>>   > Then I can create four VMs using above MAC and IP
>> address, each
>>  row in above can be mapped to a VM.
>>   >
>>   > Does any of you have any idea for the solution of this?
>>   >
>>   > --
>>   > Thanks,
>>   >
>>   > Jay
>>   > _
>>   > OpenStack-dev mailing list
>>   > OpenStack-dev@lists.openstack.__org
>> 
>>  > >
>>
>>   >
>> http://lists.openstack.org/__cgi-bin/mailman/listinfo/__
>> openstack-dev
>> > openstack-dev>
>>
>>
>>  _
>>  OpenStack-dev mailing list
>> OpenStack-dev@lists.openstack.__org
>> 
>>  > >
>>
>> http://lists.openstack.org/__cgi-bin/mailman/listinfo/__
>> openstack-dev
>>
>> > openstack-dev>
>>
>>
>>
>>
>> --
>> Thanks,
>>
>> Jay
>>
>>
>> _
>> OpenStack-dev mailing list
>> OpenStack-dev@lists.openstack.__org
>> 
>> http://lists.openstack.org/__cgi-bin/mailman/listinfo/__
>> openstack-dev
>> > openstack-dev>
>>
>>
>>
>> _
>> OpenStack-dev mailing list
>> OpenStack-dev@lists.openstack.__org
>> 
>> http://lists.openstack.org/__cgi-bin/mailman/listinfo/__openstack-dev<
>> http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev>
>>
>>
>>
>>
>>
>> --
>> Thanks,
>>
>> Jay
>>
>>
>> ___
>> OpenStack-dev mailing list
>> OpenStack-dev@lis

Re: [openstack-dev] [Network] Allocate MAC and IP address for a VM instance

2014-02-19 Thread Dong Liu

Jay, what the mac belong to? Is it a vm mac, or a mac of floatingip.
If it is a vm mac, you can associate any floatingip to vm port.
If it is a floatingip mac, I have no idea.

2014-02-19 11:44, Jay Lau :

Thanks Liu Dong.

In case that you may not get my previous question, so here just post it
again to see if you can give a help.

Is it possible to bind MAC to a FLOATING IP?

Thanks,

Jay



2014-02-19 10:38 GMT+08:00 Dong Liu mailto:willowd...@gmail.com>>:

yes, it does not worked via dashboard

Dong Liu

于 2014-02-19 8:11, Jay Lau 写道:

Thanks Dong for the great help, it does worked with command line!

This seems not available via dashboard, right?

Thanks,

Jay



2014-02-19 1:11 GMT+08:00 Dong Liu mailto:willowd...@gmail.com>
>>__:


 Hi Jay,

 In neutron API, you could create port with specified
mac_address and
 fix_ip, and then create vm with this port.
 But the mapping of them need to manage by yourself.


 在 2014年2月18日,22:41,Jay Lau mailto:jay.lau@gmail.com>
 >__> 写道:


  > Greetings,
  >
  > Not sure if it is suitable to ask this question in
openstack-dev
 list. Here come a question related to network and want to
get some
 input or comments from you experts.
  >
  > My case is as this: For some security issue, I want to
put both
 MAC and internal IP address to a pool and when create VM, I
can get
 MAC and its mapped IP address and assign the MAC and IP
address to
 the VM.
  >
  > For example, suppose I have following MAC and IP pool:
  > 1) 78:2b:cb:af:78:b0, 192.168.0.10
  > 2) 78:2b:cb:af:78:b1, 192.168.0.11
  > 3) 78:2b:cb:af:78:b2, 192.168.0.12
  > 4) 78:2b:cb:af:78:b3, 192.168.0.13
  >
  > Then I can create four VMs using above MAC and IP
address, each
 row in above can be mapped to a VM.
  >
  > Does any of you have any idea for the solution of this?
  >
  > --
  > Thanks,
  >
  > Jay
  > _
  > OpenStack-dev mailing list
  > OpenStack-dev@lists.openstack.__org

 >

  >
http://lists.openstack.org/__cgi-bin/mailman/listinfo/__openstack-dev



 _
 OpenStack-dev mailing list
OpenStack-dev@lists.openstack.__org

 >

http://lists.openstack.org/__cgi-bin/mailman/listinfo/__openstack-dev





--
Thanks,

Jay


_
OpenStack-dev mailing list
OpenStack-dev@lists.openstack.__org

http://lists.openstack.org/__cgi-bin/mailman/listinfo/__openstack-dev




_
OpenStack-dev mailing list
OpenStack-dev@lists.openstack.__org

http://lists.openstack.org/__cgi-bin/mailman/listinfo/__openstack-dev 





--
Thanks,

Jay


___
OpenStack-dev mailing list
OpenStack-dev@lists.openstack.org
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev




___
OpenStack-dev mailing list
OpenStack-dev@lists.openstack.org
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev


Re: [openstack-dev] [Network] Allocate MAC and IP address for a VM instance

2014-02-18 Thread Jay Lau
Thanks Liu Dong.

In case that you may not get my previous question, so here just post it
again to see if you can give a help.

Is it possible to bind MAC to a FLOATING IP?

Thanks,

Jay



2014-02-19 10:38 GMT+08:00 Dong Liu :

> yes, it does not worked via dashboard
>
> Dong Liu
>
> 于 2014-02-19 8:11, Jay Lau 写道:
>
>> Thanks Dong for the great help, it does worked with command line!
>>
>> This seems not available via dashboard, right?
>>
>> Thanks,
>>
>> Jay
>>
>>
>>
>> 2014-02-19 1:11 GMT+08:00 Dong Liu > >:
>>
>>
>> Hi Jay,
>>
>> In neutron API, you could create port with specified mac_address and
>> fix_ip, and then create vm with this port.
>> But the mapping of them need to manage by yourself.
>>
>>
>> 在 2014年2月18日,22:41,Jay Lau > > 写道:
>>
>>
>>  > Greetings,
>>  >
>>  > Not sure if it is suitable to ask this question in openstack-dev
>> list. Here come a question related to network and want to get some
>> input or comments from you experts.
>>  >
>>  > My case is as this: For some security issue, I want to put both
>> MAC and internal IP address to a pool and when create VM, I can get
>> MAC and its mapped IP address and assign the MAC and IP address to
>> the VM.
>>  >
>>  > For example, suppose I have following MAC and IP pool:
>>  > 1) 78:2b:cb:af:78:b0, 192.168.0.10
>>  > 2) 78:2b:cb:af:78:b1, 192.168.0.11
>>  > 3) 78:2b:cb:af:78:b2, 192.168.0.12
>>  > 4) 78:2b:cb:af:78:b3, 192.168.0.13
>>  >
>>  > Then I can create four VMs using above MAC and IP address, each
>> row in above can be mapped to a VM.
>>  >
>>  > Does any of you have any idea for the solution of this?
>>  >
>>  > --
>>  > Thanks,
>>  >
>>  > Jay
>>  > ___
>>  > OpenStack-dev mailing list
>>  > OpenStack-dev@lists.openstack.org
>> 
>>
>>  > http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev
>>
>>
>> ___
>> OpenStack-dev mailing list
>> OpenStack-dev@lists.openstack.org
>> 
>>
>> http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev
>>
>>
>>
>>
>> --
>> Thanks,
>>
>> Jay
>>
>>
>> ___
>> OpenStack-dev mailing list
>> OpenStack-dev@lists.openstack.org
>> http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev
>>
>>
>
> ___
> OpenStack-dev mailing list
> OpenStack-dev@lists.openstack.org
> http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev
>



-- 
Thanks,

Jay
___
OpenStack-dev mailing list
OpenStack-dev@lists.openstack.org
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev


Re: [openstack-dev] [Network] Allocate MAC and IP address for a VM instance

2014-02-18 Thread Dong Liu

yes, it does not worked via dashboard

Dong Liu

于 2014-02-19 8:11, Jay Lau 写道:

Thanks Dong for the great help, it does worked with command line!

This seems not available via dashboard, right?

Thanks,

Jay



2014-02-19 1:11 GMT+08:00 Dong Liu mailto:willowd...@gmail.com>>:

Hi Jay,

In neutron API, you could create port with specified mac_address and
fix_ip, and then create vm with this port.
But the mapping of them need to manage by yourself.


在 2014年2月18日,22:41,Jay Lau mailto:jay.lau@gmail.com>> 写道:

 > Greetings,
 >
 > Not sure if it is suitable to ask this question in openstack-dev
list. Here come a question related to network and want to get some
input or comments from you experts.
 >
 > My case is as this: For some security issue, I want to put both
MAC and internal IP address to a pool and when create VM, I can get
MAC and its mapped IP address and assign the MAC and IP address to
the VM.
 >
 > For example, suppose I have following MAC and IP pool:
 > 1) 78:2b:cb:af:78:b0, 192.168.0.10
 > 2) 78:2b:cb:af:78:b1, 192.168.0.11
 > 3) 78:2b:cb:af:78:b2, 192.168.0.12
 > 4) 78:2b:cb:af:78:b3, 192.168.0.13
 >
 > Then I can create four VMs using above MAC and IP address, each
row in above can be mapped to a VM.
 >
 > Does any of you have any idea for the solution of this?
 >
 > --
 > Thanks,
 >
 > Jay
 > ___
 > OpenStack-dev mailing list
 > OpenStack-dev@lists.openstack.org

 > http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev


___
OpenStack-dev mailing list
OpenStack-dev@lists.openstack.org

http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev




--
Thanks,

Jay


___
OpenStack-dev mailing list
OpenStack-dev@lists.openstack.org
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev




___
OpenStack-dev mailing list
OpenStack-dev@lists.openstack.org
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev


Re: [openstack-dev] [Network] Allocate MAC and IP address for a VM instance

2014-02-18 Thread Jay Lau
Also thanks Tim and Amir for the input here.

Just one more question and hope can also get some help from you ;-)

I have tried that we can create VM with MAC and FIXED IP bind together,
what about floating IP? Is it possible that I also bind MAC and FLOATING IP
for a VM?

===MAC and FIXED IP BIND===
[root@db01b05 ~(keystone_admin)]# neutron net-list
+--+--+---+
| id   | name |
subnets   |
+--+--+---+
| 489e5aac-aedb-4d94-b908-fc8079dee25c | Int  |
f307d9fd-2444-4ad0-b21a-9f490b182cbb 10.0.0.0/24  |
| 9b758062-2be8-4244-a5a9-3f878f74e006 | Ex   |
b76e9845-8ee1-4794-ae81-4514ce18b428 9.21.52.0/24 |
| fb1a75f9-e468-408b-a172-5d2b3802d862 | IntAdmin |
0fff20f4-142a-4e89-add1-5c5a79c6d54d 10.0.1.0/24  |
+--+--+---+
[root@db01b05 ~(keystone_admin)]# neutron subnet-list
+--+-+--+--+
| id   | name| cidr |
allocation_pools |
+--+-+--+--+
| 0fff20f4-142a-4e89-add1-5c5a79c6d54d | SubIntAdmin | 10.0.1.0/24  |
{"start": "10.0.1.2", "end": "10.0.1.254"}   |
| b76e9845-8ee1-4794-ae81-4514ce18b428 | SubEx   | 9.21.52.0/24 |
{"start": "9.21.52.20", "end": "9.21.52.30"} |
| f307d9fd-2444-4ad0-b21a-9f490b182cbb | SubInt  | 10.0.0.0/24  |
{"start": "10.0.0.3", "end": "10.0.0.254"}   |
|  | |  |
{"start": "10.0.0.1", "end": "10.0.0.1"} |
+--+-+--+--+
[root@db01b05 ~(keystone_admin)]# neutron port-create IntAdmin
--mac-address fa:16:3e:9d:e9:11 --fixed-ip ip_address=10.0.1.2
Created a new port:
+---+-+
| Field |
Value
|
+---+-+
| admin_state_up|
True
|
| allowed_address_pairs
|
|
| binding:capabilities  | {"port_filter":
true}   |
| binding:host_id
|
|
| binding:vif_type  |
ovs
|
| device_id
|
|
| device_owner
|
|
| fixed_ips | {"subnet_id":
"0fff20f4-142a-4e89-add1-5c5a79c6d54d", "ip_address": "10.0.1.2"} |
| id|
75a4eca1-1edf-415e-9bce-34a228145110
|
| mac_address   |
fa:16:3e:9d:e9:11
|
| name
|
|
| network_id|
fb1a75f9-e468-408b-a172-5d2b3802d862
|
| security_groups   |
aa3f3025-ba71-476d-a126-25a9e3b34c9a
|
| status|
DOWN
|
| tenant_id |
f181a9c2b1b4443dbd91b1b7de716185
|
+---+-+
[root@db01b05 ~(keystone_admin)]# neutron port-list | grep 10.0.1.2
| 75a4eca1-1edf-415e-9bce-34a228145110 |  | fa:16:3e:9d:e9:11 |
{"subnet_id": "0fff20f4-142a-4e89-add1-5c5a79c6d54d", "ip_address":
"10.0.1.2"}   |
[root@db01b05 ~(keystone_admin)]# nova boot --image
centos64-x86_64-cfntools --flavor 2 --key-name adminkey --nic
port-id=75a4eca1-1edf-415e-9bce-34a228145110 vm0001
+--+--+
| Property |
Value|
+--+--+
| OS-EXT-STS:task_state|
scheduling   |
| image|
centos64-x86_64-cfntools |
| OS-EXT-STS:vm_state  |
building |
| OS-EXT-SRV-ATTR:instance_name|
instance-0023|
| OS-SRV-USG:launched_at   |
None |
| flavor   |
m1.small |
| id   |
9af14d06-6fa8-4757-8eb7-118ea01d3fdb |
| security_groups  | [{u'name':
u'default'}]  |
| user_id  |
345dd87da2364fa78ffe97ed349bb71b |
| OS-DCF:diskConfig|
MANUAL   |
| accessIPv4
|  |
| accessIPv6
|  |
| progress |
0|
| OS-EXT-STS:power_state   |
0

Re: [openstack-dev] [Network] Allocate MAC and IP address for a VM instance

2014-02-18 Thread Jay Lau
Thanks Dong for the great help, it does worked with command line!

This seems not available via dashboard, right?

Thanks,

Jay



2014-02-19 1:11 GMT+08:00 Dong Liu :

> Hi Jay,
>
> In neutron API, you could create port with specified mac_address and
> fix_ip, and then create vm with this port.
> But the mapping of them need to manage by yourself.
>
>
> 在 2014年2月18日,22:41,Jay Lau  写道:
>
> > Greetings,
> >
> > Not sure if it is suitable to ask this question in openstack-dev list.
> Here come a question related to network and want to get some input or
> comments from you experts.
> >
> > My case is as this: For some security issue, I want to put both MAC and
> internal IP address to a pool and when create VM, I can get MAC and its
> mapped IP address and assign the MAC and IP address to the VM.
> >
> > For example, suppose I have following MAC and IP pool:
> > 1) 78:2b:cb:af:78:b0, 192.168.0.10
> > 2) 78:2b:cb:af:78:b1, 192.168.0.11
> > 3) 78:2b:cb:af:78:b2, 192.168.0.12
> > 4) 78:2b:cb:af:78:b3, 192.168.0.13
> >
> > Then I can create four VMs using above MAC and IP address, each row in
> above can be mapped to a VM.
> >
> > Does any of you have any idea for the solution of this?
> >
> > --
> > Thanks,
> >
> > Jay
> > ___
> > OpenStack-dev mailing list
> > OpenStack-dev@lists.openstack.org
> > http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev
>
>
> ___
> OpenStack-dev mailing list
> OpenStack-dev@lists.openstack.org
> http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev
>



-- 
Thanks,

Jay
___
OpenStack-dev mailing list
OpenStack-dev@lists.openstack.org
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev


Re: [openstack-dev] [Network] Allocate MAC and IP address for a VM instance

2014-02-18 Thread Amir Sadoughi
Hi all,

In Rackspace's quark plugin (github.com/rackerlabs/quark), we’ve developed an 
extension for MAC address ranges (MARs) as a top-level resource. Thus, the 
Neutron service manages the MAC address allocation from a pool of ranges (as 
opposed to randomly generating a MAC address). However, we haven’t made a 
relationship between MARs and subnets/networks.

Amir


On Feb 18, 2014, at 11:24 AM, Tim Bell  wrote:

> 
> Jay,
> 
> We've got a similar requirement at CERN where we would like to have pools of 
> ip/mac combinations for each subnet and have it so that the user is just 
> allocated one (and for the same subnet that the hypervisor is on).
> 
> We've not found a good solution so far.
> 
> Tim
> 
>> -Original Message-
>> From: Dong Liu [mailto:willowd...@gmail.com]
>> Sent: 18 February 2014 18:12
>> To: OpenStack Development Mailing List (not for usage questions)
>> Subject: Re: [openstack-dev] [Network] Allocate MAC and IP address for a VM 
>> instance
>> 
>> Hi Jay,
>> 
>> In neutron API, you could create port with specified mac_address and fix_ip, 
>> and then create vm with this port.
>> But the mapping of them need to manage by yourself.
>> 
>> 
>> 在 2014年2月18日,22:41,Jay Lau  写道:
>> 
>>> Greetings,
>>> 
>>> Not sure if it is suitable to ask this question in openstack-dev list. Here 
>>> come a question related to network and want to get some
>> input or comments from you experts.
>>> 
>>> My case is as this: For some security issue, I want to put both MAC and 
>>> internal IP address to a pool and when create VM, I can get
>> MAC and its mapped IP address and assign the MAC and IP address to the VM.
>>> 
>>> For example, suppose I have following MAC and IP pool:
>>> 1) 78:2b:cb:af:78:b0, 192.168.0.10
>>> 2) 78:2b:cb:af:78:b1, 192.168.0.11
>>> 3) 78:2b:cb:af:78:b2, 192.168.0.12
>>> 4) 78:2b:cb:af:78:b3, 192.168.0.13
>>> 
>>> Then I can create four VMs using above MAC and IP address, each row in 
>>> above can be mapped to a VM.
>>> 
>>> Does any of you have any idea for the solution of this?
>>> 
>>> --
>>> Thanks,
>>> 
>>> Jay
>>> ___
>>> OpenStack-dev mailing list
>>> OpenStack-dev@lists.openstack.org
>>> http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev
>> 
>> 
>> ___
>> OpenStack-dev mailing list
>> OpenStack-dev@lists.openstack.org
>> http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev
> 
> ___
> OpenStack-dev mailing list
> OpenStack-dev@lists.openstack.org
> http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev


___
OpenStack-dev mailing list
OpenStack-dev@lists.openstack.org
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev


Re: [openstack-dev] [Network] Allocate MAC and IP address for a VM instance

2014-02-18 Thread Tim Bell

Jay,

We've got a similar requirement at CERN where we would like to have pools of 
ip/mac combinations for each subnet and have it so that the user is just 
allocated one (and for the same subnet that the hypervisor is on).

We've not found a good solution so far.

Tim

> -Original Message-
> From: Dong Liu [mailto:willowd...@gmail.com]
> Sent: 18 February 2014 18:12
> To: OpenStack Development Mailing List (not for usage questions)
> Subject: Re: [openstack-dev] [Network] Allocate MAC and IP address for a VM 
> instance
> 
> Hi Jay,
> 
> In neutron API, you could create port with specified mac_address and fix_ip, 
> and then create vm with this port.
> But the mapping of them need to manage by yourself.
> 
> 
> 在 2014年2月18日,22:41,Jay Lau  写道:
> 
> > Greetings,
> >
> > Not sure if it is suitable to ask this question in openstack-dev list. Here 
> > come a question related to network and want to get some
> input or comments from you experts.
> >
> > My case is as this: For some security issue, I want to put both MAC and 
> > internal IP address to a pool and when create VM, I can get
> MAC and its mapped IP address and assign the MAC and IP address to the VM.
> >
> > For example, suppose I have following MAC and IP pool:
> > 1) 78:2b:cb:af:78:b0, 192.168.0.10
> > 2) 78:2b:cb:af:78:b1, 192.168.0.11
> > 3) 78:2b:cb:af:78:b2, 192.168.0.12
> > 4) 78:2b:cb:af:78:b3, 192.168.0.13
> >
> > Then I can create four VMs using above MAC and IP address, each row in 
> > above can be mapped to a VM.
> >
> > Does any of you have any idea for the solution of this?
> >
> > --
> > Thanks,
> >
> > Jay
> > ___
> > OpenStack-dev mailing list
> > OpenStack-dev@lists.openstack.org
> > http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev
> 
> 
> ___
> OpenStack-dev mailing list
> OpenStack-dev@lists.openstack.org
> http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev

___
OpenStack-dev mailing list
OpenStack-dev@lists.openstack.org
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev


Re: [openstack-dev] [Network] Allocate MAC and IP address for a VM instance

2014-02-18 Thread Dong Liu
Hi Jay,

In neutron API, you could create port with specified mac_address and fix_ip, 
and then create vm with this port.
But the mapping of them need to manage by yourself.


在 2014年2月18日,22:41,Jay Lau  写道:

> Greetings,
> 
> Not sure if it is suitable to ask this question in openstack-dev list. Here 
> come a question related to network and want to get some input or comments 
> from you experts.
> 
> My case is as this: For some security issue, I want to put both MAC and 
> internal IP address to a pool and when create VM, I can get MAC and its 
> mapped IP address and assign the MAC and IP address to the VM.
> 
> For example, suppose I have following MAC and IP pool:
> 1) 78:2b:cb:af:78:b0, 192.168.0.10
> 2) 78:2b:cb:af:78:b1, 192.168.0.11
> 3) 78:2b:cb:af:78:b2, 192.168.0.12
> 4) 78:2b:cb:af:78:b3, 192.168.0.13
> 
> Then I can create four VMs using above MAC and IP address, each row in above 
> can be mapped to a VM.
> 
> Does any of you have any idea for the solution of this?
> 
> -- 
> Thanks,
> 
> Jay
> ___
> OpenStack-dev mailing list
> OpenStack-dev@lists.openstack.org
> http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev


___
OpenStack-dev mailing list
OpenStack-dev@lists.openstack.org
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev


[openstack-dev] [Network] Allocate MAC and IP address for a VM instance

2014-02-18 Thread Jay Lau
Greetings,

Not sure if it is suitable to ask this question in openstack-dev list. Here
come a question related to network and want to get some input or comments
from you experts.

My case is as this: For some security issue, I want to put both MAC and
internal IP address to a pool and when create VM, I can get MAC and its
mapped IP address and assign the MAC and IP address to the VM.

For example, suppose I have following MAC and IP pool:
1) 78:2b:cb:af:78:b0, 192.168.0.10
2) 78:2b:cb:af:78:b1, 192.168.0.11
3) 78:2b:cb:af:78:b2, 192.168.0.12
4) 78:2b:cb:af:78:b3, 192.168.0.13

Then I can create four VMs using above MAC and IP address, each row in
above can be mapped to a VM.

Does any of you have any idea for the solution of this?

-- 
Thanks,

Jay
___
OpenStack-dev mailing list
OpenStack-dev@lists.openstack.org
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev