[Bug 4258] qemu image has no working network interface
bugzilla-daemon at amethyst.openembedded.net
bugzilla-daemon at amethyst.openembedded.net
Fri May 16 07:07:26 UTC 2008
http://bugs.openembedded.net/show_bug.cgi?id=4258
--- Comment #2 from Khem Raj <raj.khem at gmail.com> 2008-05-16 09:07:25 ---
I think you should create a bridge on your eth0 and use dhcp to configure
This is my /etc/qemu-ifup
#!/bin/sh
# Sample /etc/qemu-ifup to have bridged networking between qemu instances and
your real net
# You need "youruser ALL=(root) NOPASSWD: /etc/qemu-ifup" in /etc/sudoers
# You also need enough rights on /dev/tun
if [ $UID -ne 0 ]
then
sudo $0 $1
exit
fi
/sbin/ifconfig $1 promisc 0.0.0.0
if ! /sbin/ifconfig br0
then
/usr/sbin/brctl addbr br0
/usr/sbin/brctl addif br0 eth0
/sbin/ifconfig br0 up
addr=`/sbin/ip addr | grep eth0 | grep inet | sed -e 's/eth0/dev br0/'
-e s/inet//`
/sbin/ip addr add $addr
fi
/usr/sbin/brctl addif br0 $1
/usr/sbin/brctl stp br0 off
/sbin/ip route | grep eth0 | while read route
do
newroute=`echo $route | sed s/eth0/br0/ `
/sbin/ip route del $route
/sbin/ip route add $newroute
done
Then you can use poky startup scripts.
--
Configure bugmail: http://bugs.openembedded.net/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
More information about the Openembedded-issues
mailing list