Hi,
Code:
[Internet] - [ROUTER] - [physical host]
|___[Virtualbox guest OS: Ubuntu]
|___[QEMU guest OS: Raspbian]
Picture/topology:
https://www.dropbox.com/s/ow13aeaawc...gram1.png?dl=0
In my LAN there is PC with VirtualBox. GuestOS: Ubuntu and with NIC setup as: bridged adapter.
That makes Ubuntu to be like an another physical host in the LAN.
Then, inside of Ubuntu, I am running QEMU with guest OS: Raspbian.
On Ubuntu I have bridged eth0 so QEMU's guest OS is also like an another host in the LAN.
Bridging Ubuntu's eth0 for qemu's guest os:
Code:
# ip link add br0 type bridge
# ip addr flush dev eth0
# link set eth0 master br0
# /usr/sbin/tunctl -u $(whoami)
# /usr/sbin/tunctl -t tap0
# ip link set dev br0 up
# ip link set dev tap0 up
# dhclient br0 (or assign it manually)
And this is how I start QEMU guest OS:
Code:
qemu-system-arm -kernel kernel-qemu-4.4.34-jessie -cpu arm1176 -m 256 -M versatilepb -no-reboot -serial stdio -append "root=/dev/sda2 panic=1" -hda ~/qemu_vms/2017-04-10-raspbian-jessie-lite.img -net nic,macaddr=00:16:3e:00:00:01 -net tap,ifname=tap0,script=no,downscript=no
Raspbian receives IP address from Router/DHCP server. I can see that in Router's dhcp.leases AND on Raspbian - it has IP assigned.
Problem:
Raspbian reaches Ubuntu (eg. ping or SSH) and reverse Ubuntu reaches Raspbian.
Raspbian does not reach neither router/gateway(192.168.1.1) nor any physical hosts of the LAN.
Question:
Can anyone please have look on the way I prepare bridge on Ubuntu for qemu? Maybe I have missed something?
I was also wondering that bridging already bridged interface might be a problem BUT eventually Raspbian receives IP address from DHCP server / router.