# br0 Causing Problems

## Duck Man

I have a server running with two nics. One nic is WAN and the other is LAN. I recently added a vpn so now the LAN is bridged with the tap interface. I keep getting errors when it is started.

```
 # /etc/init.d/net.br0 start

 * Starting br0

 *   Creating bridge br0 ...            [ ok ]

 *   Adding ports to br0

 *     eth1 ...                         [ ok ]

 *     tap0 ...                         [ ok ]

 *   Bringing up br0

 *     192.168.69.1                     [ ok ]

 *   Adding routes

 *     default via 172.0.0.1 ...

RTNETLINK answers: No such process      [ !! ]
```

Everything still works after this but I still want to know why its doing it and how to get rid of it. I also get this is I try to restart it:

```
# /etc/init.d/net.br0 restart

 * Stopping br0

 *   Bringing down br0

 *     Destroying bridge br0 ...

 *       Removing port eth1 ...         [ ok ]

 *       Removing port tap0 ...         [ ok ]

 * Starting br0

 *   Creating bridge br0 ...            [ ok ]

 *   Adding ports to br0

 *     eth1 ...                         [ ok ]

 *     tap0 ...                         [ ok ]

 *   Bringing up br0

 *     192.168.69.1

 *     network interface br0 does not exist

 *     Please verify hardware or kernel module (driver)        [ !! ]
```

As you can imagine this does not work afterwards.

Here is my config:

```
modules=(

        "iproute2"

)

dns_domain="************"

#config_eth1=( "192.168.**.1 netmask 255.255.255.0 brd 192.168.***.255" )

#routes_eth1=( "default via localhost" )

config_eth0=( "dhcp" )

dhcpcd_eth0="-t 60 -N"

config_eth1=null

bridge_br0=( "eth1 tap0" )

config_br0=( "192.168.***.1 netmask 255.255.255.0 brd 192.168.***.255" )

routes_br0=( "default via 172.0.0.1" )

depend_br0() {

        need net.eth1 openvpn

}

```

I have replaced a few things with *. eth0 is the internet and eth1 is the lan.

Thanks in advanced  :Smile: 

----------

## i0

Hey

Is bridging enabled in kernel?

```
cat /usr/src/linux/.config | grep "CONFIG_BRIDGE="
```

----------

## Duck Man

Yes it is compiled into it, not as a module.

----------

## Cyker

Stupid question: Did you 'emerge bridge-utils'?

If so, what does "brctl show" display after the bridge is created, and also after you restart it and it fails?

Is there anything in dmesg?

I'd like to know what that RTNETLINK error is about...

Are you using iproute2 or ifconfig?

----------

## Duck Man

I have net-misc/bridge-utils-1.2 installed.

```
# brctl show

bridge name     bridge id               STP enabled     interfaces

br0             8000.00e04c778a9e       no              eth1

                                                        tap0
```

After I restart I get this in dmesg:

```
br0: port 2(tap0) entering disabled state

br0: port 1(eth1) entering disabled state

device eth1 left promiscuous mode

br0: port 1(eth1) entering disabled state

device tap0 left promiscuous mode

br0: port 2(tap0) entering disabled state
```

This is the same thing that it says when I just stop it.

When I start it successfully the only odd looking this is

```
br0: Dropping NETIF_F_UFO since no NETIF_F_HW_CSUM feature.
```

But google reveals nothing crazy about it. At least not that I could find. And I am using iproute2. It doesn't work at all if I use ifconfig. From what I have googled, iproute2 is what is giving the RTNETLINK error.

----------

## sf_alpha

routes_br0="default via 127.0.0.1"

You add route via 127.0.0.1 which cannot reachable on br0 interface. That is ...

Why you add 127.0.0.1 ... It should not

----------

## jcat

He hasn't added

```
routes_br0=( "default via 127.0.0.1" )
```

he's added

```
routes_br0=( "default via 172.0.0.1" )
```

Can you spot the difference?   :Wink: 

It should be 127.0.0.1 if he wants the localhost IP in there.

I believe that the interfaces being bridged (both real and tap) need to be declared with a null config:

```
config_eth1=( "null" )

config_tap0=( "null" )
```

and I also use

```
brctl_br0=( "setfd 0")
```

Cheers,

jcat

----------

## Duck Man

The routes line is causing one of the errors. I removed it and everything is working so thats cool. I still don;t understand why it cant restart. I guess it removes the br0 interface and can't remake it right away. But I shouldn't have to restart it so that isn't a huge deal.

Thx everyone  :Smile: 

----------

## jcat

Glad to hear it's sorted  :Smile: 

Cheers,

jcat

----------

## xatrix101

It's little bit obsolete but I found solution for your restart problem, so I post it here for further visitors.

Solution is to edit /etc/conf.d/rc to

```
RC_PLUG_SERVICES="!net.br0"
```

----------

