Re: default broadcast address


Charles Hedrick (njin!aramis.rutgers.edu!athos.rutgers.edu!hedrick@princeton.edu)
12 Jul 88 18:10:59 GMT


You asked how to use a broadcast address of -1 on hosts with more than
one interface. I don't know whether this is what actually happens in
4.3BSD, but I know what *should* happen. The application should use
net.subnet.-1. This lets the routing code choose the right interface
and route. If it turns out to be a directed broadcast to some remote
network, the packet should be sent to the right gateway using that
address as the destination. If it turns out the net.subnet is
directly connection, when the packet is about to go out the interface
(right before generating the checksum, hopefully), the address should
be changed to the preferred broadcast address for that interface.
That way they can all be -1 or 0, etc., but your application can still
specify which interface to use. This seems to be what cisco gateways
do. We set the broadcast addresses to 255.255.255.255, but it never
has trouble forwarding directed broadcasts, so it must be able to tell
which interface to use.



This archive was generated by hypermail 2.0b3 on Thu Mar 09 2000 - 14:42:51 GMT