# [SOLVED] Bridging configuration issues

## Scorpion265

Hello all,

I am currently running a xen system. I have xenbr0 that works on the internet, all my domU's can bind to external IPs no problem. I have a few testbed servers that I would like to have talking on a private IP network, however the init scripts are not letting me start up xenbr1. Let me show you my config:

```

config_eth0=( "null" )

config_xenbr0=( "208.94.241.194 netmask 255.255.255.248" )

bridge_xenbr0="eth0"

routes_xenbr0=( "default via 208.94.241.193" )

dns_domain_xenbr0="braingoo.net"

dns_servers_xenbr0="208.94.242.3 208.94.243.3"

dns_search_xenbr0="braingoo.net"

config_xenbr1=( "192.168.1.2 netmask 255.255.255.0" )

```

I get the following error when trying to start xenbr1:

```

virtualbrain conf.d # /etc/init.d/net.xenbr1 start

 * Caching service dependencies ...                                       [ ok ]

 * Starting xenbr1

 *   Bringing up xenbr1

 *     192.168.1.2

 *     network interface xenbr1 does not exist

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

```

if I manually create xenbr1 with brctl, and give it an IP via ifconfig, it works great. I would rather do this via the init scripts.Last edited by Scorpion265 on Mon Mar 15, 2010 7:47 pm; edited 1 time in total

----------

## Scorpion265

Anyone? Bueller?

----------

## Hu

Without examining the initscripts to confirm this theory, it could be an issue with insufficient configuration for xenbr1.  You specify its address, but you do not specify what interfaces it should contain.  The initscripts might not create the bridge if there are no interfaces to add to it.  Even if they did, it would not be very useful.

----------

## Scorpion265

Thats the thing, it would be very useful. This is a xen server, virtual machines, etc. These machines tap into bridges, I don't want one with a real device, they already have that for internet access. This would be for NFS shares, rsync, database traffic, etc. that would happen between the VMs in the system. I can use the brctl addbr xenbr1 to create the bridge, and assign it a private IP address, and it works as I want. However this is not a permanent solution, especially for unplanned reboots.

Before you ask why I am doing this, it's to save on bandwidth. I do not want network chatter that could happen virtually to cost me money.

----------

## Hu

 *Scorpion265 wrote:*   

> Thats the thing, it would be very useful. This is a xen server, virtual machines, etc. These machines tap into bridges, I don't want one with a real device, they already have that for internet access. This would be for NFS shares, rsync, database traffic, etc. that would happen between the VMs in the system. I can use the brctl addbr xenbr1 to create the bridge, and assign it a private IP address, and it works as I want. However this is not a permanent solution, especially for unplanned reboots.

 Assuming my guess was correct, why not just create the tap devices and add them to the bridge via the normal Gentoo networking scripts, instead of using external guest-triggered scripts to activate them?  Trying to use a hybrid of a Gentoo-managed bridge with externally-managed ports is messy even if it works.

 *Scorpion265 wrote:*   

> Before you ask why I am doing this, it's to save on bandwidth. I do not want network chatter that could happen virtually to cost me money.

 What kind of network are you on that a bit of leaked chatter will make a meaningful difference to your bill?

----------

## Scorpion265

A tap device could work, is there any way to make them permanent? I am pretty sure they disappear when the server is cycled.

It's not a bit of leaked chatter, it's a lot. This is a personal project that involves multiple nodes and (sometimes) gigs of data get transferred back and forth. I am using virtual machines to cut down on costs for development and prototyping.If all goes well I will spend the money for real machines. I would have dual NICs and have a publicly accessible NIC and a private for between server communication.

----------

## Hu

Tap devices do vanish when the system is rebooted.  My thinking was that, if you have a relatively finite number of tap devices needed, then you could configure them in /etc/conf.d/net just like your real interfaces.  Then, have your ifup scripts run /etc/init.d/net.tapX start instead of creating them directly via tunctl.  This would cause the Gentoo networking scripts to bring up and configure the devices, and would allow you to name the devices as being part of the bridge.  You might also need to have the ifup script include a statement like /etc/init.d/net.xenbr1 --quiet status || /etc/init.d/net.xenbr1 start so that the bridge would be started if it was not up.  It should be safe to leave the tap devices up when they are unused, so the ifdown script might be a no-op.

----------

## Scorpion265

That was it! I didn't have a net.tap0. I set it to config_tap0 = ( "null" ) and used it as the bridge device. That worked perfectly! I've setup an internal DNS server for routing traffic properly on the internal network. On a side note, the speed of transfers have gone up significantly with this configuration. Thank you very much for your help!

----------

