[x] Welcome to LinuxSolved.com Linux help forums, here we are a community of Linux users helping each other. It is helpful to both ie. new linux users as well experienced one. We always have our experts to help you and ofcourse members help each other, so you can ask for help any time by Registering.: Click to Register

Welcome, Guest. Please login or register.
Did you miss your activation email?


Login with username, password and session length

Linux Forums - Linux Help,Advice & support community:LinuxSolved.com  |  Forum  |  Linux in General  |  Linux Tutorials & How To's  |  Topic: DHCP SERVER How to..(dhcpd)
The LinuxSolved.com GNU/Linux User Communit - Forum
Welcome to LinuxCommunity You have just arrived to a friendly linux community which is helping Linux Users from Years.. You can be its part if you have not already joined it. Registration is FREE and is gateway to unlimited help and support to all your linux related needs. If you are an GNU/Linux supporter then you have come to the right place.
Pages: [1]
  Print  
Author Topic: DHCP SERVER How to..(dhcpd)  (Read 17088 times)
0 Members and 1 Guest are viewing this topic.
Ricky
LST CareTaker
Specially Skilled
*****
Offline Offline

Gender: Male
Posts: 2215


View Profile
« on: October 25, 2003, 02:14:48 PM »

This How to is aimed to set the dhcpd server provided by isc.You can download the latest at ftp://ftp.isc.org/isc/dhcp/dhcp-latest.tar.gz

Intro: By using dhcpd u can assign ip address and other network information to ur clients. It is very useful in large neetworks.

Configuration. dhcpd server uses the /etc/dhcpd.conf file for its configuration. it is located in /etc/ directory.
/etc/dhcpd.conf file...

Code:


ddns-update-style ad-hoc;

 # Time used to set min. lease time ie. how long the assigned address is valid.
default-lease-time 800;
       
 # Maximum liease time allowed.
max-lease-time 7200;

 # Use this to set global subnet mask for your network
option subnet-mask 255.255.255.0;


 # Set the broadcast address used by clients. (usally its the last ip of the network ip range)
option broadcast-address 192.168.1.255;

 # Give your router address here..
option routers 192.168.1.1;


   #Set domain name servers for your network ie. give ip of the DNS server on your LAN
option domain-name-servers 202.138.23.4,  202.138.100.100;

  # Give domain name you want to get assigned to your network
option domain-name "yourdomainname.net";

 
 # Here set a range of ip used by ethernet of IP 192.168.1.x . ie. say your  
 # eth0 want to serve the network and has ip of 192.168.1.2. Similarly add other subnet for other  of ip range.
subnet 192.168.1.0 mask 255.255.255.0 {
                       192.168.1.10 192.168.1.90;
                        192.168.1.100 192.168.1.200;
   
                     }
 
 #  Here use this to assign fixed ip to a client on your network with its hardware address provided.
host host_name {
                           hardware ethernet 00:c1:26:08:65:44;
                           fixed-address 192.168.1.15;
                       }


Before running dhcpd make sure /var/state/dhcp/dhcpd.leases file exist. if not then run the following command.
Code:
touch /var/state/dhcp/dhcpd.leases


Now start dhcpd by giving the follwoing command
Code:
/usr/sbin/dhcpd


Or by
Code:
/etc/rc.d/init.d/dhcpd start


Lastly :
Please correct me if you find any mistake or errors
Thankyou!
Logged
tomamodi
Linux Learner
***
Offline Offline

Posts: 78


View Profile
« Reply #1 on: July 26, 2004, 06:55:17 AM »

little more explanation
did this work with only one lan card  eth0
or need two
and did this need some of this in squid.conf from dhcpd
before there is rc.nat as you show for sharing lan
Logged
Ricky
LST CareTaker
Specially Skilled
*****
Offline Offline

Gender: Male
Posts: 2215


View Profile
« Reply #2 on: July 27, 2004, 01:55:48 AM »

This is nothing related to squid.conf

It is purely a dhcp server configuration using dhcpd in linux . It is used mostly in large network.. ie where there are many nodes .. I prefer to use dhcpd in more than 5 computer LAN.

