qemu I'm not able to configure correctly the network interface of qemu when I try to emulate freebsd for arm64 on my jetson nano.

Hello.

it's again me :) I would like to configure correctly the network interface of qemu because I want to grab the connection to internet while I'm installing freebsd 13 for arm64 on my jetson nano. I tried using several methods,but none worked,so I don't know what could be the problem and Im here to ask some help again.

I tried to configure the network interface in this way :

Code:
tunctl -t tap0
ifconfig tap0 up
brctl addif virbr0 tap0



-device virtio-net-device,netdev=mynet \
-netdev tap,id=mynet,ifname=tap0,script=no,downscript=no,vhost=on \

and

Code:
-device e1000,netdev=mynet,mac=00:1d:92:ab:3f:78 \
-netdev tap,id=mynet,ifname=tap0,script=no,downscript=no,vhost=on \

and then,when I reached the freebsd console,I have issued these commands :


Code:
root@:~ # ifconfig vtnet0 down
root@:~ # ifconfig vtnet0 192.168.1.7/24
root@:~ # ifconfig vtnet0 up


root@:~ # route add default 192.168.1.1


add net default: gateway 192.168.1.1



root@:~ # ifconfig vtnet0


vtnet0: flags=8863<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
        options=4c07bb<RXCSUM,TXCSUM,VLAN_MTU,VLAN_HWTAGGING,JUMBO_MTU,VLAN_HWCSUM,TSO4,TSO6,LRO,VLAN_HWTSO,LINKSTATE,TXCSUM_IPV6>
        ether 52:54:00:12:34:56
        inet 192.168.1.7 netmask 0xffffff00 broadcast 192.168.1.255
        media: Ethernet autoselect (10Gbase-T <full-duplex>)
        status: active
        nd6 options=29<PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL>


root@:~ # netstat -rn4



Routing tables

Internet:
Destination        Gateway            Flags     Netif Expire
default            192.168.1.1        UGS      vtnet0
127.0.0.1          link#2             UH          lo0
192.168.1.0/24     link#1             U        vtnet0
192.168.1.7        link#1             UHS         lo0



root@:~ # ping 192.168.1.1


PING 192.168.1.1 (192.168.1.1): 56 data bytes
ping: sendto: Host is down
ping: sendto: Host is down
ping: sendto: Host is down
ping: sendto: Host is down



root@:~ # ping 8.8.8.8



PING 8.8.8.8 (8.8.8.8): 56 data bytes
ping: sendto: Host is down
ping: sendto: Host is down

as u can see something is wrong. I have also tried the automatic detection of the IP address with DHCP,adding these values (I found them on /etc/resolv.conf of my jetson nano,where the connection works) :

Code:
nameserver 127.0.0.53
search homenet.telecomitalia.it

and also :

Code:
nameserver 8.8.8.8
search homenet.telecomitalia.it

but none of these tries work.

UPDATE : I've used the network parameters used in this site : https://wiki.freebsd.org/arm64/QEMU but that I don't like because the vm is not reachable from outside :

Code:
-device virtio-net-device,netdev=net0 \
-netdev user,id=net0

but they worked partially. During the installation they worked,I've been able to install freebsd using the DHCP,but then,when Freebsd has been installed and loaded,they stopped working :
do u want to give a look at the log below ?

Code:
Mounting local filesystems:.
ELF ldconfig path: /lib /usr/lib /usr/lib/compat
Building /boot/kernel/linker.hints
Setting hostname: lozio.
Setting up harvesting: [UMA],[FS_ATIME],SWI,INTERRUPT,NET_NG,[NET_ETHER],NET_TUN,MOUSE,KEYBOARD,ATTACH,CACHED
Feeding entropy: .
lo0: link state changed to UP
vtnet0: link state changed to UP
Starting Network: lo0 vtnet0.
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 0x2
        inet 127.0.0.1 netmask 0xff000000
        groups: lo
        nd6 options=21<PERFORMNUD,AUTO_LINKLOCAL>
vtnet0: flags=8863<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
        options=80028<VLAN_MTU,JUMBO_MTU,LINKSTATE>
        ether 52:54:00:12:34:56
        media: Ethernet autoselect (10Gbase-T <full-duplex>)
        status: active
        nd6 options=29<PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL>
