Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

How do I remove a bridge that has an IP address that was brought up manually and isn't in /etc/network/interfaces?

$ ifconfig br100                                                
    br100     Link encap:Ethernet  HWaddr 00:00:00:00:00:00                         
              inet addr:172.16.0.5  Bcast:172.16.0.255  Mask:255.255.255.0

Can't delete it:

# brctl delbr br100
bridge br100 is still up; can't delete it   

Can't bring it down with ifdown:

# ifdown br100                                                  
ifdown: interface br100 not configured     
share|improve this question
2  
Tried ifconfig br100 down? –  Herman Torjussen Feb 15 '12 at 16:15

2 Answers 2

up vote 12 down vote accepted

Figured it out:

# ip link set br100 down
# brctl delbr br100
share|improve this answer

To clarify this for future.

ifup and ifdown are commands from some flavours of linux. And are used to control network settings set in /etc/network/interfaces for debian based systems and /etc/sysconfig/network-scripts/ifcg* on Redhat based systems (I cannot comment on others).

Creating and removing interfaces manually is done by using ifconfig (or ip which is bit more tricky to use). Bridges can be controlled with brctl

So after removing all interfaces from a bridge with brctl delif <bridg> <if> it can be moved to "down state" with ifconfig br100 down (or ip link set br100 down) and can now be removed with brctl delbr br100

Please note that using network-manager to manage your networks might make your manually changed interfaces to reset.

share|improve this answer

Your Answer

 
discard

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.