DHCPD , dhcp relays on a large network
Simon Hobson
dhcp1 at thehobsons.co.uk
Fri Nov 10 18:49:30 UTC 2006
Alexandru Coseru wrote:
>Quote: "> This doesn't sound right, the server will NOT fail to start
>because a remote subnet is not defined - all that would happen is you would
>get runtime errors in response to requests for unknown subnets."
>
>It is the other way around.
>
>Srv1 has:
>
>[root at bv ~]# ifconfig
>eth0 Link encap:Ethernet HWaddr 00:0C:46:B3:4F:2F
> inet addr:10.1.1.1 Bcast:10.1.1.255 Mask:255.255.255.0
> UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
> RX packets:0 errors:0 dropped:0 overruns:0 frame:0
> TX packets:35 errors:0 dropped:0 overruns:0 carrier:0
> collisions:0 txqueuelen:1000
> RX bytes:0 (0.0 b) TX bytes:5384 (5.2 KiB)
> Interrupt:17 Base address:0x2c00
>[root at bv ~]#
That looks OK
>cat /etc/dhcpd.conf:
>
>ddns-update-style ad-hoc;
>authoritative;
>subnet 192.168.1.0 netmask 255.255.255.0{
> option routers 192.168.1.1;
> option subnet-mask 255.255.255.0;
>
> option nis-domain "domain.org";
> option domain-name "domain.org";
> option domain-name-servers 10.1.1.1;
>
> default-lease-time 21600;
> max-lease-time 43200;
> host phonehuawei {
> hardware ethernet 88:88:88:88:88:88;
> fixed-address 192.168.1.2;
> }
> host universalphone{
> hardware ethernet 00:13:49:53:C6:3B;
> fixed-address 192.168.1.3;
> }
> host accountingserver{
> hardware ethernet 00:43:29:12:12:FA;
> fixed-address 192.168.1.4;
> }
>
>}
A couple of comments :
1) You MUST define a subnet for 10.1.1.0/24, though you do not have
to put a range in it. This is all it needs to be :
subnet 10.1.1.0 netmask 255.255.255.0 {
}
2) ddns-update-style ad-hox is deprecated, interim is recommended.
3) You should remove your host statements from the subnet
declarations. They are global in scope (so would still be triggered
if the client was on a different subnet) but still inherit stuff from
where they are defined - hence (we think) the source of problems
where clients get the wrong routers and stuff. Putting a host
statement inside a subnet does not tie it to only apply within that
subnet and is a source of ongoing potential confusion !
>The Layer3 switch has DHCPD relay agent on it... and 2 IP addresses:
>10.1.1.2 on management vlan (Gbit port) and 192.168.1.1 on clients vlan
That's fine
>The client voip phone should broadcast a request for an ip address , the
>L3 SW A is forwarding that request to srv1 (I can see it using tcpdump).
>If i'm not declaring the subnet =>runtime errors , request for unknow
>subnets.
>
>
>Using the dhcpd config described earlier , i have:
> "No subnet declaration for 192.168.1.0".
How are you starting dhcpd ? Using system provided scripts ?
Try starting it with "<path>/dhcpd" and no arguments. Only recently
we've had some strange things reported where the scripts are
appending stuff to the command line and the server is somehow making
it into an address !
More information about the dhcp-users
mailing list