Hello.
I'm trying to setup a bridge on Linux Devuan 5 (host os) with the goal to give the connectivity to FreeBSD 13.2,that I have virtualized with qemu-kvm-libvirt. This is the guide that I'm following :
According with the guide and with the routing table that I have on Linux :
Instead,these are the starting network interfaces on the system : (the laptop is connected to the internet via Wi-Fi)
this is how I have configured the bridge on Linux :
this is how the network interfaces are configured after having issued those commands :
this is the routing table now :
This is how I start the virtualization of FreeBSD :
These are the config files that I have modified within FreeBSD :
Below you can see the messages regarding the network configuration that are displayed when FreeBSD started booting :
Ifconfig on FreeBSD :
Routing table on FreeBSD :
what's the problem,then ? this one :
what I can ping and what not :
but it can't ping the Linux IP number
neither the gateway :
what's the problem ? I really don't understand. (I haven't installed any firewall on the system).
I'm trying to setup a bridge on Linux Devuan 5 (host os) with the goal to give the connectivity to FreeBSD 13.2,that I have virtualized with qemu-kvm-libvirt. This is the guide that I'm following :
According with the guide and with the routing table that I have on Linux :
Code:
# route
Destination Gateway Genmask Flags Metric Ref Use Iface
default modemtim 0.0.0.0 UG 0 0 0 mlan0
default modemtim 0.0.0.0 UG 600 0 0 mlan0
192.168.1.0 0.0.0.0 255.255.255.0 U 600 0 0 mlan0
modemtim 0.0.0.0 255.255.255.255 UH 0 0 0 mlan0
Instead,these are the starting network interfaces on the system : (the laptop is connected to the internet via Wi-Fi)
Code:
# ifconfig
lo: flags=73<UP,LOOPBACK,RUNNING> mtu 65536
inet 127.0.0.1 netmask 255.0.0.0
inet6 ::1 prefixlen 128 scopeid 0x10<host>
loop txqueuelen 1000 (Local Loopback)
RX packets 25 bytes 3472 (3.3 KiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 25 bytes 3472 (3.3 KiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
mlan0: flags=-28605<UP,BROADCAST,RUNNING,MULTICAST,DYNAMIC> mtu 1500
inet 192.168.1.6 netmask 255.255.255.0 broadcast 192.168.1.255
ether 60:21:c0:e9:44:63 txqueuelen 1000 (Ethernet)
RX packets 131 bytes 16495 (16.1 KiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 106 bytes 16066 (15.6 KiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
this is how I have configured the bridge on Linux :
Code:
# ip tuntap add tap0 mode tap
# brctl addbr br0
# ip link set dev br0 up
# ip addr add 192.168.1.0/24 dev br0
# iptables -t nat -A POSTROUTING -o mlan0 -j MASQUERADE
# echo 1 > /proc/sys/net/ipv4/ip_forward
# brctl addif br0 tap0
this is how the network interfaces are configured after having issued those commands :
Code:
# ifconfig
br0: flags=4099<UP,BROADCAST,MULTICAST> mtu 1500
inet 192.168.1.0 netmask 255.255.255.0 broadcast 0.0.0.0
inet6 fe80::c8a6:4bff:fe41:fb04 prefixlen 64 scopeid 0x20<link>
ether ba:7a:f2:83:cd:be txqueuelen 1000 (Ethernet)
RX packets 0 bytes 0 (0.0 B)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 37 bytes 6215 (6.0 KiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
lo: flags=73<UP,LOOPBACK,RUNNING> mtu 65536
inet 127.0.0.1 netmask 255.0.0.0
inet6 ::1 prefixlen 128 scopeid 0x10<host>
loop txqueuelen 1000 (Local Loopback)
RX packets 26 bytes 3603 (3.5 KiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 26 bytes 3603 (3.5 KiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
mlan0: flags=-28605<UP,BROADCAST,RUNNING,MULTICAST,DYNAMIC> mtu 1500
inet 192.168.1.7 netmask 255.255.255.0 broadcast 192.168.1.255
inet6 fe80::32c4:8b0e:6ceb:c104 prefixlen 64 scopeid 0x20<link>
ether 60:21:c0:e9:44:63 txqueuelen 1000 (Ethernet)
RX packets 1009 bytes 83261 (81.3 KiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 375 bytes 48458 (47.3 KiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
tap0: flags=-28669<UP,BROADCAST,MULTICAST,DYNAMIC> mtu 1500
ether ba:7a:f2:83:cd:be txqueuelen 1000 (Ethernet)
RX packets 0 bytes 0 (0.0 B)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 0 bytes 0 (0.0 B)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
this is the routing table now :
Code:
# route
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
default modemtim 0.0.0.0 UG 0 0 0 mlan0
default modemtim 0.0.0.0 UG 600 0 0 mlan0
192.168.1.0 0.0.0.0 255.255.255.0 U 600 0 0 mlan0
modemtim 0.0.0.0 255.255.255.255 UH 0 0 0 mlan0
This is how I start the virtualization of FreeBSD :
Code:
UEFICODE1=/usr/share/AAVMF/AAVMF32_CODE.fd
UEFIVARS2=/usr/share/AAVMF/AAVMF32_VARS.fd
DISK=/Dati/img/FreeBSD-13.2-RELEASE-arm-armv7-GENERICSD.img
qemu-system-arm -enable-kvm -serial stdio -m 1024 -M virt -cpu cortex-a15 \
-drive if=pflash,format=raw,unit=0,file=$UEFICODE1 \
-drive if=pflash,format=raw,unit=1,file=$UEFIVARS2 \
-drive file=$DISK,media=disk,format=raw \
-net nic,model=virtio,macaddr=52:54:00:12:34:55 -net tap,ifname=tap0 \
-device virtio-gpu-pci \
-usb -device nec-usb-xhci -device usb-kbd -device usb-mouse \
-device vmware-svga,id=video0,vgamem_mb=16
These are the config files that I have modified within FreeBSD :
Code:
/etc/rc.conf :
ifconfig_vtnet0="inet 192.168.1.2/24"
defaultrouter="192.168.1.1"
/boot/loader.conf
if_tap_load="YES"
if_bridge_load="YES"
bridgestp_load="YES"
/etc/sysctl.conf
net.link.tap.up_on_open=1
net.inet.ip.forwarding=1
net.inet.ip.random_id=1
/etc/resolv.conf
search homenet.telecomitalia.it
nameserver 192.168.1.1
nameserver 8.8.8.8
Below you can see the messages regarding the network configuration that are displayed when FreeBSD started booting :
Code:
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:55
inet 192.168.1.2 netmask 0xffffff00 broadcast 192.168.1.255
media: Ethernet autoselect (10Gbase-T <full-duplex>)
status: active
nd6 options=29<PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL>
Starting devd.
eval: cannot open /dev/ttyv0: No such file or directory
eval: cannot open /dev/ttyv0: No such file or directory
Configuring vt: keymapeval: cannot open /dev/ttyv0: No such file or directory
.
Starting ums0 moused.
eval: cannot open /dev/ttyv*: No such file or directory
add host 127.0.0.1: gateway lo0 fib 0: route already in table
add net default: gateway 192.168.1.1
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
Starting local_unbound.
Waiting for nameserver to start... good
Ifconfig on FreeBSD :
Code:
# 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:55
inet 192.168.1.2 netmask 0xffffff00 broadcast 192.168.1.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>
Routing table on FreeBSD :
Code:
# netstat -rn
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.2 link#1 UHS lo0
Internet6:
Destination Gateway Flags Netif Expire
::/96 ::1 URS lo0
::1 link#2 UHS lo0
::ffff:0.0.0.0/96 ::1 URS lo0
fe80::/10 ::1 URS lo0
fe80::%lo0/64 link#2 U lo0
fe80::1%lo0 link#2 UHS lo0
ff02::/16 ::1 URS lo0
what's the problem,then ? this one :
Code:
# ping google.com
ping: Unknown host
what I can ping and what not :
Code:
# ping 192.168.1.2
PING 192.168.1.2 (192.168.1.2): 56 data bytes
64 bytes from 192.168.1.2: icmp_seq=0 ttl=64 time=0.189 ms
64 bytes from 192.168.1.2: icmp_seq=1 ttl=64 time=0.132 ms
but it can't ping the Linux IP number
Code:
# ping 192.168.1.6
PING 192.168.1.6 (192.168.1.6): 56 data bytes
ping: sendto: Host is down
ping: sendto: Host is down
ping: sendto: Host is down
neither the gateway :
Code:
# 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
what's the problem ? I really don't understand. (I haven't installed any firewall on the system).