<div dir="ltr">I am afraid there is no way of having two NICs on the same network at the moment.<div><br></div><div style>If you are trying to deploy a VM which provides some form of network service, like packet filtering, you might think about implementing it as a quantum service plugin.</div>
<div style>The 'agent' for this plugin would plug two tap interfaces connected to the same network, and do the processing as you suggest.</div><div style><br></div><div style>Clearly, this is not very easy, as it would require you to implement a plugin, possibly an API for it, as well as an agent which uses Quantum library functions for plugging/unplugging interfaces.</div>
<div style>The agent will also have the responsibility for starting/stopping the service you're providing.</div><div style><br></div><div style>Salvatore</div></div><div class="gmail_extra"><br><br><div class="gmail_quote">
On 28 May 2013 07:34, Liu Wenmao <span dir="ltr"><<a href="mailto:marvelliu@gmail.com" target="_blank">marvelliu@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div dir="ltr">Thanks Salvatore<div><br></div><div>I can create two ports with admin-state down, which are in the same network, but nova says that the two NICs of the VM can not be in the same network.</div><div>

<br></div><div>Actually I want to redirect all the packets of the network to VM eth0, after some processes the VM sends the packets out to eth1, so the two NICs should be in the same network. Is it possible?</div><div>

<br></div><div><br></div><div><div>root@node1:/usr/src/python-quantumclient# quantum port-create --admin-state-down net1</div><div>Created a new port:</div><div>+----------------------+-----------------------------------------------------------------------------------+</div>


<div>| Field                | Value                                                                             |</div><div>+----------------------+-----------------------------------------------------------------------------------+</div>


<div>| admin_state_up       | False                                                                             |</div><div>| binding:capabilities | {"port_filter": false}                                                            |</div>


<div>| binding:vif_type     | ovs                                                                               |</div><div>| device_id            |                                                                                   |</div>


<div>| device_owner         |                                                                                   |</div><div>| fixed_ips            | {"subnet_id": "c11eaa0d-3aff-41a8-909a-1dfdfdf20f48", "ip_address": "100.0.0.12"} |</div>


<div>| id                   | ca48bce7-7e42-4263-8832-cffb6e99ac0a                                              |</div><div>| mac_address          | fa:16:3e:0e:08:e1                                                                 |</div>


<div>| name                 |                                                                                   |</div><div>| network_id           | 17d31ea4-4473-4da0-9493-9a04fa5aff33                                              |</div>


<div>| status               | DOWN                                                                              |</div><div>| tenant_id            | 53707d290204404dbff625378969c25c                                                  |</div>


<div>+----------------------+-----------------------------------------------------------------------------------+</div><div>root@node1:/usr/src/python-quantumclient# quantum port-create --admin-state-down net1</div><div>

Created a new port:</div>
<div>+----------------------+-----------------------------------------------------------------------------------+</div><div>| Field                | Value                                                                             |</div>


<div>+----------------------+-----------------------------------------------------------------------------------+</div><div>| admin_state_up       | False                                                                             |</div>


<div>| binding:capabilities | {"port_filter": false}                                                            |</div><div>| binding:vif_type     | ovs                                                                               |</div>


<div>| device_id            |                                                                                   |</div><div>| device_owner         |                                                                                   |</div>


<div>| fixed_ips            | {"subnet_id": "c11eaa0d-3aff-41a8-909a-1dfdfdf20f48", "ip_address": "100.0.0.13"} |</div><div>| id                   | 8a320aae-4a16-4a78-acba-1ec505cfe914                                              |</div>


<div>| mac_address          | fa:16:3e:db:c5:15                                                                 |</div><div>| name                 |                                                                                   |</div>


<div>| network_id           | 17d31ea4-4473-4da0-9493-9a04fa5aff33                                              |</div><div>| status               | DOWN                                                                              |</div>


<div>| tenant_id            | 53707d290204404dbff625378969c25c                                                  |</div><div>+----------------------+-----------------------------------------------------------------------------------+</div>


<div><br></div><div><div>root@node1:/usr/src/python-quantumclient# nova boot --image cirros --flavor m1.tiny --nic port-id=ca48bce7-7e42-4263-8832-cffb6e99ac0a --nic port-id=8a320aae-4a16-4a78-acba-1ec505cfe914  testips </div>


<div>ERROR: The server has either erred or is incapable of performing the requested operation. (HTTP 500) (Request-ID: req-ac85648c-4e9b-4624-bf88-a6ceeb8e79aa)</div></div><div><br></div><div>nova-api.log:</div><div>

<div>3028 2013-05-28 11:50:06.007 3232 TRACE nova.api.openstack   File "/usr/lib/python2.7/contextlib.py", line 24, in __exit__</div><div>3029 2013-05-28 11:50:06.007 3232 TRACE nova.api.openstack     self.gen.next()</div>


