<div dir="auto">Depends on the usage.<div dir="auto">If your instance will be the only one on that dhcp network, then on port/server would be better, but if you will need to create more instances on such dhcp usecase, then I would go for a network port security.</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Sun, 31 Jan 2021, 05:54 dangerzone ar, <<a href="mailto:dangerzonen@gmail.com">dangerzonen@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hi Slawek and Ruslans, thanks for the response. In this case the instance is connected to an unknown dhcp network and requests ip from that network to get access to the lan/internet. Thus, there is no known ip range/gw/dns/subnet that configures on the neutron network. From Ruslanas in the email, propose to set subnet as <a href="http://0.0.0.0/0" target="_blank" rel="noreferrer">0.0.0.0/0</a> and disable port security ( on the instance itself or on the network that should be disabled???). <div><br><div>The use case is I have a computer that has been configured as an openstack and with 2 nic ports. An instance created with attached to eth0 and eth1. This is a mobile mini computer that is used for demo purposes...<div>The management openstack is set to network (eth0) <a href="http://192.168.100.0/24" target="_blank" rel="noreferrer">192.168.100.0/24</a> and the second port eth1 is the one that will be connected to the external dhcp network. For example I bring the computer to customer site A for a demo... and connect eth0 to notebook for local management and then connect eth1 to site A to get ip from dhcp server for my instance to access lan/internet from site A network.</div><div>I understand if we have the details of IP range/gw/etc that can be defined as a network, but the scenario here....we don't know the network and requesting ip from unknown dhcp network. </div><div>Hope it gives some ideas... Thanks</div><div><br></div><div><br></div><div><br></div></div></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Fri, Jan 29, 2021 at 4:07 PM Slawek Kaplonski <<a href="mailto:skaplons@redhat.com" target="_blank" rel="noreferrer">skaplons@redhat.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Hi,<br>
<br>
On Fri, Jan 29, 2021 at 12:20:15PM +0800, dangerzone ar wrote:<br>
> Hi, appreciate some advice on how instances in openstack get ip from<br>
> external DHCP server. For example instance is attached to port eth1<br>
> (physical port) and this port is connected to home/office lan port and<br>
> requests dhcp ip. How this can be achieved.<br>
> ***User don't know the dhcp ip range/gw/dns that will be provided by the<br>
> dhcp sever to that instance...instance just attach to eth1 and request<br>
> ip.***<br>
> Similar like our pc/notebook request dhcp ip via wifi or lan port.<br>
> How to establish this in openstack. Please advise and help me.<br>
> Thank you<br>
<br>
You need to disable port security on such instance. Otherwise Neutron will<br>
block traffic from such IP address which is unknown.<br>
Or You need to add this IP address which VM get to the allowed_address_pairs of<br>
the VM's port.<br>
Also, please keep in mind that You will have different IP associated to that VM<br>
in the Neutron, and that will be visible in OpenStack API and different one will<br>
be really used.<br>
<br>
-- <br>
Slawek Kaplonski<br>
Principal Software Engineer<br>
Red Hat<br>
</blockquote></div>
</blockquote></div>