Starting devd.
Starting dhclient.
DHCPDISCOVER on vtnet0 to 255.255.255.255 port 67 interval 4
DHCPOFFER from 10.0.2.2
DHCPREQUEST on vtnet0 to 255.255.255.255 port 67
DHCPACK from 10.0.2.2
bound to 10.0.2.15 -- renewal in 43200 seconds.
add host 127.0.0.1: gateway lo0 fib 0: route already in table
add host ::1: gateway lo0 fib 0: route already in table
add net fe80::: gateway ::1
add net ff02::: gateway ::1
add net ::ffff:0.0.0.0: gateway ::1
add net ::0.0.0.0: gateway ::1
Performing initial setup.
destination:
Extracting forwarders from /etc/resolv.conf.
/var/unbound/forward.conf created
/var/unbound/lan-zones.conf created
/var/unbound/control.conf created
/var/unbound/unbound.conf created
/etc/resolvconf.conf created
Original /etc/resolv.conf saved as /var/backups/resolv.conf.20210714.123557
[1626258958] libunbound[683:0] error: udp connect failed: No route to host for 2001:dc3::35 port 53
[1626258958] libunbound[683:0] error: udp connect failed: No route to host for 2001:500:1::53 port 53
[1626258958] libunbound[683:0] error: udp connect failed: No route to host for 2001:500:a8::e port 53
Starting local_unbound.
Clearing /tmp (X related).
Creating and/or trimming log files.
Updating motd:.
Updating /var/run/os-release done.
Starting syslogd.
Setting date via ntp.
Error resolving 0.freebsd.pool.ntp.org: Name does not resolve (8)
14 Jul 12:35:59 ntpdate[830]: Can't find host 0.freebsd.pool.ntp.org: Name does not resolve (8)
14 Jul 12:35:59 ntpdate[830]: no servers can be used, exiting
No core dumps found.
Mounting late filesystems:.
Security policy loaded: MAC/ntpd (mac_ntpd)
Starting ntpd.
Jul 14 12:35:59 lozio ntpd[893]: leapsecond file ('/var/db/ntpd.leap-seconds.list'): expired 17 days ago
Starting powerd.
powerd: no cpufreq(4) support -- aborting: No such file or directory
/etc/rc: WARNING: failed to start powerd
Generating RSA host key.
Jul 14 12:36:00 lozio ntpd[893]: error resolving pool 0.freebsd.pool.ntp.org: Name does not resolve (8)
2048 SHA256:R1hSN4kU7Uu32NISiHPt49/ybub7Ean1xvcxIdVtXWU root@lozio (RSA)
Generating ECDSA host key.
256 SHA256:kIVP3U+gi4LTCfYOnqMA5n6BjWuzinCCSU3BaHC1GRs root@lozio (ECDSA)
Generating ED25519 host key.
256 SHA256:4nZCeygBPwIF/Jl0lpOc1cSOd7dLK38iQpj1PpbpqQA root@lozio (ED25519)
Performing sanity check on sshd configuration.
Starting sshd.
Starting cron.
Starting background file system checks in 60 seconds.

Wed Jul 14 12:36:01 CEST 2021

FreeBSD/arm64 (lozio) (ttyu0)

login: root
Password:
Jul 14 12:36:07 lozio login[962]: ROOT LOGIN (root) ON ttyu0
FreeBSD 13.0-RELEASE (GENERIC) #0 releng/13.0-n244733-ea31abc261f: Fri Apr  9 03:54:53 UTC 2021

Welcome to FreeBSD!

Release Notes, Errata: https://www.FreeBSD.org/releases/
Security Advisories:   https://www.FreeBSD.org/security/
FreeBSD Handbook:      https://www.FreeBSD.org/handbook/
FreeBSD FAQ:           https://www.FreeBSD.org/faq/
Questions List: https://lists.FreeBSD.org/mailman/listinfo/freebsd-questions/
FreeBSD Forums:        https://forums.FreeBSD.org/

Documents installed with the system are in the /usr/local/share/doc/freebsd/
directory, or can be installed later with:  pkg install en-freebsd-doc
For other languages, replace "en" with a language code like de or fr.

Show the version of FreeBSD installed:  freebsd-version ; uname -a
Please include that output and any error messages when posting questions.
Introduction to manual pages:  man man
FreeBSD directory layout:      man hier

To change this login announcement, see motd(5).
root@lozio:~ # Jul 14 12:37:06 lozio ntpd[893]: error resolving pool 0.freebsd.pool.ntp.org: Name does not resolve (8)
Jul 14 12:38:12 lozio syslogd: last message repeated 1 times
Jul 14 12:40:24 lozio syslogd: last message repeated 2 times

root@lozio:~ # ping www.google.it

ping: Unknown host

root@lozio:~ # ifconfig

vtnet0: flags=8863<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
        options=80028<VLAN_MTU,JUMBO_MTU,LINKSTATE>
        ether 52:54:00:12:34:56
        inet 10.0.2.15 netmask 0xffffff00 broadcast 10.0.2.255
        media: Ethernet autoselect (10Gbase-T <full-duplex>)
        status: active
        nd6 options=29<PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL>
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 0x2
        inet 127.0.0.1 netmask 0xff000000
        groups: lo
        nd6 options=21<PERFORMNUD,AUTO_LINKLOCAL>

root@lozio:~ # dhclient vtnet0

dhclient already running, pid: 581.
Jul 14 12:46:54 lozio syslogd: last message
 

Attachments

  • Screenshot_2021-07-13_23-08-29.png
    Screenshot_2021-07-13_23-08-29.png
    94.3 KB · Views: 164
Back
Top