Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game. |
| Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
 |
GNU/Linux Basic Guide
This 255-page guide will provide you with the keys to understand the philosophy of free software, teach you how to use and handle it, and give you the tools required to move easily in the world of GNU/Linux. Many users and administrators will be taking their first steps with this GNU/Linux Basic guide and it will show you how to approach and solve the problems you encounter.
Click Here to receive this Complete Guide absolutely free. |
|
 |
05-24-2003, 03:22 AM
|
#1
|
|
Member
Registered: May 2003
Posts: 33
Rep:
|
DHCP setup..
Hi everyone,
does anyone know who to setup dhcp on a linux server???
|
|
|
|
05-24-2003, 04:21 AM
|
#2
|
|
Member
Registered: May 2003
Posts: 33
Original Poster
Rep:
|
Sorry,
I forgot to mention, setup dhcp on a linux server on a windows network running dhcp. 
|
|
|
|
05-24-2003, 05:42 AM
|
#3
|
|
Guru
Registered: Apr 2002
Location: Atlanta
Distribution: Gentoo
Posts: 1,280
Rep:
|
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.
|
|
|
|
05-24-2003, 05:22 PM
|
#4
|
|
Member
Registered: May 2003
Posts: 33
Original Poster
Rep:
|
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.
|
|
|
|
05-24-2003, 05:48 PM
|
#5
|
|
Member
Registered: Feb 2002
Location: Fairfax, VA
Distribution: RedHat 8, Mandrake9.1, Slack9
Posts: 456
Rep:
|
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 
|
|
|
|
05-24-2003, 07:45 PM
|
#6
|
|
Member
Registered: May 2003
Posts: 33
Original Poster
Rep:
|
how do you do that?? what network configuration tool??
|
|
|
|
05-24-2003, 08:44 PM
|
#7
|
|
Senior Member
Registered: Sep 2001
Location: Brisvegas, Antipodes
Distribution: Slackware
Posts: 4,590
Rep:
|
Try running 'netconfig' in a terminal as root.
|
|
|
|
05-25-2003, 04:45 AM
|
#8
|
|
Moderator
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 42,827
|
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
|
|
|
|
05-25-2003, 06:56 AM
|
#9
|
|
Guru
Registered: Apr 2002
Location: Atlanta
Distribution: Gentoo
Posts: 1,280
Rep:
|
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.
|
|
|
|
05-26-2003, 10:02 PM
|
#10
|
|
LQ Newbie
Registered: May 2003
Location: San Francisco
Posts: 16
Rep:
|
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.
|
|
|
|
05-27-2003, 02:00 AM
|
#11
|
|
Member
Registered: Apr 2003
Distribution: gentoo
Posts: 238
Rep:
|
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?
|
|
|
|
05-27-2003, 02:09 AM
|
#12
|
|
LQ Newbie
Registered: May 2003
Location: San Francisco
Posts: 16
Rep:
|
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.
|
|
|
|
05-27-2003, 02:29 AM
|
#13
|
|
Member
Registered: Apr 2003
Distribution: gentoo
Posts: 238
Rep:
|
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.
|
|
|
|
| Thread Tools |
Search this Thread |
|
|
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT -5. The time now is 09:34 AM.
|
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|