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] DOM0 networking - dead to the outside world

On Fri, Mar 23, 2007 at 06:01:21PM -0000, Alan Pearson wrote:
> 
> Something wierd going on, I don't get the bridge device brought up (I
> presume this should be done with service network start).
> 
> So after service network start I get this :
> 
> [root@xen-srv2 network-scripts]# ifconfig -a
> eth0      Link encap:Ethernet  HWaddr 00:14:5E:DE:BB:DA
>           UP BROADCAST RUNNING  MTU:1500  Metric:1
>           RX packets:34 errors:0 dropped:0 overruns:0 frame:0
>           TX packets:51 errors:0 dropped:0 overruns:0 carrier:0
>           collisions:0 txqueuelen:1000
>           RX bytes:2366 (2.3 KiB)  TX bytes:14320 (13.9 KiB)
>           Interrupt:19 Memory:c8000000-c8011100
> 
<snip/>
> 
> No ip address on eth0 and no xbr0 device.
> 
> ?
> 
> [root@xen-srv2 network-scripts]# brctl show
> bridge name     bridge id               STP enabled     interfaces
> [root@xen-srv2 network-scripts]#
> 
> So am I doing something wrong ? I'd expect to see a bridge device with an
> IP address ?
> 

No Alan, I doubt you are doing anything wrong. I tested those startup
configurations on an FC5 box. Now that I think about it it's quite
possible that this configuration is not supported on the more conservative 
RHEL4.3. You could try grepping the network startup scripts for 
"BRIDGE" to see if this stuff is supported:

    grep -i bridge /etc/sysconfig/network-scripts/*

As another alternative you could write your own shell script to replace
the network-bridge script that will set up your bridge for you. It's not
complicated to do, it's just not something you want to try when you are
logged into the server remotely.

Assuming eth0 had an address 172.16.1.1, you could create a bridge called 
xbr0 as follows (note that this is from memory not a cut and paste from
a script, so treat with due caution):

[First a little something for those who don't RTFP]
NOTE: DO *NOT* TYPE THE FOLLOWING AT THE COMMAND LINE WHEN YOU ARE 
      LOGGED IN REMOTELY VIA "eth0"

    brctl addbr xbr0
    ifconfig eth0 0.0.0.0 up
    brctl addif xbr0 eth0
    ifconfig xbr0 172.16.1.1 netmask 255.255.255.0 

It's that simple. However, it's worthwhile adding a few timeout values
or your bridge will sit around studying it's surroundings for the first
15 seconds or so. So a better version is:

    brctl addbr xbr0
    brctl setfd xbr0 0
    brctl sethello xbr0 0
    brctl stp xbr0 off
    ifconfig eth0 0.0.0.0 up
    brctl addif xbr0 eth0
    ifconfig xbr0 172.16.1.1 netmask 255.255.255.0 

The advantage of creating your own bridges IMHO, is that you can easily 
understand the traffic flow. I personally find the networking 
infrastucture that Xen creates by default to be difficult to understand 
conceptually and difficult to debug in practice. Maybe that's just 
me though.

jez

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