Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm trying to configure the ip address, broadcast and subnet mask of a series of interfaces. However, I'd like to configure the IP Address independent of the broadcast address and vice versa. In other words, when I use the command

ifconfig eth5

The broadcast address is updated to When I update the broadcast address the ip is also updated accordingly.

How can I change one without automatically modifying the other?

Additionally, I was wondering if the best way to make permanent changes to the IP Address, Broadcast, and so on is through editing the /etc/sysconfig/network-scripts file on redhat linux. Thanks!

share|improve this question
up vote 3 down vote accepted

Have a look at How Does Subnetting Work?

I am assuming you are using a /24 ( subnet mask which is why it is automatically changing your broadcast to There are only 254 (256 - 2) usable addresses in a /24 going from - 

with being your network address and your broadcast address (hence why it changes). In order to change your broadcast address you need to subnet your network.

As for automatically configuring your NIC, if you are on a RedHat based Linux distro you can edit the file:

/etc/sysconfig/network-scripts/ifcfg-<interface name>

Debian based distros use the following file:


Do a

man interfaces

on a Debian distro for documentation on that file.

Gentoo uses


Arch Linux uses

share|improve this answer

You can use following from command line

ifconfig eth5 netmask YOURS broadcast YOURS

But as you mentioned only proper way for permanent change is /etc/sysconfig/network-scripts for details and list of options see RH docs.

share|improve this answer

You might want to look at the iproute2 stuff - it's recommended now over ifconfig. You could do something like:-

ip addr replace broadcast dev eth1
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.