Monday, November 23, 2015

Zentyal DHCP configuration




[root@zentyal]:~# vim /etc/dhcp/dhcpd.conf

option domain-name-servers 127.0.0.1, 125.22.47.125;
default-lease-time 1800;
max-lease-time 7200;
shared-network eth0 {                       
        subnet 192.168.1.0 netmask 255.255.255.0 {
            option routers 192.168.1.1;
                option domain-name "example.com";
            option domain-name-servers 192.168.1.127, 125.22.47.125;
                option ntp-servers 192.168.1.13;
                default-lease-time 1200;
                max-lease-time 6200;
pool {
                range 192.168.1.20 192.168.1.30;
            }
            pool {
                range 192.168.1.31 192.168.1.40;
            }
}
group {
            option routers 192.168.1.1;
                option domain-name "example.com";
            option domain-name-servers 192.168.1.127, 125.22.47.125;
                option ntp-servers 192.168.1.13;
                default-lease-time 1200;
                max-lease-time 6200;

           group {
                   host rhellaptop {
                          hardware ethernet  00:1C:23:4C:3B:25;
                          fixed-address 192.168.1.14;
                          }
           }
        }
}
These all configurations are supplied here by doing changes in the GUI of Zentyal:



Now got to Infrastructure -> DHCP.
Now click on “Configuration” icon.


Now, in the first tab “Common options”, you can define
Default gateway,
Search domain,
Primary nameserver,
Secondary nameserver,
NTP server

Now click on “change”.
Scroll down:


To add IP ranges,
Click on “Add”
Give it a name so that it could be recognized.
Give “from” and “to” range of the IP range and click “add”.

In the next pane it would be showing the ranges which you have added. You can “edit” and “delete” them too.

Scroll down.

Now, to add “fixed addresses”, go to Networking -> objects.
Click on “add”.


I already have added an object named “systems”.
You need to give a name for the object and save it.
Now add a member in it.
Give the name of the member.
IP address.
And MAC address of the system.
And click “change.”

Now on the upper right corner of the page , click on the “save” button near logout button and follow the screen.

Now again go to Infrastructure -> DHCP
And see the section “Fixed addresses”.
Here you will automatically find the already added object name.
And click on “Add” button.

And save the changes in the upper right corner of the page, click on the “save” button near logout button and follow the screen.

Now open the console and open the file:
# vim /etc/dhcp/dhcpd.conf
 And you will find the configured file.
When dhcpd is running it will generate entries in the file: /var/lib/dhcp/dhcpd.leases:

lease 192.168.1.128 {
starts 2 2004/12/01 20:07:05;
ends 3 2004/12/02 08:07:05;
hardware ethernet 00:00:e8:4a:2c:5c;
uid 01:00:00:e8:4c:5d:31;
client-hostname "Node1";
}

12 comments:

  1. I like the helpful information you provide in your articles.
    I'll bookmark your weblog and check again here frequently.
    I am quite sure I'll learn many new stuff right here!
    Good luck for the next!

    ReplyDelete
  2. I always spent my half an hour to read this weblog's posts
    every day along with a mug of coffee.

    ReplyDelete
  3. Keep on writing, great job!

    ReplyDelete
  4. Hi my loved one! I wish to say that this article is amazing,
    nice written and include almost all important infos. I would like to look more posts like this.

    ReplyDelete
  5. I'll right away grasp your rss feed as I can not to find your email subscription hyperlink or e-newsletter service.
    Do you have any? Kindly permit me realize in order that
    I could subscribe. Thanks.

    ReplyDelete
  6. Keep on writing, great job!

    ReplyDelete
  7. I think other website proprietors should take this site as an example, very clean and good user
    pleasant pattern.

    ReplyDelete
  8. Remarkable things here. I'm very happy to look your article.
    Thanks a lot and I'm looking forward to contact you. Will you please drop me a mail?

    ReplyDelete
  9. Definitely believe that which you stated. Your favorite justification appeared to
    be on the net the simplest thing to be aware of.
    I say to you, I certainly get irked while people think about
    worries that they plainly do not know about.

    You managed to hit the nail upon the top and defined out the whole thing without having side-effects ,
    people can take a signal. Will probably be back to get more.
    Thanks

    ReplyDelete
  10. Thank you for the blog post. Manley and I have already been saving for
    our new e book on this matter and your writing has made us to save the money.

    Your thoughts really clarified all our inquiries. In fact, greater than what we had acknowledged before we found your wonderful blog.
    My partner and i no longer nurture doubts and also a troubled
    mind because you have totally attended to the needs here.
    Thanks

    ReplyDelete
  11. Hello.This post was really interesting, particularly since I was browsing for thoughts on this subject last
    Friday.

    ReplyDelete
  12. Aw, this was an exceptionally nice post. Taking the time and actual
    effort to generate a superb article? but what can I say?
    I procrastinate a whole lot and don't seem to get nearly anything done.

    ReplyDelete