# [SOLVED] bridging: port not coming back up after physical di

## MotivatedTea

I have a laptop I use as a server. (It uses less power than a desktop and comes with a built-in "UPS"!) I have an OpenVPN network setup, which means my network is configured as a bridge br0 consisting of my physical ethernet port eth0 and a TAP adapter tap0. I followed the instructions on the wiki (http://gentoo-wiki.com/HOWTO_setup_a_gentoo_bridge) to set up the bridge and it works fine.

Where I run into problems is after a power failure. When the power to my switch goes out, the laptop thinks eth0 has been unplugged and it removes it from the bridge. When the power comes back on, the eth0 interface is restarted but not added back into the bridge.

I simulated a blackout by unplugging my switch for a few seconds and then plugging it back in. I got this in my system log:

```
Sep 13 16:49:46 Courante ifplugd(eth0)[13376]: Link beat lost.

Sep 13 16:49:47 Courante e100: eth0: e100_watchdog: link down

Sep 13 16:49:47 Courante br0: port 1(eth0) entering disabled state

Sep 13 16:49:52 Courante ifplugd(eth0)[13376]: Executing '/etc/ifplugd/ifplugd.a

ction eth0 down'.

Sep 13 16:49:54 Courante device eth0 left promiscuous mode

Sep 13 16:49:54 Courante br0: port 1(eth0) entering disabled state

Sep 13 16:49:54 Courante ifplugd(eth0)[13376]: Program executed successfully.

Sep 13 16:50:01 Courante ifplugd(eth0)[13376]: Link beat detected.

Sep 13 16:50:01 Courante e100: eth0: e100_watchdog: link up, 100Mbps, full-duple

x

Sep 13 16:50:02 Courante ifplugd(eth0)[13376]: Executing '/etc/ifplugd/ifplugd.action eth0 up'.

Sep 13 16:50:04 Courante ifplugd(eth0)[13376]: Program executed successfully.

```

Note that eth0 is removed from the bridge but not added back in. If I run brctl addif br0 eth0 manually, it gets added back in:

```
Sep 13 16:50:59 Courante device eth0 entered promiscuous mode

Sep 13 16:50:59 Courante br0: port 1(eth0) entering learning state

Sep 13 16:51:14 Courante br0: topology change detected, propagating

Sep 13 16:51:14 Courante br0: port 1(eth0) entering forwarding state

```

How do I make this happen automatically?

My /etc/conf.d/net is here:

```
dns_domain="my.domain.name.is.here"

modules=( "dhcpcd" )

depend_br0() {

   need net.tap0

   after net.eth0

}

tuntap_tap0="tap"

config_eth0=( "null" )

config_tap0=( "0.0.0.0 promisc" )

bridge_br0="eth0 tap0"

config_br0=( "192.168.13.51 netmask 255.255.255.0 broadcast 255.255.255.0" )

routes_br0=( "default gw 192.168.13.1" )

gateways_br0=( "192.168.13.1" )

dns_servers_br0=( "67.69.184.223 67.69.184.159" )

```

(I suppose I don't need the dhcpcd module. It's left over from before, but I'm not using it. That shouldn't make a difference though.)

SOLVED: getting rid of ifconfig worksLast edited by MotivatedTea on Thu Sep 25, 2008 5:30 am; edited 1 time in total

----------

## MotivatedTea

* bump*

Any Gentoo network gurus out there? This is still a problem for me...

----------

## Mad Merlin

Do you need to be running ifplugd? Disable it and your network connection shouldn't get disconnected in the first place when the switch dies.

----------

## MotivatedTea

Yes, well, that would make sense now, wouldn't it? Why didn't I think of that?

Thank you; it works now.

----------

