On 29/11/12 13:31, Ritesh Nanda wrote: > hello, > > I am working on openstack , which uses dnsmasq as a dhcp server. > Here is a challenge what i am facing , using dnsmasq configuration file > i am adding a default route to the vms that are created in this > enviornment, now challenge i am facing is i want to add two routes using > dnsmasq configuration file. > > one route for a particular subnet so that it request get forwared to a > gateway > and one as a default route. > eg. > > 192.168.10.0 network request gets forwarded to gateway 192.168.10.6 > and all other request gets forwarded to 192.168.10.1 > > my current dnsmasq.conf is > > dhcp-range=Tenant-sme-a,192.168.10.3,192.168.10.254,255.255.255.0,24h > *dhcp-option=Tenant-sme-a,3,192.168.10.6* ------this add the default route. > domain=sme.com <http://sme.com>,192.168.10.0/24,local > <http://192.168.10.0/24,local> > > Any help would be really appreciated. >
The keyword for Google is "classless static route" and there is a DHCP option to send these, specified in RFC3442. Dnsmasq knows about the option format, it looks like this in the config file. dhcp-option=121,192.168.1.0/24,1.2.3.4 Something like that will get the information to the DHCP client running on your VM. There is no guarantee that the DHCP client will do anything useful with it, that depends on the OS you are running in the VM. I _think_ the dhclient package in Debian supports the option and Google suggests that recent Windows releases do too. Cheers, Simon. _______________________________________________ Dnsmasq-discuss mailing list [email protected] http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss
