Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

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

How do I setup an IP alias on a bridge (br0) device on Ubuntu ?

If I wait for br0 to come up and then do

/sbin/ifconfig br0:0 netmask 

then it works fine.

If however I add the following to my /etc/network/interfaces file, it does not work and the network fails to start:

auto br0:0
iface br0:0 inet static

At the moment, I have a script in /etc/network/if-up.d/bridge_alias that does this as follows:


if [ "${LOGICAL}" == "br0" ] && [ "${PHASE}" = "post-up" ]; then
        echo -n "Starting br0:0 ... "
        /sbin/ifconfig br0:0 netmask
        echo "Done!"

What is the right way of doing this though, just using the OS network config files ?

share|improve this question
up vote 2 down vote accepted

The only way you can do that is from ifconfig (or maybe ip addr add, but i haven't checked it against bridges). if-up.d is okay, but i recommend you use post-up in interfaces, like:

auto br0:0  
  iface br0:0 inet static  
  post-up /sbin/ifconfig br0:0 netmask

You can repeat post-up as much times as you want.

share|improve this answer
Thanks - didn't realise I could do that in a post-up command – Anonymouslemming Oct 24 '13 at 15:39

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.