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-devel

Re: [Xen-devel] Network script handling changes

To: Ewan Mellor <ewan@xxxxxxxxxxxxx>
Subject: Re: [Xen-devel] Network script handling changes
From: Li Ge <lge@xxxxxxxxxx>
Date: Wed, 2 Nov 2005 10:50:44 -0600
Cc: Xen Developers <xen-devel@xxxxxxxxxxxxxxxxxxx>, xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
Delivery-date: Wed, 02 Nov 2005 16:48:09 +0000
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <20051031165254.GD7630@xxxxxxxxxxxxxxxxxxxxxx>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx

Ewan,
I tried the two bridges topology you described below by following the exact steps you suggested, but I could not get it work.

-----------------------------------------------------
dom0: fake eth0 -> vif0.0 ----------------------------+
dom0: fake eth1 -> vif0.1 ---+                        |
                            |                        |
                            |                       bridge 0 -> real eth0
                            |                        |
                           bridge 1 -> real eth1     |
                            |                        |
                            |                        |
domU: fake eth0 -> vifN.0 ----------------------------+
domU: fake eth1 -> vifN.1 ---+

then you need to create a wrapper script:

(network-script my-network-script)

and in /etc/xen/scripts/my-network-script:

#!/bin/sh
dir=$(dirname "$0")
"$dir/network-bridge" vifnum=0
"$dir/network-bridge" vifnum=1

------------------------------------------------------------------------------------------------------------------

Here are the lines uncommented in my xend-config.sxp

(xend-http-server yes)
(xend-relocation-server yes)
(xend-address localhost)
(xend-relocation-address localhost)
(network-script my-network-script)
(dom0-min-mem 0)
 (dom0-cpus 0)
 
------------------------------------------------------------------------------------------------------------------

Here is the "ifconfig -a" output after I started xend:

# ifconfig -a
eth0      Link encap:Ethernet  HWaddr 00:09:6B:F5:F2:30
          inet addr:9.3.192.171  Bcast:9.3.192.255  Mask:255.255.255.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:851 errors:0 dropped:0 overruns:0 frame:0
          TX packets:206 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:90707 (88.5 Kb)  TX bytes:28471 (27.8 Kb)
          Interrupt:20
 
eth1      Link encap:Ethernet  HWaddr 00:09:6B:F5:F2:31
          inet addr:10.0.0.2  Bcast:10.0.0.255  Mask:255.255.255.0
          UP BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:0 (0.0 b)  TX bytes:0 (0.0 b)
          Interrupt:21
 
lo        Link encap:Local Loopback
          inet addr:127.0.0.1  Mask:255.0.0.0
          UP LOOPBACK RUNNING  MTU:16436  Metric:1
          RX packets:36 errors:0 dropped:0 overruns:0 frame:0
          TX packets:36 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:2594 (2.5 Kb)  TX bytes:2594 (2.5 Kb)
 
veth0     Link encap:Ethernet  HWaddr 00:00:00:00:00:00
          BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:0 (0.0 b)  TX bytes:0 (0.0 b)
 
vif0.0    Link encap:Ethernet  HWaddr FE:FF:FF:FF:FF:FF
          BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:0 (0.0 b)  TX bytes:0 (0.0 b)
_____________________________________________________

I've also tried to start network-bridge manually. But still it does not look right

 #./network-bridge vifnum=0 start
    eth0      device: Broadcom Corporation NetXtreme BCM5704 Gigabit Ethernet (rev 03)
    eth0      configuration: eth-id-00:09:6b:f5:f2:30
Nothing to flush.
    eth0
    eth0      configuration: eth-id-00:09:6b:f5:f2:30
# ./network-bridge vifnum=1 start
# ifconfig -a
eth0      Link encap:Ethernet  HWaddr 00:09:6B:F5:F2:30
          inet addr:9.3.192.171  Bcast:9.3.192.255  Mask:255.255.255.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:90 errors:0 dropped:0 overruns:0 frame:0
          TX packets:29 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:7637 (7.4 Kb)  TX bytes:3634 (3.5 Kb)
 
eth1      Link encap:Ethernet  HWaddr 00:09:6B:F5:F2:31
          inet addr:10.0.0.2  Bcast:10.0.0.255  Mask:255.255.255.0
          UP BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:0 (0.0 b)  TX bytes:0 (0.0 b)
          Interrupt:21
 
lo        Link encap:Local Loopback
          inet addr:127.0.0.1  Mask:255.0.0.0
          UP LOOPBACK RUNNING  MTU:16436  Metric:1
          RX packets:46 errors:0 dropped:0 overruns:0 frame:0
          TX packets:46 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:3648 (3.5 Kb)  TX bytes:3648 (3.5 Kb)
 
