qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] Connecting vde and LAN


From: Henrik Nordstrom
Subject: Re: [Qemu-devel] Connecting vde and LAN
Date: Mon, 11 Jul 2005 03:36:45 +0200 (CEST)

On Sun, 10 Jul 2005, Oliver Gerlich wrote:

Could you explain how you integrated vde_switch and bridging with your
current system? Do you start everything at boot and accept that this
changes the system-wide network configuration, or do you use some
bridging trick to avoid this?

I am not currently using vde_switch, instead I use named tun/tap devices (see archives) with statically assigned addresses.

The bridges is created at boot time. The host is a Fedora Core 4, and the following changes were done to cerate the bridge:

/etc/sysconfig/network-scripts

-- ifcfg-eth0 --
DEVICE=eth0
HWADDR=<the ethernet address>
ONBOOT=yes
TYPE=Ethernet
BRIDGE=br0
USERCTL=no
PEERDNS=yes
IPV6INIT=no

-- ifcfg-br0 --
DEVICE=br0
BOOTPROTO=static
IPADDR=192.168.1.53
NETMASK=255.255.255.0
GATEWAY=192.168.1.254
ONBOOT=yes
TYPE=Bridge

-- ifcfg-qemu0 ---
DEVICE=qemu0
BOOTPROTO=static
ONBOOT=yes
TYPE=Tap
BRIDGE=br0
tunctl -t ${DEVICE} -u 507

where 507 is my user ID allowing me to access the pre-created TUN/TAP device. tunctl can be found from user-mode-linux.


In theory it should be possible to set the IP address of br0 via DHCP, but the bridge support in the Fedora network scripts is a bit simpleminded and can't yet handle this proper (they attempt to dhcp before adding the physical interfaces...).



I suppose you could fool Fedora into thinking that the Bridge interface is in fact a physical Ethernet interface, and script the creation of the bridge in ifcfg-br0. Maybe something like the following will work:


-- ifcfg-br0 --
DEVICE=br0
ONBOOT=yes
TYPE=Ethernet
BOOTPROTO=dhcp
USERCTL=no
PEERDNS=yes
IPV6INIT=no
brctl addbr br0 2>/dev/null || true
brctl stp br0 off
brctl setfd br0 0
brctl sethello br0 0
brctl addif br0 eth0 2>/dev/null || true

-- ifcfg-eth0 --
DEVICE=eth0
ONBOOT=no
TYPE=Ethernet
USERCTL=no

Regards
Henrik




reply via email to

[Prev in Thread] Current Thread [Next in Thread]