Hi Harry,

Actually I worked around that and I made a configuration which is probably wrong,

for dhcp_tag in $dhcp_tags.keys():
#user-class for Cobbler DHCP tag: $dhcp_tag
 #if $dhcp_tags=pxeclient
class "pxeclient" {
  match if option user-class = "pxeclient";
}
 #if $dhcp_tags=foo
  class "mysql" {
  match if option user-class = "foo";
}
 #end if
#if $dhcp_tags=bar
class "others" {
  match if option user-class = "bar";
}
 #end if

subnet 192.168.57.0 netmask 255.255.255.0 {
pool{
allow members of "pxeclient";
option routers 192.168.57.111;
option domain-name-servers 8.8.8.8;
option subnet-mask 255.255.255.0;
range dynamic-bootp 192.168.57.200 192.168.57.254;
filename "/pxelinux.0";
default-lease-time 21600;
max-lease-time 43200;
next-server 192.168.57.111;
}
   pool {
    allow members of "foo";
    range 192.168.57.30 192.168.57.40;
    option routers 192.168.57.102;
  }
  pool {
    allow members of "bar";
    range 192.168.57.50 192.168.57.100;
  }

}

Also I did the settings change manage_dhcp: 1 and no changes in /etc/dhcp/dhcpd.conf file. 

So what's wrong in here?


On Tue, Jun 18, 2013 at 4:02 PM, Harry Hoffman <hhoffman@ip-solutions.net> wrote:
Hi Leo,

Sure, you can.

Check out the template file /etc/cobbler/dhcp.template.

Define the subnets you are using above the line that starts:
#for dhcp_tag in $dhcp_tags.keys():

Then tell cobbler to manage dhcpd by setting manage_dhcp: 1  in
/etc/cobbler/settings.

Restart cobblerd and run cobbler sync. The dhcp.template will be
expanded to /etc/dhcp.conf on redhat > 6 and /etc/dhcp/dhcpd.conf on
redhat =< 6

Cheers,
Harry

On 06/18/2013 08:21 AM, leo loe wrote:
> Hi,
>
> I am newbie on cobblerd. I am curious if I can manage dhclient.conf with
> cobbler. I got many subnets in my network. For example I got a management
> network and project subnet. So my servers have at least two interfaces. Can
> i use cobbler to use for giving IP addresses both of those interfaces. So
> that
>
> eth0: x.x.x.x
> eth1: y:y:y:y
>
> and I can manage to that via dhclient.conf by using user-class option. But
> I don't know how to do this via cobbler by using dhcp_tag. Any ideas?
>
> Regards
>
>
>
> _______________________________________________
> cobbler mailing list
> cobbler@lists.fedorahosted.org
> https://lists.fedorahosted.org/mailman/listinfo/cobbler
>
_______________________________________________
cobbler mailing list
cobbler@lists.fedorahosted.org
https://lists.fedorahosted.org/mailman/listinfo/cobbler