Ask Your Question
1

ip address assignment rule

asked 2014-10-30 19:00:54 -0500

machi029 gravatar image

Let's say I have an IP Pool of 192.168.0.100 - 192.168.0.200

I believe that the first VM instance will get the IP address "192.168.0.100" The Second instance will get the IP address "192.168.0.101" And the Third "192.168.0.102" And so on... meaning I believe the default rule is ascending.

Is it possible to make this rule descending like... 192.168.0.200 -> 192.168.0.199 -> 192.168.0.198

Is there any configuration file to control the ip assignment rule?

I'm asking this because how openstack chooses the ip address was always a mystery for me...

edit retag flag offensive close merge delete

Comments

What kind of IP addresses you mean fixed ( via dnsmasq) or floating ?

DanIzack gravatar imageDanIzack ( 2014-10-31 02:51:32 -0500 )edit

fixed, via dnsmasq

machi029 gravatar imagemachi029 ( 2014-11-03 00:45:58 -0500 )edit

1 answer

Sort by ยป oldest newest most voted
1

answered 2014-10-31 00:01:17 -0500

Hi,

  1. Generally first VM will get the IP 192.168.0.101 instead of 192.168.0.100, since 192.168.0.100 is gateway IP address, which is assigned to your bridge (generally br100).

  2. No we can't make it in descending way because DNSMasq service is going to take of this assignment.

OpenStack uses "dnsmasq" service to assign and manage IP addresses. When you boot your first instance you can see the "dnsmasq" service running on your machine by using "ps -Af | grep dnsmasq" you should get the output like:

root 3606 3605 0 10:14 ? 00:00:00 /usr/sbin/dnsmasq --strict-order --bind-interfaces --conf-file= --pid-file=/var/lib/nova/networks/nova-br100.pid --listen-address=5.5.5.1 --except-interface=lo --dhcp-range=set:demo-net,5.5.5.2,static,255.255.255.0,120s --dhcp-lease-max=256 --dhcp-hostsfile=/var/lib/nova/networks/nova-br100.conf --dhcp-script=/usr/bin/nova-dhcpbridge --leasefile-ro --domain=novalocal --no-hosts --addn-hosts=/var/lib/nova/networks/nova-br100.hosts

edit flag offensive delete link more

Comments

For 1. Thank you for pointing out that For 2. I guess I need to learn about dnsmasq more.

machi029 gravatar imagemachi029 ( 2014-11-03 00:47:47 -0500 )edit

Exactly... If that is possible in DNSMasq then you we use in OpenStack also. :) Good luck.

TechPatron gravatar imageTechPatron ( 2014-11-03 00:57:11 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Get to know Ask OpenStack

Resources for moderators

Question Tools

1 follower

Stats

Asked: 2014-10-30 19:00:54 -0500

Seen: 91 times

Last updated: Oct 31 '14