Bridge0 network interface disappeared but its parameters are correctly configured.

ziomario

Aspiring Daemon

Reaction score: 45
Messages: 616

Hello.

For sure I made some mistake somewhere,because my bridge0 interface disappeared :

Code:
@marietto:# ifconfig

em0: flags=8863<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
    options=481049b<RXCSUM,TXCSUM,VLAN_MTU,VLAN_HWTAGGING,VLAN_HWCSUM,LRO,VLAN_HWFILTER,NOMAP>
    ether e0:d5:5e:e2:1f:22
    inet 192.168.1.6 netmask 0xffffff00 broadcast 192.168.1.255
    media: Ethernet autoselect (1000baseT <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>
tap0: flags=8802<BROADCAST,SIMPLEX,MULTICAST> metric 0 mtu 1500
    options=80000<LINKSTATE>
    ether 58:9c:fc:10:ff:8e
    groups: tap
    media: Ethernet autoselect
    status: no carrier
    nd6 options=29<PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL>
virbr0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
    ether 52:54:00:59:c8:7e
    inet 192.168.122.1 netmask 0xffffff00 broadcast 192.168.122.255
    id 00:00:00:00:00:00 priority 32768 hellotime 2 fwddelay 4
    maxage 20 holdcnt 6 proto rstp maxaddr 2000 timeout 1200
    root id 00:00:00:00:00:00 priority 32768 ifcost 0 port 0
    groups: bridge
    nd6 options=9<PERFORMNUD,IFDISABLED>


I'm not able to figure out why,since inside the rc.conf and loader.conf all the parameters needed are correctly configured :


Code:
on /etc/rc.conf

cloned_interfaces="bridge0 tap0"
ifconfig_bridge0="addm em0 addm tap0"


on /boot/loader.conf

if_bridge_load="YES"
bridgestp_load="YES"

shouldn't it be recreated every time the system restarts ? I've created a new bridge with the command :

Code:
ifconfig bridge create

and it creates the bridge1 :

Code:
bridge1: flags=8802<BROADCAST,SIMPLEX,MULTICAST> metric 0 mtu 1500
    ether 58:9c:fc:10:65:6c
    id 00:00:00:00:00:00 priority 32768 hellotime 2 fwddelay 15
    maxage 20 holdcnt 6 proto rstp maxaddr 2000 timeout 1200
    root id 00:00:00:00:00:00 priority 0 ifcost 0 port 0
    groups: bridge
    nd6 options=9<PERFORMNUD,IFDISABLED>

so. what's happening ? the bridge0 has been hidden by something ? what's happening ?

Code:
@marietto:# ifconfig bridge0 create
ifconfig: interface bridge0 already exists
 
OP
ziomario

ziomario

Aspiring Daemon

Reaction score: 45
Messages: 616

I'm not sure that this is the problem,for two main reasons :

1) it seems that the bridge0 already exists,but I can't see it :

Code:
@marietto:# ifconfig bridge0 create
ifconfig: interface bridge0 already exists

2) I never touched these parameters inside /etc/rc.conf ; they always worked great !

Code:
on /etc/rc.conf

cloned_interfaces="bridge0 tap0"
ifconfig_bridge0="addm em0 addm tap0"

check at this :

Code:
# ifconfig bridge0 addm em0 addm tap0

ifconfig: interface bridge0 does not exist

I see contraddictory messages : above it tells that bridge0 already exists ; below that it doesn't exists :(
 

roccobaroccoSC

Aspiring Daemon

Reaction score: 226
Messages: 750

What does ifconfig bridge0 say?

Edit: I replicated your configuration and in my environment bridge0 and tap0 showed up. bridge0 was up, but tap0 was not up. Both were shown in ifconfig. It's a virtual machine with FreeBSD 12.2-RELEASE-p10.
What release are you using? Maybe post the full contents of your /boot/loader.conf, /etc/rc.conf and /etc/sysctl.conf to see what's different.
 
OP
ziomario

ziomario

Aspiring Daemon

Reaction score: 45
Messages: 616

Code:
# ifconfig bridge0 destroy

ifconfig: interface bridge0 does not exist

# ifconfig bridge0 create

ifconfig: interface bridge0 already exists

# ifconfig bridge0

ifconfig: interface bridge0 does not exist
 

roccobaroccoSC

Aspiring Daemon

Reaction score: 226
Messages: 750

This does not make sense to me. It looks like a bug and it behaves differently on my system. Please provide more info about the system you are using, as requested above.
 
OP
ziomario

ziomario

Aspiring Daemon

Reaction score: 45
Messages: 616

/etc/rc.conf

