WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-users

Re: [Xen-users] network-bridge breaks networking when eth0:1 is added

On Mon, Apr 27, 2009 at 4:17 PM, Kai Schaetzl <maillists@xxxxxxxxxxxxx> wrote:
> Fajar A. Nugraha wrote on Mon, 27 Apr 2009 08:11:00 +0700:
>
>> For non-standard networking setup (like the one where you have eth0:1)
>> it'd be much easier if you let the OS handle the bridge and have
>> something like (network-script /bin/true) on xend.sxp.
>
> The point is that this setup works fine on the second machine I tested it
> on, but not on the first one.

Didn't you say Xen version is different?
I'm not saying that's the root cause of problem (cause I don't know
whether or not it's true by only looking at your info). My point is
that you said yourself the setup were different.

> So for example
>> you can have these files
>>
>> /etc/sysconfig/network-scripts/ifcfg-eth0
>> /etc/sysconfig/network-scripts/ifcfg-xenbr0
>
> This looks like the old way it was done in Xen 3.0.

RHEL5/Centos still uses the same thing. So does Xen 3.3.1 port from
Gitco repository.
You are correct however, if you say that Xen 3.3.1 (the vanilla one
from xen.org) behavior have changed.


>> Let me know if you need more detail on this setup (like what those
>> file's contents look like).
>
> Yes, I'm not experienced in bridging. If you could tell me a sample config
> I could try that.

Something like this should work
/etc/sysconfig/network-scripts/ifcfg-eth0 :
DEVICE=eth0
BOOTPROTO=static
ONBOOT=yes
BRIDGE=xenbr0

/etc/sysconfig/network-scripts/ifcfg-xenbr0 :
DEVICE=xenbr0
ONBOOT=yes
TYPE=Bridge
BOOTPROTO=static
IPADDR=192.168.1.10
NETMASK=255.255.255.0
GATEWAY=192.168.1.1

/etc/sysconfig/network-scripts/ifcfg-xenbr0:1 :
DEVICE=xenbr0:1
ONBOOT=yes
BOOTPROTO=static
IPADDR=192.168.1.11
NETMASK=255.255.255.0

You could alyas change the bridge names if you want. I usually use
brXXX where XXX is the vlan number.

> I would also need to tell xen to use xenbr0 for the vifs then.

If I remember correctly Xen would use the first bridge it found by
default. Since I have lots of bridges (for different vlans), I like to
specify the bridge explicitly.

> The reason why
> I want to add another IP address to eth0 is that I want to be able to
> access the domUs on eth0 from eth1 and eth2 which are in a different non-
> routable subnet.

I'm not following you here. If you mean you want to create a private,
non-routeable network between dom0 and domU, you could simply create
another bridge.

/etc/sysconfig/network-scripts/ifcfg-brdummy0 :
DEVICE=brdummy0
ONBOOT=yes
TYPE=Bridge
BOOTPROTO=static
IPADDR=10.2.1.10
NETMASK=255.255.255.0

But if you want to create another bridge with eth1 or eth2 as the
physical device (thus domU would have two or more NICs, each connected
to a different bridge), you can copy the eth0/xenbr0 config above and
modify them accordingly.

> I had already tried by attaching eth1 and eth2 to the bridge but this
> killed the networking completely. (as I said, I'm not experienced in
> bridging ;-)

If you mean you attached dom0's eth0, eth1, and eth2 to the same
bridge when they're on different network (a.k.a different vlan) and
connected to the same switch, then that is only expected :)

Regards,

Fajar

_______________________________________________
Xen-users mailing list
Xen-users@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-users