<div>3030 2013-05-28 11:50:06.007 3232 TRACE nova.api.openstack   File "/usr/local/lib/python2.7/dist-packages/nova-2013.1-py2.7.egg/nova/compute/api.py", line 522, in _validate_and_provision_instance</div><div>


3031 2013-05-28 11:50:06.007 3232 TRACE nova.api.openstack     self._check_requested_networks(context, requested_networks)</div><div>3032 2013-05-28 11:50:06.007 3232 TRACE nova.api.openstack   File "/usr/local/lib/python2.7/dist-packages/nova-2013.1-py2.7.egg/nova/compute/api.py", line 358, in _check_requested_networks</div>


<div>3033 2013-05-28 11:50:06.007 3232 TRACE nova.api.openstack     self.network_api.validate_networks(context, requested_networks)</div><div>3034 2013-05-28 11:50:06.007 3232 TRACE nova.api.openstack   File "/usr/local/lib/python2.7/dist-packages/nova-2013.1-py2.7.egg/nova/network/quantumv2/api.py", line 454, in validate_networks</div>


<div>3035 2013-05-28 11:50:06.007 3232 TRACE nova.api.openstack     raise exception.NetworkDuplicated(network_id=net_id)</div><div>3036 2013-05-28 11:50:06.007 3232 TRACE nova.api.openstack NetworkDuplicated: Network 17d31ea4-4473-4da0-9493-9a04fa5aff33 is duplicated.</div>


<div>3037 2013-05-28 11:50:06.007 3232 TRACE nova.api.openstack</div></div></div></div><div class="HOEnZb"><div class="h5"><div class="gmail_extra"><br><br><div class="gmail_quote">On Sat, May 25, 2013 at 5:33 AM, Salvatore Orlando <span dir="ltr"><<a href="mailto:sorlando@nicira.com" target="_blank">sorlando@nicira.com</a>></span> wrote:<br>


<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div class="gmail_extra">Nova does not have an option for creating 'unbound NICs', which would be tantamount to unplugged network cards, if this is what you want to achieve.</div>


<div class="gmail_extra">
<br></div><div class="gmail_extra">Using Quantum you can create a few ports on some network, set these ports administratively down, and boot the VM with this ports (--nic port-id).</div><div class="gmail_extra">
Even if Quantum does not allow you to move these ports to another network perhaps it might still satisfy your requirements.</div><span><font color="#888888"><div class="gmail_extra"><br></div><div class="gmail_extra">

Salvatore</div></font></span><div><div><div class="gmail_extra">
<br></div><div class="gmail_extra"><br><br><div class="gmail_quote">On 24 May 2013 04:23, Istimsak Abdulbasir <span dir="ltr"><<a href="mailto:saqman2060@gmail.com" target="_blank">saqman2060@gmail.com</a>></span> wrote:<br>



<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Are you saying the the VM sees two virtual NICs or two physical NICs?<div><br></div><div>Istimsak Abdulbasir</div>



<div><br></div><div>"change is good"</div></div><div class="gmail_extra">
<br><br><div class="gmail_quote"><div><div>On Thu, May 23, 2013 at 11:18 PM, Liu Wenmao <span dir="ltr"><<a href="mailto:marvelliu@gmail.com" target="_blank">marvelliu@gmail.com</a>></span> wrote:<br></div>
</div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div>
<div dir="ltr">Hello:<div><br></div><div>I have a network with a subnet, I want create a VM with one NIC connected with this subnet, with one or two extra NIC left, because I want to do some more things such as intrusion protection</div>






<div><br></div><div>I wonder is it possible to create a VM with more NICs than its connected network?</div></div>
<br></div></div>_______________________________________________<br>
Mailing list: <a href="https://launchpad.net/~openstack" target="_blank">https://launchpad.net/~openstack</a><br>
Post to     : <a href="mailto:openstack@lists.launchpad.net" target="_blank">openstack@lists.launchpad.net</a><br>
Unsubscribe : <a href="https://launchpad.net/~openstack" target="_blank">https://launchpad.net/~openstack</a><br>
More help   : <a href="https://help.launchpad.net/ListHelp" target="_blank">https://help.launchpad.net/ListHelp</a><br>
<br></blockquote></div><br></div>
<br>_______________________________________________<br>
Mailing list: <a href="https://launchpad.net/~openstack" target="_blank">https://launchpad.net/~openstack</a><br>
Post to     : <a href="mailto:openstack@lists.launchpad.net" target="_blank">openstack@lists.launchpad.net</a><br>
Unsubscribe : <a href="https://launchpad.net/~openstack" target="_blank">https://launchpad.net/~openstack</a><br>
More help   : <a href="https://help.launchpad.net/ListHelp" target="_blank">https://help.launchpad.net/ListHelp</a><br>
<br></blockquote></div><br></div></div></div></div>
</blockquote></div><br></div>
</div></div></blockquote></div><br></div>