Code:
hostname="marietto"
#dnsmasq_enable="YES"
keymap="it.kbd"
ifconfig_em0="DHCP"
local_unbound_enable="YES"
sshd_enable="YES"
powerd_enable="YES"
#powerd_flags="-a hiadaptive -b adaptive"
ntpdate_enable="YES"
ntpd_enable="YES"
ntpd_sync_on_start="YES"
# Set dumpdev to "AUTO" to enable crash dumps, "NO" to disable
dumpdev="NO"
dbus_enable="YES"
#hald_enable="YES"
slim_enable="NO"
#sound_load="YES"
#snd_hda_load="YES"
#snddetect_enable="YES"
#kld_list="i915kms"
#moused_enable="YES"
libvirtd_enable="YES"
linux_enable="YES"
#zfs_enable="YES"
linux_mounts_enable="YES"
gateway_enable="YES"
kld_list="fusefs"
#kld_list="fusefs nvidia"
#kld_list="fusefs nvidia-modeset"
lightdm_enable="NO"
sendmail_enable="NO"
#syslogd_flags="-c -ss"
microcode_update_enable="YES"
#avahi_daemon_enable="YES"
fsck_y_enable="YES"
#swapexd_enable="YES"
#clean_tmp_X="YES"
#clear_tmp_enable="YES"
#devd_enable="YES"
#devfs_system_ruleset="devfsrules_common"
tcp_drop_synfin="NO"
telnet_enable="NO"
cupsd_enable="NO"
portmap_enable="NO"
rlogin_enable="NO"
inetd_enable="NO"
webcamd_enable="NO"
samba_enable="NO"
lpd_enable="NO"
winbindd_enable="NO"
nfs_server_enable="NO"
nfs_client_enable="NO"
vm_enable="YES"
#vm_dir="/vms/os/linux"
#vm_dir="/mnt/da1p1/vms/os/"
#vm_list="ubuntu-budgie-gpu"
#vm_delay="5"
#bastille_enable="YES"
#cloned_interfaces="lo1"
#ifconfig_lo1_name="bastille0"
#vboxnet_enable="YES"
#devfs_system_ruleset="system"
cloned_interfaces="bridge0 tap0"
ifconfig_bridge0="addm em0 addm tap0"
#cbsd_workdir="/mnt/da1p1/bhyve"
#cbsdrsyncd_enable="YES"
#cbsdrsyncd_flags="--config=/mnt/da1p1/bhyve/etc/rsyncd.conf"
#cbsdd_enable="YES"
#rcshutdown_timeout="900"
kdm5_enable="YES"
sddm_enable="YES"
#tor_enable="YES"
#polipo_enable="YES"
#vnc_server_enable="YES"
#vnc_server_flags="-geometry 1920x1080"
#vnc_server_flags="-xkb -forever -display :0 -rfbauth /home/marietto/.vnc/passwd -ncache 10"

/boot/loader.conf

Code:
vmm_load="YES"
nmdm_load="YES"
if_tap_load="YES"
if_bridge_load="YES"
bridgestp_load="YES"
fusefs_load="YES"
linprocfs_load="YES"
linsysfs_load="YES"
tmpfs_load="YES"
verbose_loading="YES"
hw.vmm.topology.cores_per_package=8
pptdevs="1/0/0 1/0/1 1/0/2 1/0/3"
kern.racct.enable=1
#vboxdrv_load="YES"
#xen_kernel="/boot/xen"
#xen_cmdline="dom0_mem=8192M dom0_max_vcpus=8 dom0=pvh com1=115200,8n1 guest_loglvl=all loglvl=all"
#boot_multicons="YES"
#boot_serial="YES"
pf_load="YES"

/etc/sysctl.conf

Code:
net.link.tap.up_on_open=1
net.inet.ip.forwarding=1
kern.init_shutdown_timeout="900"
#net.inet.ip.random_id=1
 
OP
ziomario

ziomario

Aspiring Daemon

Reaction score: 45
Messages: 616

I've fixed the problem. I'd tried to install and configure tor and I didn't realize that it could be the cause. I mean,I don't know which component of tor make the bridge0 disappear,but the following commands make the bridge0 appear again :

Code:
pkg remove torsocks
pkg remove polipo
pkg remove tor
mv /usr/local/etc/polipo/config /usr/local/etc/polipo/config_
mv /usr/local/etc/tor/torrc /usr/local/etc/tor/torrc_
 

roccobaroccoSC

Aspiring Daemon

Reaction score: 226
Messages: 750

Maybe the tor program did some magic with the bridge0 interface.
Before your last response I was thinking maybe something in the direction of Jails and VNET (interfaces can be moved from the main host to a jail's network stack and the host will not see it anymore) but maybe tor does something similar. I am not familiar. Thanks for sharing the answer.
B.t.w. try to simplify your configuration if you don't need all these services. It's quite complex indeed.
 
OP
ziomario

ziomario

Aspiring Daemon

Reaction score: 45
Messages: 616

yeah man,the first attempt for configuring tor failed. It's a complicated configuration that needs a deeper study. The challenge is only postponed later.
 
Top