Re: Passing multiple ethernet adapters to QEMU guest
On Thu, May 14, 2020 at 09:03:50PM +0100, Andrew Wood wrote:
> On 14/05/2020 15:50, Reco wrote:
> >
> > Qemu uses /etc/qemu-ifup by default which deliberately puts tap
> > interface to the bridge which corresponds to the default route.
> >
> Im sorry I dont understand where the default route comes into it as
> none of the interfaces, virtual, bridge or the corresponding real
> hardware interface have any layer 3 addressing assigned, they are
> purely working at L2.
Quoting /etc/qemu-ifup,
# only add the interface to default-route bridge if we
# have such interface (with default route) and if that
# interface is actually a bridge.
# It is possible to have several default routes too
for br in $switch; do
if [ -d /sys/class/net/$br/bridge/. ]; then
if [ -n "$ip" ]; then
ip link set "$1" master "$br"
else
brctl addif $br "$1"
fi
exit # exit with status of the previous command
fi
done
Where $ip is defined as "$(which ip)", and $switch correspond to the
interface with the default route set.
Reco
Reply to: