LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Virtualization and Cloud
User Name
Password
Linux - Virtualization and Cloud This forum is for the discussion of all topics relating to Linux Virtualization and Linux Cloud platforms. Xen, KVM, OpenVZ, VirtualBox, VMware, Linux-VServer and all other Linux Virtualization platforms are welcome. OpenStack, CloudStack, ownCloud, Cloud Foundry, Eucalyptus, Nimbus, OpenNebula and all other Linux Cloud platforms are welcome. Note that questions relating solely to non-Linux OS's should be asked in the General forum.

Notices


Reply
  Search this Thread
Old 05-17-2017, 07:45 AM   #1
czezz
Member
 
Registered: Nov 2004
Distribution: Slackware/Solaris
Posts: 924

Rep: Reputation: 43
QEMU bridging interface


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.

Last edited by czezz; 05-17-2017 at 10:23 AM.
 
Old 05-17-2017, 01:23 PM   #2
jefro
Moderator
 
Registered: Mar 2008
Posts: 21,978

Rep: Reputation: 3624Reputation: 3624Reputation: 3624Reputation: 3624Reputation: 3624Reputation: 3624Reputation: 3624Reputation: 3624Reputation: 3624Reputation: 3624Reputation: 3624
Hello. I might as well start off with a dumb question. Why don't you just run qemu on host?

Not sure I've ever read that you could double bridge like that. Not sure what would happen. As you can see you have some connection or seemingly some connection.

I might try it once with nat on both client and sub-client.

However since it does partly work, I'd imagine some problem with ping or subnet or port permissions maybe.
 
Old 05-18-2017, 02:56 AM   #3
czezz
Member
 
Registered: Nov 2004
Distribution: Slackware/Solaris
Posts: 924

Original Poster
Rep: Reputation: 43
Hello,
that question is little bit off topic but the answer is I have no permission to install anything on HOST (obviously that would be the right way ).

There are no firewalls at any step (up to router's WAN interface) and also from Ubuntu guest OS (like i have written before) I can reach both sites: router and qemu guest os.
Also please note: qemu guest os receives DHCP address from ROUTER.

The reason why I am posting this here is bridging procedure. Can anyone please have a look at it and say is it a right way to bridge interface (for guest OS) ?

Last edited by czezz; 05-18-2017 at 03:08 AM.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Bridging tap interface with ethernet interface rjm1 Linux - Networking 9 09-13-2013 09:29 AM
Bridging eth0 in KVM/qemu RHAPOLLO Linux - Virtualization and Cloud 2 05-01-2010 05:06 PM
Problem Bridging Wired Interface to Wireless Interface. JivanAmara Linux - Networking 0 08-17-2009 01:25 AM
QEMU Linux... Bridging.. And P2P lucky_dev36 General 0 03-31-2007 11:42 PM
bridging, tun/tap, qemu issues kc8tbe Linux - Networking 10 03-19-2007 01:47 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Virtualization and Cloud

All times are GMT -5. The time now is 11:35 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration