<div dir="ltr"><div>this is how i do things without dhcp services in the network.<br><br>1. enable config-drive within server declaration<br>2. using cloud-config write out the network l3 information to a file on the guest.<br></div>3. using cloud-config you can then add an user-data script to your config-drive, <br>4. the user data script will parse the injected file and configure the guest NICs accordingly<br><br><div><div><div><br><br><div style="color:rgb(0,0,0);font-family:tahoma;font-size:13.3333px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255)">resources:</div><div style="color:rgb(0,0,0);font-family:tahoma;font-size:13.3333px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255)">  mysc:</div><div style="color:rgb(0,0,0);font-family:tahoma;font-size:13.3333px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255)">    type: OS::Heat::SoftwareConfig</div><div style="color:rgb(0,0,0);font-family:tahoma;font-size:13.3333px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255)">    properties:</div><div style="color:rgb(0,0,0);font-family:tahoma;font-size:13.3333px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255)">      config:</div><div style="color:rgb(0,0,0);font-family:tahoma;font-size:13.3333px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255)">       str_replace:</div><div style="color:rgb(0,0,0);font-family:tahoma;font-size:13.3333px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255)">         template: {get_file: myscript.sh}</div><div style="color:rgb(0,0,0);font-family:tahoma;font-size:13.3333px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255)">         params:<br></div><div style="color:rgb(0,0,0);font-family:tahoma;font-size:13.3333px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255)">           $target: blah<br></div><div style="color:rgb(0,0,0);font-family:tahoma;font-size:13.3333px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255)">  myuserdata:</div><div style="color:rgb(0,0,0);font-family:tahoma;font-size:13.3333px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255)">    type: OS::Heat::MultipartMime</div><div style="color:rgb(0,0,0);font-family:tahoma;font-size:13.3333px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255)">    properties:</div><div style="color:rgb(0,0,0);font-family:tahoma;font-size:13.3333px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255)">      parts:</div><div style="color:rgb(0,0,0);font-family:tahoma;font-size:13.3333px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255)">      - config: {get_resource: myconfig}</div><div style="color:rgb(0,0,0);font-family:tahoma;font-size:13.3333px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255)">      - config: {get_resource: mysc}</div><div style="color:rgb(0,0,0);font-family:tahoma;font-size:13.3333px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255)">  myconfig:</div><div style="color:rgb(0,0,0);font-family:tahoma;font-size:13.3333px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255)">    type: OS::Heat::CloudConfig</div><div style="color:rgb(0,0,0);font-family:tahoma;font-size:13.3333px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255)">    properties:</div><div style="color:rgb(0,0,0);font-family:tahoma;font-size:13.3333px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255)">      cloud_config:</div><div style="color:rgb(0,0,0);font-family:tahoma;font-size:13.3333px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255)">        write_files:</div><div style="color:rgb(0,0,0);font-family:tahoma;font-size:13.3333px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255)">        - path: /var/tmp/network-out</div><div style="color:rgb(0,0,0);font-family:tahoma;font-size:13.3333px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255)">          content: { get_attr: [ myport1, subnets ] }<br>..<br><div style="color:rgb(0,0,0);font-family:tahoma;font-size:13.3333px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255)">  myserver:</div><div style="color:rgb(0,0,0);font-family:tahoma;font-size:13.3333px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255)">    type: OS::Nova::Server</div><div style="color:rgb(0,0,0);font-family:tahoma;font-size:13.3333px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255)">    properties:</div><div style="color:rgb(0,0,0);font-family:tahoma;font-size:13.3333px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255)">      ..</div><div style="color:rgb(0,0,0);font-family:tahoma;font-size:13.3333px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255)">      config_drive: True<br><div style="color:rgb(0,0,0);font-family:tahoma;font-size:13.3333px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255)">      user_data_format: RAW</div><div style="color:rgb(0,0,0);font-family:tahoma;font-size:13.3333px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255)">      user_data:</div><div style="color:rgb(0,0,0);font-family:tahoma;font-size:13.3333px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255)">        get_resource: myuserdata</div><div style="outline:medium none;padding:10px 0px;width:22px;margin:2px 0px 0px;color:rgb(0,0,0);font-family:tahoma;font-size:13.3333px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255)" class="gmail-yj6qo gmail-ajU"><br class="gmail-Apple-interchange-newline"></div><br></div><div style="outline:medium none;padding:10px 0px;width:22px;margin:2px 0px 0px;color:rgb(0,0,0);font-family:tahoma;font-size:13.3333px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255)" class="gmail-yj6qo gmail-ajU"><br class="gmail-Apple-interchange-newline"></div><br></div><br class="gmail-Apple-interchange-newline"><br></div></div></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Aug 30, 2016 at 9:44 AM, Satish Patel <span dir="ltr"><<a href="mailto:satish.txt@gmail.com" target="_blank">satish.txt@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Robert,<br>
<br>
I didn't find any related configuration which blacklist mac address on<br>
Mitaka. also i didn't find any document stated that DHCP agent only<br>
gives ip address to instance mac address.<br>
<br>
Do you point me to any doc or any kind of material<br>
<br>
On Fri, Aug 26, 2016 at 4:07 PM, Van Leeuwen, Robert<br>
<div class="HOEnZb"><div class="h5"><<a href="mailto:rovanleeuwen@ebay.com">rovanleeuwen@ebay.com</a>> wrote:<br>
> Are you sure it was DHCP misbehaving?<br>
> Because it could also have been that it tried to takeover the gateway IP.<br>
> That would certainly mess with connectivity on the network.<br>
><br>
> Just mentioning because you gave the example --router:external while I think it should be --router:external True<br>
><br>
> Also if it is dhcp misbehaving you might be able to fix it with the dnsmasq_config_file option in the dhcp agent. You can probably blacklist everything that does not start with the OpenStack MAC range. (Base_mac setting)<br>
><br>
> I currently don't have a setup to reproduce this so I cannot be 100% sure about the details or if this works ;-)<br>
><br>
> Cheers,<br>
> Robert van Leeuwen<br>
><br>
><br>
>> On 26 Aug 2016, at 18:58, Satish Patel <<a href="mailto:satish.txt@gmail.com">satish.txt@gmail.com</a>> wrote:<br>
>><br>
>> Robert,<br>
>><br>
>> I remembered in JUNO release when i did flat network with my existing<br>
>> provider LAN then DHCP started giving IPs to my existing LAN clients<br>
>> and people started yelling their network is down :(<br>
>><br>
>> Following networking i configured.<br>
>><br>
>> #neutron net-create network1 --provider:network_type flat<br>
>> --provider:physical_network extnet  --router:external --shared<br>
>><br>
>> #neutron subnet-create --name subnet1 --enable_dhcp=True<br>
>> --allocation-pool=start=10.0.<wbr>3.160,end=10.0.3.166 --gateway=10.0.0.1<br>
>> network1 <a href="http://10.0.0.0/21" rel="noreferrer" target="_blank">10.0.0.0/21</a><br>
>><br>
>> After realizing issue i have changed  --enable_dhcp=False<br>
>><br>
>> On Fri, Aug 26, 2016 at 2:35 AM, Van Leeuwen, Robert<br>
>> <<a href="mailto:rovanleeuwen@ebay.com">rovanleeuwen@ebay.com</a>> wrote:<br>
>>>> When i was trying to use DHCP in openstack i found openstack DHCP<br>
>>>> start provide ip address to my existing LAN machines ( we are using<br>
>>>> flat VLAN with neutron), that is why i disable openstack DHCP, Is it<br>
>>>> common or i am doing something wrong?<br>
>>><br>
>>> I do not think this should happen.<br>
>>> It has been a while (Folsom) since I touched a setup with mixed “LAN” and OpenStack DHCP but IIRC it works like this:<br>
>>><br>
>>> AFAIK the leases file neutron uses is very specific and will only reply to the mac-addresses that are in the dnsmasq config.<br>
>>> Looking at the dnsmasq process it is set to static:<br>
>>> From the man page:<br>
>>> The optional <mode> keyword may be static which tells dnsmasq to enable DHCP for the network specified, but not to dynamically allocate IP addresses, only hosts which have static addresses given via dhcp-host or from /etc/ethers will be served.<br>
>>><br>
>>> Usually the problem is the other way around:<br>
>>> The existing DHCP in the “lan” bites with what OpenStack does. (so an OpenStack instance gets an IP from the lan DHCP)<br>
>>> This can be prevented by blacklisting the MAC address range your instances get in your lan dhcp (Blacklist MAC starting with fa:16:3e )<br>
>>><br>
>>> Cheers,<br>
>>> Robert van Leeuwen<br>
>>><br>
<br>
______________________________<wbr>_________________<br>
Mailing list: <a href="http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack" rel="noreferrer" target="_blank">http://lists.openstack.org/<wbr>cgi-bin/mailman/listinfo/<wbr>openstack</a><br>
Post to     : <a href="mailto:openstack@lists.openstack.org">openstack@lists.openstack.org</a><br>
Unsubscribe : <a href="http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack" rel="noreferrer" target="_blank">http://lists.openstack.org/<wbr>cgi-bin/mailman/listinfo/<wbr>openstack</a><br>
</div></div></blockquote></div><br></div>