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] Xen 3.0, setting up a virtual network with NAT

To: Richard Jones <rich@xxxxxxxxxxx>
Subject: Re: [Xen-users] Xen 3.0, setting up a virtual network with NAT
From: Patrick Wolfe <pwolfe@xxxxxxxxxxxxxx>
Date: Fri, 03 Feb 2006 12:58:12 -0500
Cc: xen-users@xxxxxxxxxxxxxxxxxxx
Delivery-date: Fri, 03 Feb 2006 19:07:16 +0000
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <20060203163147.GA6549@xxxxxxxxxxxxxxxxxxx>
List-help: <mailto:xen-users-request@lists.xensource.com?subject=help>
List-id: Xen user discussion <xen-users.lists.xensource.com>
List-post: <mailto:xen-users@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-users>, <mailto:xen-users-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-users>, <mailto:xen-users-request@lists.xensource.com?subject=unsubscribe>
Organization: Employease
References: <20060203163147.GA6549@xxxxxxxxxxxxxxxxxxx>
Sender: xen-users-bounces@xxxxxxxxxxxxxxxxxxx
On Fri, 2006-02-03 at 16:31 +0000, Richard Jones wrote:
> I've got a network set up as in the diagram below:
> 
>    domU               domU
>    fake eth0          fake eth0
>    192.168.99.2       192.168.99.3
>        |                   |
>        +-----------+-------+
>                    |
>                192.168.99.1
>                dummy0
>                 * dom0 *
>                real eth0
>                public IP address
> 
> In /etc/xen/xend-config.sxp I've got:
>  (network-script 'network-bridge netdev=dummy0')

Instead of using dummy0, why not try using veth1 and vif0.1?

in /etc/xen/xend-config.sxp, use:

        (network-script 'network-route')
        (vif-script 'vif-bridge')

The 'network-route' script will leave eth0 alone, and turn on IP
forwarding.  Because you'll be using bridging to connect to the
domUs, we need to specify 'vif-bridge' here.

Assuming you're using Debian Linux in your dom0, edit the
file /etc/network/interfaces to add:

        # dom0's interface to the xen dmz bridge
        auto veth1
        iface veth1 inet static
                address 192.168.99.1
                netmask 255.255.255.0
                broadcast 192.168.99.255
                # optionally define MAC address for dom0
                hwaddress ether 00:16:3E:B0:01:01

        # the xen dmz bridge
        auto br1
        iface br1 inet manual
                # the following attaches veth1 to this bridge
                bridge_ports vif0.1
                bridge_stp off
                bridge_fd 0

This will define veth1 (instead of dummy0), create
the xenbr0 bridge, and connect vif0.1 (the other end of the virtual
ethernet cable which is connected to veth1) to br1 bridge.

Don't forget to turn on IP forwarding by editing /etc/network/options:

        ip_forward=yes

If your dom0 isn't running Debian, you'll have to figure out how to do
all that at boot time yourself.

Then, in your domU's config files, use something like:

        vif=[ 'bridge=br1,mac=00:16:3E:70:01:02' ]

and when your domU's come up, vif-bridge will attach them to your
bridge.  Note:  configuring the mac addresses is optional.


-- 

Patrick Wolfe

email:   pwolfe@xxxxxxxxxxxxxx

Attachment: signature.asc
Description: This is a digitally signed message part

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