So what you do is specify all your servers in dhcpd.conf file and then your clients get all information usind dhcp to configure themselves.

You here tell that which is your gateway , also specify what is your DNS servers, domain name and much more.

You can run NAT script with this also on static IP address LAN ie.  usually small LAN.

Hope you are cleared.
Logged
tomamodi
Linux Learner
***
Offline Offline

Posts: 78


View Profile
« Reply #3 on: July 27, 2004, 07:50:05 AM »

/usr/sbin/dhcpd
this is the reply
/etc/dhcpd.conf line 29: semicolon expected.
subnet
^
Configuration file errors encountered -- exiting
Logged
Ricky
LST CareTaker
Specially Skilled
*****
Offline Offline

Gender: Male
Posts: 2215


View Profile
« Reply #4 on: July 27, 2004, 07:59:04 AM »

Ya there was semicolon missing .. now corrected!!
Logged
sathish
Linux Learner
***
Offline Offline

Posts: 73


View Profile
« Reply #5 on: September 22, 2004, 03:46:14 PM »

Hello Ricky,

I have read the material regarding how to configure dhcp server, I have configured in my server also itz workin fine, but i am unable to understand what is the first line meant for ?? plz can you explain what is this.

ddns-update-style ad-hoc;

Thank you,

Sathish.
Logged
j0nd4v1d
New Member

Offline Offline

Posts: 1


View Profile
« Reply #6 on: August 11, 2005, 03:29:58 PM »

Hello!

I have an existing ~15 machine network with a gentoo dhcp server happily providing dhcp leases to machines from a specified range.

Now, I would like to add a guest [wireless] network so guests can easily connect to open wifi.

I've added an interface to the dhcp server so I physically am ready, but have not a clue how to configure dhcp server for 2 segregated networks.

Problem1: I need to segregate them completely from my other users
Problem2: I'm wondering if I can remember their MAC adds then give the guest the same 10. address, if available, next time they request a lease - a week or a month later

Is all this doable??

THANKS IN ADVANCE for any suggestions :->
Logged
Linux Forums - Linux Help,Advice & support community:LinuxSolved.com
   

 Logged
Pages: [1]
  Print  
 
Jump to:  

Related Topics
Subject Started by Replies Views Last post
DHCP SERVER General Networking Support in Linux ozioma 3 1566 Last post May 27, 2004, 02:05:21 AM
by Ricky
dhcp server Linux Servers Support gauravbajaj 10 959 Last post January 13, 2005, 02:16:12 AM
by gauravbajaj
DHCP server with multiple subnet Linux Proxy Server Support anil_garg5 0 581 Last post January 27, 2005, 01:01:23 AM
by anil_garg5
PPPD and DHCPD General Networking Support in Linux dashwell 0 558 Last post June 28, 2005, 09:25:32 AM
by dashwell
How to make DHCP Server Linux Proxy Server Support jp_durai 4 650 Last post January 05, 2006, 12:05:15 AM
by gauravbajaj
Welcome, Guest. Please login or register.
Did you miss your activation email?
December 04, 2008, 03:24:10 PM

Login with username, password and session length
Navigation
Recent Discussions
[Today at 02:53:39 AM]

[Today at 02:45:38 AM]

[December 03, 2008, 10:18:57 AM]

[December 02, 2008, 11:32:02 AM]

[November 29, 2008, 02:23:49 PM]

[November 29, 2008, 02:14:14 PM]

[November 29, 2008, 04:00:36 AM]

[November 28, 2008, 07:05:28 AM]

[November 28, 2008, 07:04:39 AM]

[November 28, 2008, 06:58:16 AM]
Members
Total Members: 6261
Latest: Larrymossyx
Stats
Total Posts: 8290
Total Topics: 2261
Online Today: 19
Online Ever: 111
(June 28, 2007, 06:47:29 AM)
Users Online
Users: 0
Guests: 5
Total: 5
Privacy Policy| Powered by SMF 1.1.4 | SMF © 2006-2007, Simple Machines LLC
Seo4Smf v0.2 © Webmaster's Talks
Theme & TinyPortal v0.9.8 © Bloc