peth0     Link encap:Ethernet  HWaddr FE:FF:FF:FF:FF:FF
          UP BROADCAST RUNNING NOARP MULTICAST  MTU:1500  Metric:1
          RX packets:89 errors:0 dropped:0 overruns:0 frame:0
          TX packets:26 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:7969 (7.7 Kb)  TX bytes:3558 (3.4 Kb)
          Interrupt:20
 
vif0.0    Link encap:Ethernet  HWaddr FE:FF:FF:FF:FF:FF
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:29 errors:0 dropped:0 overruns:0 frame:0
          TX packets:90 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:3634 (3.5 Kb)  TX bytes:7637 (7.4 Kb)
 
xenbr0    Link encap:Ethernet  HWaddr FE:FF:FF:FF:FF:FF
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:34 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:2012 (1.9 Kb)  TX bytes:0 (0.0 b)
 
xenbr1    Link encap:Ethernet  HWaddr 00:00:00:00:00:00
          BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:0 (0.0 b)  TX bytes:0 (0.0 b)
 

Anything that I could have missed in the settings?

Thanks a lot,
Li


Inactive hide details for Ewan Mellor <ewan@xxxxxxxxxxxxx>Ewan Mellor <ewan@xxxxxxxxxxxxx>


          Ewan Mellor <ewan@xxxxxxxxxxxxx>
          Sent by: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx

          10/31/2005 10:52 AM


To

Xen Developers <xen-devel@xxxxxxxxxxxxxxxxxxx>

cc


Subject

[Xen-devel] Network script handling changes

I have made some changes to the way the network scripts are handled, in order
to make it easier for those of you with non-standard configurations.

 o All scripts now cope with parameters being passed on the command line, and
   this command line may be specified in the xend-config.sxp.

 o The vif-bridge script can autodetect the correct bridge name, if you are
   using only one.

 o The vif-bridge option in xend-config.sxp has gone.  If you need this
   functionality, specify it on the script command line, instead.

 o If the default config worked for you before, then it should still work.

For example, if you are using this topology, the default bridged one:

dom0: fake eth0 -> vif0.0 -+
                          |
                        bridge (xenbr0) -> real eth0 -> the network
                          |
domU: fake eth0 -> vifN.0 -+

then

(network-script network-bridge)
(vif-script     vif-bridge)

should suffice.

If, like Sean Dague, you are renaming the bridge, like this:

dom0: fake eth0 -> vif0.0 -+
                          |
                        bridge (br0) -> real eth0 -> the network
                          |
domU: fake eth0 -> vifN.0 -+

then you want

(network-script 'network-bridge bridge=br0')
(vif-script     vif-bridge)

or if you have other bridges on your machine, but all the domUs use the same
bridge, then you want

(network-script 'network-bridge bridge=br0')
(vif-script     'vif-bridge bridge=br0')

If you need to use a different NIC than eth0, say eth1, like the "IBM blades":

dom0: fake eth0 -> vif0.0 -+
                          |
                        bridge -> real eth1 -> the network
                          |
domU: fake eth0 -> vifN.0 -+

then you want

(network-script 'network-bridge netdev=eth1')
(vif-script     vif-bridge)


If, like Charles Duffy, you want two bridges:

dom0: fake eth0 -> vif0.0 ----------------------------+
dom0: fake eth1 -> vif0.1 ---+                        |
                            |                        |
                            |                       bridge 0 -> real eth0
                            |                        |
                           bridge 1 -> real eth1     |
                            |                        |
                            |                        |
domU: fake eth0 -> vifN.0 ----------------------------+
domU: fake eth1 -> vifN.1 ---+

then you need to create a wrapper script:

(network-script my-network-script)

and in /etc/xen/scripts/my-network-script:

#!/bin/sh
dir=$(dirname "$0")
"$dir/network-bridge" vifnum=0
"$dir/network-bridge" vifnum=1


If you want non-bridged topologies, then you have to use different scripts.
Michael Lessard, I believe, wants this:

dom0: ---------------------> real eth0 -> the network
dom1: fake eth0 -> vif1.0 -> real eth1 -> the network

In which case I think you want

(network-script network-route)
(vif-script     vif-route)

though you might need some extra hacking to make this work, and I would be
interested in your success.


If you want to handle initial networking through the init.d scripts, as Greg
Brackley wanted, IIRC, then simply don't specify a network-script (this has
worked for a week or so now) and specify an appropriate vif-script instead.
Greg, if you've got anywhere with your VLAN/domU setup, I'd be interested.


If I claim your topology should work and it doesn't, then I would appreciate a
full set of info:

from dom0:

brctl show
ifconfig
route
iptables -L
cat /var/log/{debug,messages,syslog}

and from domU:

ifconfig
route
iptables -L


And if you want a topology that's not here, feel free to shout!

Happy networking,

Ewan.

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

GIF image

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