Path: utzoo!utgpu!water!watmath!clyde!bellcore!faline!thumper!ulysses!andante!mit-eddie!bloom-beacon!gatech!udel!princeton!njin!aramis.rutgers.edu!athos.rutgers.edu!hedrick From: hedrick@athos.rutgers.edu.UUCP Newsgroups: comp.protocols.tcp-ip Subject: Re: default broadcast address Message-ID:Date: 12 Jul 88 18:10:59 GMT References: <8807101600.AA02208@uc.msc.umn.edu> Organization: Rutgers Univ., New Brunswick, N.J. Lines: 15 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.