|Think about Loose Coupling|
simple DHCP server in Perlby morgon (Deacon)
|on Jul 16, 2014 at 17:56 UTC||Need Help??|
morgon has asked for the
wisdom of the Perl Monks concerning the following question:
for curiosity's sake am trying to implement a very simple DHCP-server in Perl but unfortunately I am having problems...
All the server is supposed to do is to assign an IP, a subnet-mask and a DNS-server to a client in a network that only consists of two machines (my laptop as server and a blueray player as client).
The only example for a dhcp-server I could find was part of the Net::DHCP::Packet distribution, so I tried to make that work (it does not as it is) and here is my code:
The problem that I have here is that while I can see in wireshark the dhcp-offers going out (and they look ok) the client ignores them and just keeps sending discoveries.
I believe the reason for that is that the outgoing ethernet-frames do not use the client's ethernet-address as destination but use ff:ff:ff:ff:ff:ff.
So how can I fix that or what else may I be doing wrong?
If anybody knows of a working DHCP server implementation in Perl I would be intererested to hear about it as to my surprice I could not find any.