LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices

Reply
 
Search this Thread
Old 05-24-2003, 04:22 AM   #1
masenko703
Member
 
Registered: May 2003
Posts: 33

Rep: Reputation: 15
Question DHCP setup..


Hi everyone,
does anyone know who to setup dhcp on a linux server???
 
Old 05-24-2003, 05:21 AM   #2
masenko703
Member
 
Registered: May 2003
Posts: 33

Original Poster
Rep: Reputation: 15
Sorry,
I forgot to mention, setup dhcp on a linux server on a windows network running dhcp.
 
Old 05-24-2003, 06:42 AM   #3
Robert0380
Guru
 
Registered: Apr 2002
Location: Atlanta
Distribution: Gentoo
Posts: 1,280

Rep: Reputation: 47
the 1st question made sense, then the second part you added threw me off....do you mean the Linux server will give IPs to windows machines? Well 1st off, that doesnt matter. But to set up DHCP you need to edit the dpchd.conf file to look something like this:
Code:
subnet 10.0.1.1 netmask 255.255.255.0 {
# --- default gateway
        option routers                  10.0.1.1;   #the address of the interface giing out IPs
        option subnet-mask              255.255.255.0;
        #option nis-domain              "domain.org";
        #option domain-name             "domain.org";
        option domain-name-servers      192.168.1.1; #DNS SERVERS
        option time-offset              -18000; # Eastern Standard Time
        range dynamic-bootp 10.0.1.100 10.0.1.254;
        default-lease-time 21600;
        max-lease-time 43200;
}
also you may wanna look at a HOWTO, those explain more. Try googling for dhcpd or dhcpd-howto or dhcp-howto until you get what you are looking for.

To run the server you just typed: dhcpd
and if all is good, it runs. You may get an error if you dont have a file called dhcp.leases, you can create it like so:

# touch /etc/dhcp.leases

you dont have to edit it, it just has to be there.
 
Old 05-24-2003, 06:22 PM   #4
masenko703
Member
 
Registered: May 2003
Posts: 33

Original Poster
Rep: Reputation: 15
actually, i have a linux server but i have a windows network that is using dhcp. Is there anyway to have the linux server lease an IP from the windows 2000 dhcp server?? thanx for the reply though.
 
Old 05-24-2003, 06:48 PM   #5
manthram
Member
 
Registered: Feb 2002
Location: Fairfax, VA
Distribution: RedHat 8, Mandrake9.1, Slack9
Posts: 456

Rep: Reputation: 31
thats simple, what you want is a dhcp client. Robert0380 told you how to setup a dhcp server.

just run network configuration tool and set your network card to use dhcp to get the ip and off you go
 
Old 05-24-2003, 08:45 PM   #6
masenko703
Member
 
Registered: May 2003
Posts: 33

Original Poster
Rep: Reputation: 15
how do you do that?? what network configuration tool??
 
Old 05-24-2003, 09:44 PM   #7
Aussie
Senior Member
 
Registered: Sep 2001
Location: Brisvegas, Antipodes
Distribution: Slackware
Posts: 4,590

Rep: Reputation: 56
Try running 'netconfig' in a terminal as root.
 
Old 05-25-2003, 05:45 AM   #8
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,414

Rep: Reputation: 1967Reputation: 1967Reputation: 1967Reputation: 1967Reputation: 1967Reputation: 1967Reputation: 1967Reputation: 1967Reputation: 1967Reputation: 1967Reputation: 1967
in /etc/sysconfig/network-scripts/ifcfg-eth0 just set the line "BOOTPROTO=DHCP" and that's all yuo need to do. that is what netconfig will do
 
Old 05-25-2003, 07:56 AM   #9
Robert0380
Guru
 
Registered: Apr 2002
Location: Atlanta
Distribution: Gentoo
Posts: 1,280

Rep: Reputation: 47
try running the following command:

dhcpcd eth0


if that works, then the client is now running. If there is a server giving out IP addresses then the Linux box should get an address.
 
Old 05-26-2003, 11:02 PM   #10
yurlittlepony
LQ Newbie
 
Registered: May 2003
Location: San Francisco
Posts: 16

Rep: Reputation: 0
yo ---

i'm trying to follow this, and have been starting with a direct cross-cable connection between my (dumpy) old Win ME laptop and my freshly built SuSe box.

i've edited the dhcp.conf file to bare bones, trying to get a response, but when i type in "dhcpd" in the command line of the shell-konsole, all i get back is "bash: dhcpd: command not found". i've tried running this from the root directory, and the etc directory, and no joy yet.

what the @&*!?

i can't begin to get anywhere until it listens to me...granted, i know i'm an idiot, but could this be a privileges thing? when i launch an admin function via the menus i get prompted for the network password. any help would be immensely appreciated.
 
Old 05-27-2003, 03:00 AM   #11
arrruken
Member
 
Registered: Apr 2003
Distribution: gentoo
Posts: 238

Rep: Reputation: 30
What do you mean by a windows network, im assuming you dont have a windows server, which means you have a workgroup in windows. if you have a router, then that is what is assigning the leases. in which case, you type dhcpcd eth0. also what kind of network are you trying to set up? sharing an internet connection or transferring files or what?
 
Old 05-27-2003, 03:09 AM   #12
yurlittlepony
LQ Newbie
 
Registered: May 2003
Location: San Francisco
Posts: 16

Rep: Reputation: 0
well....my SuSe box is meant to be the server rather than the laptop, and since i'm using a cross-cable connected between the ME and the SuSe box, there is no router....which means i have to have SuSe run DHCP, correct?

as i mentioned, i get no responce from typing "dhcpd" in anywhich way or form, including followed by eth0.

for the moment i'm trying to get the two talking and sharing files with ME as client and SuSe as server. once i've dumped all of my criticals over to the SuSe server, it'll be time to purge the dreaded ME, and in a short weeks time i'll get a proper router and connect my broadband through the router to both systems w/SuSe acting as server.

my options: 1. wait for my router, and have the dhcp with the router or 2. figure out the answer to my question: why do i get a "command not found" error in the shell when i type any combination of "dhcpd". i'd rather solve the mystery and understand how this works.
 
Old 05-27-2003, 03:29 AM   #13
arrruken
Member
 
Registered: Apr 2003
Distribution: gentoo
Posts: 238

Rep: Reputation: 30
well are you sharing an internet connection right now because if your not then you dont need any dhcp, and i dont think dhcp would work anyway.i was talking about the router because of the originator of the post. i dont know how to direct connect pc's with linux. you should start up your own thread about direct connecting pc's.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
DHCP setup Disqualifier Slackware 10 11-07-2005 08:04 AM
how to setup dhcp in lfs? lmmix Linux From Scratch 3 02-21-2005 11:55 AM
DHCP setup PlorkZ Linux - Networking 14 02-21-2005 11:03 AM
Need to setup DHCP on Slack 10 eosophobia Linux - Networking 1 09-15-2004 12:49 PM
Help with DHCP setup davepal Linux - Networking 0 04-18-2004 08:05 PM


All times are GMT -5. The time now is 10:32 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration