Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I need to add an alias (10.0.2.254/24) to my bridged interfaces on my Ubuntu Server.

My /etc/network/interfaces is:

auto br0
iface br0 inet static
        address 192.168.200.108
        netmask 255.255.0.0
        gateway 192.168.200.254
        bridge_ports    eth0
        bridge_stp      off
        bridge_maxwait  0
        bridge_fd       0

Any ideas?

share|improve this question
add comment

migrated from stackoverflow.com May 25 '11 at 11:37

This question came from our site for professional and enthusiast programmers.

1 Answer

Add the next lines to your br0 configuration (e.g. after bridge_fd 0):

up /sbin/ip addr add 10.0.2.254/24 dev br0
down /sbin/ip addr del 10.0.2.254/24 dev br0

When the interface is brought up, the IP address 10.0.2.254 is added to device br0. Similarly, the address is removed when the interface goes down.

share|improve this answer
add comment

Your Answer

 
discard

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