DHCP Server

Installing, Configuring, Troubleshooting server daemons such as Web and Mail
Post Reply
mzainal
Posts: 17
Joined: 2007/03/23 02:52:04
Location: Malaysia, Kuala Lumpur
Contact:

DHCP Server

Post by mzainal » 2008/09/15 00:27:17

Hi,

I finish setup dhcp on my pwer edge. Now i'm adding range ip for user. But the ip range not enough. So how to add more? Can anyone show me?

This is my dhcpd.conf
[code]
authoritative;
default-lease-time 1800;
max-lease-time 1800;
ddns-update-style none;
omapi-port 7911;
shared-network eth1 {
subnet 192.168.0.1 netmask 255.255.255.0 {
range 192.168.0.5 192.168.0.254;
default-lease-time 1800;
max-lease-time 1800;
option routers 192.168.0.1;
option subnet-mask 255.255.255.0;
option domain-name-servers 202.188.0.133;
option domain-name "jasper.my";
ping-check false;
group {
default-lease-time 604800;
max-lease-time 2592000;
}
}
}
[/code]
:-o

User avatar
WhatsHisName
Posts: 1549
Joined: 2005/12/19 20:21:43
Location: /earth/usa/nj

Re: DHCP Server

Post by WhatsHisName » 2008/09/15 01:33:43

[code]$ man dhcpd.conf[/code]

Maybe this will help: [url=http://en.wikipedia.org/wiki/Subnetwork]Subnetwork[/url]

vadek
Posts: 4
Joined: 2008/09/16 10:37:45

Re: DHCP Server

Post by vadek » 2008/09/16 10:56:43

There is a mistake:

subnet 192.168.0.[b][color=CC6600]0[/color][/b] netmask 255.255.255.0 {

mzainal
Posts: 17
Joined: 2007/03/23 02:52:04
Location: Malaysia, Kuala Lumpur
Contact:

Re: DHCP Server

Post by mzainal » 2008/09/21 06:30:24

All tutorial from the net not helping me solve my problem. Any experience members here?

MatsK
Posts: 125
Joined: 2005/02/13 19:39:28
Location: Sala, Sweden
Contact:

DHCP Server

Post by MatsK » 2008/09/21 12:36:23

[quote]
mzainal wrote:
All tutorial from the net not helping me solve my problem. Any experience members here?[/quote]

They are helping you by teaching you that you have to change the subnet parameter. By teaching you will improve your skills and the next time won't you need to ask, because then you KNOW!

But the short answer is:
replace "subnet 192.168.0.1 netmask 255.255.255.0 {" with subnet 192.168.0.0 netmask 255.255.254.0 {

and replace "range 192.168.0.5 192.168.0.254;" with "range 192.168.0.5 192.168.1.254;" will give you approx. 500 adresses.

remember to restart dhcpd to activate the changes, the command is "service dhcpd restart"

User avatar
jlehtone
Posts: 4530
Joined: 2007/12/11 08:17:33
Location: Finland

Re: DHCP Server

Post by jlehtone » 2008/09/22 09:26:24

[quote]vadek wrote:
There is a mistake:

subnet 192.168.0.[b][color=CC6600]0[/color][/b] netmask 255.255.255.0 {[/quote]
Mistake yes, and as such better to fix, but does it actually matter in action? After all, the netmask is used to compute the network part of the addresses from the subnet, and here both the correct and wrong subnet values lead to same network.

The netmask value given to the clients needs fixing too to be coherent. Otherwise the clients will broadcast to address that the DHCP considers "just a client". And naturally, the network settings of the DHCP server must match too.

In short: choose a sufficient address space for your private subnet and then make sure that everybody in that subnet knows it.

mzainal
Posts: 17
Joined: 2007/03/23 02:52:04
Location: Malaysia, Kuala Lumpur
Contact:

Re: DHCP Server

Post by mzainal » 2008/10/09 12:44:29

I manage to add more ip but got other problem. Below is my iptables using script generator.
http://pastebin.com/m7e228841

Only ip that start 192.168.0.0 can access internet. But ip 192.168.1.0 - 192.168.3.0 cannot access internet. I don't know why. Anyone that have experience, help me..I'm really expert using iptables.

Thank you.

gerald_clark
Posts: 10642
Joined: 2005/08/05 15:19:54
Location: Northern Illinois, USA

Re: DHCP Server

Post by gerald_clark » 2008/10/09 13:19:34

Check the subnet mask on your router.

mzainal
Posts: 17
Joined: 2007/03/23 02:52:04
Location: Malaysia, Kuala Lumpur
Contact:

Re: DHCP Server

Post by mzainal » 2008/10/12 05:06:50

All error i have fix it but still cannot access. In iptables, i set broadcast 192.168.3.255 ip 192.168.0.0/255.255.252.0.

Post Reply