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] Problem: hidding all NICs from dom0, how to create a vir

To: xen-users@xxxxxxxxxxxxxxxxxxx
Subject: Re: [Xen-users] Problem: hidding all NICs from dom0, how to create a virtual one
From: list user <xktnniuymlla@xxxxxxxxxxxxxx>
Date: Wed, 05 Jul 2006 15:36:42 -0700
Delivery-date: Wed, 05 Jul 2006 15:37:32 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
In-reply-to: <200607051035.56013.jonathan@xxxxxxxxxxx>
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>
References: <200607041848.28211.xen-users@xxxxxxxxxxx> <200607051035.56013.jonathan@xxxxxxxxxxx>
Sender: xen-users-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Mozilla Thunderbird 1.0.2-6 (X11/20050513)
Jonathan Vogt wrote:
Hi all

Hi Jonathon,

So I'm sort of stuck here. My question is, can I create a virtual NIC for
dom0 aswell (like vif1.0 in the domUs)?

Yes

 If so how?


Try uml-utilities. Can't say if it's better/worse than anything else but works for me.

I use bridged networking and let host#1 serve as the firewall/router, and keep dom0 as isolated as possible; dom0 uses a tap and all the hosts use the eth's Here's a sample xend startup script (it's very rudimentary).

"my-network-bridge"
#!/bin/bash

$LAN = '10.20.30'

# uml-utities let's me create a virtual device
/usr/bin/tunctl -t tap0

# start 3 bridges and 4 devices
/etc/xen/scripts/network-bridge start bridge=LAN netdev=eth0 vifnum=0
/etc/xen/scripts/network-bridge start bridge=DMZ netdev=eth1 vifnum=1
/etc/xen/scripts/network-bridge start bridge=WAN netdev=eth2 vifnum=2
/etc/xen/scripts/network-bridge start bridge=LAN netdev=tap0 vifnum=3

# none of the ethX devices have addresses
# give one to "tap0" and bring it up
/sbin/ip address add $LAN.254/24 dev tap0
/sbin/ip link set dev tap0 up

# give dom0 a way out, i.e a "default gateway"
/sbin/ip route add default via $LAN.1 dev tap0

# aaaargh! just in case
ethtool -K tap0 tx off
----------------------------------------------

After xend starts this is what this dom0 looks like:


[mike@lan254 xen]$ ip address list | grep 'inet '
    inet 127.0.0.1/8 scope host lo
    inet 10.20.30.254/24 scope global tap0


[mike@lan254 xen]$ ip route list
10.20.30.0/24 dev tap0  proto kernel  scope link  src 10.20.30.254
default via 10.20.30.1 dev tap0


[mike@lan254 xen]$ brctl show
bridge name     bridge id               STP enabled     interfaces
DMZ             8000.feffffffffff       no              peth1
                                                        vif0.1
                                                        vif1.1
                                                        vif2.0
                                                        vif3.0
LAN             8000.feffffffffff       no              peth0
                                                        ptap0
                                                        vif0.0
                                                        vif0.3
                                                        vif1.0
WAN             8000.feffffffffff       no              peth2
                                                        vif0.2
                                                        vif1.2

Hope that makes sense.

Good luck,
Mike Wright


Is this possible with the dummy device? Or does the dummy device only drop packages?
Cheers
Jonathan

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

<Prev in Thread] Current Thread [Next in Thread>