Configuring IP parameters with Linux and Unix

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.

    Requires Free Membership to View

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 netmask broadcast

The broadcast address is relative to the local subnet. Note that the host bits are all 1 (255).

This was first published in May 2000

There are Comments. Add yours.

TIP: Want to include a code block in your comment? Use <pre> or <code> tags around the desired text. Ex: <code>insert code</code>

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
Sort by: OldestNewest

Forgot Password?

No problem! Submit your e-mail address below. We'll send you an email containing your password.

Your password has been sent to:

Disclaimer: Our Tips Exchange is a forum for you to share technical advice and expertise with your peers and to learn from other enterprise IT professionals. TechTarget provides the infrastructure to facilitate this sharing of information. However, we cannot guarantee the accuracy or validity of the material submitted. You agree that your use of the Ask The Expert services and your reliance on any questions, answers, information or other materials received through this Web site is at your own risk.