:: Re: [DNG] Which qemu version is shi…
Startseite
Nachricht löschen
Nachricht beantworten
Autor: Ralph Ronnquist
Datum:  
To: dng
Betreff: Re: [DNG] Which qemu version is shipped by default with devuan 3 ?
a) set up a tap on the host:
# ip tuntap add tap0 mode tap
# ip address add 10.0.2.1/24 dev tap0

b) setting up forwarding and NAT (over eth0):
# sysctl net.ipv4.ip_forward=1
# iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE

c) parameter for declaring tap for qemu
-netdev tap,ifname=tap0,script=no,id=net0

the parameter is used instead of "-netdev type=user..."

d) you also need to bring up the client fxp0 statically (with e.g.
10.0.2.2/24) instead of using dhcp. I'm not totally sure how that's
done in freebsd.

Ralph.

On Tue, Aug 15, 2023 at 12:43:55PM +0200, Mario Marietto wrote:
> I get this error and as you can see,the problem is that it is disabled on
> the kernel :
>
> https://stackoverflow.com/questions/8080226/bridge-utils-add-bridge-failed-package-not-installed
>
> My goal is to configure qemu for accepting a bridge connection.
>
> The instructions you provided about how to configure the network are
> unclear to me. Can you write the commands that I should issue one by one ?
> I will try.
>
> On Tue, Aug 15, 2023 at 12:10 PM Ralph Ronnquist <rrq@???> wrote:
>
> > Interesting.. I don't know anything about what's possible on
> > Chromebook. I think it's slightly odd that bridge is disabled, but
> > perhaps you could use plain forwarding and NAT instead, with iptables,
> > rather than rebuilding the kernel?
> >
> > If qemu uses a tap, say tap0, then you simply enable forwarding in the
> > kernel (sysctl net.ipv4.ip_forward=1), and add an iptables nat rule
> > (iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE) .. that rule
> > assumes your outbound interface is eth0; replace that as applicable.
> >
> > With a qemu tap you can't use dhcp in the client but will need to set
> > address statically. You also need to assigne an IP address at the host
> > end for the tap, which the client should nominate as gateway. E.g. you
> > could use 10.0.2.1/24 for the tap on the host, and 10.0.2.2/24 for the
> > client.
> >
> > Ralph.
> >
> > On Tue, Aug 15, 2023 at 11:43:17AM +0200, Mario Marietto wrote:
> > > Not for me. This parameter :
> > >
> > > -device i82559b,netdev=net0,mac="52:54:00:12:34:55"
> > >
> > > give to me a lot of problems :
> > >
> > > 1) forces me to enter the UEFI menu and to choose manually the disk that
> > > should boot
> > > 2) I can reach the login prompt of FreeBSD,but this network configuration
> > > does not work :
> > >
> > > /etc/rc.conf
> > >
> > > hostname="marietto"
> > > ifconfig_fxp0="DHCP"
> > > local_unbound_enable="YES"
> > > gateway_enable="YES"
> > >
> > > /etc/resolv.conf
> > >
> > > nameserver 127.0.0.53
> > > options edns0 trust-ad
> > > search homenet.telecomitalia.it
> > > nameserver 8.8.8.8
> > >
> > > root@mario:~ # ifconfig
> > >
> > > lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> metric 0 mtu 16384
> > >         options=680003<RXCSUM,TXCSUM,LINKSTATE,RXCSUM_IPV6,TXCSUM_IPV6>
> > >         inet6 ::1 prefixlen 128
> > >         inet6 fe80::1%lo0 prefixlen 64 scopeid 0x1
> > >         inet 127.0.0.1 netmask 0xff000000
> > >         groups: lo
> > >         nd6 options=21<PERFORMNUD,AUTO_LINKLOCAL>
> > > fxp0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu
> > 1500
> > >         options=8<VLAN_MTU>
> > >         ether 52:54:00:12:34:55
> > >         inet 10.0.2.15 netmask 0xffffff00 broadcast 10.0.2.255
> > >         media: Ethernet autoselect (10baseT/UTP <half-duplex>)
> > >         status: active
> > >         nd6 options=29<PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL>

> > >
> > > I can ping 10.0.2.15,but not google.com ;
> > >
> > > root@mario:~ # ping google.com
> > >
> > > PING google.com (142.250.180.142): 56 data bytes
> > > frozen.
> > >
> > > Now,on the FreeBSD forum,the user "covacat" suggested me to : "create
> > > a tap device on the linux side and bridge it with your ethernet
> > > iface"
> > >
> > > I tried,but now arises another problem : the kernel that I'm using on
> > > the chromebook has the option bridge disabled in the kernel,so
> > >
> > > I have recompiled the kernel to enable it. Here comes another problem
> > > : The new kernel worked,my Chromebook reached the desktop environment
> > >
> > > access login,but mouse,keyboard and trackpad don't work. I think that
> > > when I have recompiled the kernel I haven't produced the new kernel
> > >
> > > modules. Do you know what's the proper command to do this ? If I
> > > remember well,should it be "make modules" ?
> > >
> > >
> > >
> > > On Tue, Aug 15, 2023 at 2:34 AM Ralph Ronnquist <rrq@???> wrote:
> > >
> > > > The card "i82559b" worked for me.
> > > >
> > > > It boots without entering UEFI shell first. And it has update my local
> > > > AAVMF32_VARS.fd to continue doing so.
> > > >
> > > > Perhaps if copy the system AAVMF32_VARS.fd once again, to refresh
> > > > locally, with a working boot then your will "learn" too?
> > > >
> > > > regards,
> > > >
> > > > Ralph.
> > > >
> > > > On Mon, Aug 14, 2023 at 07:55:36PM +0200, Mario Marietto wrote:
> > > > > Do you need to go inside the UEFI menu to boot FreeBSD or in your
> > case it
> > > > > is detected at first shot ? because I haven't fixed the probem yet.
> > > > > ...
> > > > > --
> > > > > Mario.
> > > > _______________________________________________
> > > > Dng mailing list
> > > > Dng@???
> > > > https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng
> > > >
> > >
> > >
> > > --
> > > Mario.
> >
>
>
> --
> Mario.