qemu-discuss
[Top][All Lists]
Advanced

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

Re: Connection of a qemu guest to the 'net.


From: peter
Subject: Re: Connection of a qemu guest to the 'net.
Date: Thu, 18 Mar 2021 08:49:55 -0700

From:   "Berto Furth" <bertofurth@sent.com>
Date:   Thu, 18 Mar 2021 21:53:08 +1100
> If one of the more experienced people who lurk on these forums could 
> comment on it just in case it's pure rubbish I'd be more comfortable 
> making an attempt at putting it somewhere permanent.

Organizing into sections with headings will help.  Almost any addition 
to https://en.wikibooks.org/wiki/QEMU/Devices/Network will be 
improvement.  Content with an error or two is better than no content. (!) 
In a wiki, errors can be corrected.  =8~)

> My view is that Interfaces are at the Data Link and optionally at the 
> Network Layer as well. For example an eth0 interface has an Ethernet 
> MAC address (Data Link Layer) but if you want you can also give it an 
> IP and IPv6 address (Network Layer). 

OK.  Acknowledged.

> You have to create the bridge before you connect the interface to it 
> in the same way that you have to put your network switch on the desk 
> before you can plug your Ethernet cables into it!!

Interesting analogy.  Seems strictly correct although a reader might 
misinterpret. The switch and cables are both at the physical layer 
whereas you refer to them as analogues rather than OSI components.

> Can you clarify that? Do you mean you have no bridge on the Shorewall? 
> Does it have a switch in it? A "switch" and a "bridge" are 
> functionally equivalent. 

This is my understanding.  Shorewall is not a daemon. It sets up 
routing by iptables.  

Any command such as "ip link show" never reported a bridge until br0 
was created for qemu.  To my understanding, Shorewall does not require 
a  bridge or switch but either can be present with Shorewall.  Several 
documents are available.  One here.

https://shorewall.org/SimpleBridge.html

> >     inet6 fe80::6c05:fdff:fedf:e2eb/64 scope link
> >        valid_lft forever preferred_lft forever

> This is the IPv6 Link Local address. Every interface with IPv6 
> enabled will automagically assign itself an IPv6 address based on it's 
> eMAC address.

Thanks.  I'm learning about IPv6 along with qemu.

This is my current qemu command.

sudo qemu-system-i386 \
 -drive file=/dev/KingstonCF,media=disk,format=raw \
 -vga std \
 -boot order=c \
 -nic tap,model=ne2k_pci,br=br0

As described previously, br0 is created here when the qemu host boots. 
br0 continues to exist when qemu is executed.

With the /etc/qemu-ifup provided by Berto, no guest system appears 
and this is reported to the terminal. 

qemu-system-i386: network script /etc/qemu-ifup failed with status 256

With the /etc/qemu-ifup provided by qemu in Debian 10, a guest system 
appears and this is reported to the terminal. 

W: /etc/qemu-ifup: no bridge for guest interface found

Conclusion
br0 is present but qemu fails to recognize it.  The /etc/qemu-ifup in 
Debian avoids catastrophic failure.  

Why does qemu fail to recognize br0?  My best guess is that an error 
is present in my qemu command above.  

Ideas?

Thx,                         ... P.

-- 
cell: +1 236 464 1479            Bcc: peter at easthope. ca
VoIP: +1 604 670 0140




reply via email to

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