LinuxQuestions.org
Visit the LQ Articles and Editorials section
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General > LinuxAnswers Discussion
User Name
Password
LinuxAnswers Discussion This forum is to discuss articles posted to LinuxAnswers.

Notices

Reply
 
Search this Thread
Old 10-19-2004, 11:11 PM   #1
SiegeX
Member
 
Registered: Jul 2004
Location: Silicon Valley, CA
Distribution: Slackware
Posts: 171

Rep: Reputation: 38
Post DISCUSSION: DHCP Server Howto


This thread is to discuss the article titled: DHCP Server Howto
 
Old 10-29-2004, 03:38 PM   #2
LinuxRam
Member
 
Registered: Jul 2004
Distribution: Red Hat 9, Mandrake 9.2
Posts: 211

Rep: Reputation: 30
It is good, but I think u should also take some time and write DHCP client how to also.


-Akshat
 
Old 10-29-2004, 06:28 PM   #3
mdkelly
LQ Newbie
 
Registered: Jan 2003
Posts: 15

Rep: Reputation: 0
Hi and thanks for the great how-to

I am setting up a DHCP server that will assign all of its IP address via MAC address and your post will come in very handy for this.

I do have one question though.

If I have the subnet 192.168.0.0/24, with all IPs served out as static from the DHCP server, how do I stop someone from just plugging in and entering in there own static IP address and getting on to the network. I am setting up the server for a small office and I want to be able to restrict what gets plugged in and gets an IP address and also to stop people from hooking up devices that have not been approved for use in the office.

Thanks for any points you may have to offer
mdkelly
 
Old 11-15-2004, 06:59 PM   #4
egag
Senior Member
 
Registered: Jul 2004
Location: Netherlands
Distribution: Slackware
Posts: 2,721

Rep: Reputation: 52
hi there,

thank you for the great "howto", ( very clear ! ) i've set up my own dhcp-server. only one thing kept me busy
for more then 14 days: you need a #$%%@! CROSSOVER-cable to connect 2 pc's nic to nic.
i found out late at night, so with a little cutting-and -soldering i made it from a patch-cable.
now all works fine...

egag
 
Old 12-07-2004, 06:59 AM   #5
abhijeetudas
Member
 
Registered: Sep 2004
Distribution: Redhat / Fedora
Posts: 114

Rep: Reputation: 15
DHCP Mac Addresses

How does one configure DHCP
so that only a pool of addresses
having mac address say 00-11--XX-XX-XX
are assigned IP addresses as we have all ethernet cards with 1 starting address
and plan to have same in future..
so i have seen hardware-address option
but that doesnt help if a new machine comes in..
any solution.???
 
Old 01-03-2005, 09:32 PM   #6
Ron_shyen
LQ Newbie
 
Registered: Dec 2004
Location: Malaysia
Distribution: Mandrakelinux 10.0
Posts: 13

Rep: Reputation: 0
Thanks to this How-to, I'm able to setup the static DHCP server using the methods provided. However, I'm more concerning about the dynamic IP that I configure, it still doesn't work. My network has 3 dhcp servers. Despite the pcs that I appointed as host (thru mac address and static IP), the rest pcs that logon thru the access point I setup still get its IP from other dhcp server. Any idea why is this happening? I'm ready to explain in more details if anyone here can give his/her help.
 
Old 01-04-2005, 02:45 PM   #7
abhijeetudas
Member
 
Registered: Sep 2004
Distribution: Redhat / Fedora
Posts: 114

Rep: Reputation: 15
If you could be a bit more precise..
it would help..
 
Old 01-05-2005, 12:17 AM   #8
Ron_shyen
LQ Newbie
 
Registered: Dec 2004
Location: Malaysia
Distribution: Mandrakelinux 10.0
Posts: 13

Rep: Reputation: 0
Here's my story: I'm setting up a wireless access point in my school (it's a project) which already has 3 access points cum dhcp server.

AP1 (D-Link DWL-900AP+):
IP:10.107.100.200
IP range: 10.107.100.201---254
Netmask: 255.255.0.0
Gateway: 10.107.1.1

AP2(D-Link DWL-714P+):
IP: 192.168.0.1
Range: 192.168.0.100---199
Netmask: 255.255.255.0

AP3(D-Link DWL-900AP+)
IP:10.107.100.100
Range: 10.107.101---151
Netmask: 255.255.0.0
Gateway: 10.107.1.1

My access point is configured to
IP:10.107.200.1
Range: 10.107.200.11---19 (for testing purpose only)
Subnet:10.107.200.0
Netmask:255.255.0.0
Gateway:10.107.1.1

For your information, AP1 and AP3 is the default DHCP server for the wired pcs in school. And my access point is also a wired desktop with an extra wireless interface.

so after I configured the dhcpd.conf following the how-to, the host that access thru my AP still getting the IP from AP1 or AP3. However, I'm pretty sure that my dhcp server is running, coz when i try it with the method assigning the host MAC address with IP, it works.

some said it is the netmask of AP1 or AP3 that is too wide in the range. What say you?

Last edited by Ron_shyen; 01-06-2005 at 01:32 AM.
 
Old 01-06-2005, 12:32 AM   #9
Ron_shyen
LQ Newbie
 
Registered: Dec 2004
Location: Malaysia
Distribution: Mandrakelinux 10.0
Posts: 13

Rep: Reputation: 0
Some updates here: The DHCP server that I configure is in fact running. Some of the desktop units (with wired connection) nearby can obtain IP from it rather than the other 2 dhcp server (AP1 & AP3) within the same netmask (255.255.0.0). Now the major problem is: wireless hosts may not necessarily obtain its IP from this server, even though they logon to the internet thru my access-point-cum-dhcp-server, which is against the major objective of my project. Hmmm.....

Last edited by Ron_shyen; 01-06-2005 at 12:34 AM.
 
Old 01-06-2005, 06:40 AM   #10
abhijeetudas
Member
 
Registered: Sep 2004
Distribution: Redhat / Fedora
Posts: 114

Rep: Reputation: 15
Ideally
you could block dhcp relay's requests that are passed through from
your "localised network" to the othr DHCP server's
that way only your DHCP server can assign Dynamic IP's
as per your criteria..
 
Old 01-10-2005, 11:35 AM   #11
Ron_shyen
LQ Newbie
 
Registered: Dec 2004
Location: Malaysia
Distribution: Mandrakelinux 10.0
Posts: 13

Rep: Reputation: 0
Quote:
Originally posted by abhijeetudas
Ideally
you could block dhcp relay's requests that are passed through from
your "localised network" to the othr DHCP server's
that way only your DHCP server can assign Dynamic IP's
as per your criteria..
can you share with me how to configure the relay?
 
Old 01-13-2005, 11:00 PM   #12
newlinuxuser03
LQ Newbie
 
Registered: Dec 2004
Posts: 11

Rep: Reputation: 0
My Dhcpd is configured, I think, but it doesn't start upt when I turn on my computer and my computer can't find it's own hostname, How do I tell is my dhcp is configued and how do I get it to start when i start my computer?
 
Old 01-16-2005, 10:11 AM   #13
abhijeetudas
Member
 
Registered: Sep 2004
Distribution: Redhat / Fedora
Posts: 114

Rep: Reputation: 15
If you already have a firewall / router that connects these
"Different N/w" together then i suggest
to block UDP port 67
[ im not sure on the port no ]
but then just google on it
that way no
DHCP Discover from your n/w clients gets relayed to to
the other DHCP server's in your campus..

hope this helps..
 
Old 01-16-2005, 10:17 AM   #14
abhijeetudas
Member
 
Registered: Sep 2004
Distribution: Redhat / Fedora
Posts: 114

Rep: Reputation: 15
Quote:
Originally posted by newlinuxuser03
My Dhcpd is configured, I think, but it doesn't start upt when I turn on my computer and my computer can't find it's own hostname, How do I tell is my dhcp is configued and how do I get it to start when i start my computer?
Just some basic stuff that MITE HELP


If your computer cant find its own hostname
try adding some thing like

IP www.hostname.com hostname

in the /etc/hosts file.

IF you have multiple ethernets on that box u mite need to specify the which interface u want to use


& also make sure that...
if your ethernet is assigned say a 10,.1.2.X
your giving out DHCP IP ranges in same range & not say 192.168.X.X

to check if dhcpd is running

do a
ps -ef | grep dhcpd

root 17443 1 0 Jan15 ? 00:00:00 /usr/sbin/dhcpd

you should see some thing like this....
 
Old 01-24-2005, 12:57 PM   #15
ethrazahraza
LQ Newbie
 
Registered: Jan 2005
Location: São Paulo - Brazil
Distribution: MandrakeLinux
Posts: 5

Rep: Reputation: 0
Question An advanced question I think

I trying to di this: A dhcp and proxy server that serves abount 50 points. But the cool thing is that each one cannot see another one. The proxy side I know how to do but the dhcp side is another history.
I think in create 50 virtuals IPs in the server nic and so create 50 subnet with 1 ip range, so when a client come in, it win a unique IP that will be different of the others and each one will not see the others, they will only see the server and the Internet.
For the tests I'm trying but without success this:

My last dhcpd.conf :
---
ddns-update-style ad-hoc;
shared-network 0 {
subnet 192.168.0.0 netmask 255.255.255.0 {
option broadcast-address 192.168.0.255;
}
}
subnet 192.168.1.0 netmask 255.255.255.0 {
range 192.168.1.2 192.168.1.5;
option broadcast-address 192.168.1.255;
}
subnet 192.168.2.0 netmask 255.255.255.0 {
range 192.168.2.2 192.168.2.5;
option broadcast-address 192.168.2.255;
}
---

ifconfig :
---
eth1 Encapsulamento do Link: Ethernet Endereço de HW 00:02:44:25:C0:EC
inet end.: 192.168.0.1 Bcast:192.168.0.255 Masc:255.255.255.0
endereço inet6: fe80::202:44ff:fe25:c0ec/64 Escopo:Link
UP BROADCASTRUNNING MULTICAST MTU:1500 Métrica:1
RX packets:6718 errors:0 dropped:0 overruns:0 frame:0
TX packets:15975 errors:0 dropped:0 overruns:0 carrier:0
colisões:0 txqueuelen:1000
RX bytes:940656 (918.6 Kb) TX bytes:12740022 (12.1 Mb)
IRQ:10 Endereço de E/S:0x2000

eth1:1 Encapsulamento do Link: Ethernet Endereço de HW 00:02:44:25:C0:EC
inet end.: 192.168.1.1 Bcast:192.168.1.255 Masc:255.255.255.0
UP BROADCASTRUNNING MULTICAST MTU:1500 Métrica:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
colisões:0 txqueuelen:1000
RX bytes:0 (0.0 b ) TX bytes:0 (0.0 b )
IRQ:10 Endereço de E/S:0x2000

eth1:2 Encapsulamento do Link: Ethernet Endereço de HW 00:02:44:25:C0:EC
inet end.: 192.168.2.1 Bcast:192.168.2.255 Masc:255.255.255.0
UP BROADCASTRUNNING MULTICAST MTU:1500 Métrica:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
colisões:0 txqueuelen:1000
RX bytes:0 (0.0 b ) TX bytes:0 (0.0 b )
IRQ:10 Endereço de E/S:0x2000
---

service dhcpd start
[Failed]

syslog :
---
dhcpd: Not searching LDAP since ldap-server, ldap-port and ldap-base-dn were not specified in the config file
dhcpd: Wrote 0 leases to leases file.
dhcpd: Interface eth1 matches multiple shared networks
dhcpd:
dhcpd: exiting.
dhcpd: dhcpd inmcio failed
---

Why?
Any clue? Thanks in advance.

Oh, and if my aproch is wrong, please point me to the right direction. Thx.

Last edited by ethrazahraza; 01-24-2005 at 01:01 PM.
 
  


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
DISCUSSION: SUID - HOWTO krishvij LinuxAnswers Discussion 12 12-21-2010 01:23 PM
DISCUSSION: LINUX ALTERNATIVES HOWTO krishvij LinuxAnswers Discussion 2 03-03-2009 05:41 PM
DISCUSSION: Comcast and KMail - HOWTO kittani LinuxAnswers Discussion 3 02-26-2007 05:04 PM
DHCP Server Howto SiegeX Slackware 7 10-15-2004 01:51 PM
DISCUSSION: HOWTO Setup a Secure Relaying Email Server DavidPhillips LinuxAnswers Discussion 20 07-30-2004 11:46 AM


All times are GMT -5. The time now is 02:37 AM.

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