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

Re: DHCP configuration



Well I have a little more info:
the line: dhcpd: DHCPOFFER on 192.168.1.100 to 00:10:5a:5d:73:0d via 192.168.1.100
is wrong, it is printing bogus info.
The code uses inet_ntoa() to print the last field the gateway addr field.
It also uses piaddr(), which also uses inet_ntoa()
to print the first IP address, the leased address.
These two calls to inet_ntoa() step all over each other,
the first one is basically overwritten by the second.


So that's a little debugging bug.

Now the real problem:
The server is trying to send the OFFER to 192.168.1.1 (the gateway),
which it can't because it doesn't know about that subnet.
So is the relay agent protocol broken?
Should the relay agent specifiy his IP on the subnet of the server
in the gateway field? (that would be 192.168.0.31 in my example)

thanks for keeping me from pulling out all my hair
David Shifflett

David Shifflett wrote:

I need some help with a DHCP configuration.
I am trying to use OBSD 3.1 as my DHCP server
and I have a relay agent in the network.

The request gets through and looks OK (please correct me if I'm wrong)
and the offer is prepared, but is sent back to the client (who doesn't
know his IP yet) and is on a different subnet.

I expected that the offer would have been sent back to .0.31
to be relayed to the client.

I have a relay between my client and the DHCP server as pictured below:

server                      relay agent                     client
192.168.0.25   -----  192.168.0.31 and 192.168.1.1   -----  x.x.x.x

The log on the server shows:
dhcpd: DHCPDISCOVER from 00:10:5a:5d:73:0d via 192.168.1.1
dhcpd: DHCPOFFER on 192.168.1.100 to 00:10:5a:5d:73:0d via 192.168.1.100

I tried configuring the relay agent to send 192.168.0.31
in the gateway addr field and got:
DHCPDISCOVER from 00:10:5a:5d:73:0d via 192.168.0.31
no free leases on subnet 192.168.0.0


The dhcpd.conf file read as follows (names have been sanitized): default-lease-time 600; max-lease-time 7200; option subnet-mask 255.255.255.0; option broadcast-address 192.168.0.255; option domain-name-servers 192.168.0.25; option domain-name "MY DOMAIN"; allow bootp; deny unknown-clients; subnet 192.168.0.0 netmask 255.255.255.0 { option routers 192.168.0.31; } subnet 192.168.1.0 netmask 255.255.255.0 { option routers 192.168.0.31; } group { default-lease-time -1; server-name "SERVER.MY DOMAIN"; server-identifier 192.168.0.25; use-host-decl-names on; host CLIENT { hardware ethernet 00:10:5A:5D:73:0D; fixed-address 192.168.1.100; filename "/CLIENT/zImage"; } }


thanks for any help David Shifflett



Visit your host, monkey.org