Port-xen archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: dom0/domU bridging - don't get it to work



On Mon, Sep 12, 2005 at 01:30:53AM +0200, Florian Heigl wrote:
> Hi,
> 
> I don't want to waste anyone's time, but I just don't get this to work.
> 
> I'm running xen-2.0.7 on what I think is the most current snapshot of
> 3_BETA (NetBSD 3.0_BETA (XEN0) #0: Sat Aug 13 13:50:25), and my dom0
> luckily is running fine, with X and everything I could wish for.
> 
> I'm trying to run another NetBSD in the first domU; after problems
> using a file backend I've simply plugged in an USB stick. It's too 
> small for any real work of course, but OK for testing. 
> Unfortunately, I don't get to ftp the distribution packages.
> 
> I need to be able to DHCP the ip address for the domU and somehow just
> don't get the bridge to work, and hope someone is able to spot where
> I went wrong.
> 
> Bridge configuration:
> 
> xen-host-2# cat /etc/ifconfig.bridge0                                         
>  
> create
> !brconfig  add fxp0 up
> 
> xen-host-2# brconfig -a  
> bridge0: flags=41<UP,RUNNING>
> [...]
> Interfaces:
> fxp0 flags=3<LEARNING,DISCOVER>
> port 1 priority 128
> [...]
> 
> 
> Domain Config
> 
> xen-host-2# cat xm.dom1.netbsd                                                
> kernel = "/export/xen/dom1/netbsd-INSTALL_XENU.gz"
> memory = 64
> name = "xen-u-1"
> nics = 1 
> root = "/dev/wd0d"
> vif = [ 'mac=aa:00:00:55:03:f0','bridge=bridge0' ]
> 
> in ifconfig I see fxp0, bridge0, and the vif for the domU, 
> the later is not in state 'UP', but manually changing this state
> made no difference as far as I can tell.

Is the domU's xvif added to the bridge ? check with brconfig.

Here is my xen/scripts/vif-bridge:
#!/bin/sh
set -e 

echo "vif-bridge $*"

# Operation name.
OP=$1
shift

# Pull variables in args into environment
for arg ; do export "${arg}" ; done

# Required parameters. Fail if not set.
domain=${domain:?}
vif=${vif:?}
mac=${mac:?}
bridge=${bridge:?}

# Optional parameters. Set defaults.
ip=${ip:-''}   # default to null (do nothing)
case $OP in
    up)
        ifconfig x${vif} up
        brconfig ${bridge} add x${vif}
        exit 0
        ;;
    down)
        exit 0
        ;;
    *)
        echo 'Invalid command: ' $OP
        echo 'Valid commands are: up, down'
        exit 1
        ;;
esac


-- 
Manuel Bouyer <bouyer%antioche.eu.org@localhost>
     NetBSD: 26 ans d'experience feront toujours la difference
--



Home | Main Index | Thread Index | Old Index