[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Dhcp problem...what is the msitake?



2008/11/27 Jesus arteche <chechu.linux@gmail.com>:
> hey,
>
> I've implemented a dhcp server,  I want to cretae several subnets inside the
> same subnet using net mask, at teh same time i want to give the ip by mac.
> The problem is that when  the server get the mac dont give the correct ip to
> the client, its like i didnt define it in conf file. The syslog shows how
> the petition arrives but later the server dont give it the correct ip. Thats
> my conf, can someone help me?:

What do you want to achieve with your separate subnets? At the moment
your group statements may be confusing things as you aren't using any
group features.
You don't need to specify domain name servers inside each host
declaration unless you want it to be different from the globally
defined setting above.

Below I have attached my dhcpd.conf file for you to look at, I have a
range of ip's 192.168.32 - 192.168.0.64 allocated automatically (for
visitors) and everything else is statically defined.

Also like Lee said, check your mac addresses, they need to match the
actual hardware. Unless you bought a box of nics then they aren't
going to be sequential (possibly even in a box they might not be
sequential).

Adrian

# dhcpd.conf
#
# Sample configuration file for ISC dhcpd
#

# option definitions common to all supported networks...
option domain-name "lefty";
option domain-name-servers 192.168.0.5, 192.168.0.1;
option subnet-mask 255.255.255.0;
option broadcast-address 192.168.0.255;
option routers 192.168.0.1;
server-name "caprica.lefty";
default-lease-time 43200;
max-lease-time 86400;

subnet 192.168.0.0 netmask 255.255.255.0 {
  range 192.168.0.32 192.168.0.64;
}

subnet 192.168.100.0 netmask 255.255.255.0 {
not authoritative;
}

#subnet 192.5.5.0 netmask 255.255.255.224 {
#  range 192.5.5.26 192.5.5.30;
#  option domain-name-servers bb.home.vix.com, gw.home.vix.com;
#  option domain-name "vix.com";
#  option routers 192.5.5.1;
#  option subnet-mask 255.255.255.224;
#  option broadcast-address 192.5.5.31;
#  default-lease-time 600;
#  max-lease-time 7200;
#}

# Fixed IP addresses can also be specified for hosts.   These addresses
# should not also be listed as being available for dynamic assignment.
# Hosts for which fixed IP addresses have been specified can boot using
# BOOTP or DHCP.   Hosts for which no fixed address is specified can only
# be booted with DHCP, unless there is an address range on the subnet
# to which a BOOTP client is connected which has the dynamic-bootp flag
# set.

#host caprica {
#  hardware ethernet 00:40:CA:19:1F:44;
#  option domain-name "lefty";
#  fixed-address 192.168.0.1;
#}host starbuck {
#On board lan card (suspect)
#hardware ethernet 00:40:CA:19:0B:84;
hardware ethernet 00:E0:29:9D:BF:13;
  option domain-name "qld.optushome.com.au lefty";
  fixed-address starbuck.lefty;
}

host bruce {
  hardware ethernet 00:02:E3:0E:5F:8B;
  option domain-name "qld.optushome.com.au lefty";
  fixed-address bruce.lefty;
}

host brucelaptop {
  hardware ethernet 00:C0:9F:B4:3C:91;
  option domain-name "qld.optushome.com.au lefty";
  fixed-address brucelaptop.lefty;
}

host ibm {
  hardware ethernet 00:A0:24:AC:47:BF;
  option domain-name "lefty";
  fixed-address ibm.lefty;
}

host earth {
  hardware ethernet 00:11:95:66:17:73;
  option domain-name "qld.optushome.com.au lefty";
  fixed-address earth.lefty;
}
host gallactica {
  hardware ethernet 00:40:F4:05:10:58;
  option domain-name "qld.optushome.com.au lefty";
  fixed-address gallactica.lefty;
}

host Brother-MFC {
  hardware ethernet 00:80:77:8E:05:A4;
  fixed-address brother-mfc.lefty;
}

host Netgear-FS526T {
  hardware ethernet 00:09:5B:62:14:D7;
  fixed-address switch.lefty;
}

host xbox {
  hardware ethernet 00:0d:3a:53:27:fa;
  fixed-address xbox.lefty;
}

host n95 {
  hardware ethernet 00:1e:3a:92:fd:fc;
  fixed-address n95.lefty;
}

host cloud9 {
  hardware ethernet 00:1B:24:F7:C4:1D;
  hardware ethernet 00:1D:E0:30:1F:D5;
  fixed-address cloud9.lefty;
}

host WRT54GL-lan {
  hardware ethernet 00:21:29:9D:B2:A1;
  fixed-address wrt54gl-lan.lefty;
}
host WRT54GL-wan {
  hardware ethernet 00:21:29:9D:B2:A2;
  fixed-address wrt54gl-wan.lefty;
}
host WRT54GL-wir {
  hardware ethernet 00:21:29:9D:B2:A3;
  fixed-address wrt54gl-air.lefty;
}

host gemini.lefty {
        hardware ethernet 00:A0:CC:D6:38:DE;}
}

# If a DHCP or BOOTP client is mobile and might be connected to a variety
# of networks, more than one fixed address for that host can be specified.
# Hosts can have fixed addresses on some networks, but receive dynamically
# allocated address on other subnets; in order to support this, a host
# declaration for that client must be given which does not have a fixed
# address.   If a client should get different parameters depending on
# what subnet it boots on, host declarations for each such network should
# be given.   Finally, if a domain name is given for a host's fixed address
# and that domain name evaluates to more than one address, the address
# corresponding to the network to which the client is attached, if any,
# will be assigned.
#host confusia {
#  hardware ethernet 02:03:04:05:06:07;
#  fixed-address confusia-1.fugue.com, confusia-2.fugue.com;
#  filename "vmunix.confusia";
#  server-name "toccata.fugue.com";
#}

#host confusia {
#  hardware ethernet 02:03:04:05:06:07;
#  fixed-address confusia-3.fugue.com;
#  filename "vmunix.confusia";
#  server-name "snarg.fugue.com";
#}



-- 
24x7x365 != 24x7x52 Stupid or bad maths?
<erno> hm. I've lost a machine.. literally _lost_. it responds to
ping, it works completely, I just can't figure out where in my
apartment it is.


Reply to: