Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

send UDP packet to 255.255.255.255.

2 views
Skip to first unread message

Joost Mulders

unread,
Oct 24, 1999, 3:00:00 AM10/24/99
to
Hi,

I am trying to setup ISC's (www.isc.org) DHCP server on a HP-UX 10.20 box
without success. The DHCP rfc's require that an DHCPOFFER or a DHCPNACK is
broadcasted to the address of 255.255.255.255 instead of the local subnet's
broadcastaddress (because the requesting client does not know (yet) about
the subnet's broadcast address).

The server uses the BSD socket API to send the DHCP packets (sendto). When
the destination address is 255.255.255.255 (as required by the DHCP
protocol) the sockets API converts this address to the subnet's local
broadcastaddress and sends the packet. Therefore, the response is never
heard by the requesting DHCP client.

On systems that have packetfilters (bpf, lpf, nit ..), the dhcp software
uses the filter's API to assemble an ethernet UDP packet with the
destination address of 255.255.255.255. Unfortunately, such a packetfilter
is not available on a HP system.

I've tried to use the DLPI 2.0 API (which IS available) to send the UDP
packet but it won't let me bind to the ETHERTYPE_IP (0x800) sap because it
is already in use. It returns DL_BADDADDR.

Does anybody know a way of sending an UDP packet with the destinationaddress
of 255.255.255.255 succesfully down the wire ?


Any help would be very appreciated !

TIA

Joost Mulders.

R

unread,
Oct 26, 1999, 3:00:00 AM10/26/99
to
I dont know if this helps, but here goes

According to my LINUX dhcp howto, I dont know if this is of any use to you on
your HP box:

BROADCAST

In order for dhcpd to work correctly with picky DHCP clients (e.g.,
Windows 95), it must be able to send packets with an IP destination
address of 255.255.255.255. Unfortunately, Linux insists on changing
255.255.255.255 into the local subnet broadcast address (here, that's
192.5.5.223). This results in a DHCP protocol violation, and while
many DHCP clients don't notice the problem, some (e.g., all Microsoft
DHCP clients) do. Clients that have this problem will appear not to
see DHCPOFFER messages from the server.

It is possible to work around this problem on some versions of Linux
by creating a host route from your network interface address to
255.255.255.255. The command you need to use to do this on Linux
varies from version to version. The easiest version is:

route add -host 255.255.255.255 dev eth0

On some older Linux systems, you will get an error if you try to do
this. On those systems, try adding the following entry to your
/etc/hosts file:

255.255.255.255 all-ones

Then, try:

route add -host all-ones dev eth0

Another route that has worked for some users is:

route add -net 255.255.255.0 dev eth0

If you are not using eth0 as your network interface, you should
specify the network interface you *are* using in your route command.

0 new messages