Page 1 of 1

DHCP Server

Posted: 2008/09/15 00:27:17
by mzainal
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

Re: DHCP Server

Posted: 2008/09/15 01:33:43
by WhatsHisName
[code]$ man dhcpd.conf[/code]

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

Re: DHCP Server

Posted: 2008/09/16 10:56:43
by vadek
There is a mistake:

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

Re: DHCP Server

Posted: 2008/09/21 06:30:24
by mzainal
All tutorial from the net not helping me solve my problem. Any experience members here?

DHCP Server

Posted: 2008/09/21 12:36:23
by MatsK
[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"

Re: DHCP Server

Posted: 2008/09/22 09:26:24
by jlehtone
[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.

Re: DHCP Server

Posted: 2008/10/09 12:44:29
by mzainal
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.

Re: DHCP Server

Posted: 2008/10/09 13:19:34
by gerald_clark
Check the subnet mask on your router.

Re: DHCP Server

Posted: 2008/10/12 05:06:50
by mzainal
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.