This tip is excerpted from TCP/IP Network Administration, Help for Unix System Administrators, by Craig Hunt, from
O'Reilly and Associates.
NT Network administrators who are investigating using Linux or Unix servers as Web servers, for example, may not be familiar with the way that Linux and Unix configure IP parameters. Since IP is independent of the network it runs on, all its parameters have to be set in software. The ifconfig (interface configure) command sets these parameters.
Of particular note is setting the broadcast address for the network systems. RFC 919, Broadcasting Internet Datagrams, clearly defines the format of a broadcast address as an address with all host bits set to 1. Since the broadcast address is so precisely defined, ifconfig should be able to compute it automatically, and you should always be able to use the default. Unfortunately, this is not the case. TCP/IP was included in BSD 4.2 before RFC 919 was an adopted standard. BSD 4/2 used a broadcast address with all host bits set to 0, and did not allow the broadcast address to be modified during configuration. Because of this history, some releases of Unix default to a "0-style" broadcast address for compatibility with older systems, while other releases default to the standard "1-style" broadcast address.
Avoid this confusion by defining a broadcast address for the entire network and ensuring that every device on the network explicitly sets it during configuration. Set the broadcast in the ifconfig command using the keyword broadcast followed by the correct broadcast address. For example, the ifconfig command to set the broadcast address for a particular workstation's le0 interface is:
# ifconfig le0 172.16.12.1 netmask 255.255.255.0 broadcast 172.16.12.255
The broadcast address is relative to the local subnet. Note that the host bits are all 1 (255).