Expiring Today—Celebrate National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

dhcpd.conf

Posted on 2001-06-12
4
Medium Priority
?
1,778 Views
Last Modified: 2012-06-27
Hi,
I'm maintaining a linux server which servers more than 100 peoples. I'd like to add dhcpd service to all users.

The server has 3 nic, the ip address is:
1. private IP: 109.10.X.X
2. private IP: 192.168.1.1
3. public IP: 202.X.X.X

I'd like to provide the following dhcpd services:
1. dhcpd on 1 and 2 nic, but not on 3.
2. fixed ip for 109.10 network by host name and workgroup name, the host name may be same for different workgroup
3. dynamic ip for 192.168.1, this is for customers' laptop so they can access internet.

I'm new to dhcpd and linux, would you like to give me a sample dhcpd.conf so I do not need to try by myself? or at least a sample for the 3 conditions.

Best Regards

How can I config the dhcpd.conf?
0
Comment
Question by:hk22
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
4 Comments
 
LVL 1

Expert Comment

by:Haho
ID: 6184831
here you go, a working sample from our server :)

# Global parameters
server-name "servername.domain.com";

# Interface parameters for private net
subnet 10.0.0.0 netmask 255.0.0.0 {
        range 10.0.0.1 10.0.0.254;
        default-lease-time 2592000;
        max-lease-time 2592000;
        option subnet-mask 255.0.0.0;
        option broadcast-address 10.255.255.255;
        option routers 10.0.0.x;
        option domain-name "domain.com";
        option domain-name-servers 192.x.x.x, 202.x.x.x, 202.x.x.x;
        option netbios-node-type 8;
        option netbios-name-servers 10.0.0.x;


}

# Interface parameters for public net
subnet 202.x.x.0 netmask 255.255.255.0 {
        option broadcast-address 202.x.x.255;
}

Cheers!
0
 

Author Comment

by:hk22
ID: 6184963
Hi,
Thanks for your comments.
And I'd like to get more from your sample. Can you show me how can I config to asign fixed ip address for hosts that in specified domain?

BR
0
 
LVL 1

Expert Comment

by:Haho
ID: 6185271
got this from the net. this should assign the IP to a hostname..

> Can I use the following configuration:

> host host_name
> {
>      client-hostname "host_name";
>      fixed-address 206.246.50.2;
> }

No, but you can, in v3, do this:

  class "host-name-foo" {
    match if option host-name = "foo";
  }
  pool {
    range 206.246.50.2;
    allow members of "host-name-foo";
  }
0
 
LVL 3

Accepted Solution

by:
tdaoud earned 400 total points
ID: 6198138

Here is a sample of threee NICs with one public not used, and two privates with some fixed assigned IP addresses in each in addition to dynamic ones in each.

To reserve/assign ip addresses you will need the MAC address of the NIC (on windows 95/98 stations you can get it by running the command "winipcfg", and on windows NT/2000 by running the command "ipconfig /all")

#Sample begins here------------------------
#
server-identifier 192.88.5.1;
# default for all subnets, otherwise include in each one
default-lease-time 604800;
#
# public subnet....no dhcp
#
subnet 192.119.X.XXX netmask 255.255.255.248{}
#
# private subnet one
#
subnet 192.88.5.0 netmask 255.255.255.0{
        range  192.88.5.200 192.88.5.254;
        max-lease-time 1209600;
        option domain-name  "domain.name";
        option domain-name-servers 192.88.5.1;
        option routers   192.88.5.1;
        option subnet-mask   255.255.255.0;
        host FixedHost1 {
                hardware ethernet 00:60:04:EC:44:09;
                fixed-address 192.88.5.99;
        }      
        host FixedHost2 {
                hardware ethernet 00:60:04:EC:44:09;
                fixed-address 192.88.5.98;
        }      
}      
#
# private subnet two
#
subnet 192.88.4.0 netmask 255.255.255.0{
        max-lease-time 64800;
        range  192.88.4.100 192.88.4.254;
        option domain-name "domain.name";
        option domain-name-servers  192.88.4.1;
        option routers     192.88.4.1;
        option subnet-mask       255.255.255.0;
        host FixedHost1 {
                hardware ethernet 00:02:02:2c:32:e1;
                fixed-address 192.88.4.88;
        }
        host FixedHost2 {
                hardware ethernet 00:02:02:2c:34:70;
                fixed-address 192.88.4.89;
        }
        host FixedHost3 {
                hardware ethernet 00:02:02:2C:34:5C;
                fixed-address 192.88.4.90;
        }
        host FixedHost4 {
                hardware ethernet 00:15:4b:06:0b:7b;
                fixed-address 192.88.4.91;
        }
}

# Sample ends here

Good Luck

Tarik
0

Featured Post

Hire Technology Freelancers with Gigs

Work with freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely, and get projects done right.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I have seen several blogs and forum entries elsewhere state that because NTFS volumes do not support linux ownership or permissions, they cannot be used for anonymous ftp upload through the vsftpd program.   IT can be done and here's how to get i…
Note: for this to work properly you need to use a Cross-Over network cable. 1. Connect both servers S1 and S2 on the second network slots respectively. Note that you can use the 1st slots but usually these would be occupied by the Service Provide…
If you're a developer or IT admin, you’re probably tasked with managing multiple websites, servers, applications, and levels of security on a daily basis. While this can be extremely time consuming, it can also be frustrating when systems aren't wor…
In response to a need for security and privacy, and to continue fostering an environment members can turn to for support, solutions, and education, Experts Exchange has created anonymous question capabilities. This new feature is available to our Pr…

719 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question